From 413f23195eeaea66e50924a17987e901e0793358 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 20 Oct 2026 12:30:41 +0000 Subject: [PATCH] fix(gen): stop backticks in descriptions from becoming flag types in --help pflag reads the first backticked word in a usage string as the flag's value name, so descriptions like 'Requires `arrivalId`' printed `--max-price arrivalId` instead of `--max-price int`. buildHelp now swaps backticks for plain quotes. cmd/ is regenerated against the same spec hash; only flag usage strings change. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01VkPtq7Nyd8XbgFqYQWcYfm --- GENERATION_REPORT.md | 2 +- cmd/gen_bing_serp.go | 6 +++--- cmd/gen_booking_place.go | 12 ++++++------ cmd/gen_booking_search.go | 18 ++++++++--------- cmd/gen_chat_gpt_chat.go | 2 +- cmd/gen_duckduckgo.go | 10 +++++----- cmd/gen_facebook_profile.go | 6 +++--- cmd/gen_glassdoor_listing.go | 4 ++-- cmd/gen_google_events.go | 2 +- cmd/gen_google_finance.go | 4 ++-- cmd/gen_google_flights.go | 24 +++++++++++------------ cmd/gen_google_flights_deals.go | 30 ++++++++++++++--------------- cmd/gen_google_hotels.go | 16 +++++++-------- cmd/gen_google_images.go | 2 +- cmd/gen_google_immersive_product.go | 2 +- cmd/gen_google_maps.go | 2 +- cmd/gen_google_maps_place.go | 2 +- cmd/gen_google_news.go | 8 ++++---- cmd/gen_google_scholar.go | 8 ++++---- cmd/gen_google_scholar_cite.go | 2 +- cmd/gen_google_serp.go | 2 +- cmd/gen_google_serp_light.go | 2 +- cmd/gen_google_shopping.go | 4 ++-- cmd/gen_google_short_videos.go | 2 +- cmd/gen_google_trends.go | 10 +++++----- cmd/gen_indeed_listing.go | 6 +++--- cmd/gen_instagram_comments.go | 6 +++--- cmd/gen_instagram_posts.go | 4 ++-- cmd/gen_instagram_profile.go | 2 +- cmd/gen_redfin_listing.go | 4 ++-- cmd/gen_tiktok_comments.go | 4 ++-- cmd/gen_tiktok_posts.go | 4 ++-- cmd/gen_tiktok_profile.go | 2 +- cmd/gen_tiktok_search.go | 2 +- cmd/gen_tripadvisor_place.go | 2 +- cmd/gen_tripadvisor_reviews.go | 6 +++--- cmd/gen_tripadvisor_search.go | 12 ++++++------ cmd/gen_walmart_product.go | 10 +++++----- cmd/gen_walmart_reviews.go | 18 ++++++++--------- cmd/gen_walmart_search.go | 16 +++++++-------- cmd/gen_web_scraping.go | 16 +++++++-------- cmd/gen_yellowpages_search.go | 2 +- cmd/gen_yelp_place.go | 2 +- cmd/gen_yelp_reviews.go | 12 ++++++------ cmd/gen_yelp_search.go | 4 ++-- cmd/gen_youtube_channel_api.go | 4 ++-- cmd/gen_youtube_search_api.go | 8 ++++---- cmd/gen_youtube_transcript_api.go | 6 +++--- cmd/gen_youtube_video_api.go | 2 +- cmd/gen_zillow_listing.go | 4 ++-- internal/gen/main.go | 5 ++++- 51 files changed, 174 insertions(+), 171 deletions(-) diff --git a/GENERATION_REPORT.md b/GENERATION_REPORT.md index 20db1ae..6042a04 100644 --- a/GENERATION_REPORT.md +++ b/GENERATION_REPORT.md @@ -1,6 +1,6 @@ # Generation Report -Generated at: 2026-10-20T12:26:11Z +Generated at: 2026-10-20T12:30:27Z ## APIs generated (67) - chat-gpt-chat diff --git a/cmd/gen_bing_serp.go b/cmd/gen_bing_serp.go index c29a1d6..e03b15d 100644 --- a/cmd/gen_bing_serp.go +++ b/cmd/gen_bing_serp.go @@ -99,10 +99,10 @@ func newBingSerpCmd() *cobra.Command { _ = cmd.RegisterFlagCompletionFunc("device-type", func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective) { return []string{"desktop", "mobile", "tablet"}, cobra.ShellCompDirectiveNoFileComp }) - cmd.Flags().StringVar(&p_filtersVar, "filters", "", "filters Additional Filtering: Allows applying various filters to narrow search results, including date-based options:\n\n - `ex1:\"ez1\"` – past 24 hours\n - `ex1:\"ez2\"` – past week\n - `ex1:\"ez3\"` – past month\n\nFor complex filters, run a Bing search and copy the filters parameter from the URL.\n") + cmd.Flags().StringVar(&p_filtersVar, "filters", "", "filters Additional Filtering: Allows applying various filters to narrow search results, including date-based options:\n\n - 'ex1:\"ez1\"' – past 24 hours\n - 'ex1:\"ez2\"' – past week\n - 'ex1:\"ez3\"' – past month\n\nFor complex filters, run a Bing search and copy the filters parameter from the URL.\n") cmd.Flags().IntVar(&p_firstVar, "first", 0, "first Result Offset: This parameter specifies the number of search results to skip and is used for implementing pagination. For example, a value of 1 (default) indicates the first page of results, 11 refers to the second page, and 21 to the third page.\n") cmd.Flags().StringVar(&p_latVar, "lat", "", "lat Latitude: GPS latitude for the search origin.") - cmd.Flags().StringVar(&p_locationVar, "location", "Austin, Texas, United States", "location Location: Defines the search’s origin location as free text (e.g. `Austin, Texas`). It is resolved to coordinates to localize the results. For realistic results, set location at the city level. If both `lat` and `lon` are provided, they take precedence and `location` is ignored. If omitted, the proxy’s location may be used.") + cmd.Flags().StringVar(&p_locationVar, "location", "Austin, Texas, United States", "location Location: Defines the search’s origin location as free text (e.g. 'Austin, Texas'). It is resolved to coordinates to localize the results. For realistic results, set location at the city level. If both 'lat' and 'lon' are provided, they take precedence and 'location' is ignored. If omitted, the proxy’s location may be used.") cmd.Flags().StringVar(&p_lonVar, "lon", "", "lon Longitude: GPS longitude for the search origin.") cmd.Flags().StringVar(&p_mktVar, "mkt", "", "mkt Market Code: The two-letter country code for the country to search from.") cmd.Flags().StringVar(&p_qVar, "q", "Coffee", "q Search Query: Specify the search term for which you want to scrape the SERP. (required)") @@ -111,7 +111,7 @@ func newBingSerpCmd() *cobra.Command { _ = cmd.RegisterFlagCompletionFunc("safe-search", func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective) { return []string{"off", "moderate", "strict"}, cobra.ShellCompDirectiveNoFileComp }) - cmd.Flags().StringVar(&p_setLangVar, "set-lang", "", "setLang Interface Language: The language of the user interface and preferred result language. Accepts a two-letter language code (e.g. `en`, `de`) or a locale/script variant (e.g. `en-gb`, `zh-hans`, `pt-br`).") + cmd.Flags().StringVar(&p_setLangVar, "set-lang", "", "setLang Interface Language: The language of the user interface and preferred result language. Accepts a two-letter language code (e.g. 'en', 'de') or a locale/script variant (e.g. 'en-gb', 'zh-hans', 'pt-br').") return cmd } diff --git a/cmd/gen_booking_place.go b/cmd/gen_booking_place.go index 65654cb..28eed71 100644 --- a/cmd/gen_booking_place.go +++ b/cmd/gen_booking_place.go @@ -68,18 +68,18 @@ func newBookingPlaceCmd() *cobra.Command { } cmd.Flags().IntVar(&p_adultsVar, "adults", 2, "adults Adults: Number of adult guests across all rooms. (required)") _ = cmd.MarkFlagRequired("adults") - cmd.Flags().StringVar(&p_checkInDateVar, "check-in-date", "2026-11-17", "checkInDate Check-in Date: Check-in date in `YYYY-MM-DD` format. Must be in the future and earlier than `checkOutDate`. (required)") + cmd.Flags().StringVar(&p_checkInDateVar, "check-in-date", "2026-11-17", "checkInDate Check-in Date: Check-in date in 'YYYY-MM-DD' format. Must be in the future and earlier than 'checkOutDate'. (required)") _ = cmd.MarkFlagRequired("check-in-date") - cmd.Flags().StringVar(&p_checkOutDateVar, "check-out-date", "2026-11-21", "checkOutDate Check-out Date: Check-out date in `YYYY-MM-DD` format. Must be later than `checkInDate`. (required)") + cmd.Flags().StringVar(&p_checkOutDateVar, "check-out-date", "2026-11-21", "checkOutDate Check-out Date: Check-out date in 'YYYY-MM-DD' format. Must be later than 'checkInDate'. (required)") _ = cmd.MarkFlagRequired("check-out-date") - cmd.Flags().IntVar(&p_childrenVar, "children", 0, "children Children Count: Number of child guests across all rooms (0–10). Pass `0` if there are no children. (required)") + cmd.Flags().IntVar(&p_childrenVar, "children", 0, "children Children Count: Number of child guests across all rooms (0–10). Pass '0' if there are no children. (required)") _ = cmd.MarkFlagRequired("children") - cmd.Flags().StringVar(&p_childrenAgesVar, "children-ages", "", "childrenAges Children Ages: Comma-separated list of child ages, one entry per child (each `0`–`17`). Required when `children > 0` and the number of ages must equal `children`.\n\nExample: `1,3,7`\n") - cmd.Flags().StringVar(&p_currencyVar, "currency", "", "currency Currency: Currency of the prices returned in the response. Use `hotelCurrency` to keep each property's native currency.") + cmd.Flags().StringVar(&p_childrenAgesVar, "children-ages", "", "childrenAges Children Ages: Comma-separated list of child ages, one entry per child (each '0'–'17'). Required when 'children > 0' and the number of ages must equal 'children'.\n\nExample: '1,3,7'\n") + cmd.Flags().StringVar(&p_currencyVar, "currency", "", "currency Currency: Currency of the prices returned in the response. Use 'hotelCurrency' to keep each property's native currency.") cmd.Flags().StringVar(&p_languageVar, "language", "", "language Language: Language of the Booking.com interface and localized fields in the response.") cmd.Flags().IntVar(&p_roomsVar, "rooms", 1, "rooms Rooms: Number of rooms to book. (required)") _ = cmd.MarkFlagRequired("rooms") - cmd.Flags().StringVar(&p_urlVar, "url", "https://www.booking.com/hotel/fr/le-bristol-paris.html", "url Property URL: Full Booking.com URL of the property page. Only `booking.com` and `www.booking.com` hosts are accepted. (required)") + cmd.Flags().StringVar(&p_urlVar, "url", "https://www.booking.com/hotel/fr/le-bristol-paris.html", "url Property URL: Full Booking.com URL of the property page. Only 'booking.com' and 'www.booking.com' hosts are accepted. (required)") _ = cmd.MarkFlagRequired("url") return cmd diff --git a/cmd/gen_booking_search.go b/cmd/gen_booking_search.go index 1fd199c..081f008 100644 --- a/cmd/gen_booking_search.go +++ b/cmd/gen_booking_search.go @@ -246,14 +246,14 @@ func newBookingSearchCmd() *cobra.Command { return []string{"twinBeds", "doubleBed"}, cobra.ShellCompDirectiveNoFileComp }) cmd.Flags().IntVar(&p_bedroomsVar, "bedrooms", 0, "bedrooms Bedrooms: Minimum number of bedrooms in the property.") - cmd.Flags().StringVar(&p_checkInDateVar, "check-in-date", "2026-11-17", "checkInDate Check-in Date: Check-in date in `YYYY-MM-DD` format. Must be in the future and earlier than `checkOutDate`. (required)") + cmd.Flags().StringVar(&p_checkInDateVar, "check-in-date", "2026-11-17", "checkInDate Check-in Date: Check-in date in 'YYYY-MM-DD' format. Must be in the future and earlier than 'checkOutDate'. (required)") _ = cmd.MarkFlagRequired("check-in-date") - cmd.Flags().StringVar(&p_checkOutDateVar, "check-out-date", "2026-11-21", "checkOutDate Check-out Date: Check-out date in `YYYY-MM-DD` format. Must be later than `checkInDate`. (required)") + cmd.Flags().StringVar(&p_checkOutDateVar, "check-out-date", "2026-11-21", "checkOutDate Check-out Date: Check-out date in 'YYYY-MM-DD' format. Must be later than 'checkInDate'. (required)") _ = cmd.MarkFlagRequired("check-out-date") - cmd.Flags().IntVar(&p_childrenVar, "children", 0, "children Children Count: Number of child guests across all rooms (0–10). Pass `0` if there are no children. (required)") + cmd.Flags().IntVar(&p_childrenVar, "children", 0, "children Children Count: Number of child guests across all rooms (0–10). Pass '0' if there are no children. (required)") _ = cmd.MarkFlagRequired("children") - cmd.Flags().StringVar(&p_childrenAgesVar, "children-ages", "", "childrenAges Children Ages: Comma-separated list of child ages, one entry per child (each `0`–`17`). Required when `children > 0` and the number of ages must equal `children`.\n\nExample: `1,3,7`\n") - cmd.Flags().StringVar(&p_currencyVar, "currency", "", "currency Currency: Currency of the prices returned in the response. Use `hotelCurrency` to keep each property's native currency.") + cmd.Flags().StringVar(&p_childrenAgesVar, "children-ages", "", "childrenAges Children Ages: Comma-separated list of child ages, one entry per child (each '0'–'17'). Required when 'children > 0' and the number of ages must equal 'children'.\n\nExample: '1,3,7'\n") + cmd.Flags().StringVar(&p_currencyVar, "currency", "", "currency Currency: Currency of the prices returned in the response. Use 'hotelCurrency' to keep each property's native currency.") cmd.Flags().StringSliceVar(&p_distanceFromCenterVar, "distance-from-center", nil, "distanceFromCenter[] Distance from Center: Filter by distance from the destination center. Multiple values are combined with OR.") _ = cmd.RegisterFlagCompletionFunc("distance-from-center", func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective) { return []string{"lessThan1Km", "lessThan3Km", "lessThan5Km"}, cobra.ShellCompDirectiveNoFileComp @@ -262,7 +262,7 @@ func newBookingSearchCmd() *cobra.Command { _ = cmd.RegisterFlagCompletionFunc("facilities", func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective) { return []string{"swimmingPool", "parking", "spa", "freeWifi", "hotTubJacuzzi", "airportShuttle", "fitnessCenter", "restaurant", "nonSmokingRooms", "frontDesk24Hour", "electricVehicleChargingStation", "wheelchairAccessible", "roomService"}, cobra.ShellCompDirectiveNoFileComp }) - cmd.Flags().StringVar(&p_keywordVar, "keyword", "Paris", "keyword Search Query: Free-text destination query. Usually a city, region or neighborhood (e.g. `Paris`, `Manhattan, New York`); a specific property name is also accepted. (required)") + cmd.Flags().StringVar(&p_keywordVar, "keyword", "Paris", "keyword Search Query: Free-text destination query. Usually a city, region or neighborhood (e.g. 'Paris', 'Manhattan, New York'); a specific property name is also accepted. (required)") _ = cmd.MarkFlagRequired("keyword") cmd.Flags().StringVar(&p_languageVar, "language", "", "language Language: Language of the Booking.com interface and localized fields in the response.") cmd.Flags().StringSliceVar(&p_mealsVar, "meals", nil, "meals[] Meals: Filter by available meal plans. Multiple values are combined with OR.") @@ -273,9 +273,9 @@ func newBookingSearchCmd() *cobra.Command { _ = cmd.RegisterFlagCompletionFunc("online-payment", func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective) { return []string{"acceptsOnlinePayments"}, cobra.ShellCompDirectiveNoFileComp }) - cmd.Flags().IntVar(&p_pageVar, "page", 0, "page Page Number: Page number of the search results. Booking.com returns 25 results per page; pass `2` for results 26–50, `3` for 51–75, etc.") - cmd.Flags().Float64Var(&p_price_maxVar, "price-max", 0, "price[max] Price Max: Maximum total price for the stay, in the requested `currency`. Must be `>= 20` and greater than `price[min]`. Required if `price[min]` is omitted.") - cmd.Flags().Float64Var(&p_price_minVar, "price-min", 0, "price[min] Price Min: Minimum total price for the stay, in the requested `currency`. Must be `>= 10`. Required if `price[max]` is omitted.") + cmd.Flags().IntVar(&p_pageVar, "page", 0, "page Page Number: Page number of the search results. Booking.com returns 25 results per page; pass '2' for results 26–50, '3' for 51–75, etc.") + cmd.Flags().Float64Var(&p_price_maxVar, "price-max", 0, "price[max] Price Max: Maximum total price for the stay, in the requested 'currency'. Must be '>= 20' and greater than 'price[min]'. Required if 'price[min]' is omitted.") + cmd.Flags().Float64Var(&p_price_minVar, "price-min", 0, "price[min] Price Min: Minimum total price for the stay, in the requested 'currency'. Must be '>= 10'. Required if 'price[max]' is omitted.") cmd.Flags().StringSliceVar(&p_propertyAccessibilityVar, "property-accessibility", nil, "propertyAccessibility[] Property Accessibility: Filter by property-level accessibility features. Multiple values are combined with OR.") _ = cmd.RegisterFlagCompletionFunc("property-accessibility", func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective) { return []string{"auditoryGuidance", "toiletWithGrabRails", "visualAidsTactileSigns", "visualAidsBraille", "bathroomEmergencyCord", "raisedToilet", "loweredSink"}, cobra.ShellCompDirectiveNoFileComp diff --git a/cmd/gen_chat_gpt_chat.go b/cmd/gen_chat_gpt_chat.go index 6be467d..a2f0017 100644 --- a/cmd/gen_chat_gpt_chat.go +++ b/cmd/gen_chat_gpt_chat.go @@ -50,7 +50,7 @@ func newChatGptChatCmd() *cobra.Command { } cmd.Flags().StringVar(&p_promptVar, "prompt", "What are the latest developments in the James Webb Space Telescope this month?", "prompt Prompt: The question or instruction to send to ChatGPT, up to 8000 characters. A prompt that asks about recent events makes ChatGPT search the web and return sources; a general-knowledge prompt is answered from the model alone. The prompt also decides the language of the answer — write it in the language you want back, or ask for one explicitly (\"Antworte auf Deutsch\"). (required)") _ = cmd.MarkFlagRequired("prompt") - cmd.Flags().StringVar(&p_timezoneVar, "timezone", "Europe/Berlin", "timezone Timezone: IANA time zone name, for example `America/Chicago` or `Europe/Berlin`. It sets what ChatGPT treats as the current date and time, which matters for prompts that say \"today\", \"this week\" or \"latest\".") + cmd.Flags().StringVar(&p_timezoneVar, "timezone", "Europe/Berlin", "timezone Timezone: IANA time zone name, for example 'America/Chicago' or 'Europe/Berlin'. It sets what ChatGPT treats as the current date and time, which matters for prompts that say \"today\", \"this week\" or \"latest\".") return cmd } diff --git a/cmd/gen_duckduckgo.go b/cmd/gen_duckduckgo.go index 285e7b7..a4c17eb 100644 --- a/cmd/gen_duckduckgo.go +++ b/cmd/gen_duckduckgo.go @@ -95,7 +95,7 @@ func newDuckduckgoCmd() *cobra.Command { return WriteResponse(c, resp) }, } - cmd.Flags().StringVar(&p_ccVar, "cc", "", "cc Country: The two-letter country code for the country to search from. Combined with `setLang` to form the DuckDuckGo region. Ignored if `kl` is set. [allowed: ar|au|at|be|br|ca|cl|dk|fi|fr|de|hk|in|id|it|jp|kr|my|mx|nl|nz|no|cn|pl|pt|ph|ru|sa|za|es|se|ch|tw|tr|gb|us]") + cmd.Flags().StringVar(&p_ccVar, "cc", "", "cc Country: The two-letter country code for the country to search from. Combined with 'setLang' to form the DuckDuckGo region. Ignored if 'kl' is set. [allowed: ar|au|at|be|br|ca|cl|dk|fi|fr|de|hk|in|id|it|jp|kr|my|mx|nl|nz|no|cn|pl|pt|ph|ru|sa|za|es|se|ch|tw|tr|gb|us]") _ = cmd.RegisterFlagCompletionFunc("cc", func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective) { return []string{"ar", "au", "at", "be", "br", "ca", "cl", "dk", "fi", "fr", "de", "hk", "in", "id", "it", "jp", "kr", "my", "mx", "nl", "nz", "no", "cn", "pl", "pt", "ph", "ru", "sa", "za", "es", "se", "ch", "tw", "tr", "gb", "us"}, cobra.ShellCompDirectiveNoFileComp }) @@ -103,17 +103,17 @@ func newDuckduckgoCmd() *cobra.Command { _ = cmd.RegisterFlagCompletionFunc("device-type", func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective) { return []string{"desktop", "mobile", "tablet"}, cobra.ShellCompDirectiveNoFileComp }) - cmd.Flags().StringVar(&p_klVar, "kl", "", "kl Region: DuckDuckGo region code in `-` form (e.g. `us-en`, `de-de`). Sets country and interface language at once; takes precedence over `cc`/`setLang`. Use `wt-wt` for no region. [allowed: ar-es|au-en|at-de|be-nl|be-fr|br-pt|ca-en|ca-fr|cl-es|dk-da|fi-fi|fr-fr|de-de|hk-tzh|in-en|id-en|it-it|jp-jp|kr-kr|my-en|mx-es|nl-nl|nz-en|no-no|cn-zh|pl-pl|ph-en|ru-ru|za-en|es-es|se-sv|ch-de|tw-tzh|tr-tr|uk-en|us-en|wt-wt]") + cmd.Flags().StringVar(&p_klVar, "kl", "", "kl Region: DuckDuckGo region code in '-' form (e.g. 'us-en', 'de-de'). Sets country and interface language at once; takes precedence over 'cc'/'setLang'. Use 'wt-wt' for no region. [allowed: ar-es|au-en|at-de|be-nl|be-fr|br-pt|ca-en|ca-fr|cl-es|dk-da|fi-fi|fr-fr|de-de|hk-tzh|in-en|id-en|it-it|jp-jp|kr-kr|my-en|mx-es|nl-nl|nz-en|no-no|cn-zh|pl-pl|ph-en|ru-ru|za-en|es-es|se-sv|ch-de|tw-tzh|tr-tr|uk-en|us-en|wt-wt]") _ = cmd.RegisterFlagCompletionFunc("kl", func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective) { return []string{"ar-es", "au-en", "at-de", "be-nl", "be-fr", "br-pt", "ca-en", "ca-fr", "cl-es", "dk-da", "fi-fi", "fr-fr", "de-de", "hk-tzh", "in-en", "id-en", "it-it", "jp-jp", "kr-kr", "my-en", "mx-es", "nl-nl", "nz-en", "no-no", "cn-zh", "pl-pl", "ph-en", "ru-ru", "za-en", "es-es", "se-sv", "ch-de", "tw-tzh", "tr-tr", "uk-en", "us-en", "wt-wt"}, cobra.ShellCompDirectiveNoFileComp }) - cmd.Flags().StringVar(&p_nextPageTokenVar, "next-page-token", "", "nextPageToken Next Page Token: Opaque token returned in each response as `nextPageToken`. Pass it back (in place of `q`) to fetch the next page of results. It carries a pre-signed page URL bound to the original request's session, so it must be used as-is and cannot be constructed manually. Absent when there are no further pages.\n") - cmd.Flags().StringVar(&p_qVar, "q", "Coffee", "q Search Query: Specify the search term for which you want to scrape the SERP. Required unless `nextPageToken` is provided (which carries the query of the page it continues).") + cmd.Flags().StringVar(&p_nextPageTokenVar, "next-page-token", "", "nextPageToken Next Page Token: Opaque token returned in each response as 'nextPageToken'. Pass it back (in place of 'q') to fetch the next page of results. It carries a pre-signed page URL bound to the original request's session, so it must be used as-is and cannot be constructed manually. Absent when there are no further pages.\n") + cmd.Flags().StringVar(&p_qVar, "q", "Coffee", "q Search Query: Specify the search term for which you want to scrape the SERP. Required unless 'nextPageToken' is provided (which carries the query of the page it continues).") cmd.Flags().StringVar(&p_safeSearchVar, "safe-search", "", "safeSearch Adult Content Filtering: Adult Content Filtering option. [allowed: off|moderate|strict]") _ = cmd.RegisterFlagCompletionFunc("safe-search", func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective) { return []string{"off", "moderate", "strict"}, cobra.ShellCompDirectiveNoFileComp }) - cmd.Flags().StringVar(&p_setLangVar, "set-lang", "", "setLang Interface Language: The preferred result/interface language code — usually two letters (e.g. `en`, `de`), with script-tag variants for some languages (e.g. `zh-hans`, `zh-hant`). Combined with `cc` to form the DuckDuckGo region. Ignored if `kl` is set. [allowed: ar|ca|zh-hans|zh-hant|hr|cs|da|nl|en|et|fi|fr|de|he|hu|it|ja|ko|lv|lt|nb|pl|pt|ro|ru|sk|sl|es|sv|th|tr|uk|vi]") + cmd.Flags().StringVar(&p_setLangVar, "set-lang", "", "setLang Interface Language: The preferred result/interface language code — usually two letters (e.g. 'en', 'de'), with script-tag variants for some languages (e.g. 'zh-hans', 'zh-hant'). Combined with 'cc' to form the DuckDuckGo region. Ignored if 'kl' is set. [allowed: ar|ca|zh-hans|zh-hant|hr|cs|da|nl|en|et|fi|fr|de|he|hu|it|ja|ko|lv|lt|nb|pl|pt|ro|ru|sk|sl|es|sv|th|tr|uk|vi]") _ = cmd.RegisterFlagCompletionFunc("set-lang", func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective) { return []string{"ar", "ca", "zh-hans", "zh-hant", "hr", "cs", "da", "nl", "en", "et", "fi", "fr", "de", "he", "hu", "it", "ja", "ko", "lv", "lt", "nb", "pl", "pt", "ro", "ru", "sk", "sl", "es", "sv", "th", "tr", "uk", "vi"}, cobra.ShellCompDirectiveNoFileComp }) diff --git a/cmd/gen_facebook_profile.go b/cmd/gen_facebook_profile.go index 5f58f55..71935a6 100644 --- a/cmd/gen_facebook_profile.go +++ b/cmd/gen_facebook_profile.go @@ -57,13 +57,13 @@ func newFacebookProfileCmd() *cobra.Command { return WriteResponse(c, resp) }, } - cmd.Flags().StringVar(&p_handleVar, "handle", "nike", "handle Facebook Handle: The Facebook username of the page or profile you want to scrape, with or without the `@` symbol, or its numeric profile id (the `id` of a `profile.php?id=…` URL), e.g. `nike` or `61550916779928`. Groups and private personal accounts are not supported. (required)") + cmd.Flags().StringVar(&p_handleVar, "handle", "nike", "handle Facebook Handle: The Facebook username of the page or profile you want to scrape, with or without the '@' symbol, or its numeric profile id (the 'id' of a 'profile.php?id=…' URL), e.g. 'nike' or '61550916779928'. Groups and private personal accounts are not supported. (required)") _ = cmd.MarkFlagRequired("handle") - cmd.Flags().StringVar(&p_languageVar, "language", "", "language Language: Language the page is rendered in. Facebook serves a page in the language of the request, so this changes the localised strings (`followersCount`, `followingCount`, `category`) while the exact figures (`likesCount`, `talkingAboutCount`) stay numeric in every language. [allowed: ar|bn|cs|da|de|el|en|es|fi|fil|fr|he|hi|hu|id|it|ja|ko|ms|nb|nl|pl|pt|ro|ru|sv|th|tr|uk|vi|zh-hans|zh-hant]") + cmd.Flags().StringVar(&p_languageVar, "language", "", "language Language: Language the page is rendered in. Facebook serves a page in the language of the request, so this changes the localised strings ('followersCount', 'followingCount', 'category') while the exact figures ('likesCount', 'talkingAboutCount') stay numeric in every language. [allowed: ar|bn|cs|da|de|el|en|es|fi|fil|fr|he|hi|hu|id|it|ja|ko|ms|nb|nl|pl|pt|ro|ru|sv|th|tr|uk|vi|zh-hans|zh-hant]") _ = cmd.RegisterFlagCompletionFunc("language", func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective) { return []string{"ar", "bn", "cs", "da", "de", "el", "en", "es", "fi", "fil", "fr", "he", "hi", "hu", "id", "it", "ja", "ko", "ms", "nb", "nl", "pl", "pt", "ro", "ru", "sv", "th", "tr", "uk", "vi", "zh-hans", "zh-hant"}, cobra.ShellCompDirectiveNoFileComp }) - cmd.Flags().StringVar(&p_nextPageTokenVar, "next-page-token", "", "nextPageToken Next Page Token: Token from the `pagination.nextPageToken` field of a previous response; the page it leads to is reported as `pagination.nextPage`. Each paginated request returns the next three posts of the feed and a fresh token; the token is absent once the feed ends. Every request is billed separately.") + cmd.Flags().StringVar(&p_nextPageTokenVar, "next-page-token", "", "nextPageToken Next Page Token: Token from the 'pagination.nextPageToken' field of a previous response; the page it leads to is reported as 'pagination.nextPage'. Each paginated request returns the next three posts of the feed and a fresh token; the token is absent once the feed ends. Every request is billed separately.") return cmd } diff --git a/cmd/gen_glassdoor_listing.go b/cmd/gen_glassdoor_listing.go index 233820e..fb70cdd 100644 --- a/cmd/gen_glassdoor_listing.go +++ b/cmd/gen_glassdoor_listing.go @@ -121,11 +121,11 @@ func newGlassdoorListingCmd() *cobra.Command { _ = cmd.MarkFlagRequired("keyword") cmd.Flags().StringVar(&p_locationVar, "location", "New York, NY", "location Location: The location to search for job listings. (required)") _ = cmd.MarkFlagRequired("location") - cmd.Flags().IntVar(&p_maxSalaryVar, "max-salary", 150000, "maxSalary Maximum Salary: Upper bound of the yearly pay range, must be greater than `minSalary`. Can be used on its own.") + cmd.Flags().IntVar(&p_maxSalaryVar, "max-salary", 150000, "maxSalary Maximum Salary: Upper bound of the yearly pay range, must be greater than 'minSalary'. Can be used on its own.") cmd.Flags().IntVar(&p_minRatingVar, "min-rating", 0, "minRating Company Rating: Returns jobs from companies rated at least this high. Glassdoor applies the filter approximately, so a few companies rated slightly below the value can appear. [allowed: 1, 2, 3, 4]") cmd.Flags().IntVar(&p_minSalaryVar, "min-salary", 90000, "minSalary Minimum Salary: Lower bound of the yearly pay range. A job is kept when its estimated pay range overlaps the requested one; hourly and monthly pay are converted to yearly. Jobs without a pay estimate are excluded when a salary filter is set.") cmd.Flags().StringVar(&p_nextPageTokenVar, "next-page-token", "", "nextPageToken Next Page Token: Token for fetching the next page of jobs, taken from the pagination of a previous response. The token keeps the filters of the search it came from, so they do not need to be sent again.") - cmd.Flags().IntVar(&p_radiusVar, "radius", 0, "radius Distance: Search radius around the location, in miles. `0` keeps only jobs in the location itself. Glassdoor uses 25 miles when this is not set. [allowed: 0, 5, 10, 15, 25, 50, 100]") + cmd.Flags().IntVar(&p_radiusVar, "radius", 0, "radius Distance: Search radius around the location, in miles. '0' keeps only jobs in the location itself. Glassdoor uses 25 miles when this is not set. [allowed: 0, 5, 10, 15, 25, 50, 100]") cmd.Flags().BoolVar(&p_remoteOnlyVar, "remote-only", false, "remoteOnly Remote Only: Returns only remote jobs. Defaults to false.") cmd.Flags().StringVar(&p_sortVar, "sort", "recent", "sort Sort By: The sorting option for the search results. [allowed: recent|relevant]") _ = cmd.RegisterFlagCompletionFunc("sort", func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective) { diff --git a/cmd/gen_google_events.go b/cmd/gen_google_events.go index 93ccffa..e37f6c0 100644 --- a/cmd/gen_google_events.go +++ b/cmd/gen_google_events.go @@ -44,7 +44,7 @@ func newGoogleEventsCmd() *cobra.Command { return WriteResponse(c, resp) }, } - cmd.Flags().StringVar(&p_pageTokenVar, "page-token", "", "pageToken Page Token: Token identifying a single event, taken from the `pageToken` field of an `eventsResults` entry in a `google/serp` response. Expires a few minutes after it is minted. (required)") + cmd.Flags().StringVar(&p_pageTokenVar, "page-token", "", "pageToken Page Token: Token identifying a single event, taken from the 'pageToken' field of an 'eventsResults' entry in a 'google/serp' response. Expires a few minutes after it is minted. (required)") _ = cmd.MarkFlagRequired("page-token") return cmd diff --git a/cmd/gen_google_finance.go b/cmd/gen_google_finance.go index 509b55a..64a5a84 100644 --- a/cmd/gen_google_finance.go +++ b/cmd/gen_google_finance.go @@ -58,9 +58,9 @@ func newGoogleFinanceCmd() *cobra.Command { }, } cmd.Flags().StringVar(&p_hlVar, "hl", "", "hl Language: The two-letter language code for the language you want to use for the search.") - cmd.Flags().StringVar(&p_qVar, "q", "GOOGL:NASDAQ", "q Ticker: Ticker as Google Finance writes it, e.g. `GOOGL:NASDAQ`, `.INX:INDEXSP`, `EUR-USD` or `BTC-USD`. An unknown ticker returns `suggestions`. (required)") + cmd.Flags().StringVar(&p_qVar, "q", "GOOGL:NASDAQ", "q Ticker: Ticker as Google Finance writes it, e.g. 'GOOGL:NASDAQ', '.INX:INDEXSP', 'EUR-USD' or 'BTC-USD'. An unknown ticker returns 'suggestions'. (required)") _ = cmd.MarkFlagRequired("q") - cmd.Flags().StringVar(&p_windowVar, "window", "", "window Time Range: Time range of the price chart in `graph`. [allowed: 1D|5D|1M|6M|YTD|1Y|5Y|MAX]") + cmd.Flags().StringVar(&p_windowVar, "window", "", "window Time Range: Time range of the price chart in 'graph'. [allowed: 1D|5D|1M|6M|YTD|1Y|5Y|MAX]") _ = cmd.RegisterFlagCompletionFunc("window", func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective) { return []string{"1D", "5D", "1M", "6M", "YTD", "1Y", "5Y", "MAX"}, cobra.ShellCompDirectiveNoFileComp }) diff --git a/cmd/gen_google_flights.go b/cmd/gen_google_flights.go index dd96541..f2f264f 100644 --- a/cmd/gen_google_flights.go +++ b/cmd/gen_google_flights.go @@ -181,34 +181,34 @@ func newGoogleFlightsCmd() *cobra.Command { }, } cmd.Flags().IntVar(&p_adultsVar, "adults", 0, "adults Adults: Number of adult passengers (>= 1 if specified).\n") - cmd.Flags().StringVar(&p_arrivalIdVar, "arrival-id", "JFK", "arrivalId Arrival airport code / location kgmid: Specifies the arrival airport code (IATA) or location kgmid.\n\n - **IATA Code**: A 3-letter uppercase code (e.g., `SFO` for San Francisco, `LHR` for London Heathrow). Search on [IATA](https://www.iata.org/en/publications/directories/code-search).\n - **Location kgmid**: A string starting with `/m/`, found in Wikidata under \"Freebase ID\" (e.g., `/m/02_286` for New York, NY).\n\nMultiple values can be separated by commas (e.g., `JFK,LGA,/m/0hptm`).\n (required)") + cmd.Flags().StringVar(&p_arrivalIdVar, "arrival-id", "JFK", "arrivalId Arrival airport code / location kgmid: Specifies the arrival airport code (IATA) or location kgmid.\n\n - **IATA Code**: A 3-letter uppercase code (e.g., 'SFO' for San Francisco, 'LHR' for London Heathrow). Search on [IATA](https://www.iata.org/en/publications/directories/code-search).\n - **Location kgmid**: A string starting with '/m/', found in Wikidata under \"Freebase ID\" (e.g., '/m/02_286' for New York, NY).\n\nMultiple values can be separated by commas (e.g., 'JFK,LGA,/m/0hptm').\n (required)") _ = cmd.MarkFlagRequired("arrival-id") cmd.Flags().IntVar(&p_bagsVar, "bags", 0, "bags Number of Bags: Number of carry-on bags per passenger.\n") - cmd.Flags().StringVar(&p_bookingTokenVar, "booking-token", "", "bookingToken Booking Token: Used to request booking options for selected flights. This token is found in the flight results and cannot be used with `departureToken`.\n") + cmd.Flags().StringVar(&p_bookingTokenVar, "booking-token", "", "bookingToken Booking Token: Used to request booking options for selected flights. This token is found in the flight results and cannot be used with 'departureToken'.\n") cmd.Flags().IntVar(&p_childrenVar, "children", 0, "children Children: Number of child passengers.\n") cmd.Flags().StringVar(&p_currencyVar, "currency", "", "currency Currency: Parameter defines the currency of the returned prices") - cmd.Flags().BoolVar(&p_deepSearchVar, "deep-search", false, "deepSearch Deep Search: Enable deep search. Returns the same results as Google Flights in a browser, but takes longer to respond. Default is `false`.\n") - cmd.Flags().StringVar(&p_departureIdVar, "departure-id", "LHR", "departureId Departure airport code / location kgmid: Specifies the departure airport code (IATA) or location kgmid.\n\n - **IATA Code**: A 3-letter uppercase code (e.g., SFO for San Francisco, LHR for London Heathrow). Search on [IATA](https://www.iata.org/en/publications/directories/code-search).\n - **Location kgmid**: A string starting with `/m/`, found in Wikidata under \"Freebase ID\" (e.g., `/m/02_286` for New York, NY).\n\nMultiple values can be separated by commas (e.g., `JFK,LGA,/m/0hptm`).\n (required)") + cmd.Flags().BoolVar(&p_deepSearchVar, "deep-search", false, "deepSearch Deep Search: Enable deep search. Returns the same results as Google Flights in a browser, but takes longer to respond. Default is 'false'.\n") + cmd.Flags().StringVar(&p_departureIdVar, "departure-id", "LHR", "departureId Departure airport code / location kgmid: Specifies the departure airport code (IATA) or location kgmid.\n\n - **IATA Code**: A 3-letter uppercase code (e.g., SFO for San Francisco, LHR for London Heathrow). Search on [IATA](https://www.iata.org/en/publications/directories/code-search).\n - **Location kgmid**: A string starting with '/m/', found in Wikidata under \"Freebase ID\" (e.g., '/m/02_286' for New York, NY).\n\nMultiple values can be separated by commas (e.g., 'JFK,LGA,/m/0hptm').\n (required)") _ = cmd.MarkFlagRequired("departure-id") cmd.Flags().StringVar(&p_departureTokenVar, "departure-token", "", "departureToken Departure Token: Used to select a flight and retrieve return flights for a round trip or the next leg of the itinerary for a multi-city trip.\n") - cmd.Flags().StringVar(&p_excludeAirlinesVar, "exclude-airlines", "", "excludeAirlines Exclude Airlines: A comma separated list of airline codes to exclude from results. You can search for airline codes on [IATA](https://www.iata.org/en/publications/directories/code-search). For example, `UA` is United Airlines.\n") + cmd.Flags().StringVar(&p_excludeAirlinesVar, "exclude-airlines", "", "excludeAirlines Exclude Airlines: A comma separated list of airline codes to exclude from results. You can search for airline codes on [IATA](https://www.iata.org/en/publications/directories/code-search). For example, 'UA' is United Airlines.\n") cmd.Flags().StringVar(&p_excludeConnectionsVar, "exclude-connections", "", "excludeConnections Exclude Connections: A comma separated list of specific airports to exclude as connections.\n") cmd.Flags().StringVar(&p_glVar, "gl", "", "gl Country: The two-letter country code for the country you want to limit the search to.") cmd.Flags().StringVar(&p_hlVar, "hl", "", "hl Language: The two-letter language code for the language you want to use for the search.") - cmd.Flags().StringVar(&p_includeAirlinesVar, "include-airlines", "", "includeAirlines Include Airlines: A comma separated list of airline codes to exclusively include in results. You can search for airline codes on [IATA](https://www.iata.org/en/publications/directories/code-search). For example, `UA` is United Airlines.\n\n`excludeAirlines` and `includeAirlines` parameters can't be used together.\n") + cmd.Flags().StringVar(&p_includeAirlinesVar, "include-airlines", "", "includeAirlines Include Airlines: A comma separated list of airline codes to exclusively include in results. You can search for airline codes on [IATA](https://www.iata.org/en/publications/directories/code-search). For example, 'UA' is United Airlines.\n\n'excludeAirlines' and 'includeAirlines' parameters can't be used together.\n") cmd.Flags().StringVar(&p_includeConnectionsVar, "include-connections", "", "includeConnections Include Connections: A comma separated list of specific airports to allow as connections.\n") cmd.Flags().IntVar(&p_infantsInSeatVar, "infants-in-seat", 0, "infantsInSeat Infants in Seat: Number of infants occupying seats.\n") cmd.Flags().IntVar(&p_infantsOnLapVar, "infants-on-lap", 0, "infantsOnLap Infants on Lap: Number of infants sitting on an adult's lap.\n") - cmd.Flags().StringVar(&p_layoverDurationVar, "layover-duration", "", "layoverDuration Maximum Layover Duration: Set the maximum layover duration in minutes to filter flights. For example, `120, 360` filters layovers between 2 hours and 6 hours, while `45, 180` allows layovers from 45 minutes to 3 hours.\n") + cmd.Flags().StringVar(&p_layoverDurationVar, "layover-duration", "", "layoverDuration Maximum Layover Duration: Set the maximum layover duration in minutes to filter flights. For example, '120, 360' filters layovers between 2 hours and 6 hours, while '45, 180' allows layovers from 45 minutes to 3 hours.\n") cmd.Flags().BoolVar(&p_lessEmissionsVar, "less-emissions", false, "lessEmissions Fewer Emissions: Prefer flight options with lower carbon emissions.\n") cmd.Flags().IntVar(&p_maxDurationVar, "max-duration", 0, "maxDuration Maximum Flight Duration: The maximum total flight duration in minutes.\n") cmd.Flags().Float64Var(&p_maxPriceVar, "max-price", 0, "maxPrice Maximum Price: Maximum price limit for the flight search, in the selected currency.\n") - cmd.Flags().StringVar(&p_multiCityJsonVar, "multi-city-json", "", "multiCityJson Multi-city JSON: This parameter specifies flight details for multi-city trips. It is a JSON string containing multiple flight objects. Each object must include the following fields:\n\n- **departureId** – The departure airport code or location KGMID. Uses the same format as the main `departureId` parameter.\n- **arrivalId** – The arrival airport code or location KGMID. Uses the same format as the main `arrivalId` parameter.\n- **date** – The flight date. Uses the same format as the `outboundDate` parameter.\n- **times** *(optional)* – The time range for the flight. Uses the same format as the `outboundTimes` parameter.\n") + cmd.Flags().StringVar(&p_multiCityJsonVar, "multi-city-json", "", "multiCityJson Multi-city JSON: This parameter specifies flight details for multi-city trips. It is a JSON string containing multiple flight objects. Each object must include the following fields:\n\n- **departureId** – The departure airport code or location KGMID. Uses the same format as the main 'departureId' parameter.\n- **arrivalId** – The arrival airport code or location KGMID. Uses the same format as the main 'arrivalId' parameter.\n- **date** – The flight date. Uses the same format as the 'outboundDate' parameter.\n- **times** *(optional)* – The time range for the flight. Uses the same format as the 'outboundTimes' parameter.\n") cmd.Flags().StringVar(&p_outboundDateVar, "outbound-date", "2026-11-17", "outboundDate Outbound Date: The outbound travel date in 'yyyy-MM-dd' format.\n (required)") _ = cmd.MarkFlagRequired("outbound-date") - cmd.Flags().StringVar(&p_outboundTimesVar, "outbound-times", "", "outboundTimes Outbound Times: Set up to 4 time boundaries (2 for departure, 2 for arrival) to filter flights. Each number represents the start of an hour.\n\nExamples:\n - `6,20` → 6:00 AM - 9:00 PM departure\n - `1,15` → 1:00 AM - 4:00 PM departure\n - `7,18,2,21` → 7:00 AM - 9:00 PM departure, 2:00 AM - 10:00 PM arrival\n") - cmd.Flags().StringVar(&p_returnDateVar, "return-date", "2026-11-24", "returnDate Return Date: The return travel date in 'yyyy-MM-dd' format. Required when **type** is `roundTrip`.\n") - cmd.Flags().StringVar(&p_returnTimesVar, "return-times", "", "returnTimes Return Times: Set up to 4 time boundaries (2 for departure, 2 for arrival) to filter return flights. Each number represents the start of an hour.\n\nExamples:\n - `6,20` → 6:00 AM - 9:00 PM departure\n - `1,15` → 1:00 AM - 4:00 PM departure\n - `7,18,2,21` → 7:00 AM - 9:00 PM departure, 2:00 AM - 10:00 PM arrival\n") + cmd.Flags().StringVar(&p_outboundTimesVar, "outbound-times", "", "outboundTimes Outbound Times: Set up to 4 time boundaries (2 for departure, 2 for arrival) to filter flights. Each number represents the start of an hour.\n\nExamples:\n - '6,20' → 6:00 AM - 9:00 PM departure\n - '1,15' → 1:00 AM - 4:00 PM departure\n - '7,18,2,21' → 7:00 AM - 9:00 PM departure, 2:00 AM - 10:00 PM arrival\n") + cmd.Flags().StringVar(&p_returnDateVar, "return-date", "2026-11-24", "returnDate Return Date: The return travel date in 'yyyy-MM-dd' format. Required when **type** is 'roundTrip'.\n") + cmd.Flags().StringVar(&p_returnTimesVar, "return-times", "", "returnTimes Return Times: Set up to 4 time boundaries (2 for departure, 2 for arrival) to filter return flights. Each number represents the start of an hour.\n\nExamples:\n - '6,20' → 6:00 AM - 9:00 PM departure\n - '1,15' → 1:00 AM - 4:00 PM departure\n - '7,18,2,21' → 7:00 AM - 9:00 PM departure, 2:00 AM - 10:00 PM arrival\n") cmd.Flags().BoolVar(&p_showHiddenVar, "show-hidden", false, "showHidden Show Hidden Fares: Indicates whether to include hidden options in the results.\n") cmd.Flags().StringVar(&p_sortByVar, "sort-by", "", "sortBy Sort By: Sort the flight results based on price, departure time, arrival time, etc.\n [allowed: topFlights|price|departureTime|arrivalTime|duration|emissions]") _ = cmd.RegisterFlagCompletionFunc("sort-by", func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective) { @@ -222,7 +222,7 @@ func newGoogleFlightsCmd() *cobra.Command { _ = cmd.RegisterFlagCompletionFunc("travel-class", func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective) { return []string{"economy", "premiumEconomy", "business", "first"}, cobra.ShellCompDirectiveNoFileComp }) - cmd.Flags().StringVar(&p_typeVar, "type", "", "type Flight Type: Specifies the type of flight. Options:\n\n - `roundTrip` (default)\n - `oneWay`\n - `multiCity` (requires `multiCityJson` for flight details)\n\nFor round trips, retrieve return flight details with a separate request using `departureToken`.\n [allowed: roundTrip|oneWay|multiCity]") + cmd.Flags().StringVar(&p_typeVar, "type", "", "type Flight Type: Specifies the type of flight. Options:\n\n - 'roundTrip' (default)\n - 'oneWay'\n - 'multiCity' (requires 'multiCityJson' for flight details)\n\nFor round trips, retrieve return flight details with a separate request using 'departureToken'.\n [allowed: roundTrip|oneWay|multiCity]") _ = cmd.RegisterFlagCompletionFunc("type", func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective) { return []string{"roundTrip", "oneWay", "multiCity"}, cobra.ShellCompDirectiveNoFileComp }) diff --git a/cmd/gen_google_flights_deals.go b/cmd/gen_google_flights_deals.go index 7847e88..0b2d77a 100644 --- a/cmd/gen_google_flights_deals.go +++ b/cmd/gen_google_flights_deals.go @@ -142,38 +142,38 @@ func newGoogleFlightsDealsCmd() *cobra.Command { return WriteResponse(c, resp) }, } - cmd.Flags().IntVar(&p_adultsVar, "adults", 0, "adults Adults: Number of adults. Prices cover the whole party, so raising this raises every deal price.\n\nPassenger counts reprice rather than narrow the search, so they need no `arrivalId`. The whole party must not exceed 9.\n") - cmd.Flags().StringVar(&p_arrivalIdVar, "arrival-id", "", "arrivalId Arrival airport code / location kgmid: Pins the search to one destination instead of letting Google pick from the query.\n\n - **IATA code**: 3 uppercase letters, e.g. `NRT` for Tokyo Narita.\n - **Location kgmid**: starts with `/m/`, found in Wikidata under \"Freebase ID\", e.g. `/m/07dfk` for Tokyo.\n\nRequired by every filter: `type`, `travelClass`, `stops`, `outboundDate`, `returnDate`, `travelDuration`, `tripLength`, `maxPrice`, `maxDuration`, `includeAirlines` and `excludeAirlines`. Without it Google drops them silently.\n") + cmd.Flags().IntVar(&p_adultsVar, "adults", 0, "adults Adults: Number of adults. Prices cover the whole party, so raising this raises every deal price.\n\nPassenger counts reprice rather than narrow the search, so they need no 'arrivalId'. The whole party must not exceed 9.\n") + cmd.Flags().StringVar(&p_arrivalIdVar, "arrival-id", "", "arrivalId Arrival airport code / location kgmid: Pins the search to one destination instead of letting Google pick from the query.\n\n - **IATA code**: 3 uppercase letters, e.g. 'NRT' for Tokyo Narita.\n - **Location kgmid**: starts with '/m/', found in Wikidata under \"Freebase ID\", e.g. '/m/07dfk' for Tokyo.\n\nRequired by every filter: 'type', 'travelClass', 'stops', 'outboundDate', 'returnDate', 'travelDuration', 'tripLength', 'maxPrice', 'maxDuration', 'includeAirlines' and 'excludeAirlines'. Without it Google drops them silently.\n") cmd.Flags().IntVar(&p_childrenVar, "children", 0, "children Children: Number of children, priced at their own fare. Counts towards the limit of 9 passengers.\n") cmd.Flags().StringVar(&p_currencyVar, "currency", "", "currency Currency: Parameter defines the currency of the returned prices") - cmd.Flags().StringVar(&p_departureIdVar, "departure-id", "LAX", "departureId Departure airport code: Departure airport as a 3-letter uppercase IATA code, e.g. `LAX` or `LHR`. Search on [IATA](https://www.iata.org/en/publications/directories/code-search).\n\nOne airport per search; city names are not accepted.\n (required)") + cmd.Flags().StringVar(&p_departureIdVar, "departure-id", "LAX", "departureId Departure airport code: Departure airport as a 3-letter uppercase IATA code, e.g. 'LAX' or 'LHR'. Search on [IATA](https://www.iata.org/en/publications/directories/code-search).\n\nOne airport per search; city names are not accepted.\n (required)") _ = cmd.MarkFlagRequired("departure-id") - cmd.Flags().StringVar(&p_excludeAirlinesVar, "exclude-airlines", "", "excludeAirlines Exclude airlines: Drops these airlines from the deals. Requires `arrivalId`. Cannot be combined with `includeAirlines`.\n\nTakes the same values as `includeAirlines`.\n") + cmd.Flags().StringVar(&p_excludeAirlinesVar, "exclude-airlines", "", "excludeAirlines Exclude airlines: Drops these airlines from the deals. Requires 'arrivalId'. Cannot be combined with 'includeAirlines'.\n\nTakes the same values as 'includeAirlines'.\n") cmd.Flags().StringVar(&p_glVar, "gl", "", "gl Country: The two-letter country code for the country you want to limit the search to.") cmd.Flags().StringVar(&p_hlVar, "hl", "", "hl Language: The two-letter language code for the language you want to use for the search.") - cmd.Flags().StringVar(&p_includeAirlinesVar, "include-airlines", "", "includeAirlines Include airlines: Keeps only these airlines. Requires `arrivalId`. Cannot be combined with `excludeAirlines`.\n\nComma-separated 2-character IATA codes (`AF`, `UA`, `B6`) and Google's alliances `STAR_ALLIANCE`, `SKYTEAM`, `ONEWORLD`. The two can be mixed.\n\nAn airline that does not serve the route returns an empty `flightDeals` array, not an error.\n") + cmd.Flags().StringVar(&p_includeAirlinesVar, "include-airlines", "", "includeAirlines Include airlines: Keeps only these airlines. Requires 'arrivalId'. Cannot be combined with 'excludeAirlines'.\n\nComma-separated 2-character IATA codes ('AF', 'UA', 'B6') and Google's alliances 'STAR_ALLIANCE', 'SKYTEAM', 'ONEWORLD'. The two can be mixed.\n\nAn airline that does not serve the route returns an empty 'flightDeals' array, not an error.\n") cmd.Flags().IntVar(&p_infantsInSeatVar, "infants-in-seat", 0, "infantsInSeat Infants in seat: Number of infants in their own seat. Counts towards the limit of 9 passengers.\n") cmd.Flags().IntVar(&p_infantsOnLapVar, "infants-on-lap", 0, "infantsOnLap Infants on lap: Number of infants on an adult's lap. Counts towards the limit of 9 passengers.\n\nGoogle prices a lap infant above one in its own seat — the opposite of how airlines usually charge.\n") - cmd.Flags().IntVar(&p_maxDurationVar, "max-duration", 0, "maxDuration Maximum flight duration: Maximum flight duration in minutes — `1500` for 25 hours. Requires `arrivalId`. Omitted, it is unbounded. Applies to each leg, not to the round trip.\n\nGoogle measures against a longer figure than the `durationMinutes` it returns, so set the ceiling above the flight you want: on a route whose shortest deal is 635 minutes, `635` comes back empty and `680` returns it. On an empty result, raise `maxDuration` by up to 200 before concluding the route has nothing.\n") - cmd.Flags().IntVar(&p_maxPriceVar, "max-price", 0, "maxPrice Maximum price: Maximum ticket price, inclusive. Requires `arrivalId`. Omitted, it is unbounded.\n\nRead in the currency of the request: `650` means 650 EUR when `currency` is `EUR`, and 650 USD by default.\n") - cmd.Flags().StringVar(&p_outboundDateVar, "outbound-date", "", "outboundDate Departure date or window: When to depart. Requires `arrivalId`.\n\n - **Exact date**: `2026-12-10`\n - **Window**: `2026-12-01,2026-12-10` — any day within it\n\nOmitted, Google picks the dates from the query, or from whatever is cheapest.\n") - cmd.Flags().StringVar(&p_qVar, "q", "I would like to see cherry blossom in Japan", "q Trip description: Free-text trip description, from a bare place name to a full sentence:\n\n - **Destination**: `Tokyo`\n - **Type of trip**: `beach escape`, `weekend getaway in Europe`\n - **Season or event**: `I would like to see cherry blossom in Japan`\n\nWhen the query implies a time of year, Google dates it itself and reports the range in `searchInformation.dateRange`.\n (required)") + cmd.Flags().IntVar(&p_maxDurationVar, "max-duration", 0, "maxDuration Maximum flight duration: Maximum flight duration in minutes — '1500' for 25 hours. Requires 'arrivalId'. Omitted, it is unbounded. Applies to each leg, not to the round trip.\n\nGoogle measures against a longer figure than the 'durationMinutes' it returns, so set the ceiling above the flight you want: on a route whose shortest deal is 635 minutes, '635' comes back empty and '680' returns it. On an empty result, raise 'maxDuration' by up to 200 before concluding the route has nothing.\n") + cmd.Flags().IntVar(&p_maxPriceVar, "max-price", 0, "maxPrice Maximum price: Maximum ticket price, inclusive. Requires 'arrivalId'. Omitted, it is unbounded.\n\nRead in the currency of the request: '650' means 650 EUR when 'currency' is 'EUR', and 650 USD by default.\n") + cmd.Flags().StringVar(&p_outboundDateVar, "outbound-date", "", "outboundDate Departure date or window: When to depart. Requires 'arrivalId'.\n\n - **Exact date**: '2026-12-10'\n - **Window**: '2026-12-01,2026-12-10' — any day within it\n\nOmitted, Google picks the dates from the query, or from whatever is cheapest.\n") + cmd.Flags().StringVar(&p_qVar, "q", "I would like to see cherry blossom in Japan", "q Trip description: Free-text trip description, from a bare place name to a full sentence:\n\n - **Destination**: 'Tokyo'\n - **Type of trip**: 'beach escape', 'weekend getaway in Europe'\n - **Season or event**: 'I would like to see cherry blossom in Japan'\n\nWhen the query implies a time of year, Google dates it itself and reports the range in 'searchInformation.dateRange'.\n (required)") _ = cmd.MarkFlagRequired("q") - cmd.Flags().StringVar(&p_returnDateVar, "return-date", "", "returnDate Return date or window: When to return, in the same exact-or-window spelling as `outboundDate`, which is required alongside it.\n\nCannot be combined with `travelDuration` or `tripLength` — all three set the trip length. Ignored when `type` is `oneWay`.\n") - cmd.Flags().StringVar(&p_stopsVar, "stops", "", "stops Stops: Maximum number of stops. Requires `arrivalId`. Omitted, any number is allowed.\n\n - `1` / `nonStop` — direct flights only\n - `2` / `oneStopOrFewer` — at most one connection\n - `3` / `twoStopsOrFewer` — at most two connections\n\nA route with nothing at that depth returns an empty `flightDeals` array, not an error — `nonStop` on a route without a direct flight is a valid, empty answer.\n [allowed: 1|nonStop|2|oneStopOrFewer|3|twoStopsOrFewer]") + cmd.Flags().StringVar(&p_returnDateVar, "return-date", "", "returnDate Return date or window: When to return, in the same exact-or-window spelling as 'outboundDate', which is required alongside it.\n\nCannot be combined with 'travelDuration' or 'tripLength' — all three set the trip length. Ignored when 'type' is 'oneWay'.\n") + cmd.Flags().StringVar(&p_stopsVar, "stops", "", "stops Stops: Maximum number of stops. Requires 'arrivalId'. Omitted, any number is allowed.\n\n - '1' / 'nonStop' — direct flights only\n - '2' / 'oneStopOrFewer' — at most one connection\n - '3' / 'twoStopsOrFewer' — at most two connections\n\nA route with nothing at that depth returns an empty 'flightDeals' array, not an error — 'nonStop' on a route without a direct flight is a valid, empty answer.\n [allowed: 1|nonStop|2|oneStopOrFewer|3|twoStopsOrFewer]") _ = cmd.RegisterFlagCompletionFunc("stops", func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective) { return []string{"1", "nonStop", "2", "oneStopOrFewer", "3", "twoStopsOrFewer"}, cobra.ShellCompDirectiveNoFileComp }) - cmd.Flags().StringVar(&p_travelClassVar, "travel-class", "", "travelClass Travel class: Travel class. Requires `arrivalId`.\n\n - `1` / `economy` — economy (default)\n - `2` / `premiumEconomy` — premium economy\n - `3` / `business` — business\n - `4` / `first` — first\n\nFares climb steeply: on LAX-NRT the same search ran $730 in economy against $2882 in business.\n [allowed: 1|economy|2|premiumEconomy|3|business|4|first]") + cmd.Flags().StringVar(&p_travelClassVar, "travel-class", "", "travelClass Travel class: Travel class. Requires 'arrivalId'.\n\n - '1' / 'economy' — economy (default)\n - '2' / 'premiumEconomy' — premium economy\n - '3' / 'business' — business\n - '4' / 'first' — first\n\nFares climb steeply: on LAX-NRT the same search ran $730 in economy against $2882 in business.\n [allowed: 1|economy|2|premiumEconomy|3|business|4|first]") _ = cmd.RegisterFlagCompletionFunc("travel-class", func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective) { return []string{"1", "economy", "2", "premiumEconomy", "3", "business", "4", "first"}, cobra.ShellCompDirectiveNoFileComp }) - cmd.Flags().StringVar(&p_travelDurationVar, "travel-duration", "", "travelDuration Trip duration preset: Preset trip length. Requires `arrivalId`. Cannot be combined with `returnDate` or `tripLength`.\n\n - `1` / `week` — about a week (6-8 days)\n - `2` / `weekend` — a weekend (2-3 days)\n - `3` / `twoWeeks` — about two weeks (13-15 days)\n\nPairs with `outboundDate` to limit the departure period. Ignored when `type` is `oneWay`.\n [allowed: 1|week|2|weekend|3|twoWeeks]") + cmd.Flags().StringVar(&p_travelDurationVar, "travel-duration", "", "travelDuration Trip duration preset: Preset trip length. Requires 'arrivalId'. Cannot be combined with 'returnDate' or 'tripLength'.\n\n - '1' / 'week' — about a week (6-8 days)\n - '2' / 'weekend' — a weekend (2-3 days)\n - '3' / 'twoWeeks' — about two weeks (13-15 days)\n\nPairs with 'outboundDate' to limit the departure period. Ignored when 'type' is 'oneWay'.\n [allowed: 1|week|2|weekend|3|twoWeeks]") _ = cmd.RegisterFlagCompletionFunc("travel-duration", func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective) { return []string{"1", "week", "2", "weekend", "3", "twoWeeks"}, cobra.ShellCompDirectiveNoFileComp }) - cmd.Flags().StringVar(&p_tripLengthVar, "trip-length", "", "tripLength Trip length in days: Trip length in days. Requires `arrivalId`. Cannot be combined with `returnDate` or `travelDuration`.\n\n - **Exact**: `7`\n - **Range**: `5,10` — min first\n\nPairs with `outboundDate` to limit the departure period. Ignored when `type` is `oneWay`.\n") - cmd.Flags().StringVar(&p_typeVar, "type", "", "type Flight type: Flight type. Requires `arrivalId`.\n\n - `1` / `roundTrip` — round trip (default)\n - `2` / `oneWay` — one way\n\nA one-way deal carries no `returnDate` and no `tripLengthDays`.\n [allowed: 1|roundTrip|2|oneWay]") + cmd.Flags().StringVar(&p_tripLengthVar, "trip-length", "", "tripLength Trip length in days: Trip length in days. Requires 'arrivalId'. Cannot be combined with 'returnDate' or 'travelDuration'.\n\n - **Exact**: '7'\n - **Range**: '5,10' — min first\n\nPairs with 'outboundDate' to limit the departure period. Ignored when 'type' is 'oneWay'.\n") + cmd.Flags().StringVar(&p_typeVar, "type", "", "type Flight type: Flight type. Requires 'arrivalId'.\n\n - '1' / 'roundTrip' — round trip (default)\n - '2' / 'oneWay' — one way\n\nA one-way deal carries no 'returnDate' and no 'tripLengthDays'.\n [allowed: 1|roundTrip|2|oneWay]") _ = cmd.RegisterFlagCompletionFunc("type", func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective) { return []string{"1", "roundTrip", "2", "oneWay"}, cobra.ShellCompDirectiveNoFileComp }) diff --git a/cmd/gen_google_hotels.go b/cmd/gen_google_hotels.go index 15122b5..610bfaf 100644 --- a/cmd/gen_google_hotels.go +++ b/cmd/gen_google_hotels.go @@ -161,40 +161,40 @@ func newGoogleHotelsCmd() *cobra.Command { }, } cmd.Flags().IntVar(&p_adultsVar, "adults", 0, "adults Adults: Number of adult guests (1-6).\n") - cmd.Flags().StringSliceVar(&p_amenityVar, "amenity", nil, "amenity[] Amenity: List of amenities to filter by (e.g., `hotelFreeWifi,hotelPool`).\n\nValues prefixed `hotel*` apply when searching hotels (the default mode). Values prefixed `rental*` apply when `vacationRentals=true`.\n\nThe two sets are disjoint because Google Hotels exposes different amenity catalogs for each mode — pass values matching the mode you're querying.\n") + cmd.Flags().StringSliceVar(&p_amenityVar, "amenity", nil, "amenity[] Amenity: List of amenities to filter by (e.g., 'hotelFreeWifi,hotelPool').\n\nValues prefixed 'hotel*' apply when searching hotels (the default mode). Values prefixed 'rental*' apply when 'vacationRentals=true'.\n\nThe two sets are disjoint because Google Hotels exposes different amenity catalogs for each mode — pass values matching the mode you're querying.\n") _ = cmd.RegisterFlagCompletionFunc("amenity", func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective) { return []string{"hotelFreeParking", "hotelParking", "hotelIndoorPool", "hotelOutdoorPool", "hotelPool", "hotelFitnessCenter", "hotelRestaurant", "hotelFreeBreakfast", "hotelSpa", "hotelBeachAccess", "hotelChildFriendly", "hotelBar", "hotelPetFriendly", "hotelRoomService", "hotelFreeWifi", "hotelAirConditioned", "hotelAllInclusive", "hotelWheelchairAccessible", "hotelEvCharger", "rentalHotTub", "rentalAirConditioned", "rentalOutdoorGrill", "rentalFireplace", "rentalPatioOrDeck", "rentalKitchen", "rentalFitnessCenter", "rentalCrib", "rentalBeachAccess", "rentalKidFriendly", "rentalPetFriendly", "rentalFreeWifi", "rentalPool"}, cobra.ShellCompDirectiveNoFileComp }) cmd.Flags().IntVar(&p_bathroomsVar, "bathrooms", 0, "bathrooms Bathrooms: Minimum number of bathrooms (vacation rentals only).\n") cmd.Flags().IntVar(&p_bedroomsVar, "bedrooms", 0, "bedrooms Bedrooms: Minimum number of bedrooms (vacation rentals only).\n") - cmd.Flags().StringVar(&p_brandsVar, "brands", "", "brands Brands: Comma-separated list of brand IDs to filter by. Brand IDs are returned in the response under `brands` for the same query.\n") + cmd.Flags().StringVar(&p_brandsVar, "brands", "", "brands Brands: Comma-separated list of brand IDs to filter by. Brand IDs are returned in the response under 'brands' for the same query.\n") cmd.Flags().StringVar(&p_checkInDateVar, "check-in-date", "2026-11-17", "checkInDate Check-in Date: The check-in date in 'yyyy-MM-dd' format.\n (required)") _ = cmd.MarkFlagRequired("check-in-date") cmd.Flags().StringVar(&p_checkOutDateVar, "check-out-date", "2026-11-21", "checkOutDate Check-out Date: The check-out date in 'yyyy-MM-dd' format.\n (required)") _ = cmd.MarkFlagRequired("check-out-date") cmd.Flags().IntVar(&p_childrenVar, "children", 0, "children Children: Number of child guests (1-5). Total guests (adults + children) cannot exceed 6.\n") - cmd.Flags().StringVar(&p_childrenAgesVar, "children-ages", "", "childrenAges Children Ages: Comma-separated list of children ages (e.g., `5,8,12`). Must match the number of children.\n") + cmd.Flags().StringVar(&p_childrenAgesVar, "children-ages", "", "childrenAges Children Ages: Comma-separated list of children ages (e.g., '5,8,12'). Must match the number of children.\n") cmd.Flags().StringVar(&p_currencyVar, "currency", "", "currency Currency: Parameter defines the currency of the returned prices") cmd.Flags().BoolVar(&p_ecoCertifiedVar, "eco-certified", false, "ecoCertified Eco-certified: Show only eco-certified properties.\n") cmd.Flags().BoolVar(&p_freeCancellationVar, "free-cancellation", false, "freeCancellation Free Cancellation: Show only properties offering free cancellation.\n") cmd.Flags().StringVar(&p_glVar, "gl", "", "gl Country: The two-letter country code for the country you want to limit the search to.") cmd.Flags().StringVar(&p_hlVar, "hl", "", "hl Language: The two-letter language code for the language you want to use for the search.") - cmd.Flags().StringVar(&p_hotelClassVar, "hotel-class", "", "hotelClass Hotel Class: Comma-separated list of hotel star classes to include (e.g., `2,3,4,5`).\n") + cmd.Flags().StringVar(&p_hotelClassVar, "hotel-class", "", "hotelClass Hotel Class: Comma-separated list of hotel star classes to include (e.g., '2,3,4,5').\n") cmd.Flags().Float64Var(&p_maxPriceVar, "max-price", 0, "maxPrice Maximum Price: Maximum price per night, in the selected currency.\n") cmd.Flags().Float64Var(&p_minPriceVar, "min-price", 0, "minPrice Minimum Price: Minimum price per night, in the selected currency.\n") - cmd.Flags().StringVar(&p_nextPageTokenVar, "next-page-token", "", "nextPageToken Next Page Token: Token to fetch the next page of hotel results. Returned in the `pagination` field of a previous response.\n") + cmd.Flags().StringVar(&p_nextPageTokenVar, "next-page-token", "", "nextPageToken Next Page Token: Token to fetch the next page of hotel results. Returned in the 'pagination' field of a previous response.\n") cmd.Flags().StringVar(&p_propertyTokenVar, "property-token", "", "propertyToken Property Token: Token used to retrieve details for a specific property. Returned in each property in the results.\n") - cmd.Flags().StringSliceVar(&p_propertyTypeVar, "property-type", nil, "propertyType[] Property Type: List of property types to filter by (e.g., `hotelResort,hotelMotel`).\n\nValues prefixed `hotel*` apply when searching hotels (the default mode). Values prefixed `rental*` apply when `vacationRentals=true`.\n\nThe two sets are disjoint because Google Hotels exposes different property-type catalogs for each mode — pass values matching the mode you're querying.\n") + cmd.Flags().StringSliceVar(&p_propertyTypeVar, "property-type", nil, "propertyType[] Property Type: List of property types to filter by (e.g., 'hotelResort,hotelMotel').\n\nValues prefixed 'hotel*' apply when searching hotels (the default mode). Values prefixed 'rental*' apply when 'vacationRentals=true'.\n\nThe two sets are disjoint because Google Hotels exposes different property-type catalogs for each mode — pass values matching the mode you're querying.\n") _ = cmd.RegisterFlagCompletionFunc("property-type", func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective) { return []string{"hotelBeach", "hotelBoutique", "hotelHostel", "hotelInn", "hotelMotel", "hotelResort", "hotelSpa", "hotelBedAndBreakfast", "hotelOther", "hotelAparthotel", "hotelMinshuku", "hotelJapaneseBusiness", "hotelRyokan", "rentalApartment", "rentalBungalow", "rentalCabin", "rentalChalet", "rentalCottage", "rentalGite", "rentalHolidayVillage", "rentalHouse", "rentalHouseboat", "rentalVilla", "rentalOther", "rentalAparthotel"}, cobra.ShellCompDirectiveNoFileComp }) cmd.Flags().StringVar(&p_qVar, "q", "Hotels in New York", "q Search Query: The search query for Google Hotels (e.g., a city, neighborhood, or hotel name).\n (required)") _ = cmd.MarkFlagRequired("q") - cmd.Flags().StringVar(&p_ratingVar, "rating", "", "rating Minimum Rating: Filter by minimum overall guest rating. Options:\n\n - `threePointFivePlus` — 3.5 stars or higher\n - `fourPlus` — 4.0 stars or higher\n - `fourPointFivePlus` — 4.5 stars or higher\n [allowed: threePointFivePlus|fourPlus|fourPointFivePlus]") + cmd.Flags().StringVar(&p_ratingVar, "rating", "", "rating Minimum Rating: Filter by minimum overall guest rating. Options:\n\n - 'threePointFivePlus' — 3.5 stars or higher\n - 'fourPlus' — 4.0 stars or higher\n - 'fourPointFivePlus' — 4.5 stars or higher\n [allowed: threePointFivePlus|fourPlus|fourPointFivePlus]") _ = cmd.RegisterFlagCompletionFunc("rating", func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective) { return []string{"threePointFivePlus", "fourPlus", "fourPointFivePlus"}, cobra.ShellCompDirectiveNoFileComp }) - cmd.Flags().StringVar(&p_sortByVar, "sort-by", "", "sortBy Sort By: Sort hotel results. Options:\n\n - `lowestPrice` — lowest price\n - `highestRating` — highest rating\n - `mostReviewed` — most reviewed\n [allowed: lowestPrice|highestRating|mostReviewed]") + cmd.Flags().StringVar(&p_sortByVar, "sort-by", "", "sortBy Sort By: Sort hotel results. Options:\n\n - 'lowestPrice' — lowest price\n - 'highestRating' — highest rating\n - 'mostReviewed' — most reviewed\n [allowed: lowestPrice|highestRating|mostReviewed]") _ = cmd.RegisterFlagCompletionFunc("sort-by", func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective) { return []string{"lowestPrice", "highestRating", "mostReviewed"}, cobra.ShellCompDirectiveNoFileComp }) diff --git a/cmd/gen_google_images.go b/cmd/gen_google_images.go index cea43ae..198f1a8 100644 --- a/cmd/gen_google_images.go +++ b/cmd/gen_google_images.go @@ -118,7 +118,7 @@ func newGoogleImagesCmd() *cobra.Command { _ = cmd.RegisterFlagCompletionFunc("safe", func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective) { return []string{"active", "off"}, cobra.ShellCompDirectiveNoFileComp }) - cmd.Flags().StringVar(&p_tbsVar, "tbs", "", "tbs Advanced Search Parameters: `tbs` parameter for the Google Images API customizes image search results with various filters that can be combined using commas. Here are the available options:\n\nImage Size Filters:\n - `isz:l` - Search for large images.\n - `isz:m` - Search for medium images.\n - `isz:i` - Search for icon-sized images.\n - `isz:lt,islt:qsvga` - Filter for images larger than 400×300.\n - `isz:lt,islt:vga` - Filter for images larger than 640×480.\n - `isz:lt,islt:svga` - Filter for images larger than 800×600.\n - `isz:lt,islt:xga` - Filter for images larger than 1024×768.\n - `isz:lt,islt:2mp` - Filter for images larger than 1600×1200.\n - `isz:lt,islt:4mp` - Filter for images larger than 2272×1704.\n - `isz:ex,iszw:1000,iszh:1000` - Search for images exactly 1000×1000.\n\nColor Filters:\n - `ic:color` - Search for full-color images.\n - `ic:gray` - Search for black and white images.\n - `ic:specific,isc:red` (and other colors such as orange, yellow, green, etc.) - Search for images predominantly in specified colors.\n\nImage Type Filters:\n - `itp:face` - Search for images of faces.\n - `itp:photo` - Search for photographs.\n - `itp:clipart` - Search for clipart images.\n - `itp:lineart` - Search for line drawings.\n - `itp:animated` - Search for animated images (GIFs).\n") + cmd.Flags().StringVar(&p_tbsVar, "tbs", "", "tbs Advanced Search Parameters: 'tbs' parameter for the Google Images API customizes image search results with various filters that can be combined using commas. Here are the available options:\n\nImage Size Filters:\n - 'isz:l' - Search for large images.\n - 'isz:m' - Search for medium images.\n - 'isz:i' - Search for icon-sized images.\n - 'isz:lt,islt:qsvga' - Filter for images larger than 400×300.\n - 'isz:lt,islt:vga' - Filter for images larger than 640×480.\n - 'isz:lt,islt:svga' - Filter for images larger than 800×600.\n - 'isz:lt,islt:xga' - Filter for images larger than 1024×768.\n - 'isz:lt,islt:2mp' - Filter for images larger than 1600×1200.\n - 'isz:lt,islt:4mp' - Filter for images larger than 2272×1704.\n - 'isz:ex,iszw:1000,iszh:1000' - Search for images exactly 1000×1000.\n\nColor Filters:\n - 'ic:color' - Search for full-color images.\n - 'ic:gray' - Search for black and white images.\n - 'ic:specific,isc:red' (and other colors such as orange, yellow, green, etc.) - Search for images predominantly in specified colors.\n\nImage Type Filters:\n - 'itp:face' - Search for images of faces.\n - 'itp:photo' - Search for photographs.\n - 'itp:clipart' - Search for clipart images.\n - 'itp:lineart' - Search for line drawings.\n - 'itp:animated' - Search for animated images (GIFs).\n") cmd.Flags().StringVar(&p_uuleVar, "uule", "", "uule Encoded Location: The encoded location parameter.") return cmd diff --git a/cmd/gen_google_immersive_product.go b/cmd/gen_google_immersive_product.go index 5d737c6..8959fd3 100644 --- a/cmd/gen_google_immersive_product.go +++ b/cmd/gen_google_immersive_product.go @@ -54,7 +54,7 @@ func newGoogleImmersiveProductCmd() *cobra.Command { } cmd.Flags().BoolVar(&p_moreStoresVar, "more-stores", false, "moreStores Fetch More Stores: Fetch additional store results in a single search. By default it returns 3–5 stores, and when true it returns up to 13 or the maximum available for the product.") cmd.Flags().StringVar(&p_nextPageTokenVar, "next-page-token", "", "nextPageToken Stores Next Page Token: Token used to retrieve the next page of store results.") - cmd.Flags().StringVar(&p_pageTokenVar, "page-token", "eyJyZHMiOiJQQ18zMjQ1NDc2NDAwODMzNTUxOTQ4fFBST0RfUENfMzI0NTQ3NjQwMDgzMzU1MTk0OCIsInByb2R1Y3RpZCI6IjE2NTYxODg2MzMwNjI5NzA1MjY5IiwiY2F0YWxvZ2lkIjoiMTA5MDU3MjEzODE1NDM1NDgwMCIsImhlYWRsaW5lT2ZmZXJEb2NpZCI6IjEwNTQwMDUxMzg0NjEzOTczOTg1IiwiaW1hZ2VEb2NpZCI6IjE3MjMwMzM3NDkwMTYzODIyNjMiLCJncGNpZCI6IjgyOTk1MTI3NTExOTg2NzE2MjIiLCJtaWQiOiI1NzY0NjI2MTIyODAxMzA0ODEiLCJxIjoiYnV5IGNvZmZlZSIsImhsIjoiZW4iLCJnbCI6InVzIiwiY29va2llcyI6Il9fU2VjdXJlLVNUUlA9QU5tWndhMHZsZUx5TFN3SDZKcmFHRU15RGxnbEhJN3NJelN2NFVJcXhZUDhFQk5kd1FXNTRoRHVsX3RZRl9hSFBsQjM3ajhNMWZRY1NwOVhTMy1icmVOdzIwa1RybjhnajhCaDsgQUVDPUFkSlZFYXR5TE1ZbHktUk5IRGxTVm04MGkySWRhWm4yeE5mWlVBX3JzV3pDX0xyTFFTeUwzTGJ3TkJnOyBOSUQ9NTMyPWtadG5CQnpoNE02cU5lTW9VM1Rjekd1d0VKdmtkcjBZMzFFbmNPTlZUT084TmlVX0oyUTVucmR3Q0dWUU5pWVlvWUROSEdWTE9BdUd0SWI2ZjEwSDk3OHM3bk9hajFFTVN1ellIaDVTMzdDTkJDZkdwLWlmcThVenV4aHR3TTR0YmNidXdnbVBNUHJHeXBlMS1aQmZtTEVCOXpTam9aMFpGOUZHQ3ZQdkc3aGdXZzRCcndvb1RYclhnTHdhc3BtYXpUVi1YYUg1bzJjV2lUNTUwc0dHNG5pRVpYLUI1aFZsbllYQ1QxZU91LXU0Tjk4MXQtUnYzYi1RZS1nTGV2NmV4ZGNFdlE7IERWPU02U2J0ZDljdGtvc1VKSEhKMHhOMXZfa3lxX0M5Tm42MHAxSjhPd3dCd1FBQUFBIiwieHNyZiI6IkFGNXRTTzRGb3VnZDItOVJPN09YU29oMzlvWnhLUzZGNVE6MTc4MzY4OTMxMzM5MiIsIm9hcHZmYyI6IkVvc0RDc3dDUVVwcFZEUjBTMGMwTmxObk16TktTRmxmYW05SlpUbFNNM1ZaVTFJeWJ6ZENlRGgwWm5kRVNGWTFja2hzZFVZNVMzWnVOMVUxYkVSSU1YTlVSMUpyV1VwWFpVWlNUVVY0Y2s5ak1EaElYMWd3UVRaR1RVbzJTVmxpZVdGdU5IRklVV1o0WTJ4d1RVUm1hRFZPT1dSbGFXOVZaVFpNT1ZaT1VXZHJNMlJTTlZNMlQzWlhiSEI1UW01aU5DMHlUR0psYnpWTVJEVkhSazVoYlZkZlVFUmxlbkIwTlc1U2FtRjJOVUprVWkxTloxcFJhbHBsY21kc1VXbDNXVWcxY1dKeFdtTjZWR0ZEVDB0a2RISldTekYwYzB0MVlqaHBiR1o2TFc1cFZsODNjV296VTI5RVgydDVkSE13WlVNNVJVaGhhRTU0WHpKT2ExY3plR3BXY1VGMlJXVjBhVmN5T1ZkNk9WaEVialV5VldVNGNtdHlPVUV4Ym1ZdFNYRjRkM1J3VUMxdFNYUjZORUk0Y3pCV1REUlhkbTVHUldodE1ETnVaaTFNTFZSUlRuUm9PVmRDWDNoaVoyNXVkVWtTRmxsUVFsRmhjV1ZrVFZCWGRIRjBjMUEwV1U5elRWRWFJa0ZFYzNJNVpsRjZSMVpNTkZKR2IwRmhZbmhQWmpSRFRqbHBNRTVCWjAxcFowRSIsInZlcnNpb24iOjJ9", "pageToken Page Token: Token for displaying more product info in the Google immersive pop-up, available in the Google Shopping API response as the `immersiveProductPageToken` property. (required)") + cmd.Flags().StringVar(&p_pageTokenVar, "page-token", "eyJyZHMiOiJQQ18zMjQ1NDc2NDAwODMzNTUxOTQ4fFBST0RfUENfMzI0NTQ3NjQwMDgzMzU1MTk0OCIsInByb2R1Y3RpZCI6IjE2NTYxODg2MzMwNjI5NzA1MjY5IiwiY2F0YWxvZ2lkIjoiMTA5MDU3MjEzODE1NDM1NDgwMCIsImhlYWRsaW5lT2ZmZXJEb2NpZCI6IjEwNTQwMDUxMzg0NjEzOTczOTg1IiwiaW1hZ2VEb2NpZCI6IjE3MjMwMzM3NDkwMTYzODIyNjMiLCJncGNpZCI6IjgyOTk1MTI3NTExOTg2NzE2MjIiLCJtaWQiOiI1NzY0NjI2MTIyODAxMzA0ODEiLCJxIjoiYnV5IGNvZmZlZSIsImhsIjoiZW4iLCJnbCI6InVzIiwiY29va2llcyI6Il9fU2VjdXJlLVNUUlA9QU5tWndhMHZsZUx5TFN3SDZKcmFHRU15RGxnbEhJN3NJelN2NFVJcXhZUDhFQk5kd1FXNTRoRHVsX3RZRl9hSFBsQjM3ajhNMWZRY1NwOVhTMy1icmVOdzIwa1RybjhnajhCaDsgQUVDPUFkSlZFYXR5TE1ZbHktUk5IRGxTVm04MGkySWRhWm4yeE5mWlVBX3JzV3pDX0xyTFFTeUwzTGJ3TkJnOyBOSUQ9NTMyPWtadG5CQnpoNE02cU5lTW9VM1Rjekd1d0VKdmtkcjBZMzFFbmNPTlZUT084TmlVX0oyUTVucmR3Q0dWUU5pWVlvWUROSEdWTE9BdUd0SWI2ZjEwSDk3OHM3bk9hajFFTVN1ellIaDVTMzdDTkJDZkdwLWlmcThVenV4aHR3TTR0YmNidXdnbVBNUHJHeXBlMS1aQmZtTEVCOXpTam9aMFpGOUZHQ3ZQdkc3aGdXZzRCcndvb1RYclhnTHdhc3BtYXpUVi1YYUg1bzJjV2lUNTUwc0dHNG5pRVpYLUI1aFZsbllYQ1QxZU91LXU0Tjk4MXQtUnYzYi1RZS1nTGV2NmV4ZGNFdlE7IERWPU02U2J0ZDljdGtvc1VKSEhKMHhOMXZfa3lxX0M5Tm42MHAxSjhPd3dCd1FBQUFBIiwieHNyZiI6IkFGNXRTTzRGb3VnZDItOVJPN09YU29oMzlvWnhLUzZGNVE6MTc4MzY4OTMxMzM5MiIsIm9hcHZmYyI6IkVvc0RDc3dDUVVwcFZEUjBTMGMwTmxObk16TktTRmxmYW05SlpUbFNNM1ZaVTFJeWJ6ZENlRGgwWm5kRVNGWTFja2hzZFVZNVMzWnVOMVUxYkVSSU1YTlVSMUpyV1VwWFpVWlNUVVY0Y2s5ak1EaElYMWd3UVRaR1RVbzJTVmxpZVdGdU5IRklVV1o0WTJ4d1RVUm1hRFZPT1dSbGFXOVZaVFpNT1ZaT1VXZHJNMlJTTlZNMlQzWlhiSEI1UW01aU5DMHlUR0psYnpWTVJEVkhSazVoYlZkZlVFUmxlbkIwTlc1U2FtRjJOVUprVWkxTloxcFJhbHBsY21kc1VXbDNXVWcxY1dKeFdtTjZWR0ZEVDB0a2RISldTekYwYzB0MVlqaHBiR1o2TFc1cFZsODNjV296VTI5RVgydDVkSE13WlVNNVJVaGhhRTU0WHpKT2ExY3plR3BXY1VGMlJXVjBhVmN5T1ZkNk9WaEVialV5VldVNGNtdHlPVUV4Ym1ZdFNYRjRkM1J3VUMxdFNYUjZORUk0Y3pCV1REUlhkbTVHUldodE1ETnVaaTFNTFZSUlRuUm9PVmRDWDNoaVoyNXVkVWtTRmxsUVFsRmhjV1ZrVFZCWGRIRjBjMUEwV1U5elRWRWFJa0ZFYzNJNVpsRjZSMVpNTkZKR2IwRmhZbmhQWmpSRFRqbHBNRTVCWjAxcFowRSIsInZlcnNpb24iOjJ9", "pageToken Page Token: Token for displaying more product info in the Google immersive pop-up, available in the Google Shopping API response as the 'immersiveProductPageToken' property. (required)") _ = cmd.MarkFlagRequired("page-token") return cmd diff --git a/cmd/gen_google_maps.go b/cmd/gen_google_maps.go index 7f2133a..4a11fe2 100644 --- a/cmd/gen_google_maps.go +++ b/cmd/gen_google_maps.go @@ -75,7 +75,7 @@ func newGoogleMapsCmd() *cobra.Command { }) cmd.Flags().StringVar(&p_glVar, "gl", "", "gl Country: The two-letter country code for the country you want to limit the search to.") cmd.Flags().StringVar(&p_hlVar, "hl", "", "hl Language: The two-letter language code for the language you want to use for the search.") - cmd.Flags().StringVar(&p_llVar, "ll", "@40.7455096,-74.0083012,14z", "ll GPS Coordinates: GPS coordinates of the location where the search query is to be performed. This parameter is required if the 'start' parameter is present. The format for the `ll` parameter is `@` followed by latitude, longitude, and zoom level, separated by commas. The latitude and longitude should be in decimal degrees, and the zoom level is an integer. Example: `@40.7455096,-74.0083012,14z`.\n") + cmd.Flags().StringVar(&p_llVar, "ll", "@40.7455096,-74.0083012,14z", "ll GPS Coordinates: GPS coordinates of the location where the search query is to be performed. This parameter is required if the 'start' parameter is present. The format for the 'll' parameter is '@' followed by latitude, longitude, and zoom level, separated by commas. The latitude and longitude should be in decimal degrees, and the zoom level is an integer. Example: '@40.7455096,-74.0083012,14z'.\n") cmd.Flags().StringVar(&p_qVar, "q", "Pizza", "q Search Query: Search query term or phrase. (required)") _ = cmd.MarkFlagRequired("q") cmd.Flags().IntVar(&p_startVar, "start", 0, "start Result Offset: Specifies the result offset for pagination purposes. The offset dictates the number of rows to skip from the beginning of the results. This is useful for accessing subsequent pages of search results. For example, an offset of 0 (the default value) returns the first page of results, 20 returns the second page, 40 returns the third page, and so on. This parameter is especially relevant when used in conjunction with the 'll' parameter for location-based searches.\n") diff --git a/cmd/gen_google_maps_place.go b/cmd/gen_google_maps_place.go index a2a7a25..ba0a06c 100644 --- a/cmd/gen_google_maps_place.go +++ b/cmd/gen_google_maps_place.go @@ -65,7 +65,7 @@ func newGoogleMapsPlaceCmd() *cobra.Command { _ = cmd.RegisterFlagCompletionFunc("domain", func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective) { return []string{"google.ac", "google.ad", "google.ae", "google.al", "google.am", "google.as", "google.at", "google.az", "google.ba", "google.be", "google.bf", "google.bg", "google.bi", "google.bj", "google.bs", "google.bt", "google.by", "google.ca", "google.cd", "google.cf", "google.cg", "google.ch", "google.ci", "google.cl", "google.cm", "google.co.ao", "google.co.bw", "google.co.ck", "google.co.cr", "google.co.id", "google.co.il", "google.co.in", "google.co.jp", "google.co.ke", "google.co.kr", "google.co.ls", "google.co.ma", "google.co.mz", "google.co.nz", "google.co.th", "google.co.tz", "google.co.ug", "google.co.uk", "google.co.uz", "google.co.ve", "google.co.vi", "google.co.za", "google.co.zm", "google.co.zw", "google.com", "google.com.af", "google.com.ag", "google.com.ai", "google.com.ar", "google.com.au", "google.com.bd", "google.com.bh", "google.com.bn", "google.com.bo", "google.com.br", "google.com.bz", "google.com.co", "google.com.cu", "google.com.cy", "google.com.do", "google.com.ec", "google.com.eg", "google.com.et", "google.com.fj", "google.com.gh", "google.com.gi", "google.com.gt", "google.com.hk", "google.com.jm", "google.com.kh", "google.com.kw", "google.com.lb", "google.com.ly", "google.com.mm", "google.com.mt", "google.com.mx", "google.com.my", "google.com.na", "google.com.ng", "google.ng", "google.com.nf", "google.com.ni", "google.com.np", "google.com.om", "google.com.pa", "google.com.pe", "google.com.pg", "google.com.ph", "google.com.pk", "google.com.pr", "google.com.py", "google.com.qa", "google.com.sa", "google.com.sb", "google.com.sg", "google.com.sl", "google.com.sv", "google.com.tj", "google.com.tr", "google.com.tw", "google.com.ua", "google.com.uy", "google.com.vc", "google.com.vn", "google.cat", "google.cn", "google.cv", "google.cz", "google.de", "google.dj", "google.dk", "google.dm", "google.dz", "google.ee", "google.es", "google.fi", "google.fm", "google.fr", "google.ga", "google.ge", "google.gg", "google.gl", "google.gm", "google.gp", "google.gr", "google.gy", "google.hn", "google.hr", "google.ht", "google.hu", "google.ie", "google.im", "google.iq", "google.is", "google.it", "google.je", "google.jo", "google.kg", "google.ki", "google.kz", "google.la", "google.li", "google.lk", "google.lt", "google.lu", "google.lv", "google.md", "google.me", "google.mg", "google.mk", "google.ml", "google.mn", "google.ms", "google.mu", "google.mv", "google.mw", "google.ne", "google.nl", "google.no", "google.nr", "google.nu", "google.pl", "google.pn", "google.ps", "google.pt", "google.ro", "google.rs", "google.ru", "google.rw", "google.sc", "google.se", "google.sh", "google.si", "google.sk", "google.sm", "google.sn", "google.so", "google.sr", "google.st", "google.td", "google.tg", "google.tk", "google.tl", "google.tm", "google.tn", "google.to", "google.tt", "google.vg", "google.vu", "google.ws"}, cobra.ShellCompDirectiveNoFileComp }) - cmd.Flags().BoolVar(&p_fetchWebResultsVar, "fetch-web-results", false, "fetchWebResults Fetch Web Results: Also collect the place panel's \"Web results\" section (the business's website and its pages on Instagram, Facebook, delivery services, etc.) and return it as `webResults`. This takes an extra request to Google and costs 5 credits on top of the base. Default is false.") + cmd.Flags().BoolVar(&p_fetchWebResultsVar, "fetch-web-results", false, "fetchWebResults Fetch Web Results: Also collect the place panel's \"Web results\" section (the business's website and its pages on Instagram, Facebook, delivery services, etc.) and return it as 'webResults'. This takes an extra request to Google and costs 5 credits on top of the base. Default is false.") cmd.Flags().StringVar(&p_hlVar, "hl", "", "hl Language: The two-letter language code for the language you want to use for the search.") cmd.Flags().StringVar(&p_placeIdVar, "place-id", "ChIJFU2bda4SM4cRKSCRyb6pOB8", "placeId Google Place ID: A unique identifier for the place. This ID can be obtained from Google Maps search results. (required)") _ = cmd.MarkFlagRequired("place-id") diff --git a/cmd/gen_google_news.go b/cmd/gen_google_news.go index ada7dd1..fd22f01 100644 --- a/cmd/gen_google_news.go +++ b/cmd/gen_google_news.go @@ -76,12 +76,12 @@ func newGoogleNewsCmd() *cobra.Command { } cmd.Flags().StringVar(&p_glVar, "gl", "", "gl Country: The two-letter country code for the country you want to limit the search to.") cmd.Flags().StringVar(&p_hlVar, "hl", "", "hl Language: The two-letter language code for the language you want to use for the search.") - cmd.Flags().StringVar(&p_publicationTokenVar, "publication-token", "", "publicationToken Publication Token: Token for a specific publisher such as CNN or BBC. Not allowed with `q`, `storyToken`, or `topicToken`.") - cmd.Flags().StringVar(&p_qVar, "q", "", "q Search Query: Free-text query as used on news.google.com. Not allowed with `topicToken`, `storyToken`, or `publicationToken`.") - cmd.Flags().StringVar(&p_sectionTokenVar, "section-token", "", "sectionToken Section Token: Token for a sub-section under a topic, for example Business → Economy. Use only when `topicToken` or `publicationToken` is present.") + cmd.Flags().StringVar(&p_publicationTokenVar, "publication-token", "", "publicationToken Publication Token: Token for a specific publisher such as CNN or BBC. Not allowed with 'q', 'storyToken', or 'topicToken'.") + cmd.Flags().StringVar(&p_qVar, "q", "", "q Search Query: Free-text query as used on news.google.com. Not allowed with 'topicToken', 'storyToken', or 'publicationToken'.") + cmd.Flags().StringVar(&p_sectionTokenVar, "section-token", "", "sectionToken Section Token: Token for a sub-section under a topic, for example Business → Economy. Use only when 'topicToken' or 'publicationToken' is present.") cmd.Flags().StringVar(&p_soVar, "so", "", "so Sort Order: Sort order for articles in a story. Use only with storyToken.") cmd.Flags().StringVar(&p_storyTokenVar, "story-token", "", "storyToken Story Token: Token for a single news story cluster (the “Full coverage” page).") - cmd.Flags().StringVar(&p_topicTokenVar, "topic-token", "", "topicToken Topic Token: Token for a Google News topic such as World, Business, or Technology. Not allowed with `q`, `storyToken`, or `publicationToken`.") + cmd.Flags().StringVar(&p_topicTokenVar, "topic-token", "", "topicToken Topic Token: Token for a Google News topic such as World, Business, or Technology. Not allowed with 'q', 'storyToken', or 'publicationToken'.") return cmd } diff --git a/cmd/gen_google_scholar.go b/cmd/gen_google_scholar.go index eb5b918..67bfe8e 100644 --- a/cmd/gen_google_scholar.go +++ b/cmd/gen_google_scholar.go @@ -113,12 +113,12 @@ func newGoogleScholarCmd() *cobra.Command { }, } cmd.Flags().Float64Var(&p_asRrVar, "as-rr", 0, "asRr Review Articles Only: Set to 1 to return review articles only, or 0 (default) to return all articles.") - cmd.Flags().StringVar(&p_asSdtVar, "as-sdt", "0,5", "asSdt Search Type / Filter: Search type/filter. Pick a value below to search case law from a specific court, or use `0,5` for Articles (default) / `7` to include patents. Any comma-separated court-code combination Google Scholar accepts also works here as free text beyond this list.") + cmd.Flags().StringVar(&p_asSdtVar, "as-sdt", "0,5", "asSdt Search Type / Filter: Search type/filter. Pick a value below to search case law from a specific court, or use '0,5' for Articles (default) / '7' to include patents. Any comma-separated court-code combination Google Scholar accepts also works here as free text beyond this list.") cmd.Flags().Float64Var(&p_asVisVar, "as-vis", 0, "asVis Exclude Citations: Set to 1 to exclude citations from the results, or 0 (default) to include them.") cmd.Flags().IntVar(&p_asYhiVar, "as-yhi", 2024, "asYhi Year To: Return results published up to and including this year.") cmd.Flags().IntVar(&p_asYloVar, "as-ylo", 2020, "asYlo Year From: Return results published from this year onward.") - cmd.Flags().StringVar(&p_citesVar, "cites", "", "cites Cited By Search: Unique article ID to look up articles that cite it, as returned in a result's `citedBy.citesId`.") - cmd.Flags().StringVar(&p_clusterVar, "cluster", "", "cluster All Versions Search: Unique article ID to look up all indexed versions of that article, as returned in a result's `versions.clusterId`.") + cmd.Flags().StringVar(&p_citesVar, "cites", "", "cites Cited By Search: Unique article ID to look up articles that cite it, as returned in a result's 'citedBy.citesId'.") + cmd.Flags().StringVar(&p_clusterVar, "cluster", "", "cluster All Versions Search: Unique article ID to look up all indexed versions of that article, as returned in a result's 'versions.clusterId'.") cmd.Flags().Float64Var(&p_filterVar, "filter", 0, "filter Results Filtering: Defines whether to enable or disable the filters for 'Similar Results' and 'Omitted Results'. Set to 1 (default) to enable these filters, or 0 to disable them.\n") cmd.Flags().StringVar(&p_hlVar, "hl", "", "hl Language: The two-letter language code for the language you want to use for the search.") cmd.Flags().StringSliceVar(&p_lrVar, "lr", nil, "lr Set Multiple Languages: The 'lr' parameter specifies the language of the websites to return results from. This parameter filters results based on the language of the web content.") @@ -126,7 +126,7 @@ func newGoogleScholarCmd() *cobra.Command { return []string{"lang_ar", "lang_hy", "lang_bg", "lang_ca", "lang_cs", "lang_da", "lang_de", "lang_el", "lang_en", "lang_es", "lang_et", "lang_tl", "lang_fi", "lang_fr", "lang_hr", "lang_hi", "lang_hu", "lang_id", "lang_is", "lang_it", "lang_iw", "lang_he", "lang_ja", "lang_ko", "lang_lt", "lang_lv", "lang_nl", "lang_no", "lang_fa", "lang_pl", "lang_pt", "lang_ro", "lang_ru", "lang_sk", "lang_sl", "lang_sr", "lang_sv", "lang_th", "lang_tr", "lang_uk", "lang_vi", "lang_zh-CN", "lang_zh-TW"}, cobra.ShellCompDirectiveNoFileComp }) cmd.Flags().IntVar(&p_numVar, "num", 0, "num Number of Results: Maximum number of results to return per page.") - cmd.Flags().StringVar(&p_qVar, "q", "machine learning", "q Search Query: Search query. Supports Google Scholar search helpers such as `author:` and `source:`. (required)") + cmd.Flags().StringVar(&p_qVar, "q", "machine learning", "q Search Query: Search query. Supports Google Scholar search helpers such as 'author:' and 'source:'. (required)") _ = cmd.MarkFlagRequired("q") cmd.Flags().StringVar(&p_safeVar, "safe", "", "safe Adult Content Filtering: Adult content filtering option. [allowed: active|off]") _ = cmd.RegisterFlagCompletionFunc("safe", func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective) { diff --git a/cmd/gen_google_scholar_cite.go b/cmd/gen_google_scholar_cite.go index 525e108..4075123 100644 --- a/cmd/gen_google_scholar_cite.go +++ b/cmd/gen_google_scholar_cite.go @@ -49,7 +49,7 @@ func newGoogleScholarCiteCmd() *cobra.Command { }, } cmd.Flags().StringVar(&p_hlVar, "hl", "", "hl Language: The two-letter language code for the language you want to use for the search.") - cmd.Flags().StringVar(&p_qVar, "q", "EQ8shYj8Ai8J", "q Result ID: The `resultId` of a Google Scholar organic result, as returned by the google/scholar endpoint. (required)") + cmd.Flags().StringVar(&p_qVar, "q", "EQ8shYj8Ai8J", "q Result ID: The 'resultId' of a Google Scholar organic result, as returned by the google/scholar endpoint. (required)") _ = cmd.MarkFlagRequired("q") return cmd diff --git a/cmd/gen_google_serp.go b/cmd/gen_google_serp.go index ccee963..543de9e 100644 --- a/cmd/gen_google_serp.go +++ b/cmd/gen_google_serp.go @@ -168,7 +168,7 @@ func newGoogleSerpCmd() *cobra.Command { cmd.Flags().StringVar(&p_siVar, "si", "", "si Google Cached Search Parameters ID: Google Cached Search Parameters ID.") cmd.Flags().IntVar(&p_startVar, "start", 0, "start Result Offset: This parameter specifies the number of search results to skip and is used for implementing pagination. For example, a value of 0 (default) indicates the first page of results, 10 refers to the second page, and 20 to the third page.\n\nFor Google Local Results, the start value must be in multiples of 20, such as 20 for the second page, 40 for the third page, etc.\n") cmd.Flags().StringVar(&p_tbmVar, "tbm", "", "tbm Search Type: Specify the type of search.") - cmd.Flags().StringVar(&p_tbsVar, "tbs", "", "tbs Advanced Search Parameters: This parameter supports various filters that can be combined by separating them with a comma. Here are examples of these filters:\n\n - Specific Time Range: `cdr:1,cd_min:10/17/2018,cd_max:3/8/2021` - Filter results to show only those within the defined date range.\n - Sort by Date: `sbd:1` - Results are sorted by date, from the most recent to the oldest.\n - Sort by Relevance: `sbd:0` - Results are sorted by relevance to the search query.\n - Sites with Images: `img:1` - Only show results from webpages that contain images.\n\nQuick Date Range (qdr):\n - `qdr:h` - Show results from the past hour.\n - `qdr:d` - Limit results to the past day.\n - `qdr:w` - Filter results from the week.\n - `qdr:m` - Display results from the past month.\n - `qdr:y` - Show results from the past year.\n - `qdr:h10`, `qdr:d10`, `qdr:w10`, `qdr:m10`, `qdr:y10` - Specify a number to show results from the last 10 hours, days, weeks, months, or years respectively.\n\nThese filters enhance the control over search results, allowing for precise retrieval of information based on specific criteria.\n") + cmd.Flags().StringVar(&p_tbsVar, "tbs", "", "tbs Advanced Search Parameters: This parameter supports various filters that can be combined by separating them with a comma. Here are examples of these filters:\n\n - Specific Time Range: 'cdr:1,cd_min:10/17/2018,cd_max:3/8/2021' - Filter results to show only those within the defined date range.\n - Sort by Date: 'sbd:1' - Results are sorted by date, from the most recent to the oldest.\n - Sort by Relevance: 'sbd:0' - Results are sorted by relevance to the search query.\n - Sites with Images: 'img:1' - Only show results from webpages that contain images.\n\nQuick Date Range (qdr):\n - 'qdr:h' - Show results from the past hour.\n - 'qdr:d' - Limit results to the past day.\n - 'qdr:w' - Filter results from the week.\n - 'qdr:m' - Display results from the past month.\n - 'qdr:y' - Show results from the past year.\n - 'qdr:h10', 'qdr:d10', 'qdr:w10', 'qdr:m10', 'qdr:y10' - Specify a number to show results from the last 10 hours, days, weeks, months, or years respectively.\n\nThese filters enhance the control over search results, allowing for precise retrieval of information based on specific criteria.\n") cmd.Flags().StringVar(&p_uuleVar, "uule", "", "uule Encoded Location: The encoded location parameter.") return cmd diff --git a/cmd/gen_google_serp_light.go b/cmd/gen_google_serp_light.go index cfb51fb..c205d05 100644 --- a/cmd/gen_google_serp_light.go +++ b/cmd/gen_google_serp_light.go @@ -125,7 +125,7 @@ func newGoogleSerpLightCmd() *cobra.Command { return []string{"active", "off"}, cobra.ShellCompDirectiveNoFileComp }) cmd.Flags().IntVar(&p_startVar, "start", 0, "start Result Offset: This parameter specifies the number of search results to skip and is used for implementing pagination. For example, a value of 0 (default) indicates the first page of results, 10 refers to the second page, and 20 to the third page.\n\nFor Google Local Results, the start value must be in multiples of 20, such as 20 for the second page, 40 for the third page, etc.\n") - cmd.Flags().StringVar(&p_tbsVar, "tbs", "", "tbs Advanced Search Parameters: This parameter supports various filters that can be combined by separating them with a comma. Here are examples of these filters:\n\n - Specific Time Range: `cdr:1,cd_min:10/17/2018,cd_max:3/8/2021` - Filter results to show only those within the defined date range.\n - Sort by Date: `sbd:1` - Results are sorted by date, from the most recent to the oldest.\n - Sort by Relevance: `sbd:0` - Results are sorted by relevance to the search query.\n - Sites with Images: `img:1` - Only show results from webpages that contain images.\n\nQuick Date Range (qdr):\n - `qdr:h` - Show results from the past hour.\n - `qdr:d` - Limit results to the past day.\n - `qdr:w` - Filter results from the week.\n - `qdr:m` - Display results from the past month.\n - `qdr:y` - Show results from the past year.\n - `qdr:h10`, `qdr:d10`, `qdr:w10`, `qdr:m10`, `qdr:y10` - Specify a number to show results from the last 10 hours, days, weeks, months, or years respectively.\n\nThese filters enhance the control over search results, allowing for precise retrieval of information based on specific criteria.\n") + cmd.Flags().StringVar(&p_tbsVar, "tbs", "", "tbs Advanced Search Parameters: This parameter supports various filters that can be combined by separating them with a comma. Here are examples of these filters:\n\n - Specific Time Range: 'cdr:1,cd_min:10/17/2018,cd_max:3/8/2021' - Filter results to show only those within the defined date range.\n - Sort by Date: 'sbd:1' - Results are sorted by date, from the most recent to the oldest.\n - Sort by Relevance: 'sbd:0' - Results are sorted by relevance to the search query.\n - Sites with Images: 'img:1' - Only show results from webpages that contain images.\n\nQuick Date Range (qdr):\n - 'qdr:h' - Show results from the past hour.\n - 'qdr:d' - Limit results to the past day.\n - 'qdr:w' - Filter results from the week.\n - 'qdr:m' - Display results from the past month.\n - 'qdr:y' - Show results from the past year.\n - 'qdr:h10', 'qdr:d10', 'qdr:w10', 'qdr:m10', 'qdr:y10' - Specify a number to show results from the last 10 hours, days, weeks, months, or years respectively.\n\nThese filters enhance the control over search results, allowing for precise retrieval of information based on specific criteria.\n") cmd.Flags().StringVar(&p_uuleVar, "uule", "", "uule Encoded Location: The encoded location parameter.") return cmd diff --git a/cmd/gen_google_shopping.go b/cmd/gen_google_shopping.go index 7fa53ef..52cb313 100644 --- a/cmd/gen_google_shopping.go +++ b/cmd/gen_google_shopping.go @@ -103,9 +103,9 @@ func newGoogleShoppingCmd() *cobra.Command { cmd.Flags().StringVar(&p_locationVar, "location", "Austin,Texas,United States", "location Location: Google canonical location for the search.") cmd.Flags().StringVar(&p_qVar, "q", "Coffee", "q Search Query: Specify the search term for which you want to scrape the SERP. (required)") _ = cmd.MarkFlagRequired("q") - cmd.Flags().StringVar(&p_shoprsVar, "shoprs", "", "shoprs Search Filter ID: Specifies the helper ID for applying search filters. Must be used with the updated `q` parameter, which includes the selected filter (e.g., Coffee sale).\n\nTo apply filters, use the `hasdata_link` from `filters[index].options[index]` in the JSON. Apply multiple filters by following each `hasdata_link` one by one.\n\nTo remove a filter, follow its specific `hasdata_link`.\n") + cmd.Flags().StringVar(&p_shoprsVar, "shoprs", "", "shoprs Search Filter ID: Specifies the helper ID for applying search filters. Must be used with the updated 'q' parameter, which includes the selected filter (e.g., Coffee sale).\n\nTo apply filters, use the 'hasdata_link' from 'filters[index].options[index]' in the JSON. Apply multiple filters by following each 'hasdata_link' one by one.\n\nTo remove a filter, follow its specific 'hasdata_link'.\n") cmd.Flags().IntVar(&p_startVar, "start", 0, "start Result Offset: This parameter specifies the number of search results to skip and is used for implementing pagination. For example, a value of 0 (default) indicates the first page of results, 40 refers to the second page, and 80 to the third page.\n") - cmd.Flags().StringVar(&p_tbsVar, "tbs", "", "tbs Advanced Search Parameters: This parameter supports various filters that can be combined by separating them with a comma. Here are examples of these filters:\n\n - Specific Time Range: `cdr:1,cd_min:10/17/2018,cd_max:3/8/2021` - Filter results to show only those within the defined date range.\n - Sort by Date: `sbd:1` - Results are sorted by date, from the most recent to the oldest.\n - Sort by Relevance: `sbd:0` - Results are sorted by relevance to the search query.\n - Sites with Images: `img:1` - Only show results from webpages that contain images.\n\nQuick Date Range (qdr):\n - `qdr:h` - Show results from the past hour.\n - `qdr:d` - Limit results to the past day.\n - `qdr:w` - Filter results from the week.\n - `qdr:m` - Display results from the past month.\n - `qdr:y` - Show results from the past year.\n - `qdr:h10`, `qdr:d10`, `qdr:w10`, `qdr:m10`, `qdr:y10` - Specify a number to show results from the last 10 hours, days, weeks, months, or years respectively.\n\nThese filters enhance the control over search results, allowing for precise retrieval of information based on specific criteria.\n") + cmd.Flags().StringVar(&p_tbsVar, "tbs", "", "tbs Advanced Search Parameters: This parameter supports various filters that can be combined by separating them with a comma. Here are examples of these filters:\n\n - Specific Time Range: 'cdr:1,cd_min:10/17/2018,cd_max:3/8/2021' - Filter results to show only those within the defined date range.\n - Sort by Date: 'sbd:1' - Results are sorted by date, from the most recent to the oldest.\n - Sort by Relevance: 'sbd:0' - Results are sorted by relevance to the search query.\n - Sites with Images: 'img:1' - Only show results from webpages that contain images.\n\nQuick Date Range (qdr):\n - 'qdr:h' - Show results from the past hour.\n - 'qdr:d' - Limit results to the past day.\n - 'qdr:w' - Filter results from the week.\n - 'qdr:m' - Display results from the past month.\n - 'qdr:y' - Show results from the past year.\n - 'qdr:h10', 'qdr:d10', 'qdr:w10', 'qdr:m10', 'qdr:y10' - Specify a number to show results from the last 10 hours, days, weeks, months, or years respectively.\n\nThese filters enhance the control over search results, allowing for precise retrieval of information based on specific criteria.\n") cmd.Flags().StringVar(&p_uuleVar, "uule", "", "uule Encoded Location: The encoded location parameter.") return cmd diff --git a/cmd/gen_google_short_videos.go b/cmd/gen_google_short_videos.go index 03a5fec..1460b1d 100644 --- a/cmd/gen_google_short_videos.go +++ b/cmd/gen_google_short_videos.go @@ -107,7 +107,7 @@ func newGoogleShortVideosCmd() *cobra.Command { cmd.Flags().IntVar(&p_pageVar, "page", 0, "page Page Number: Page number for paginated results, where 0 is the first page.") cmd.Flags().StringVar(&p_qVar, "q", "Coffee", "q Search Query: Search query term for retrieving short videos results. (required)") _ = cmd.MarkFlagRequired("q") - cmd.Flags().StringVar(&p_tbsVar, "tbs", "", "tbs Advanced Search Parameters: Google advanced search filters, combined with commas. For example:\n\n - `qdr:h`, `qdr:d`, `qdr:w`, `qdr:m`, `qdr:y` - Show videos from the past hour, day, week, month, or year.\n") + cmd.Flags().StringVar(&p_tbsVar, "tbs", "", "tbs Advanced Search Parameters: Google advanced search filters, combined with commas. For example:\n\n - 'qdr:h', 'qdr:d', 'qdr:w', 'qdr:m', 'qdr:y' - Show videos from the past hour, day, week, month, or year.\n") cmd.Flags().StringVar(&p_uuleVar, "uule", "", "uule Encoded Location: The encoded location parameter.") return cmd diff --git a/cmd/gen_google_trends.go b/cmd/gen_google_trends.go index a842b30..4adbf97 100644 --- a/cmd/gen_google_trends.go +++ b/cmd/gen_google_trends.go @@ -73,14 +73,14 @@ func newGoogleTrendsCmd() *cobra.Command { }, } cmd.Flags().StringVar(&p_catVar, "cat", "", "cat Category: Category of the search term. The default value is 0 (\"All categories\").") - cmd.Flags().StringVar(&p_dataTypeVar, "data-type", "", "dataType Data Type: Defines the type of search to perform.\n\nAvailable options:\n - `timeseries`: Interest over time (default). Accepts both single and multiple queries per search.\n - `geoMap`: Interest by region. Accepts both single and multiple queries per search.\n - `relatedTopics`: Related topics. Accepts only single query per search.\n - `relatedQueries`: Related queries. Accepts only single query per search.\n") - cmd.Flags().StringVar(&p_dateVar, "date", "", "date Date Range: Defines a date range for the search. Available options:\n\n- `now 1-H`: Past hour\n- `now 4-H`: Past 4 hours\n- `now 1-d`: Past day\n- `now 7-d`: Past 7 days\n- `today 1-m`: Past 30 days\n- `today 3-m`: Past 90 days\n- `today 12-m`: Past 12 months\n- `today 5-y`: Past 5 years\n- `all`: 2004 - present\n\nYou can also specify a custom date range using one of the following formats:\n\n- `yyyy-mm-dd yyyy-mm-dd` - (e.g. 2021-10-15 2022-05-25) for dates from 2004 to present.\n- `yyyy-mm-ddThh yyyy-mm-ddThh` - (e.g. 2022-05-19T10 2022-05-24T22) for dates with hours within a week range. The hours will be calculated based on the tz (time zone) parameter.\n") + cmd.Flags().StringVar(&p_dataTypeVar, "data-type", "", "dataType Data Type: Defines the type of search to perform.\n\nAvailable options:\n - 'timeseries': Interest over time (default). Accepts both single and multiple queries per search.\n - 'geoMap': Interest by region. Accepts both single and multiple queries per search.\n - 'relatedTopics': Related topics. Accepts only single query per search.\n - 'relatedQueries': Related queries. Accepts only single query per search.\n") + cmd.Flags().StringVar(&p_dateVar, "date", "", "date Date Range: Defines a date range for the search. Available options:\n\n- 'now 1-H': Past hour\n- 'now 4-H': Past 4 hours\n- 'now 1-d': Past day\n- 'now 7-d': Past 7 days\n- 'today 1-m': Past 30 days\n- 'today 3-m': Past 90 days\n- 'today 12-m': Past 12 months\n- 'today 5-y': Past 5 years\n- 'all': 2004 - present\n\nYou can also specify a custom date range using one of the following formats:\n\n- 'yyyy-mm-dd yyyy-mm-dd' - (e.g. 2021-10-15 2022-05-25) for dates from 2004 to present.\n- 'yyyy-mm-ddThh yyyy-mm-ddThh' - (e.g. 2022-05-19T10 2022-05-24T22) for dates with hours within a week range. The hours will be calculated based on the tz (time zone) parameter.\n") cmd.Flags().StringVar(&p_geoVar, "geo", "", "geo Location: Specifies the location for the search. Defaults to Worldwide if not set or empty.") - cmd.Flags().StringVar(&p_gpropVar, "gprop", "", "gprop Google Property: Sorts results by a specific property. The default property is Web Search (applied when the gprop parameter is not set or empty).\n\nAvailable options:\n - `images`: Image Search\n - `news`: News Search\n - `froogle`: Google Shopping\n - `youtube`: YouTube Search\n") + cmd.Flags().StringVar(&p_gpropVar, "gprop", "", "gprop Google Property: Sorts results by a specific property. The default property is Web Search (applied when the gprop parameter is not set or empty).\n\nAvailable options:\n - 'images': Image Search\n - 'news': News Search\n - 'froogle': Google Shopping\n - 'youtube': YouTube Search\n") cmd.Flags().StringVar(&p_qVar, "q", "Coffee", "q Search Query: Specify the search term for which you want to retrieve trends data. (required)") _ = cmd.MarkFlagRequired("q") - cmd.Flags().StringVar(&p_regionVar, "region", "", "region Region: Used to get more specific results when using \"Interest by region\" data type. Other data types do not accept this parameter. The default value depends on the geo location that is set.\n\nAvailable options:\n - `country`: Country\n - `region`: Subregion\n - `dma`: Metro\n - `city`: City\n\nNote: Not all region options will return results for every geo location.\n") - cmd.Flags().Float64Var(&p_tzVar, "tz", 0, "tz Time Zone: Defines a time zone offset in minutes. The default value is 420 (Pacific Daylight Time (PDT): UTC-7). The valid range for this parameter is from -1439 to 1439.\n\nTo calculate the `tz` value for a specific time zone, you can use the time difference between UTC +0 and the desired time zone.\n\nExamples:\n- `420`: Pacific Daylight Time (PDT)\n- `60`: Central European Time (CET)\n- `-540`: Japan Standard Time\n") + cmd.Flags().StringVar(&p_regionVar, "region", "", "region Region: Used to get more specific results when using \"Interest by region\" data type. Other data types do not accept this parameter. The default value depends on the geo location that is set.\n\nAvailable options:\n - 'country': Country\n - 'region': Subregion\n - 'dma': Metro\n - 'city': City\n\nNote: Not all region options will return results for every geo location.\n") + cmd.Flags().Float64Var(&p_tzVar, "tz", 0, "tz Time Zone: Defines a time zone offset in minutes. The default value is 420 (Pacific Daylight Time (PDT): UTC-7). The valid range for this parameter is from -1439 to 1439.\n\nTo calculate the 'tz' value for a specific time zone, you can use the time difference between UTC +0 and the desired time zone.\n\nExamples:\n- '420': Pacific Daylight Time (PDT)\n- '60': Central European Time (CET)\n- '-540': Japan Standard Time\n") return cmd } diff --git a/cmd/gen_indeed_listing.go b/cmd/gen_indeed_listing.go index 9b5ca8c..5f2a14b 100644 --- a/cmd/gen_indeed_listing.go +++ b/cmd/gen_indeed_listing.go @@ -103,8 +103,8 @@ func newIndeedListingCmd() *cobra.Command { _ = cmd.MarkFlagRequired("keyword") cmd.Flags().StringVar(&p_locationVar, "location", "New York, NY", "location Location: The location to search for job listings. (required)") _ = cmd.MarkFlagRequired("location") - cmd.Flags().StringVar(&p_nextPageVar, "next-page", "", "nextPage Next Page: The recommended way to paginate. To fetch the next page, pass the `pagination.nextPage` value from the previous response to preserve the ranking order of the search results. When `nextPage` is passed, the `start` parameter is ignored.") - cmd.Flags().StringVar(&p_remoteTypeVar, "remote-type", "", "remoteType Remote: Returns only remote (`remote`) or hybrid (`hybrid`) jobs. In the US, Indeed ties fully remote jobs to the country rather than a city, so use a country-wide location such as `United States`: with a city, Indeed returns few or no remote jobs. [allowed: remote|hybrid]") + cmd.Flags().StringVar(&p_nextPageVar, "next-page", "", "nextPage Next Page: The recommended way to paginate. To fetch the next page, pass the 'pagination.nextPage' value from the previous response to preserve the ranking order of the search results. When 'nextPage' is passed, the 'start' parameter is ignored.") + cmd.Flags().StringVar(&p_remoteTypeVar, "remote-type", "", "remoteType Remote: Returns only remote ('remote') or hybrid ('hybrid') jobs. In the US, Indeed ties fully remote jobs to the country rather than a city, so use a country-wide location such as 'United States': with a city, Indeed returns few or no remote jobs. [allowed: remote|hybrid]") _ = cmd.RegisterFlagCompletionFunc("remote-type", func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective) { return []string{"remote", "hybrid"}, cobra.ShellCompDirectiveNoFileComp }) @@ -113,7 +113,7 @@ func newIndeedListingCmd() *cobra.Command { return []string{"relevance", "date"}, cobra.ShellCompDirectiveNoFileComp }) cmd.Flags().BoolVar(&p_sponsoredOnlyVar, "sponsored-only", false, "sponsoredOnly Sponsored Only: When enabled, the request is made in a way that returns more sponsored listings. Defaults to false.") - cmd.Flags().Float64Var(&p_startVar, "start", 0, "start Result Offset: The starting index of the results to retrieve from a single page. For ranked data spanning multiple pages, we recommend using only `nextPage`.") + cmd.Flags().Float64Var(&p_startVar, "start", 0, "start Result Offset: The starting index of the results to retrieve from a single page. For ranked data spanning multiple pages, we recommend using only 'nextPage'.") return cmd } diff --git a/cmd/gen_instagram_comments.go b/cmd/gen_instagram_comments.go index 81ec4af..ea577dd 100644 --- a/cmd/gen_instagram_comments.go +++ b/cmd/gen_instagram_comments.go @@ -52,9 +52,9 @@ func newInstagramCommentsCmd() *cobra.Command { return WriteResponse(c, resp) }, } - cmd.Flags().BoolVar(&p_includeMusicVar, "include-music", false, "includeMusic Include Music: Also return the reel's sound (audio ID, artist and song title) in `post.music`, for both licensed tracks and original audio. This takes an extra request to Instagram on the first page and is ignored when `nextPageToken` is set. Default is false.") - cmd.Flags().StringVar(&p_nextPageTokenVar, "next-page-token", "", "nextPageToken Next Page Token: Defines the next page token. Use the `nextPageToken` value returned by the previous response. Omit it to fetch the first page.") - cmd.Flags().StringVar(&p_urlVar, "url", "https://www.instagram.com/instagram/p/Ddjis3vETcP/", "url Post URL: The URL of the Instagram post or reel, for example `https://www.instagram.com/p/Ddjis3vETcP/` or `https://www.instagram.com/instagram/reel/DcymgItMFao/`. (required)") + cmd.Flags().BoolVar(&p_includeMusicVar, "include-music", false, "includeMusic Include Music: Also return the reel's sound (audio ID, artist and song title) in 'post.music', for both licensed tracks and original audio. This takes an extra request to Instagram on the first page and is ignored when 'nextPageToken' is set. Default is false.") + cmd.Flags().StringVar(&p_nextPageTokenVar, "next-page-token", "", "nextPageToken Next Page Token: Defines the next page token. Use the 'nextPageToken' value returned by the previous response. Omit it to fetch the first page.") + cmd.Flags().StringVar(&p_urlVar, "url", "https://www.instagram.com/instagram/p/Ddjis3vETcP/", "url Post URL: The URL of the Instagram post or reel, for example 'https://www.instagram.com/p/Ddjis3vETcP/' or 'https://www.instagram.com/instagram/reel/DcymgItMFao/'. (required)") _ = cmd.MarkFlagRequired("url") return cmd diff --git a/cmd/gen_instagram_posts.go b/cmd/gen_instagram_posts.go index 20951b9..3008249 100644 --- a/cmd/gen_instagram_posts.go +++ b/cmd/gen_instagram_posts.go @@ -52,10 +52,10 @@ func newInstagramPostsCmd() *cobra.Command { return WriteResponse(c, resp) }, } - cmd.Flags().StringVar(&p_handleVar, "handle", "hasdatadotcom", "handle Instagram Handle: The Instagram username of the account whose posts you want to scrape, without the `@` symbol. (required)") + cmd.Flags().StringVar(&p_handleVar, "handle", "hasdatadotcom", "handle Instagram Handle: The Instagram username of the account whose posts you want to scrape, without the '@' symbol. (required)") _ = cmd.MarkFlagRequired("handle") cmd.Flags().IntVar(&p_limitVar, "limit", 12, "limit Results Limit: The maximum number of posts to retrieve per request. Defaults to 12.") - cmd.Flags().StringVar(&p_nextPageTokenVar, "next-page-token", "", "nextPageToken Next Page Token: Defines the next page token. It is used for retrieving the next page results. Use the `nextPageToken` value returned by the previous response.") + cmd.Flags().StringVar(&p_nextPageTokenVar, "next-page-token", "", "nextPageToken Next Page Token: Defines the next page token. It is used for retrieving the next page results. Use the 'nextPageToken' value returned by the previous response.") return cmd } diff --git a/cmd/gen_instagram_profile.go b/cmd/gen_instagram_profile.go index 61ef364..8d06178 100644 --- a/cmd/gen_instagram_profile.go +++ b/cmd/gen_instagram_profile.go @@ -44,7 +44,7 @@ func newInstagramProfileCmd() *cobra.Command { return WriteResponse(c, resp) }, } - cmd.Flags().StringVar(&p_handleVar, "handle", "hasdatadotcom", "handle Instagram Handle: The Instagram username of the profile you want to scrape, without the `@` symbol. (required)") + cmd.Flags().StringVar(&p_handleVar, "handle", "hasdatadotcom", "handle Instagram Handle: The Instagram username of the profile you want to scrape, without the '@' symbol. (required)") _ = cmd.MarkFlagRequired("handle") return cmd diff --git a/cmd/gen_redfin_listing.go b/cmd/gen_redfin_listing.go index 2f392af..2823340 100644 --- a/cmd/gen_redfin_listing.go +++ b/cmd/gen_redfin_listing.go @@ -493,11 +493,11 @@ func newRedfinListingCmd() *cobra.Command { _ = cmd.RegisterFlagCompletionFunc("home-features-pool-type", func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective) { return []string{"privatePool", "communityPool", "privateOrCommunityPool", "noPrivatePool"}, cobra.ShellCompDirectiveNoFileComp }) - cmd.Flags().StringSliceVar(&p_homeTypesVar, "home-types", nil, "homeTypes[] Home Types: An array of home types to filter the listings. Allowed values depend on the listing `type`.") + cmd.Flags().StringSliceVar(&p_homeTypesVar, "home-types", nil, "homeTypes[] Home Types: An array of home types to filter the listings. Allowed values depend on the listing 'type'.") _ = cmd.RegisterFlagCompletionFunc("home-types", func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective) { return []string{"house", "townhouse", "townhome", "condo", "land", "multiFamily", "mobile", "coOp", "other", "apartment"}, cobra.ShellCompDirectiveNoFileComp }) - cmd.Flags().StringVar(&p_keywordVar, "keyword", "33321", "keyword Location: The location to search for listings. Accepts a zipcode (`33321`), a city (`Austin` or `Austin, TX`), a neighborhood (`East Austin`), a school (`BASIS Austin`), a school district (`Austin Independent School District`), an apartment building by its name (`Maizon Brickell`), or a full street address (`5805 Woodview Ave, Austin, TX 78756`), including a single unit (`221 SW 12th St Unit 1716, Miami, FL`). An address or a building returns a single property card instead of a list of listings, and the `type` parameter does not apply to it. (required)") + cmd.Flags().StringVar(&p_keywordVar, "keyword", "33321", "keyword Location: The location to search for listings. Accepts a zipcode ('33321'), a city ('Austin' or 'Austin, TX'), a neighborhood ('East Austin'), a school ('BASIS Austin'), a school district ('Austin Independent School District'), an apartment building by its name ('Maizon Brickell'), or a full street address ('5805 Woodview Ave, Austin, TX 78756'), including a single unit ('221 SW 12th St Unit 1716, Miami, FL'). An address or a building returns a single property card instead of a list of listings, and the 'type' parameter does not apply to it. (required)") _ = cmd.MarkFlagRequired("keyword") cmd.Flags().StringSliceVar(&p_listingType_categoryVar, "listing-type-category", nil, "listingType[category][] Listing Category: An array of listing categories.") _ = cmd.RegisterFlagCompletionFunc("listing-type-category", func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective) { diff --git a/cmd/gen_tiktok_comments.go b/cmd/gen_tiktok_comments.go index 8aec565..e435296 100644 --- a/cmd/gen_tiktok_comments.go +++ b/cmd/gen_tiktok_comments.go @@ -53,8 +53,8 @@ func newTiktokCommentsCmd() *cobra.Command { }, } cmd.Flags().StringVar(&p_commentIdVar, "comment-id", "", "commentId Comment ID: When provided, returns the replies to this comment instead of the video's top-level comments.") - cmd.Flags().StringVar(&p_nextPageTokenVar, "next-page-token", "", "nextPageToken Next Page Token: Defines the next page token. Use the `nextPageToken` value returned by the previous response. Omit it to fetch the first page.") - cmd.Flags().StringVar(&p_videoIdVar, "video-id", "7667749432279977230", "videoId Video ID: The numeric id of the video (the number after `/video/` in a TikTok URL). (required)") + cmd.Flags().StringVar(&p_nextPageTokenVar, "next-page-token", "", "nextPageToken Next Page Token: Defines the next page token. Use the 'nextPageToken' value returned by the previous response. Omit it to fetch the first page.") + cmd.Flags().StringVar(&p_videoIdVar, "video-id", "7667749432279977230", "videoId Video ID: The numeric id of the video (the number after '/video/' in a TikTok URL). (required)") _ = cmd.MarkFlagRequired("video-id") return cmd diff --git a/cmd/gen_tiktok_posts.go b/cmd/gen_tiktok_posts.go index 8453b3a..91087bc 100644 --- a/cmd/gen_tiktok_posts.go +++ b/cmd/gen_tiktok_posts.go @@ -48,9 +48,9 @@ func newTiktokPostsCmd() *cobra.Command { return WriteResponse(c, resp) }, } - cmd.Flags().StringVar(&p_handleVar, "handle", "tiktok", "handle TikTok Handle: The TikTok username of the account whose videos you want to scrape, with or without the `@` symbol. (required)") + cmd.Flags().StringVar(&p_handleVar, "handle", "tiktok", "handle TikTok Handle: The TikTok username of the account whose videos you want to scrape, with or without the '@' symbol. (required)") _ = cmd.MarkFlagRequired("handle") - cmd.Flags().StringVar(&p_nextPageTokenVar, "next-page-token", "", "nextPageToken Next Page Token: Defines the next page token. It is used for retrieving the next page of results. Use the `nextPageToken` value returned by the previous response. Omit it to fetch the first page.") + cmd.Flags().StringVar(&p_nextPageTokenVar, "next-page-token", "", "nextPageToken Next Page Token: Defines the next page token. It is used for retrieving the next page of results. Use the 'nextPageToken' value returned by the previous response. Omit it to fetch the first page.") return cmd } diff --git a/cmd/gen_tiktok_profile.go b/cmd/gen_tiktok_profile.go index e268441..aa6be2b 100644 --- a/cmd/gen_tiktok_profile.go +++ b/cmd/gen_tiktok_profile.go @@ -44,7 +44,7 @@ func newTiktokProfileCmd() *cobra.Command { return WriteResponse(c, resp) }, } - cmd.Flags().StringVar(&p_handleVar, "handle", "nasa", "handle TikTok Handle: The TikTok username of the profile you want to scrape, with or without the `@` symbol. (required)") + cmd.Flags().StringVar(&p_handleVar, "handle", "nasa", "handle TikTok Handle: The TikTok username of the profile you want to scrape, with or without the '@' symbol. (required)") _ = cmd.MarkFlagRequired("handle") return cmd diff --git a/cmd/gen_tiktok_search.go b/cmd/gen_tiktok_search.go index be86812..9f5ab44 100644 --- a/cmd/gen_tiktok_search.go +++ b/cmd/gen_tiktok_search.go @@ -59,7 +59,7 @@ func newTiktokSearchCmd() *cobra.Command { } cmd.Flags().StringVar(&p_keywordVar, "keyword", "dance", "keyword Keyword: The phrase to search for on TikTok. (required)") _ = cmd.MarkFlagRequired("keyword") - cmd.Flags().StringVar(&p_nextPageTokenVar, "next-page-token", "", "nextPageToken Next Page Token: Defines the next page token. Use the `nextPageToken` value returned by the previous response. Omit it to fetch the first page.") + cmd.Flags().StringVar(&p_nextPageTokenVar, "next-page-token", "", "nextPageToken Next Page Token: Defines the next page token. Use the 'nextPageToken' value returned by the previous response. Omit it to fetch the first page.") cmd.Flags().StringVar(&p_typeVar, "type", "", "type Result Type: What to search for — videos or users. Defaults to video. [allowed: video|user]") _ = cmd.RegisterFlagCompletionFunc("type", func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective) { return []string{"video", "user"}, cobra.ShellCompDirectiveNoFileComp diff --git a/cmd/gen_tripadvisor_place.go b/cmd/gen_tripadvisor_place.go index 0876ad6..9b43c38 100644 --- a/cmd/gen_tripadvisor_place.go +++ b/cmd/gen_tripadvisor_place.go @@ -53,7 +53,7 @@ func newTripadvisorPlaceCmd() *cobra.Command { return WriteResponse(c, resp) }, } - cmd.Flags().StringVar(&p_domainVar, "domain", "", "domain Domain: Tripadvisor domain to use. The domain sets the language of the results. Default is `www.tripadvisor.com`. [allowed: www.tripadvisor.com|ar.tripadvisor.com|www.tripadvisor.com.ar|www.tripadvisor.com.au|www.tripadvisor.at|www.tripadvisor.be|fr.tripadvisor.be|www.tripadvisor.com.br|www.tripadvisor.ca|fr.tripadvisor.ca|www.tripadvisor.cl|cn.tripadvisor.com|www.tripadvisor.co|www.tripadvisor.com.pe|www.tripadvisor.dk|www.tripadvisor.com.eg|www.tripadvisor.fr|www.tripadvisor.de|www.tripadvisor.com.gr|www.tripadvisor.com.hk|en.tripadvisor.com.hk|www.tripadvisor.in|www.tripadvisor.co.id|www.tripadvisor.ie|www.tripadvisor.co.il|www.tripadvisor.it|www.tripadvisor.jp|www.tripadvisor.co.kr|www.tripadvisor.com.my|www.tripadvisor.com.mx|www.tripadvisor.nl|www.tripadvisor.co.nz|no.tripadvisor.com|www.tripadvisor.com.ph|www.tripadvisor.pt|www.tripadvisor.ru|www.tripadvisor.com.sg|www.tripadvisor.co.za|www.tripadvisor.es|www.tripadvisor.se|fr.tripadvisor.ch|www.tripadvisor.ch|it.tripadvisor.ch|www.tripadvisor.com.tw|th.tripadvisor.com|www.tripadvisor.com.tr|www.tripadvisor.co.uk|www.tripadvisor.com.ve|www.tripadvisor.com.vn]") + cmd.Flags().StringVar(&p_domainVar, "domain", "", "domain Domain: Tripadvisor domain to use. The domain sets the language of the results. Default is 'www.tripadvisor.com'. [allowed: www.tripadvisor.com|ar.tripadvisor.com|www.tripadvisor.com.ar|www.tripadvisor.com.au|www.tripadvisor.at|www.tripadvisor.be|fr.tripadvisor.be|www.tripadvisor.com.br|www.tripadvisor.ca|fr.tripadvisor.ca|www.tripadvisor.cl|cn.tripadvisor.com|www.tripadvisor.co|www.tripadvisor.com.pe|www.tripadvisor.dk|www.tripadvisor.com.eg|www.tripadvisor.fr|www.tripadvisor.de|www.tripadvisor.com.gr|www.tripadvisor.com.hk|en.tripadvisor.com.hk|www.tripadvisor.in|www.tripadvisor.co.id|www.tripadvisor.ie|www.tripadvisor.co.il|www.tripadvisor.it|www.tripadvisor.jp|www.tripadvisor.co.kr|www.tripadvisor.com.my|www.tripadvisor.com.mx|www.tripadvisor.nl|www.tripadvisor.co.nz|no.tripadvisor.com|www.tripadvisor.com.ph|www.tripadvisor.pt|www.tripadvisor.ru|www.tripadvisor.com.sg|www.tripadvisor.co.za|www.tripadvisor.es|www.tripadvisor.se|fr.tripadvisor.ch|www.tripadvisor.ch|it.tripadvisor.ch|www.tripadvisor.com.tw|th.tripadvisor.com|www.tripadvisor.com.tr|www.tripadvisor.co.uk|www.tripadvisor.com.ve|www.tripadvisor.com.vn]") _ = cmd.RegisterFlagCompletionFunc("domain", func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective) { return []string{"www.tripadvisor.com", "ar.tripadvisor.com", "www.tripadvisor.com.ar", "www.tripadvisor.com.au", "www.tripadvisor.at", "www.tripadvisor.be", "fr.tripadvisor.be", "www.tripadvisor.com.br", "www.tripadvisor.ca", "fr.tripadvisor.ca", "www.tripadvisor.cl", "cn.tripadvisor.com", "www.tripadvisor.co", "www.tripadvisor.com.pe", "www.tripadvisor.dk", "www.tripadvisor.com.eg", "www.tripadvisor.fr", "www.tripadvisor.de", "www.tripadvisor.com.gr", "www.tripadvisor.com.hk", "en.tripadvisor.com.hk", "www.tripadvisor.in", "www.tripadvisor.co.id", "www.tripadvisor.ie", "www.tripadvisor.co.il", "www.tripadvisor.it", "www.tripadvisor.jp", "www.tripadvisor.co.kr", "www.tripadvisor.com.my", "www.tripadvisor.com.mx", "www.tripadvisor.nl", "www.tripadvisor.co.nz", "no.tripadvisor.com", "www.tripadvisor.com.ph", "www.tripadvisor.pt", "www.tripadvisor.ru", "www.tripadvisor.com.sg", "www.tripadvisor.co.za", "www.tripadvisor.es", "www.tripadvisor.se", "fr.tripadvisor.ch", "www.tripadvisor.ch", "it.tripadvisor.ch", "www.tripadvisor.com.tw", "th.tripadvisor.com", "www.tripadvisor.com.tr", "www.tripadvisor.co.uk", "www.tripadvisor.com.ve", "www.tripadvisor.com.vn"}, cobra.ShellCompDirectiveNoFileComp }) diff --git a/cmd/gen_tripadvisor_reviews.go b/cmd/gen_tripadvisor_reviews.go index b7d8012..02834a7 100644 --- a/cmd/gen_tripadvisor_reviews.go +++ b/cmd/gen_tripadvisor_reviews.go @@ -97,14 +97,14 @@ func newTripadvisorReviewsCmd() *cobra.Command { return WriteResponse(c, resp) }, } - cmd.Flags().StringVar(&p_domainVar, "domain", "", "domain Domain: Tripadvisor domain to use. The domain sets the language of the results. Default is `www.tripadvisor.com`. [allowed: www.tripadvisor.com|ar.tripadvisor.com|www.tripadvisor.com.ar|www.tripadvisor.com.au|www.tripadvisor.at|www.tripadvisor.be|fr.tripadvisor.be|www.tripadvisor.com.br|www.tripadvisor.ca|fr.tripadvisor.ca|www.tripadvisor.cl|cn.tripadvisor.com|www.tripadvisor.co|www.tripadvisor.com.pe|www.tripadvisor.dk|www.tripadvisor.com.eg|www.tripadvisor.fr|www.tripadvisor.de|www.tripadvisor.com.gr|www.tripadvisor.com.hk|en.tripadvisor.com.hk|www.tripadvisor.in|www.tripadvisor.co.id|www.tripadvisor.ie|www.tripadvisor.co.il|www.tripadvisor.it|www.tripadvisor.jp|www.tripadvisor.co.kr|www.tripadvisor.com.my|www.tripadvisor.com.mx|www.tripadvisor.nl|www.tripadvisor.co.nz|no.tripadvisor.com|www.tripadvisor.com.ph|www.tripadvisor.pt|www.tripadvisor.ru|www.tripadvisor.com.sg|www.tripadvisor.co.za|www.tripadvisor.es|www.tripadvisor.se|fr.tripadvisor.ch|www.tripadvisor.ch|it.tripadvisor.ch|www.tripadvisor.com.tw|th.tripadvisor.com|www.tripadvisor.com.tr|www.tripadvisor.co.uk|www.tripadvisor.com.ve|www.tripadvisor.com.vn]") + cmd.Flags().StringVar(&p_domainVar, "domain", "", "domain Domain: Tripadvisor domain to use. The domain sets the language of the results. Default is 'www.tripadvisor.com'. [allowed: www.tripadvisor.com|ar.tripadvisor.com|www.tripadvisor.com.ar|www.tripadvisor.com.au|www.tripadvisor.at|www.tripadvisor.be|fr.tripadvisor.be|www.tripadvisor.com.br|www.tripadvisor.ca|fr.tripadvisor.ca|www.tripadvisor.cl|cn.tripadvisor.com|www.tripadvisor.co|www.tripadvisor.com.pe|www.tripadvisor.dk|www.tripadvisor.com.eg|www.tripadvisor.fr|www.tripadvisor.de|www.tripadvisor.com.gr|www.tripadvisor.com.hk|en.tripadvisor.com.hk|www.tripadvisor.in|www.tripadvisor.co.id|www.tripadvisor.ie|www.tripadvisor.co.il|www.tripadvisor.it|www.tripadvisor.jp|www.tripadvisor.co.kr|www.tripadvisor.com.my|www.tripadvisor.com.mx|www.tripadvisor.nl|www.tripadvisor.co.nz|no.tripadvisor.com|www.tripadvisor.com.ph|www.tripadvisor.pt|www.tripadvisor.ru|www.tripadvisor.com.sg|www.tripadvisor.co.za|www.tripadvisor.es|www.tripadvisor.se|fr.tripadvisor.ch|www.tripadvisor.ch|it.tripadvisor.ch|www.tripadvisor.com.tw|th.tripadvisor.com|www.tripadvisor.com.tr|www.tripadvisor.co.uk|www.tripadvisor.com.ve|www.tripadvisor.com.vn]") _ = cmd.RegisterFlagCompletionFunc("domain", func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective) { return []string{"www.tripadvisor.com", "ar.tripadvisor.com", "www.tripadvisor.com.ar", "www.tripadvisor.com.au", "www.tripadvisor.at", "www.tripadvisor.be", "fr.tripadvisor.be", "www.tripadvisor.com.br", "www.tripadvisor.ca", "fr.tripadvisor.ca", "www.tripadvisor.cl", "cn.tripadvisor.com", "www.tripadvisor.co", "www.tripadvisor.com.pe", "www.tripadvisor.dk", "www.tripadvisor.com.eg", "www.tripadvisor.fr", "www.tripadvisor.de", "www.tripadvisor.com.gr", "www.tripadvisor.com.hk", "en.tripadvisor.com.hk", "www.tripadvisor.in", "www.tripadvisor.co.id", "www.tripadvisor.ie", "www.tripadvisor.co.il", "www.tripadvisor.it", "www.tripadvisor.jp", "www.tripadvisor.co.kr", "www.tripadvisor.com.my", "www.tripadvisor.com.mx", "www.tripadvisor.nl", "www.tripadvisor.co.nz", "no.tripadvisor.com", "www.tripadvisor.com.ph", "www.tripadvisor.pt", "www.tripadvisor.ru", "www.tripadvisor.com.sg", "www.tripadvisor.co.za", "www.tripadvisor.es", "www.tripadvisor.se", "fr.tripadvisor.ch", "www.tripadvisor.ch", "it.tripadvisor.ch", "www.tripadvisor.com.tw", "th.tripadvisor.com", "www.tripadvisor.com.tr", "www.tripadvisor.co.uk", "www.tripadvisor.com.ve", "www.tripadvisor.com.vn"}, cobra.ShellCompDirectiveNoFileComp }) - cmd.Flags().StringVar(&p_languageVar, "language", "", "language Language: Review language code, e.g. `en` or `fr`. Includes reviews machine-translated into it; compare `language` and `originalLanguage` on each review. All languages when omitted.") + cmd.Flags().StringVar(&p_languageVar, "language", "", "language Language: Review language code, e.g. 'en' or 'fr'. Includes reviews machine-translated into it; compare 'language' and 'originalLanguage' on each review. All languages when omitted.") cmd.Flags().IntVar(&p_limitVar, "limit", 0, "limit Results Limit: Number of reviews to return.") cmd.Flags().StringSliceVar(&p_monthVar, "month", nil, "month[] Month of Visit: Only reviews of visits in these months (1 = January). Multiple values are combined with OR.") - cmd.Flags().IntVar(&p_offsetVar, "offset", 0, "offset Result Offset: Number of reviews to skip. Use `pagination.nextOffset` from the previous response, or call `pagination.hasdataLink`, which repeats every filter with the next offset.") + cmd.Flags().IntVar(&p_offsetVar, "offset", 0, "offset Result Offset: Number of reviews to skip. Use 'pagination.nextOffset' from the previous response, or call 'pagination.hasdataLink', which repeats every filter with the next offset.") cmd.Flags().StringVar(&p_placeIdVar, "place-id", "190138", "placeId Place ID: Tripadvisor place ID, as returned by the Tripadvisor Search API. (required)") _ = cmd.MarkFlagRequired("place-id") cmd.Flags().StringSliceVar(&p_ratingVar, "rating", nil, "rating[] Rating: Only reviews with these ratings. Multiple values are combined with OR.") diff --git a/cmd/gen_tripadvisor_search.go b/cmd/gen_tripadvisor_search.go index 448b798..aca4688 100644 --- a/cmd/gen_tripadvisor_search.go +++ b/cmd/gen_tripadvisor_search.go @@ -78,17 +78,17 @@ func newTripadvisorSearchCmd() *cobra.Command { return WriteResponse(c, resp) }, } - cmd.Flags().StringVar(&p_domainVar, "domain", "", "domain Domain: Tripadvisor domain to use. The domain sets the language of the results. Default is `www.tripadvisor.com`. [allowed: www.tripadvisor.com|ar.tripadvisor.com|www.tripadvisor.com.ar|www.tripadvisor.com.au|www.tripadvisor.at|www.tripadvisor.be|fr.tripadvisor.be|www.tripadvisor.com.br|www.tripadvisor.ca|fr.tripadvisor.ca|www.tripadvisor.cl|cn.tripadvisor.com|www.tripadvisor.co|www.tripadvisor.com.pe|www.tripadvisor.dk|www.tripadvisor.com.eg|www.tripadvisor.fr|www.tripadvisor.de|www.tripadvisor.com.gr|www.tripadvisor.com.hk|en.tripadvisor.com.hk|www.tripadvisor.in|www.tripadvisor.co.id|www.tripadvisor.ie|www.tripadvisor.co.il|www.tripadvisor.it|www.tripadvisor.jp|www.tripadvisor.co.kr|www.tripadvisor.com.my|www.tripadvisor.com.mx|www.tripadvisor.nl|www.tripadvisor.co.nz|no.tripadvisor.com|www.tripadvisor.com.ph|www.tripadvisor.pt|www.tripadvisor.ru|www.tripadvisor.com.sg|www.tripadvisor.co.za|www.tripadvisor.es|www.tripadvisor.se|fr.tripadvisor.ch|www.tripadvisor.ch|it.tripadvisor.ch|www.tripadvisor.com.tw|th.tripadvisor.com|www.tripadvisor.com.tr|www.tripadvisor.co.uk|www.tripadvisor.com.ve|www.tripadvisor.com.vn]") + cmd.Flags().StringVar(&p_domainVar, "domain", "", "domain Domain: Tripadvisor domain to use. The domain sets the language of the results. Default is 'www.tripadvisor.com'. [allowed: www.tripadvisor.com|ar.tripadvisor.com|www.tripadvisor.com.ar|www.tripadvisor.com.au|www.tripadvisor.at|www.tripadvisor.be|fr.tripadvisor.be|www.tripadvisor.com.br|www.tripadvisor.ca|fr.tripadvisor.ca|www.tripadvisor.cl|cn.tripadvisor.com|www.tripadvisor.co|www.tripadvisor.com.pe|www.tripadvisor.dk|www.tripadvisor.com.eg|www.tripadvisor.fr|www.tripadvisor.de|www.tripadvisor.com.gr|www.tripadvisor.com.hk|en.tripadvisor.com.hk|www.tripadvisor.in|www.tripadvisor.co.id|www.tripadvisor.ie|www.tripadvisor.co.il|www.tripadvisor.it|www.tripadvisor.jp|www.tripadvisor.co.kr|www.tripadvisor.com.my|www.tripadvisor.com.mx|www.tripadvisor.nl|www.tripadvisor.co.nz|no.tripadvisor.com|www.tripadvisor.com.ph|www.tripadvisor.pt|www.tripadvisor.ru|www.tripadvisor.com.sg|www.tripadvisor.co.za|www.tripadvisor.es|www.tripadvisor.se|fr.tripadvisor.ch|www.tripadvisor.ch|it.tripadvisor.ch|www.tripadvisor.com.tw|th.tripadvisor.com|www.tripadvisor.com.tr|www.tripadvisor.co.uk|www.tripadvisor.com.ve|www.tripadvisor.com.vn]") _ = cmd.RegisterFlagCompletionFunc("domain", func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective) { return []string{"www.tripadvisor.com", "ar.tripadvisor.com", "www.tripadvisor.com.ar", "www.tripadvisor.com.au", "www.tripadvisor.at", "www.tripadvisor.be", "fr.tripadvisor.be", "www.tripadvisor.com.br", "www.tripadvisor.ca", "fr.tripadvisor.ca", "www.tripadvisor.cl", "cn.tripadvisor.com", "www.tripadvisor.co", "www.tripadvisor.com.pe", "www.tripadvisor.dk", "www.tripadvisor.com.eg", "www.tripadvisor.fr", "www.tripadvisor.de", "www.tripadvisor.com.gr", "www.tripadvisor.com.hk", "en.tripadvisor.com.hk", "www.tripadvisor.in", "www.tripadvisor.co.id", "www.tripadvisor.ie", "www.tripadvisor.co.il", "www.tripadvisor.it", "www.tripadvisor.jp", "www.tripadvisor.co.kr", "www.tripadvisor.com.my", "www.tripadvisor.com.mx", "www.tripadvisor.nl", "www.tripadvisor.co.nz", "no.tripadvisor.com", "www.tripadvisor.com.ph", "www.tripadvisor.pt", "www.tripadvisor.ru", "www.tripadvisor.com.sg", "www.tripadvisor.co.za", "www.tripadvisor.es", "www.tripadvisor.se", "fr.tripadvisor.ch", "www.tripadvisor.ch", "it.tripadvisor.ch", "www.tripadvisor.com.tw", "th.tripadvisor.com", "www.tripadvisor.com.tr", "www.tripadvisor.co.uk", "www.tripadvisor.com.ve", "www.tripadvisor.com.vn"}, cobra.ShellCompDirectiveNoFileComp }) - cmd.Flags().Float64Var(&p_latVar, "lat", 40.75, "lat Latitude: Latitude of the search origin. Requires `lon`. Results near this point are ranked higher.") + cmd.Flags().Float64Var(&p_latVar, "lat", 40.75, "lat Latitude: Latitude of the search origin. Requires 'lon'. Results near this point are ranked higher.") cmd.Flags().IntVar(&p_limitVar, "limit", 0, "limit Results Limit: Number of results to return.") - cmd.Flags().Float64Var(&p_lonVar, "lon", -73.99, "lon Longitude: Longitude of the search origin. Requires `lat`.") - cmd.Flags().IntVar(&p_offsetVar, "offset", 0, "offset Result Offset: Number of results to skip, e.g. `30` for the second page with the default limit. Use `pagination.nextOffset` from the previous response. Tripadvisor serves results up to offset 1000.") - cmd.Flags().StringVar(&p_qVar, "q", "Rome", "q Search Query: The search query, e.g. a destination, a property name or a phrase like `luxury hotels in new york city`. (required)") + cmd.Flags().Float64Var(&p_lonVar, "lon", -73.99, "lon Longitude: Longitude of the search origin. Requires 'lat'.") + cmd.Flags().IntVar(&p_offsetVar, "offset", 0, "offset Result Offset: Number of results to skip, e.g. '30' for the second page with the default limit. Use 'pagination.nextOffset' from the previous response. Tripadvisor serves results up to offset 1000.") + cmd.Flags().StringVar(&p_qVar, "q", "Rome", "q Search Query: The search query, e.g. a destination, a property name or a phrase like 'luxury hotels in new york city'. (required)") _ = cmd.MarkFlagRequired("q") - cmd.Flags().StringVar(&p_typeVar, "type", "", "type Result Type: Limits results to one type. `all` mixes destinations, hotels, restaurants and things to do; `forums` returns forum topics instead of places. [allowed: all|hotels|restaurants|thingsToDo|destinations|forums]") + cmd.Flags().StringVar(&p_typeVar, "type", "", "type Result Type: Limits results to one type. 'all' mixes destinations, hotels, restaurants and things to do; 'forums' returns forum topics instead of places. [allowed: all|hotels|restaurants|thingsToDo|destinations|forums]") _ = cmd.RegisterFlagCompletionFunc("type", func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective) { return []string{"all", "hotels", "restaurants", "thingsToDo", "destinations", "forums"}, cobra.ShellCompDirectiveNoFileComp }) diff --git a/cmd/gen_walmart_product.go b/cmd/gen_walmart_product.go index ae708fc..3844915 100644 --- a/cmd/gen_walmart_product.go +++ b/cmd/gen_walmart_product.go @@ -72,17 +72,17 @@ func newWalmartProductCmd() *cobra.Command { return WriteResponse(c, resp) }, } - cmd.Flags().StringVar(&p_domainVar, "domain", "", "domain Domain: Walmart storefront the item belongs to. Each storefront has its own catalog, item ids, prices and currency, so an id from one storefront does not resolve on another. Ignored when `url` is provided. Default is `walmart.com`. [allowed: walmart.com|walmart.ca]") + cmd.Flags().StringVar(&p_domainVar, "domain", "", "domain Domain: Walmart storefront the item belongs to. Each storefront has its own catalog, item ids, prices and currency, so an id from one storefront does not resolve on another. Ignored when 'url' is provided. Default is 'walmart.com'. [allowed: walmart.com|walmart.ca]") _ = cmd.RegisterFlagCompletionFunc("domain", func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective) { return []string{"walmart.com", "walmart.ca"}, cobra.ShellCompDirectiveNoFileComp }) - cmd.Flags().StringVar(&p_itemIdVar, "item-id", "14977205582", "itemId Item ID: Walmart item id, taken from a product URL or from the id field of the Walmart Search API response. On `walmart.com` it is numeric (for example `14977205582`), on `walmart.ca` an alphanumeric code (for example `6NZMJ5CW6MH2`). Required unless `url` is provided.") - cmd.Flags().StringVar(&p_languageVar, "language", "en", "language Language: Language of the product details. Availability depends on the storefront - `walmart.com` serves `en` and `es`, `walmart.ca` serves `en` and `fr`. A language the storefront does not support falls back to its default. [allowed: en|es|fr]") + cmd.Flags().StringVar(&p_itemIdVar, "item-id", "14977205582", "itemId Item ID: Walmart item id, taken from a product URL or from the id field of the Walmart Search API response. On 'walmart.com' it is numeric (for example '14977205582'), on 'walmart.ca' an alphanumeric code (for example '6NZMJ5CW6MH2'). Required unless 'url' is provided.") + cmd.Flags().StringVar(&p_languageVar, "language", "en", "language Language: Language of the product details. Availability depends on the storefront - 'walmart.com' serves 'en' and 'es', 'walmart.ca' serves 'en' and 'fr'. A language the storefront does not support falls back to its default. [allowed: en|es|fr]") _ = cmd.RegisterFlagCompletionFunc("language", func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective) { return []string{"en", "es", "fr"}, cobra.ShellCompDirectiveNoFileComp }) - cmd.Flags().BoolVar(&p_otherOffersVar, "other-offers", false, "otherOffers Other Sellers: Also collect the offers of other sellers competing for this item - each seller name, storefront, price, condition, shipping cost, delivery date and return policy. This takes an extra request to Walmart and costs 5 credits on top of the base 10, whether or not the item turns out to have competing sellers. Enable it to get the seller list - it is the only reliable way to know whether other sellers exist, because the product page's own advertised competitor count is often absent (notably on `walmart.ca`) even when sellers are available. With the switch off, the `otherOffers` block is returned only when the page itself advertises a count, and then carries just that count and the cheapest competing price without the seller list. Default is `false`.") - cmd.Flags().StringVar(&p_urlVar, "url", "https://www.walmart.com/ip/Samsung-Galaxy-S25-Ultra-256GB-Unlocked-Android-Cell-Phone-with-200MP-Camera-Titanium-Blue/14977205582", "url Product URL: A full Walmart product URL to scrape as is. When provided, it overrides `itemId` and the storefront is taken from the URL itself. Required unless `itemId` is provided.") + cmd.Flags().BoolVar(&p_otherOffersVar, "other-offers", false, "otherOffers Other Sellers: Also collect the offers of other sellers competing for this item - each seller name, storefront, price, condition, shipping cost, delivery date and return policy. This takes an extra request to Walmart and costs 5 credits on top of the base 10, whether or not the item turns out to have competing sellers. Enable it to get the seller list - it is the only reliable way to know whether other sellers exist, because the product page's own advertised competitor count is often absent (notably on 'walmart.ca') even when sellers are available. With the switch off, the 'otherOffers' block is returned only when the page itself advertises a count, and then carries just that count and the cheapest competing price without the seller list. Default is 'false'.") + cmd.Flags().StringVar(&p_urlVar, "url", "https://www.walmart.com/ip/Samsung-Galaxy-S25-Ultra-256GB-Unlocked-Android-Cell-Phone-with-200MP-Camera-Titanium-Blue/14977205582", "url Product URL: A full Walmart product URL to scrape as is. When provided, it overrides 'itemId' and the storefront is taken from the URL itself. Required unless 'itemId' is provided.") return cmd } diff --git a/cmd/gen_walmart_reviews.go b/cmd/gen_walmart_reviews.go index d86034e..d30030b 100644 --- a/cmd/gen_walmart_reviews.go +++ b/cmd/gen_walmart_reviews.go @@ -97,24 +97,24 @@ func newWalmartReviewsCmd() *cobra.Command { return WriteResponse(c, resp) }, } - cmd.Flags().StringVar(&p_aspectIdVar, "aspect-id", "", "aspectId Frequent Mention: Return only reviews mentioning one topic. Send the `value` of the topic you want, taken from the Frequent mentions group of the `filters` block in the response - given `{\"name\": \"Battery Life\", \"value\": \"6049\", \"count\": 8}` you send `6049`, and `count` is how many reviews to expect. **Only one topic per request**, Walmart rejects a list of them. Topics belong to the product rather than to Walmart: a phone offers Battery Life or Display, a coffee offers Flavor or Aroma, and some items offer none at all - so make an unfiltered request first and read the block, instead of reusing a topic id across products.") - cmd.Flags().StringVar(&p_conditionVar, "condition", "", "condition Condition: Return only reviews written about one condition of the item. Send the `value` from the Condition group of the `filters` block - given `{\"name\": \"Restored: Like New\", \"value\": \"5\"}` you send `5`. **Only one condition per request.** This group appears for items Walmart sells in several conditions, and only when the request already names one: reach the variant through the `url` parameter with its `conditionGroupCode`, as in `https://www.walmart.com/ip/1028936148?conditionGroupCode=2`, and the block then lists the condition that variant carries. An item sold in a single condition has no such group, and no reviews to separate by it.") - cmd.Flags().StringVar(&p_domainVar, "domain", "", "domain Domain: Walmart storefront the item belongs to. Each storefront has its own catalog, item ids and review pool, so an id from one storefront does not resolve on another. Ignored when `url` is provided. Default is `walmart.com`. [allowed: walmart.com|walmart.ca]") + cmd.Flags().StringVar(&p_aspectIdVar, "aspect-id", "", "aspectId Frequent Mention: Return only reviews mentioning one topic. Send the 'value' of the topic you want, taken from the Frequent mentions group of the 'filters' block in the response - given '{\"name\": \"Battery Life\", \"value\": \"6049\", \"count\": 8}' you send '6049', and 'count' is how many reviews to expect. **Only one topic per request**, Walmart rejects a list of them. Topics belong to the product rather than to Walmart: a phone offers Battery Life or Display, a coffee offers Flavor or Aroma, and some items offer none at all - so make an unfiltered request first and read the block, instead of reusing a topic id across products.") + cmd.Flags().StringVar(&p_conditionVar, "condition", "", "condition Condition: Return only reviews written about one condition of the item. Send the 'value' from the Condition group of the 'filters' block - given '{\"name\": \"Restored: Like New\", \"value\": \"5\"}' you send '5'. **Only one condition per request.** This group appears for items Walmart sells in several conditions, and only when the request already names one: reach the variant through the 'url' parameter with its 'conditionGroupCode', as in 'https://www.walmart.com/ip/1028936148?conditionGroupCode=2', and the block then lists the condition that variant carries. An item sold in a single condition has no such group, and no reviews to separate by it.") + cmd.Flags().StringVar(&p_domainVar, "domain", "", "domain Domain: Walmart storefront the item belongs to. Each storefront has its own catalog, item ids and review pool, so an id from one storefront does not resolve on another. Ignored when 'url' is provided. Default is 'walmart.com'. [allowed: walmart.com|walmart.ca]") _ = cmd.RegisterFlagCompletionFunc("domain", func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective) { return []string{"walmart.com", "walmart.ca"}, cobra.ShellCompDirectiveNoFileComp }) - cmd.Flags().StringVar(&p_itemIdVar, "item-id", "1028936148", "itemId Item ID: Walmart item id, taken from a product URL or from the id field of the Walmart Search API response. On `walmart.com` it is numeric (for example `14977205582`), on `walmart.ca` an alphanumeric code (for example `6NZMJ5CW6MH2`). Required unless `url` is provided.") - cmd.Flags().StringVar(&p_languageVar, "language", "en", "language Language: Language of the review page. Availability depends on the storefront - `walmart.com` serves `en` and `es`, `walmart.ca` serves `en` and `fr`. A language the storefront does not support falls back to its default. Reviews themselves are returned in the language their author wrote them in. [allowed: en|es|fr]") + cmd.Flags().StringVar(&p_itemIdVar, "item-id", "1028936148", "itemId Item ID: Walmart item id, taken from a product URL or from the id field of the Walmart Search API response. On 'walmart.com' it is numeric (for example '14977205582'), on 'walmart.ca' an alphanumeric code (for example '6NZMJ5CW6MH2'). Required unless 'url' is provided.") + cmd.Flags().StringVar(&p_languageVar, "language", "en", "language Language: Language of the review page. Availability depends on the storefront - 'walmart.com' serves 'en' and 'es', 'walmart.ca' serves 'en' and 'fr'. A language the storefront does not support falls back to its default. Reviews themselves are returned in the language their author wrote them in. [allowed: en|es|fr]") _ = cmd.RegisterFlagCompletionFunc("language", func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective) { return []string{"en", "es", "fr"}, cobra.ShellCompDirectiveNoFileComp }) - cmd.Flags().IntVar(&p_pageVar, "page", 1, "page Page: Page of reviews to return, ten reviews a page. The response reports the last available page in `pagination.totalPages`, the next one in `pagination.nextPage`, and how many reviews the current filters select in `pagination.totalResults`. Note that only reviews carrying written text are paginated, so the ceiling follows `reviewsInformation.totalReviews` rather than the larger `reviewsInformation.totalRatings`. Default is `1`.") - cmd.Flags().IntVar(&p_ratingVar, "rating", 0, "rating Star Rating: Return only reviews carrying this star rating, from `1` to `5`. The Star rating group of the `filters` block lists the ratings this item actually has, each with the `value` to send here and a `count` of how many reviews to expect.") - cmd.Flags().StringVar(&p_sortVar, "sort", "mostRelevant", "sort Sort By: Order of the returned reviews, named as the Walmart review page names it. Default is `mostRelevant`. [allowed: mostRelevant|mostRecent|mostHelpful|highestRated|lowestRated|oldest]") + cmd.Flags().IntVar(&p_pageVar, "page", 1, "page Page: Page of reviews to return, ten reviews a page. The response reports the last available page in 'pagination.totalPages', the next one in 'pagination.nextPage', and how many reviews the current filters select in 'pagination.totalResults'. Note that only reviews carrying written text are paginated, so the ceiling follows 'reviewsInformation.totalReviews' rather than the larger 'reviewsInformation.totalRatings'. Default is '1'.") + cmd.Flags().IntVar(&p_ratingVar, "rating", 0, "rating Star Rating: Return only reviews carrying this star rating, from '1' to '5'. The Star rating group of the 'filters' block lists the ratings this item actually has, each with the 'value' to send here and a 'count' of how many reviews to expect.") + cmd.Flags().StringVar(&p_sortVar, "sort", "mostRelevant", "sort Sort By: Order of the returned reviews, named as the Walmart review page names it. Default is 'mostRelevant'. [allowed: mostRelevant|mostRecent|mostHelpful|highestRated|lowestRated|oldest]") _ = cmd.RegisterFlagCompletionFunc("sort", func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective) { return []string{"mostRelevant", "mostRecent", "mostHelpful", "highestRated", "lowestRated", "oldest"}, cobra.ShellCompDirectiveNoFileComp }) - cmd.Flags().StringVar(&p_urlVar, "url", "https://www.walmart.com/ip/Restored-Apple-iPhone-14-Carrier-Unlocked-128-GB-Starlight-MPUN3LL-A-Refurbished/1028936148", "url Product URL: A full Walmart product URL whose reviews to scrape. When provided, it overrides `itemId` and the storefront is taken from the URL itself. Required unless `itemId` is provided.") + cmd.Flags().StringVar(&p_urlVar, "url", "https://www.walmart.com/ip/Restored-Apple-iPhone-14-Carrier-Unlocked-128-GB-Starlight-MPUN3LL-A-Refurbished/1028936148", "url Product URL: A full Walmart product URL whose reviews to scrape. When provided, it overrides 'itemId' and the storefront is taken from the URL itself. Required unless 'itemId' is provided.") cmd.Flags().BoolVar(&p_verifiedPurchasesOnlyVar, "verified-purchases-only", false, "verifiedPurchasesOnly Verified Purchases Only: Return only reviews left by customers whose purchase Walmart confirmed. Narrows the pool considerably, since most reviews are unverified or syndicated from the manufacturer.") return cmd diff --git a/cmd/gen_walmart_search.go b/cmd/gen_walmart_search.go index b6ac907..9e2057f 100644 --- a/cmd/gen_walmart_search.go +++ b/cmd/gen_walmart_search.go @@ -106,29 +106,29 @@ func newWalmartSearchCmd() *cobra.Command { return WriteResponse(c, resp) }, } - cmd.Flags().StringVar(&p_catIdVar, "cat-id", "", "catId Category ID: Walmart category id, taken from a category URL (for example `976759_1086446_1229651`). Combine it with `q` to search inside a category, or send it alone to browse the whole category. Required unless `q` is provided.") - cmd.Flags().StringVar(&p_deliveryTypeVar, "delivery-type", "shipping", "deliveryType Delivery Type: Keep only the products available with the selected fulfillment method. Default is `shipping`. Note that `pickup` is answered against one Walmart store, so an item in stock nationally can still be unavailable for `pickup` nearby - the response then reports that nothing matched the filters rather than that the query had no results. [allowed: shipping|pickup]") + cmd.Flags().StringVar(&p_catIdVar, "cat-id", "", "catId Category ID: Walmart category id, taken from a category URL (for example '976759_1086446_1229651'). Combine it with 'q' to search inside a category, or send it alone to browse the whole category. Required unless 'q' is provided.") + cmd.Flags().StringVar(&p_deliveryTypeVar, "delivery-type", "shipping", "deliveryType Delivery Type: Keep only the products available with the selected fulfillment method. Default is 'shipping'. Note that 'pickup' is answered against one Walmart store, so an item in stock nationally can still be unavailable for 'pickup' nearby - the response then reports that nothing matched the filters rather than that the query had no results. [allowed: shipping|pickup]") _ = cmd.RegisterFlagCompletionFunc("delivery-type", func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective) { return []string{"shipping", "pickup"}, cobra.ShellCompDirectiveNoFileComp }) - cmd.Flags().StringVar(&p_domainVar, "domain", "", "domain Domain: Walmart storefront to search. Each storefront has its own catalog, prices and currency. Default is `walmart.com`. [allowed: walmart.com|walmart.ca]") + cmd.Flags().StringVar(&p_domainVar, "domain", "", "domain Domain: Walmart storefront to search. Each storefront has its own catalog, prices and currency. Default is 'walmart.com'. [allowed: walmart.com|walmart.ca]") _ = cmd.RegisterFlagCompletionFunc("domain", func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective) { return []string{"walmart.com", "walmart.ca"}, cobra.ShellCompDirectiveNoFileComp }) - cmd.Flags().StringVar(&p_facetVar, "facet", "brand:Great Value\nretailer_type:Walmart", "facet Facet Filter: Walmart filter in the `name:value` form, for example `brand:Great Value`. Every value available for a query is listed in the facets block of the response, each one carrying the exact string to send back here, so a first unfiltered request tells you what can be filtered on. To combine filters, put each one on its own line. The double-pipe form Walmart's own urls use `brand:Great Value||retailer_type:Walmart` is also accepted.") - cmd.Flags().StringVar(&p_languageVar, "language", "en", "language Language: Language of the results. Availability depends on the storefront - `walmart.com` serves `en` and `es`, `walmart.ca` serves `en` and `fr`. A language the storefront does not support falls back to its default. [allowed: en|es|fr]") + cmd.Flags().StringVar(&p_facetVar, "facet", "brand:Great Value\nretailer_type:Walmart", "facet Facet Filter: Walmart filter in the 'name:value' form, for example 'brand:Great Value'. Every value available for a query is listed in the facets block of the response, each one carrying the exact string to send back here, so a first unfiltered request tells you what can be filtered on. To combine filters, put each one on its own line. The double-pipe form Walmart's own urls use 'brand:Great Value||retailer_type:Walmart' is also accepted.") + cmd.Flags().StringVar(&p_languageVar, "language", "en", "language Language: Language of the results. Availability depends on the storefront - 'walmart.com' serves 'en' and 'es', 'walmart.ca' serves 'en' and 'fr'. A language the storefront does not support falls back to its default. [allowed: en|es|fr]") _ = cmd.RegisterFlagCompletionFunc("language", func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective) { return []string{"en", "es", "fr"}, cobra.ShellCompDirectiveNoFileComp }) cmd.Flags().Float64Var(&p_maxPriceVar, "max-price", 0, "maxPrice Maximum Price: Upper bound of the price range, in the storefront currency.") cmd.Flags().Float64Var(&p_minPriceVar, "min-price", 0, "minPrice Minimum Price: Lower bound of the price range, in the storefront currency.") - cmd.Flags().IntVar(&p_pageVar, "page", 0, "page Page Number: Page number for pagination (e.g., `1` for the first page, `2` for the second page, etc.). Walmart stops serving results after roughly page 10, returning an empty page beyond that.") - cmd.Flags().StringVar(&p_qVar, "q", "coffee", "q Search Query: The search term for which to get the search results. It can be omitted only when `catId` is provided, to browse a whole category instead of searching.") + cmd.Flags().IntVar(&p_pageVar, "page", 0, "page Page Number: Page number for pagination (e.g., '1' for the first page, '2' for the second page, etc.). Walmart stops serving results after roughly page 10, returning an empty page beyond that.") + cmd.Flags().StringVar(&p_qVar, "q", "coffee", "q Search Query: The search term for which to get the search results. It can be omitted only when 'catId' is provided, to browse a whole category instead of searching.") cmd.Flags().StringVar(&p_sortVar, "sort", "bestMatch", "sort Sort By: The sorting option for the search results. [allowed: bestMatch|priceLowToHigh|priceHighToLow|bestseller|highlyRated|newArrivals]") _ = cmd.RegisterFlagCompletionFunc("sort", func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective) { return []string{"bestMatch", "priceLowToHigh", "priceHighToLow", "bestseller", "highlyRated", "newArrivals"}, cobra.ShellCompDirectiveNoFileComp }) - cmd.Flags().StringVar(&p_urlVar, "url", "", "url Search URL: A full Walmart search or category URL to scrape as is. When provided, it overrides `q`, `catId` and the other search parameters, and the storefront is taken from the URL itself.") + cmd.Flags().StringVar(&p_urlVar, "url", "", "url Search URL: A full Walmart search or category URL to scrape as is. When provided, it overrides 'q', 'catId' and the other search parameters, and the storefront is taken from the URL itself.") return cmd } diff --git a/cmd/gen_web_scraping.go b/cmd/gen_web_scraping.go index 138cf31..9d7fc29 100644 --- a/cmd/gen_web_scraping.go +++ b/cmd/gen_web_scraping.go @@ -217,26 +217,26 @@ func newWebScrapingCmd() *cobra.Command { return WriteResponse(c, resp) }, } - cmd.Flags().Var(&p_aiExtractRulesVar, "ai-extract-rules-json", "aiExtractRules AI Extraction Rules: Defines custom rules for AI-based data extraction using LLMs. This enables the system to extract structured data directly from the HTML of the page. Each key in the object represents a desired output field name, and the value specifies its type and optional description to guide the AI.\n\nSupported types:\n- `string`: plain text value\n- `number`: numeric value\n- `boolean`: true/false\n- `list`: an array of values\n- `item`: a nested object with its own structure defined under `output`\n — accepts raw JSON, @file, or - (stdin)") - cmd.Flags().BoolVar(&p_autoModeVar, "auto-mode", false, "autoMode Auto Mode: Use the cheapest proxy type and JS rendering that load the page, overriding `jsRendering` and `proxyType`. The chosen values are returned in `requestMetadata` and billed.") + cmd.Flags().Var(&p_aiExtractRulesVar, "ai-extract-rules-json", "aiExtractRules AI Extraction Rules: Defines custom rules for AI-based data extraction using LLMs. This enables the system to extract structured data directly from the HTML of the page. Each key in the object represents a desired output field name, and the value specifies its type and optional description to guide the AI.\n\nSupported types:\n- 'string': plain text value\n- 'number': numeric value\n- 'boolean': true/false\n- 'list': an array of values\n- 'item': a nested object with its own structure defined under 'output'\n — accepts raw JSON, @file, or - (stdin)") + cmd.Flags().BoolVar(&p_autoModeVar, "auto-mode", false, "autoMode Auto Mode: Use the cheapest proxy type and JS rendering that load the page, overriding 'jsRendering' and 'proxyType'. The chosen values are returned in 'requestMetadata' and billed.") cmd.Flags().BoolVar(&p_blockAdsVar, "block-ads", true, "blockAds Block ADS: Whether to block ads.") cmd.Flags().BoolVar(&p_blockAdsVarNeg, "no-"+"block-ads", false, "disable --block-ads") cmd.Flags().BoolVar(&p_blockResourcesVar, "block-resources", true, "blockResources Block Images And CSS: Whether to block loading of resources like images and stylesheets.") cmd.Flags().BoolVar(&p_blockResourcesVarNeg, "no-"+"block-resources", false, "disable --block-resources") cmd.Flags().StringSliceVar(&p_blockUrlsVar, "block-urls", nil, "blockUrls Block URLs: List of URLs to block.") - cmd.Flags().StringSliceVar(&p_excludeTagsVar, "exclude-tags", nil, "excludeTags Exclude Tags: The `excludeTags` parameter accepts an array of valid CSS selectors.\nElements matching these selectors will be removed from the final output.\nEach value must be a valid `querySelectorAll` selector. This can be used to remove ads, scripts, or\nother unwanted sections.\n") + cmd.Flags().StringSliceVar(&p_excludeTagsVar, "exclude-tags", nil, "excludeTags Exclude Tags: The 'excludeTags' parameter accepts an array of valid CSS selectors.\nElements matching these selectors will be removed from the final output.\nEach value must be a valid 'querySelectorAll' selector. This can be used to remove ads, scripts, or\nother unwanted sections.\n") cmd.Flags().BoolVar(&p_extractEmailsVar, "extract-emails", true, "extractEmails Extract Emails: Extract emails from the page.") cmd.Flags().BoolVar(&p_extractEmailsVarNeg, "no-"+"extract-emails", false, "disable --extract-emails") cmd.Flags().BoolVar(&p_extractLinksVar, "extract-links", false, "extractLinks Extract Links: Extract links from the page.") - cmd.Flags().StringArrayVar(&p_extractRulesVarKV, "extract-rules", nil, "extractRules Extraction Rules: Rules for extracting specific data from the page. For example: `{ \"title\": \"h1\", \"link_href\": \"a#link @href\", \"page_text\": \"body\" }`\n") + cmd.Flags().StringArrayVar(&p_extractRulesVarKV, "extract-rules", nil, "extractRules Extraction Rules: Rules for extracting specific data from the page. For example: '{ \"title\": \"h1\", \"link_href\": \"a#link @href\", \"page_text\": \"body\" }'\n") cmd.Flags().Var(&p_extractRulesVarJSON, "extract-rules-json", "extractRules Extraction Rules as raw JSON, @file, or -") cmd.Flags().StringArrayVar(&p_headersVarKV, "headers", nil, "headers Headers: Optional custom headers to send with the request.") cmd.Flags().Var(&p_headersVarJSON, "headers-json", "headers Headers as raw JSON, @file, or -") - cmd.Flags().StringSliceVar(&p_includeOnlyTagsVar, "include-only-tags", nil, "includeOnlyTags Include Only Tags: The `includeOnlyTags` parameter accepts an array of valid CSS selectors.\nWhen specified, only the elements matching these selectors will be included in the response content.\nEach value must be a valid `querySelectorAll` selector. Useful for extracting specific parts of the document.\n") + cmd.Flags().StringSliceVar(&p_includeOnlyTagsVar, "include-only-tags", nil, "includeOnlyTags Include Only Tags: The 'includeOnlyTags' parameter accepts an array of valid CSS selectors.\nWhen specified, only the elements matching these selectors will be included in the response content.\nEach value must be a valid 'querySelectorAll' selector. Useful for extracting specific parts of the document.\n") cmd.Flags().BoolVar(&p_jsRenderingVar, "js-rendering", true, "jsRendering JS Rendering: Enable JavaScript rendering.") cmd.Flags().BoolVar(&p_jsRenderingVarNeg, "no-"+"js-rendering", false, "disable --js-rendering") - cmd.Flags().Var(&p_jsScenarioVar, "js-scenario-json", "jsScenario JavaScript Execution: Enables custom JavaScript interactions on the target webpage during scraping. It's an array where each object defines a specific action or step. These actions can include clicking elements, waiting for elements, executing custom scripts, and more. Key actions within this field include:\n\n- `evaluate`: Run custom JavaScript code on the page.\n- `click`: Click on an element specified by a CSS selector.\n- `wait`: Pause for a set duration (in milliseconds).\n- `waitFor`: Delay until a specific element appears.\n- `waitForAndClick`: Combine waiting for an element and then clicking it.\n- `scrollX`, `scrollY`: Scroll to specified positions on the page.\n- `fill`: Enter values into input fields identified by CSS selectors.\n\nActions are executed sequentially.\n — accepts raw JSON, @file, or - (stdin)") - cmd.Flags().StringSliceVar(&p_outputFormatVar, "output-format", nil, "outputFormat Output Format: The outputFormat parameter specifies the desired response format: `html`, `text`, `markdown`, or `json`. If only one of `html`, `text`, or `markdown` is provided, the API returns the response in that format. If multiple formats are specified, the API returns a JSON response with keys for each requested format. If `json` is included with any other format, the API returns a JSON response with keys for the other specified formats.\n") + cmd.Flags().Var(&p_jsScenarioVar, "js-scenario-json", "jsScenario JavaScript Execution: Enables custom JavaScript interactions on the target webpage during scraping. It's an array where each object defines a specific action or step. These actions can include clicking elements, waiting for elements, executing custom scripts, and more. Key actions within this field include:\n\n- 'evaluate': Run custom JavaScript code on the page.\n- 'click': Click on an element specified by a CSS selector.\n- 'wait': Pause for a set duration (in milliseconds).\n- 'waitFor': Delay until a specific element appears.\n- 'waitForAndClick': Combine waiting for an element and then clicking it.\n- 'scrollX', 'scrollY': Scroll to specified positions on the page.\n- 'fill': Enter values into input fields identified by CSS selectors.\n\nActions are executed sequentially.\n — accepts raw JSON, @file, or - (stdin)") + cmd.Flags().StringSliceVar(&p_outputFormatVar, "output-format", nil, "outputFormat Output Format: The outputFormat parameter specifies the desired response format: 'html', 'text', 'markdown', or 'json'. If only one of 'html', 'text', or 'markdown' is provided, the API returns the response in that format. If multiple formats are specified, the API returns a JSON response with keys for each requested format. If 'json' is included with any other format, the API returns a JSON response with keys for the other specified formats.\n") _ = cmd.RegisterFlagCompletionFunc("output-format", func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective) { return []string{"json", "html", "markdown", "text"}, cobra.ShellCompDirectiveNoFileComp }) @@ -248,7 +248,7 @@ func newWebScrapingCmd() *cobra.Command { _ = cmd.RegisterFlagCompletionFunc("proxy-type", func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective) { return []string{"datacenter", "residential"}, cobra.ShellCompDirectiveNoFileComp }) - cmd.Flags().BoolVar(&p_removeBase64ImagesVar, "remove-base64-images", false, "removeBase64Images Remove Base64 Images: If set to `true`, any images embedded as base64-encoded strings will be removed from the output.\nUseful for reducing response size or when base64 images are not needed.\n") + cmd.Flags().BoolVar(&p_removeBase64ImagesVar, "remove-base64-images", false, "removeBase64Images Remove Base64 Images: If set to 'true', any images embedded as base64-encoded strings will be removed from the output.\nUseful for reducing response size or when base64 images are not needed.\n") cmd.Flags().BoolVar(&p_screenshotVar, "screenshot", true, "screenshot Screenshot: Whether to take a screenshot of the page.") cmd.Flags().BoolVar(&p_screenshotVarNeg, "no-"+"screenshot", false, "disable --screenshot") cmd.Flags().StringVar(&p_urlVar, "url", "https://example.com", "url URL: The URL of the web page to scrape. (required)") diff --git a/cmd/gen_yellowpages_search.go b/cmd/gen_yellowpages_search.go index a403ed1..f729f62 100644 --- a/cmd/gen_yellowpages_search.go +++ b/cmd/gen_yellowpages_search.go @@ -68,7 +68,7 @@ func newYellowpagesSearchCmd() *cobra.Command { return WriteResponse(c, resp) }, } - cmd.Flags().StringVar(&p_domainVar, "domain", "", "domain Domain: YellowPages domain to use. Default is `www.yellowpages.com`. [allowed: www.yellowpages.com|www.yellowpages.ca]") + cmd.Flags().StringVar(&p_domainVar, "domain", "", "domain Domain: YellowPages domain to use. Default is 'www.yellowpages.com'. [allowed: www.yellowpages.com|www.yellowpages.ca]") _ = cmd.RegisterFlagCompletionFunc("domain", func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective) { return []string{"www.yellowpages.com", "www.yellowpages.ca"}, cobra.ShellCompDirectiveNoFileComp }) diff --git a/cmd/gen_yelp_place.go b/cmd/gen_yelp_place.go index 3a3e107..b51e475 100644 --- a/cmd/gen_yelp_place.go +++ b/cmd/gen_yelp_place.go @@ -53,7 +53,7 @@ func newYelpPlaceCmd() *cobra.Command { return WriteResponse(c, resp) }, } - cmd.Flags().StringVar(&p_domainVar, "domain", "", "domain Domain: Yelp domain to use. Default is `www.yelp.com`. [allowed: www.yelp.com|www.yelp.co.uk|www.yelp.ca|www.yelp.com.au|ms.yelp.my|www.yelp.cz|www.yelp.dk|www.yelp.de|www.yelp.at|de.yelp.ch|en.yelp.be|en.yelp.com.hk|en.yelp.my|www.yelp.co.nz|en.yelp.com.ph|www.yelp.ie|www.yelp.com.sg|en.yelp.ch|www.yelp.com.ar|www.yelp.cl|www.yelp.es|www.yelp.com.mx|fil.yelp.com.ph|fr.yelp.be|www.yelp.fr|fr.yelp.ch|www.yelp.it|it.yelp.ch|nl.yelp.be|www.yelp.nl|www.yelp.no|www.yelp.pl|www.yelp.com.br|www.yelp.pt|fi.yelp.fi|sv.yelp.fi|www.yelp.com.tr|www.yelp.co.jp|zh.yelp.com.hk|www.yelp.com.tw]") + cmd.Flags().StringVar(&p_domainVar, "domain", "", "domain Domain: Yelp domain to use. Default is 'www.yelp.com'. [allowed: www.yelp.com|www.yelp.co.uk|www.yelp.ca|www.yelp.com.au|ms.yelp.my|www.yelp.cz|www.yelp.dk|www.yelp.de|www.yelp.at|de.yelp.ch|en.yelp.be|en.yelp.com.hk|en.yelp.my|www.yelp.co.nz|en.yelp.com.ph|www.yelp.ie|www.yelp.com.sg|en.yelp.ch|www.yelp.com.ar|www.yelp.cl|www.yelp.es|www.yelp.com.mx|fil.yelp.com.ph|fr.yelp.be|www.yelp.fr|fr.yelp.ch|www.yelp.it|it.yelp.ch|nl.yelp.be|www.yelp.nl|www.yelp.no|www.yelp.pl|www.yelp.com.br|www.yelp.pt|fi.yelp.fi|sv.yelp.fi|www.yelp.com.tr|www.yelp.co.jp|zh.yelp.com.hk|www.yelp.com.tw]") _ = cmd.RegisterFlagCompletionFunc("domain", func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective) { return []string{"www.yelp.com", "www.yelp.co.uk", "www.yelp.ca", "www.yelp.com.au", "ms.yelp.my", "www.yelp.cz", "www.yelp.dk", "www.yelp.de", "www.yelp.at", "de.yelp.ch", "en.yelp.be", "en.yelp.com.hk", "en.yelp.my", "www.yelp.co.nz", "en.yelp.com.ph", "www.yelp.ie", "www.yelp.com.sg", "en.yelp.ch", "www.yelp.com.ar", "www.yelp.cl", "www.yelp.es", "www.yelp.com.mx", "fil.yelp.com.ph", "fr.yelp.be", "www.yelp.fr", "fr.yelp.ch", "www.yelp.it", "it.yelp.ch", "nl.yelp.be", "www.yelp.nl", "www.yelp.no", "www.yelp.pl", "www.yelp.com.br", "www.yelp.pt", "fi.yelp.fi", "sv.yelp.fi", "www.yelp.com.tr", "www.yelp.co.jp", "zh.yelp.com.hk", "www.yelp.com.tw"}, cobra.ShellCompDirectiveNoFileComp }) diff --git a/cmd/gen_yelp_reviews.go b/cmd/gen_yelp_reviews.go index 45efef3..8e50b3a 100644 --- a/cmd/gen_yelp_reviews.go +++ b/cmd/gen_yelp_reviews.go @@ -90,23 +90,23 @@ func newYelpReviewsCmd() *cobra.Command { return WriteResponse(c, resp) }, } - cmd.Flags().StringVar(&p_domainVar, "domain", "", "domain Domain: Yelp domain to use. Default is `www.yelp.com`. [allowed: www.yelp.com|www.yelp.co.uk|www.yelp.ca|www.yelp.com.au|ms.yelp.my|www.yelp.cz|www.yelp.dk|www.yelp.de|www.yelp.at|de.yelp.ch|en.yelp.be|en.yelp.com.hk|en.yelp.my|www.yelp.co.nz|en.yelp.com.ph|www.yelp.ie|www.yelp.com.sg|en.yelp.ch|www.yelp.com.ar|www.yelp.cl|www.yelp.es|www.yelp.com.mx|fil.yelp.com.ph|fr.yelp.be|www.yelp.fr|fr.yelp.ch|www.yelp.it|it.yelp.ch|nl.yelp.be|www.yelp.nl|www.yelp.no|www.yelp.pl|www.yelp.com.br|www.yelp.pt|fi.yelp.fi|sv.yelp.fi|www.yelp.com.tr|www.yelp.co.jp|zh.yelp.com.hk|www.yelp.com.tw]") + cmd.Flags().StringVar(&p_domainVar, "domain", "", "domain Domain: Yelp domain to use. Default is 'www.yelp.com'. [allowed: www.yelp.com|www.yelp.co.uk|www.yelp.ca|www.yelp.com.au|ms.yelp.my|www.yelp.cz|www.yelp.dk|www.yelp.de|www.yelp.at|de.yelp.ch|en.yelp.be|en.yelp.com.hk|en.yelp.my|www.yelp.co.nz|en.yelp.com.ph|www.yelp.ie|www.yelp.com.sg|en.yelp.ch|www.yelp.com.ar|www.yelp.cl|www.yelp.es|www.yelp.com.mx|fil.yelp.com.ph|fr.yelp.be|www.yelp.fr|fr.yelp.ch|www.yelp.it|it.yelp.ch|nl.yelp.be|www.yelp.nl|www.yelp.no|www.yelp.pl|www.yelp.com.br|www.yelp.pt|fi.yelp.fi|sv.yelp.fi|www.yelp.com.tr|www.yelp.co.jp|zh.yelp.com.hk|www.yelp.com.tw]") _ = cmd.RegisterFlagCompletionFunc("domain", func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective) { return []string{"www.yelp.com", "www.yelp.co.uk", "www.yelp.ca", "www.yelp.com.au", "ms.yelp.my", "www.yelp.cz", "www.yelp.dk", "www.yelp.de", "www.yelp.at", "de.yelp.ch", "en.yelp.be", "en.yelp.com.hk", "en.yelp.my", "www.yelp.co.nz", "en.yelp.com.ph", "www.yelp.ie", "www.yelp.com.sg", "en.yelp.ch", "www.yelp.com.ar", "www.yelp.cl", "www.yelp.es", "www.yelp.com.mx", "fil.yelp.com.ph", "fr.yelp.be", "www.yelp.fr", "fr.yelp.ch", "www.yelp.it", "it.yelp.ch", "nl.yelp.be", "www.yelp.nl", "www.yelp.no", "www.yelp.pl", "www.yelp.com.br", "www.yelp.pt", "fi.yelp.fi", "sv.yelp.fi", "www.yelp.com.tr", "www.yelp.co.jp", "zh.yelp.com.hk", "www.yelp.com.tw"}, cobra.ShellCompDirectiveNoFileComp }) cmd.Flags().StringVar(&p_languageCodeVar, "language-code", "en", "languageCode Language: Language of the reviews to return, as a two-letter code (e.g., 'en', 'es', 'fr'). Defaults to en.") - cmd.Flags().StringVar(&p_nextPageTokenVar, "next-page-token", "", "nextPageToken Next Page Token: Opaque cursor for the next page, taken verbatim from `pagination.nextPageToken` of the previous response. It carries both the offset and the page size, so passing it alone continues the feed where the last response ended. Keep the other filters (`sortBy`, `rating`, `languageCode`, `query`, `notRecommended`) identical across pages. Use either this or `start`, not both. Paginate until `pagination.hasNextPage` is false.\n") + cmd.Flags().StringVar(&p_nextPageTokenVar, "next-page-token", "", "nextPageToken Next Page Token: Opaque cursor for the next page, taken verbatim from 'pagination.nextPageToken' of the previous response. It carries both the offset and the page size, so passing it alone continues the feed where the last response ended. Keep the other filters ('sortBy', 'rating', 'languageCode', 'query', 'notRecommended') identical across pages. Use either this or 'start', not both. Paginate until 'pagination.hasNextPage' is false.\n") cmd.Flags().BoolVar(&p_notRecommendedVar, "not-recommended", false, "notRecommended Not Recommended: Returns the reviews Yelp does not currently recommend (filtered out of the main feed by its recommendation software) instead of the recommended ones. These reviews carry no photos, videos or reactions, and are paginated ten at a time. Defaults to false.\n") - cmd.Flags().IntVar(&p_numVar, "num", 0, "num Number of Results: Number of reviews to return per page. The maximum is 49. Defaults to 49 for the recommended feed and to 10 when `notRecommended` is set. The response echoes it back as `pagination.num`.\n") + cmd.Flags().IntVar(&p_numVar, "num", 0, "num Number of Results: Number of reviews to return per page. The maximum is 49. Defaults to 49 for the recommended feed and to 10 when 'notRecommended' is set. The response echoes it back as 'pagination.num'.\n") cmd.Flags().StringVar(&p_placeIdVar, "place-id", "-4ofMtrD7pSpZIX5pnDkig", "placeId Place ID: The Yelp ID of the place. For example, '-4ofMtrD7pSpZIX5pnDkig'. Yelp IDs can be obtained from the Yelp Search Scraper API. (required)") _ = cmd.MarkFlagRequired("place-id") - cmd.Flags().StringVar(&p_queryVar, "query", "", "query Search Query: Note: Yelp ignores the `rating` filter while searching, so a query returns matching reviews of every star rating. Free-text query to search within the reviews of the place.\n") - cmd.Flags().StringVar(&p_ratingVar, "rating", "5,4", "rating Rating: Note: Yelp ignores this filter when `query` is set, so a search returns matching reviews of every star rating. Filters the reviews by star rating. Possible values are 5, 4, 3, 2 and 1. To return only five-star reviews, set it to `5`. To include several ratings, pass them comma-separated, for example `5,4,3`. When omitted, reviews with any rating are returned.\n") + cmd.Flags().StringVar(&p_queryVar, "query", "", "query Search Query: Note: Yelp ignores the 'rating' filter while searching, so a query returns matching reviews of every star rating. Free-text query to search within the reviews of the place.\n") + cmd.Flags().StringVar(&p_ratingVar, "rating", "5,4", "rating Rating: Note: Yelp ignores this filter when 'query' is set, so a search returns matching reviews of every star rating. Filters the reviews by star rating. Possible values are 5, 4, 3, 2 and 1. To return only five-star reviews, set it to '5'. To include several ratings, pass them comma-separated, for example '5,4,3'. When omitted, reviews with any rating are returned.\n") cmd.Flags().StringVar(&p_sortByVar, "sort-by", "", "sortBy Sort By: The order in which the reviews are returned. Defaults to relevanceDesc. [allowed: relevanceDesc|dateDesc|dateAsc|ratingDesc|ratingAsc|elitesDesc]") _ = cmd.RegisterFlagCompletionFunc("sort-by", func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective) { return []string{"relevanceDesc", "dateDesc", "dateAsc", "ratingDesc", "ratingAsc", "elitesDesc"}, cobra.ShellCompDirectiveNoFileComp }) - cmd.Flags().IntVar(&p_startVar, "start", 0, "start Result Offset: Result offset for pagination. It skips the given number of reviews, so the step matches `num` (e.g., 0, 49, 98 for the recommended feed, or 0, 10, 20 when `notRecommended` is set). The response echoes it back as `pagination.start`. Cannot be combined with `nextPageToken`.\n") + cmd.Flags().IntVar(&p_startVar, "start", 0, "start Result Offset: Result offset for pagination. It skips the given number of reviews, so the step matches 'num' (e.g., 0, 49, 98 for the recommended feed, or 0, 10, 20 when 'notRecommended' is set). The response echoes it back as 'pagination.start'. Cannot be combined with 'nextPageToken'.\n") return cmd } diff --git a/cmd/gen_yelp_search.go b/cmd/gen_yelp_search.go index 45e8f88..789c32f 100644 --- a/cmd/gen_yelp_search.go +++ b/cmd/gen_yelp_search.go @@ -63,13 +63,13 @@ func newYelpSearchCmd() *cobra.Command { return WriteResponse(c, resp) }, } - cmd.Flags().StringVar(&p_domainVar, "domain", "", "domain Domain: Yelp domain to use. Default is `www.yelp.com`. [allowed: www.yelp.com|www.yelp.co.uk|www.yelp.ca|www.yelp.com.au|ms.yelp.my|www.yelp.cz|www.yelp.dk|www.yelp.de|www.yelp.at|de.yelp.ch|en.yelp.be|en.yelp.com.hk|en.yelp.my|www.yelp.co.nz|en.yelp.com.ph|www.yelp.ie|www.yelp.com.sg|en.yelp.ch|www.yelp.com.ar|www.yelp.cl|www.yelp.es|www.yelp.com.mx|fil.yelp.com.ph|fr.yelp.be|www.yelp.fr|fr.yelp.ch|www.yelp.it|it.yelp.ch|nl.yelp.be|www.yelp.nl|www.yelp.no|www.yelp.pl|www.yelp.com.br|www.yelp.pt|fi.yelp.fi|sv.yelp.fi|www.yelp.com.tr|www.yelp.co.jp|zh.yelp.com.hk|www.yelp.com.tw]") + cmd.Flags().StringVar(&p_domainVar, "domain", "", "domain Domain: Yelp domain to use. Default is 'www.yelp.com'. [allowed: www.yelp.com|www.yelp.co.uk|www.yelp.ca|www.yelp.com.au|ms.yelp.my|www.yelp.cz|www.yelp.dk|www.yelp.de|www.yelp.at|de.yelp.ch|en.yelp.be|en.yelp.com.hk|en.yelp.my|www.yelp.co.nz|en.yelp.com.ph|www.yelp.ie|www.yelp.com.sg|en.yelp.ch|www.yelp.com.ar|www.yelp.cl|www.yelp.es|www.yelp.com.mx|fil.yelp.com.ph|fr.yelp.be|www.yelp.fr|fr.yelp.ch|www.yelp.it|it.yelp.ch|nl.yelp.be|www.yelp.nl|www.yelp.no|www.yelp.pl|www.yelp.com.br|www.yelp.pt|fi.yelp.fi|sv.yelp.fi|www.yelp.com.tr|www.yelp.co.jp|zh.yelp.com.hk|www.yelp.com.tw]") _ = cmd.RegisterFlagCompletionFunc("domain", func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective) { return []string{"www.yelp.com", "www.yelp.co.uk", "www.yelp.ca", "www.yelp.com.au", "ms.yelp.my", "www.yelp.cz", "www.yelp.dk", "www.yelp.de", "www.yelp.at", "de.yelp.ch", "en.yelp.be", "en.yelp.com.hk", "en.yelp.my", "www.yelp.co.nz", "en.yelp.com.ph", "www.yelp.ie", "www.yelp.com.sg", "en.yelp.ch", "www.yelp.com.ar", "www.yelp.cl", "www.yelp.es", "www.yelp.com.mx", "fil.yelp.com.ph", "fr.yelp.be", "www.yelp.fr", "fr.yelp.ch", "www.yelp.it", "it.yelp.ch", "nl.yelp.be", "www.yelp.nl", "www.yelp.no", "www.yelp.pl", "www.yelp.com.br", "www.yelp.pt", "fi.yelp.fi", "sv.yelp.fi", "www.yelp.com.tr", "www.yelp.co.jp", "zh.yelp.com.hk", "www.yelp.com.tw"}, cobra.ShellCompDirectiveNoFileComp }) cmd.Flags().StringVar(&p_keywordVar, "keyword", "McDonald's", "keyword Search Query: The search term for which to get the search results. (required)") _ = cmd.MarkFlagRequired("keyword") - cmd.Flags().StringVar(&p_lVar, "l", "", "l Area: Parameter defines the distance or map radius for the search results. For example: `g:-95.2486,29.8496,-95.4277,29.6324`.\n") + cmd.Flags().StringVar(&p_lVar, "l", "", "l Area: Parameter defines the distance or map radius for the search results. For example: 'g:-95.2486,29.8496,-95.4277,29.6324'.\n") cmd.Flags().StringVar(&p_locationVar, "location", "New York, NY", "location Location: The location where to search for businesses with the given keyword. (required)") _ = cmd.MarkFlagRequired("location") cmd.Flags().IntVar(&p_startVar, "start", 0, "start Result Offset: Result offset for pagination (e.g., 0 for the first page, 10 for the 2nd page, etc.).") diff --git a/cmd/gen_youtube_channel_api.go b/cmd/gen_youtube_channel_api.go index b49d42d..add3e8b 100644 --- a/cmd/gen_youtube_channel_api.go +++ b/cmd/gen_youtube_channel_api.go @@ -74,7 +74,7 @@ func newYoutubeChannelApiCmd() *cobra.Command { return WriteResponse(c, resp) }, } - cmd.Flags().StringVar(&p_channelIdVar, "channel-id", "@PewDiePie", "channelId Channel ID: YouTube channel identifier — either the canonical channel ID (`UC…`, 24 chars) or the public handle starting with `@` (e.g. `@PewDiePie`). Legacy `/c/` and `/user/` URL slugs are also accepted. (required)") + cmd.Flags().StringVar(&p_channelIdVar, "channel-id", "@PewDiePie", "channelId Channel ID: YouTube channel identifier — either the canonical channel ID ('UC…', 24 chars) or the public handle starting with '@' (e.g. '@PewDiePie'). Legacy '/c/' and '/user/' URL slugs are also accepted. (required)") _ = cmd.MarkFlagRequired("channel-id") cmd.Flags().StringVar(&p_deviceTypeVar, "device-type", "", "deviceType Device: Device type for the request. [allowed: desktop|mobile]") _ = cmd.RegisterFlagCompletionFunc("device-type", func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective) { @@ -83,7 +83,7 @@ func newYoutubeChannelApiCmd() *cobra.Command { cmd.Flags().StringVar(&p_glVar, "gl", "", "gl Country: The two-letter country code for the country you want to limit the search to.") cmd.Flags().StringVar(&p_hlVar, "hl", "", "hl Language: The two-letter language code for the language you want to use for the search.") cmd.Flags().StringVar(&p_paginationTokenVar, "pagination-token", "", "paginationToken Pagination Token: Token returned in the previous response to fetch the next page of results.") - cmd.Flags().StringVar(&p_tabVar, "tab", "", "tab Tab: Channel tab to scrape. Each tab returns a different content shape:\n- `featured` (default) — channel Home page (channel trailer + curated rows)\n- `videos` — uploaded long-form videos\n- `shorts` — Shorts feed\n- `streams` — past and upcoming live streams\n- `playlists` — created and saved playlists\n- `posts` / `community` — community posts\n- `podcasts` — podcast episodes\n- `releases` — music releases\n- `about` — channel description, links, stats\n- `store` — channel merch\n [allowed: featured|videos|shorts|streams|playlists|posts|community|podcasts|releases|about|store]") + cmd.Flags().StringVar(&p_tabVar, "tab", "", "tab Tab: Channel tab to scrape. Each tab returns a different content shape:\n- 'featured' (default) — channel Home page (channel trailer + curated rows)\n- 'videos' — uploaded long-form videos\n- 'shorts' — Shorts feed\n- 'streams' — past and upcoming live streams\n- 'playlists' — created and saved playlists\n- 'posts' / 'community' — community posts\n- 'podcasts' — podcast episodes\n- 'releases' — music releases\n- 'about' — channel description, links, stats\n- 'store' — channel merch\n [allowed: featured|videos|shorts|streams|playlists|posts|community|podcasts|releases|about|store]") _ = cmd.RegisterFlagCompletionFunc("tab", func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective) { return []string{"featured", "videos", "shorts", "streams", "playlists", "posts", "community", "podcasts", "releases", "about", "store"}, cobra.ShellCompDirectiveNoFileComp }) diff --git a/cmd/gen_youtube_search_api.go b/cmd/gen_youtube_search_api.go index 18491cd..9bccc3a 100644 --- a/cmd/gen_youtube_search_api.go +++ b/cmd/gen_youtube_search_api.go @@ -124,24 +124,24 @@ func newYoutubeSearchApiCmd() *cobra.Command { _ = cmd.RegisterFlagCompletionFunc("device-type", func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective) { return []string{"desktop", "mobile"}, cobra.ShellCompDirectiveNoFileComp }) - cmd.Flags().StringSliceVar(&p_filtersVar, "filters", nil, "filters[] Features: Feature flags to require on results. Multiple values are combined with AND (every flag must apply).\n\n- `hd` — HD quality\n- `k4` — 4K quality\n- `hdr` — HDR\n- `subtitles` — has subtitles/closed captions\n- `cc` — Creative Commons license\n- `d3` — 3D video\n- `d360` — 360° video\n- `vr180` — VR180 video\n- `live` — currently live\n- `bought` — purchased/paid content\n- `location` — has a geographic location tag\n") + cmd.Flags().StringSliceVar(&p_filtersVar, "filters", nil, "filters[] Features: Feature flags to require on results. Multiple values are combined with AND (every flag must apply).\n\n- 'hd' — HD quality\n- 'k4' — 4K quality\n- 'hdr' — HDR\n- 'subtitles' — has subtitles/closed captions\n- 'cc' — Creative Commons license\n- 'd3' — 3D video\n- 'd360' — 360° video\n- 'vr180' — VR180 video\n- 'live' — currently live\n- 'bought' — purchased/paid content\n- 'location' — has a geographic location tag\n") _ = cmd.RegisterFlagCompletionFunc("filters", func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective) { return []string{"hd", "subtitles", "cc", "d3", "live", "bought", "k4", "d360", "location", "hdr", "vr180"}, cobra.ShellCompDirectiveNoFileComp }) cmd.Flags().StringVar(&p_glVar, "gl", "", "gl Country: The two-letter country code for the country you want to limit the search to.") cmd.Flags().StringVar(&p_hlVar, "hl", "", "hl Language: The two-letter language code for the language you want to use for the search.") - cmd.Flags().StringVar(&p_lengthVar, "length", "", "length Duration: Filter by video duration bucket:\n- `under4` — under 4 minutes\n- `between420` — 4 to 20 minutes\n- `plus20` — over 20 minutes\n [allowed: under4|between420|plus20]") + cmd.Flags().StringVar(&p_lengthVar, "length", "", "length Duration: Filter by video duration bucket:\n- 'under4' — under 4 minutes\n- 'between420' — 4 to 20 minutes\n- 'plus20' — over 20 minutes\n [allowed: under4|between420|plus20]") _ = cmd.RegisterFlagCompletionFunc("length", func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective) { return []string{"under4", "between420", "plus20"}, cobra.ShellCompDirectiveNoFileComp }) cmd.Flags().StringVar(&p_paginationTokenVar, "pagination-token", "", "paginationToken Pagination Token: Token returned in the previous response to fetch the next page.") cmd.Flags().StringVar(&p_qVar, "q", "BMW", "q Search Query: Free-text search query, exactly as a user would type it into the YouTube search box. (required)") _ = cmd.MarkFlagRequired("q") - cmd.Flags().StringVar(&p_sortByVar, "sort-by", "", "sortBy Sort By: Sort order applied to the results page. `relevance` (default) — best match for the query; `date` — newest first; `views` — most viewed first; `rating` — highest rated first; `popularity` — trending/most popular. [allowed: relevance|popularity|rating|date|views]") + cmd.Flags().StringVar(&p_sortByVar, "sort-by", "", "sortBy Sort By: Sort order applied to the results page. 'relevance' (default) — best match for the query; 'date' — newest first; 'views' — most viewed first; 'rating' — highest rated first; 'popularity' — trending/most popular. [allowed: relevance|popularity|rating|date|views]") _ = cmd.RegisterFlagCompletionFunc("sort-by", func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective) { return []string{"relevance", "popularity", "rating", "date", "views"}, cobra.ShellCompDirectiveNoFileComp }) - cmd.Flags().StringVar(&p_spVar, "sp", "", "sp Search Parameters: Raw YouTube `sp` filter token, copied verbatim from a YouTube search URL (e.g. `EgIQAQ%253D%253D`). When provided, it overrides `sortBy`, `date`, `videoType`, `length`, and `filters[]`. Use only if you need a YouTube-side filter that this API does not expose as a structured parameter.") + cmd.Flags().StringVar(&p_spVar, "sp", "", "sp Search Parameters: Raw YouTube 'sp' filter token, copied verbatim from a YouTube search URL (e.g. 'EgIQAQ%253D%253D'). When provided, it overrides 'sortBy', 'date', 'videoType', 'length', and 'filters[]'. Use only if you need a YouTube-side filter that this API does not expose as a structured parameter.") cmd.Flags().StringVar(&p_videoTypeVar, "video-type", "", "videoType Type: Restrict results to a single YouTube content type — regular videos, Shorts, channels, playlists, or movies. [allowed: video|shorts|channel|playlist|movie]") _ = cmd.RegisterFlagCompletionFunc("video-type", func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective) { return []string{"video", "shorts", "channel", "playlist", "movie"}, cobra.ShellCompDirectiveNoFileComp diff --git a/cmd/gen_youtube_transcript_api.go b/cmd/gen_youtube_transcript_api.go index 943ff43..597600b 100644 --- a/cmd/gen_youtube_transcript_api.go +++ b/cmd/gen_youtube_transcript_api.go @@ -57,12 +57,12 @@ func newYoutubeTranscriptApiCmd() *cobra.Command { return WriteResponse(c, resp) }, } - cmd.Flags().StringVar(&p_languageCodeVar, "language-code", "en", "languageCode Language Code: BCP-47 / YouTube language code of the transcript track to return (e.g. `en`, `de`, `en-US`, `pt-BR`). Must match a track that the video actually has. When omitted, the video's default language track is returned.") - cmd.Flags().StringVar(&p_typeVar, "type", "", "type Transcript Type: Set to `asr` to fetch the YouTube auto-generated (speech-recognition) track. Omit to fetch the human-authored track for `languageCode` when one exists. [allowed: asr]") + cmd.Flags().StringVar(&p_languageCodeVar, "language-code", "en", "languageCode Language Code: BCP-47 / YouTube language code of the transcript track to return (e.g. 'en', 'de', 'en-US', 'pt-BR'). Must match a track that the video actually has. When omitted, the video's default language track is returned.") + cmd.Flags().StringVar(&p_typeVar, "type", "", "type Transcript Type: Set to 'asr' to fetch the YouTube auto-generated (speech-recognition) track. Omit to fetch the human-authored track for 'languageCode' when one exists. [allowed: asr]") _ = cmd.RegisterFlagCompletionFunc("type", func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective) { return []string{"asr"}, cobra.ShellCompDirectiveNoFileComp }) - cmd.Flags().StringVar(&p_vVar, "v-param", "dQw4w9WgXcQ", "v Video ID: 11-character YouTube video ID — the value of the `v=` query parameter in a watch URL (e.g. `dQw4w9WgXcQ` for `https://www.youtube.com/watch?v=dQw4w9WgXcQ`). (required)") + cmd.Flags().StringVar(&p_vVar, "v-param", "dQw4w9WgXcQ", "v Video ID: 11-character YouTube video ID — the value of the 'v=' query parameter in a watch URL (e.g. 'dQw4w9WgXcQ' for 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'). (required)") _ = cmd.MarkFlagRequired("v-param") return cmd diff --git a/cmd/gen_youtube_video_api.go b/cmd/gen_youtube_video_api.go index 4063acd..aaa90d2 100644 --- a/cmd/gen_youtube_video_api.go +++ b/cmd/gen_youtube_video_api.go @@ -67,7 +67,7 @@ func newYoutubeVideoApiCmd() *cobra.Command { }) cmd.Flags().StringVar(&p_glVar, "gl", "", "gl Country: The two-letter country code for the country you want to limit the search to.") cmd.Flags().StringVar(&p_hlVar, "hl", "", "hl Language: The two-letter language code for the language you want to use for the search.") - cmd.Flags().StringVar(&p_vVar, "v-param", "dQw4w9WgXcQ", "v Video ID: 11-character YouTube video ID — the value of the `v=` query parameter in a watch URL (e.g. `dQw4w9WgXcQ` for `https://www.youtube.com/watch?v=dQw4w9WgXcQ`). (required)") + cmd.Flags().StringVar(&p_vVar, "v-param", "dQw4w9WgXcQ", "v Video ID: 11-character YouTube video ID — the value of the 'v=' query parameter in a watch URL (e.g. 'dQw4w9WgXcQ' for 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'). (required)") _ = cmd.MarkFlagRequired("v-param") return cmd diff --git a/cmd/gen_zillow_listing.go b/cmd/gen_zillow_listing.go index 64d2e94..b2e7357 100644 --- a/cmd/gen_zillow_listing.go +++ b/cmd/gen_zillow_listing.go @@ -258,13 +258,13 @@ func newZillowListingCmd() *cobra.Command { cmd.Flags().StringVar(&p_keywordVar, "keyword", "New York, NY", "keyword Location: The keyword used to search for listings. (required)") _ = cmd.MarkFlagRequired("keyword") cmd.Flags().StringVar(&p_keywordsVar, "keywords", "", "keywords Additional Keywords: Additional keywords to refine the search.") - cmd.Flags().StringSliceVar(&p_listingPublishOptionsVar, "listing-publish-options", nil, "listingPublishOptions[] Listing Publish Options: An array of listing publish options. Use `ownerPosted` for listings by owner and `agentListed` for listings by agent.") + cmd.Flags().StringSliceVar(&p_listingPublishOptionsVar, "listing-publish-options", nil, "listingPublishOptions[] Listing Publish Options: An array of listing publish options. Use 'ownerPosted' for listings by owner and 'agentListed' for listings by agent.") _ = cmd.RegisterFlagCompletionFunc("listing-publish-options", func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective) { return []string{"ownerPosted", "agentListed", "newConstruction", "foreclosures", "auctions", "foreclosed", "preForeclosures"}, cobra.ShellCompDirectiveNoFileComp }) cmd.Flags().Float64Var(&p_lotSize_maxVar, "lot-size-max", 0, "lotSize[max] Lot Size Max: The maximum lot size.") cmd.Flags().Float64Var(&p_lotSize_minVar, "lot-size-min", 0, "lotSize[min] Lot Size Min: The minimum lot size.") - cmd.Flags().StringVar(&p_moveInDateVar, "move-in-date", "", "moveInDate Move In Date: The desired move-in date in `YYYY-MM-DD` format.") + cmd.Flags().StringVar(&p_moveInDateVar, "move-in-date", "", "moveInDate Move In Date: The desired move-in date in 'YYYY-MM-DD' format.") cmd.Flags().BoolVar(&p_mustHaveGarageVar, "must-have-garage", false, "mustHaveGarage Must Have Garage: If set to true, only listings with a garage will be included.") cmd.Flags().StringSliceVar(&p_otherAmenitiesVar, "other-amenities", nil, "otherAmenities[] Other Amenities: An array of other amenities.") _ = cmd.RegisterFlagCompletionFunc("other-amenities", func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective) { diff --git a/internal/gen/main.go b/internal/gen/main.go index 1ef6f6c..2cfa0cb 100644 --- a/internal/gen/main.go +++ b/internal/gen/main.go @@ -574,7 +574,10 @@ func buildHelp(p spec.Property, required bool) string { if required { help += " (required)" } - return help + // pflag treats the first `quoted` word in a usage string as the flag's + // value name, so backticked words in descriptions would show up as the + // flag's type in --help. Plain quotes keep the text readable. + return strings.ReplaceAll(help, "`", "'") } // buildJSONHelp returns the usage string for a pure-JSON flag, making the