Skip to content

Commit 62df7fe

Browse files
author
stlc-bot
committed
feat(brand): add search metadata and country and language filters (#1945)
Stainless-Generated-From: 2456c3ddf6bd00a6022538875513744ea04b8811
1 parent 90701fc commit 62df7fe

2 files changed

Lines changed: 13 additions & 1 deletion

File tree

‎pkg/cmd/brand.go‎

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ var brandRetrieve = requestflag.WithInnerFlags(cli.Command{
130130

131131
var brandSearch = cli.Command{
132132
Name: "search",
133-
Usage: "Find up to 10 brands by name or domain, ordered by popularity. Use the returned\ndomain to retrieve a full brand profile.",
133+
Usage: "Find up to 10 brands by name or domain, ordered by popularity. Optionally filter\nby country and primary language; both filters must match when provided together.\nResults include description, country, and language when available. Use the\nreturned domain to retrieve a full brand profile.",
134134
Suggest: true,
135135
Flags: []cli.Flag{
136136
&requestflag.Flag[string]{
@@ -145,6 +145,16 @@ var brandSearch = cli.Command{
145145
Default: true,
146146
QueryPath: "autocomplete",
147147
},
148+
&requestflag.Flag[string]{
149+
Name: "country",
150+
Usage: "Only return brands in this country, as an uppercase ISO 3166-1 alpha-2 code such as US or GB.",
151+
QueryPath: "country",
152+
},
153+
&requestflag.Flag[string]{
154+
Name: "language",
155+
Usage: "Only return brands with this primary language, such as english or french.",
156+
QueryPath: "language",
157+
},
148158
&requestflag.Flag[[]string]{
149159
Name: "query-by",
150160
Usage: "Fields to match the search term against, as a comma-separated list or repeated parameter: 'name', 'domain', or both. Defaults to both.",

‎pkg/cmd/brand_test.go‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@ func TestBrandSearch(t *testing.T) {
7979
"brand", "search",
8080
"--query", "x",
8181
"--autocomplete=true",
82+
"--country", "US",
83+
"--language", "afrikaans",
8284
"--query-by", "name",
8385
"--tag", "production",
8486
"--tag", "team-alpha",

0 commit comments

Comments
 (0)