scrapebadger 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/Gemfile +9 -0
- data/LICENSE +21 -0
- data/README.md +548 -0
- data/Rakefile +10 -0
- data/docs/AccountApi.md +76 -0
- data/docs/AccountInfo.md +28 -0
- data/docs/AmazonApi.md +1244 -0
- data/docs/ApartmentsApi.md +373 -0
- data/docs/BaiduApi.md +447 -0
- data/docs/BillingLogListResponse.md +24 -0
- data/docs/BillingLogResponse.md +32 -0
- data/docs/BingApi.md +610 -0
- data/docs/ChatGPTApi.md +521 -0
- data/docs/DepopApi.md +542 -0
- data/docs/DuckDuckGoApi.md +700 -0
- data/docs/EBayApi.md +1019 -0
- data/docs/FacebookApi.md +1671 -0
- data/docs/FilterRuleCreate.md +28 -0
- data/docs/FilterRuleDeliveryLogListResponse.md +24 -0
- data/docs/FilterRuleDeliveryLogResponse.md +44 -0
- data/docs/FilterRuleListResponse.md +24 -0
- data/docs/FilterRuleResponse.md +40 -0
- data/docs/FilterRuleUpdate.md +30 -0
- data/docs/FilterRuleValidateRequest.md +18 -0
- data/docs/FilterRuleValidateResponse.md +22 -0
- data/docs/GoogleApi.md +3175 -0
- data/docs/HTTPValidationError.md +18 -0
- data/docs/IdealistaApi.md +822 -0
- data/docs/ImmobiliareApi.md +773 -0
- data/docs/InstagramApi.md +1673 -0
- data/docs/LeboncoinApi.md +884 -0
- data/docs/LinkedInApi.md +925 -0
- data/docs/LoopNetApi.md +529 -0
- data/docs/PortalApiRoutersV1TwitterFilterRulesFilterRulePricingResponse.md +20 -0
- data/docs/RealtorApi.md +474 -0
- data/docs/RedditApi.md +1677 -0
- data/docs/RedfinApi.md +616 -0
- data/docs/StreamMonitorCreate.md +26 -0
- data/docs/StreamMonitorListResponse.md +24 -0
- data/docs/StreamMonitorResponse.md +42 -0
- data/docs/StreamMonitorUpdate.md +28 -0
- data/docs/SubscriptionInfo.md +40 -0
- data/docs/TikTokApi.md +2104 -0
- data/docs/TweetDeliveryLogListResponse.md +24 -0
- data/docs/TweetDeliveryLogResponse.md +44 -0
- data/docs/TwitterApi.md +4091 -0
- data/docs/ValidationError.md +22 -0
- data/docs/ValidationErrorLocInner.md +15 -0
- data/docs/VintedApi.md +766 -0
- data/docs/WalmartApi.md +904 -0
- data/docs/WebApi.md +634 -0
- data/docs/WebhookCreate.md +22 -0
- data/docs/WebhookListItem.md +28 -0
- data/docs/WebhookListResponse.md +20 -0
- data/docs/WebhookResponse.md +26 -0
- data/docs/WebhookTestRequest.md +18 -0
- data/docs/WebhookTestResponse.md +24 -0
- data/docs/YahooApi.md +602 -0
- data/docs/YandexApi.md +450 -0
- data/docs/YouTubeApi.md +2872 -0
- data/docs/ZillowApi.md +622 -0
- data/git_push.sh +57 -0
- data/lib/scrapebadger/api/account_api.rb +79 -0
- data/lib/scrapebadger/api/amazon_api.rb +1165 -0
- data/lib/scrapebadger/api/apartments_api.rb +377 -0
- data/lib/scrapebadger/api/baidu_api.rb +436 -0
- data/lib/scrapebadger/api/bing_api.rb +580 -0
- data/lib/scrapebadger/api/chat_gpt_api.rb +466 -0
- data/lib/scrapebadger/api/depop_api.rb +518 -0
- data/lib/scrapebadger/api/duck_duck_go_api.rb +675 -0
- data/lib/scrapebadger/api/e_bay_api.rb +1029 -0
- data/lib/scrapebadger/api/facebook_api.rb +1492 -0
- data/lib/scrapebadger/api/google_api.rb +3191 -0
- data/lib/scrapebadger/api/idealista_api.rb +864 -0
- data/lib/scrapebadger/api/immobiliare_api.rb +734 -0
- data/lib/scrapebadger/api/instagram_api.rb +1555 -0
- data/lib/scrapebadger/api/leboncoin_api.rb +818 -0
- data/lib/scrapebadger/api/linked_in_api.rb +832 -0
- data/lib/scrapebadger/api/loop_net_api.rb +503 -0
- data/lib/scrapebadger/api/realtor_api.rb +481 -0
- data/lib/scrapebadger/api/reddit_api.rb +1601 -0
- data/lib/scrapebadger/api/redfin_api.rb +625 -0
- data/lib/scrapebadger/api/tik_tok_api.rb +2029 -0
- data/lib/scrapebadger/api/twitter_api.rb +3696 -0
- data/lib/scrapebadger/api/vinted_api.rb +705 -0
- data/lib/scrapebadger/api/walmart_api.rb +876 -0
- data/lib/scrapebadger/api/web_api.rb +547 -0
- data/lib/scrapebadger/api/yahoo_api.rb +560 -0
- data/lib/scrapebadger/api/yandex_api.rb +422 -0
- data/lib/scrapebadger/api/you_tube_api.rb +2520 -0
- data/lib/scrapebadger/api/zillow_api.rb +634 -0
- data/lib/scrapebadger/api_client.rb +394 -0
- data/lib/scrapebadger/api_error.rb +58 -0
- data/lib/scrapebadger/configuration.rb +308 -0
- data/lib/scrapebadger/models/account_info.rb +288 -0
- data/lib/scrapebadger/models/billing_log_list_response.rb +272 -0
- data/lib/scrapebadger/models/billing_log_response.rb +334 -0
- data/lib/scrapebadger/models/filter_rule_create.rb +427 -0
- data/lib/scrapebadger/models/filter_rule_delivery_log_list_response.rb +272 -0
- data/lib/scrapebadger/models/filter_rule_delivery_log_response.rb +422 -0
- data/lib/scrapebadger/models/filter_rule_list_response.rb +272 -0
- data/lib/scrapebadger/models/filter_rule_response.rb +390 -0
- data/lib/scrapebadger/models/filter_rule_update.rb +389 -0
- data/lib/scrapebadger/models/filter_rule_validate_request.rb +250 -0
- data/lib/scrapebadger/models/filter_rule_validate_response.rb +248 -0
- data/lib/scrapebadger/models/http_validation_error.rb +216 -0
- data/lib/scrapebadger/models/portal_api_routers_v1_twitter_filter_rules_filter_rule_pricing_response.rb +238 -0
- data/lib/scrapebadger/models/stream_monitor_create.rb +373 -0
- data/lib/scrapebadger/models/stream_monitor_list_response.rb +272 -0
- data/lib/scrapebadger/models/stream_monitor_response.rb +406 -0
- data/lib/scrapebadger/models/stream_monitor_update.rb +335 -0
- data/lib/scrapebadger/models/subscription_info.rb +352 -0
- data/lib/scrapebadger/models/tweet_delivery_log_list_response.rb +272 -0
- data/lib/scrapebadger/models/tweet_delivery_log_response.rb +422 -0
- data/lib/scrapebadger/models/validation_error.rb +255 -0
- data/lib/scrapebadger/models/validation_error_loc_inner.rb +104 -0
- data/lib/scrapebadger/models/webhook_create.rb +282 -0
- data/lib/scrapebadger/models/webhook_list_item.rb +302 -0
- data/lib/scrapebadger/models/webhook_list_response.rb +240 -0
- data/lib/scrapebadger/models/webhook_response.rb +286 -0
- data/lib/scrapebadger/models/webhook_test_request.rb +223 -0
- data/lib/scrapebadger/models/webhook_test_response.rb +259 -0
- data/lib/scrapebadger/version.rb +15 -0
- data/lib/scrapebadger.rb +96 -0
- data/scrapebadger.gemspec +39 -0
- data/spec/api/account_api_spec.rb +46 -0
- data/spec/api/amazon_api_spec.rb +258 -0
- data/spec/api/apartments_api_spec.rb +98 -0
- data/spec/api/baidu_api_spec.rb +109 -0
- data/spec/api/bing_api_spec.rb +141 -0
- data/spec/api/chat_gpt_api_spec.rb +123 -0
- data/spec/api/depop_api_spec.rb +132 -0
- data/spec/api/duck_duck_go_api_spec.rb +162 -0
- data/spec/api/e_bay_api_spec.rb +222 -0
- data/spec/api/facebook_api_spec.rb +326 -0
- data/spec/api/google_api_spec.rb +649 -0
- data/spec/api/idealista_api_spec.rb +197 -0
- data/spec/api/immobiliare_api_spec.rb +174 -0
- data/spec/api/instagram_api_spec.rb +309 -0
- data/spec/api/leboncoin_api_spec.rb +184 -0
- data/spec/api/linked_in_api_spec.rb +197 -0
- data/spec/api/loop_net_api_spec.rb +127 -0
- data/spec/api/realtor_api_spec.rb +123 -0
- data/spec/api/reddit_api_spec.rb +331 -0
- data/spec/api/redfin_api_spec.rb +147 -0
- data/spec/api/tik_tok_api_spec.rb +413 -0
- data/spec/api/twitter_api_spec.rb +735 -0
- data/spec/api/vinted_api_spec.rb +169 -0
- data/spec/api/walmart_api_spec.rb +192 -0
- data/spec/api/web_api_spec.rb +136 -0
- data/spec/api/yahoo_api_spec.rb +137 -0
- data/spec/api/yandex_api_spec.rb +111 -0
- data/spec/api/you_tube_api_spec.rb +500 -0
- data/spec/api/zillow_api_spec.rb +150 -0
- data/spec/models/account_info_spec.rb +66 -0
- data/spec/models/billing_log_list_response_spec.rb +54 -0
- data/spec/models/billing_log_response_spec.rb +78 -0
- data/spec/models/filter_rule_create_spec.rb +66 -0
- data/spec/models/filter_rule_delivery_log_list_response_spec.rb +54 -0
- data/spec/models/filter_rule_delivery_log_response_spec.rb +114 -0
- data/spec/models/filter_rule_list_response_spec.rb +54 -0
- data/spec/models/filter_rule_response_spec.rb +102 -0
- data/spec/models/filter_rule_update_spec.rb +72 -0
- data/spec/models/filter_rule_validate_request_spec.rb +36 -0
- data/spec/models/filter_rule_validate_response_spec.rb +48 -0
- data/spec/models/http_validation_error_spec.rb +36 -0
- data/spec/models/portal_api_routers_v1_twitter_filter_rules_filter_rule_pricing_response_spec.rb +42 -0
- data/spec/models/stream_monitor_create_spec.rb +60 -0
- data/spec/models/stream_monitor_list_response_spec.rb +54 -0
- data/spec/models/stream_monitor_response_spec.rb +108 -0
- data/spec/models/stream_monitor_update_spec.rb +66 -0
- data/spec/models/subscription_info_spec.rb +102 -0
- data/spec/models/tweet_delivery_log_list_response_spec.rb +54 -0
- data/spec/models/tweet_delivery_log_response_spec.rb +114 -0
- data/spec/models/validation_error_loc_inner_spec.rb +21 -0
- data/spec/models/validation_error_spec.rb +48 -0
- data/spec/models/webhook_create_spec.rb +48 -0
- data/spec/models/webhook_list_item_spec.rb +66 -0
- data/spec/models/webhook_list_response_spec.rb +42 -0
- data/spec/models/webhook_response_spec.rb +60 -0
- data/spec/models/webhook_test_request_spec.rb +36 -0
- data/spec/models/webhook_test_response_spec.rb +54 -0
- data/spec/spec_helper.rb +111 -0
- metadata +324 -0
|
@@ -0,0 +1,466 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#ScrapeBadger API
|
|
3
|
+
|
|
4
|
+
#Unified credit-based scraping API. https://docs.scrapebadger.com
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 0.1.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.10.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'cgi'
|
|
14
|
+
|
|
15
|
+
module ScrapeBadger
|
|
16
|
+
class ChatGPTApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Ask ChatGPT a question
|
|
23
|
+
# Send a prompt to ChatGPT and get the answer plus the web sources it cited.
|
|
24
|
+
# @param prompt [String] The prompt to send to ChatGPT (max 4096 characters).
|
|
25
|
+
# @param [Hash] opts the optional parameters
|
|
26
|
+
# @option opts [String] :country ISO-3166 alpha-2 egress country, e.g. 'US', 'GB', 'DE'.
|
|
27
|
+
# @option opts [String] :web_search auto (let ChatGPT decide) | force (ask it to browse) | off (answer from memory). `web_search_triggered` in the response always reports what actually happened. (default to 'auto')
|
|
28
|
+
# @return [Object]
|
|
29
|
+
def chatgpt_ask_chatgpt_a_question(prompt, opts = {})
|
|
30
|
+
data, _status_code, _headers = chatgpt_ask_chatgpt_a_question_with_http_info(prompt, opts)
|
|
31
|
+
data
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
# Ask ChatGPT a question
|
|
35
|
+
# Send a prompt to ChatGPT and get the answer plus the web sources it cited.
|
|
36
|
+
# @param prompt [String] The prompt to send to ChatGPT (max 4096 characters).
|
|
37
|
+
# @param [Hash] opts the optional parameters
|
|
38
|
+
# @option opts [String] :country ISO-3166 alpha-2 egress country, e.g. 'US', 'GB', 'DE'.
|
|
39
|
+
# @option opts [String] :web_search auto (let ChatGPT decide) | force (ask it to browse) | off (answer from memory). `web_search_triggered` in the response always reports what actually happened. (default to 'auto')
|
|
40
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
41
|
+
def chatgpt_ask_chatgpt_a_question_with_http_info(prompt, opts = {})
|
|
42
|
+
if @api_client.config.debugging
|
|
43
|
+
@api_client.config.logger.debug 'Calling API: ChatGPTApi.chatgpt_ask_chatgpt_a_question ...'
|
|
44
|
+
end
|
|
45
|
+
# verify the required parameter 'prompt' is set
|
|
46
|
+
if @api_client.config.client_side_validation && prompt.nil?
|
|
47
|
+
fail ArgumentError, "Missing the required parameter 'prompt' when calling ChatGPTApi.chatgpt_ask_chatgpt_a_question"
|
|
48
|
+
end
|
|
49
|
+
# resource path
|
|
50
|
+
local_var_path = '/v1/chatgpt/ask'
|
|
51
|
+
|
|
52
|
+
# query parameters
|
|
53
|
+
query_params = opts[:query_params] || {}
|
|
54
|
+
query_params[:'prompt'] = prompt
|
|
55
|
+
query_params[:'country'] = opts[:'country'] if !opts[:'country'].nil?
|
|
56
|
+
query_params[:'web_search'] = opts[:'web_search'] if !opts[:'web_search'].nil?
|
|
57
|
+
|
|
58
|
+
# header parameters
|
|
59
|
+
header_params = opts[:header_params] || {}
|
|
60
|
+
# HTTP header 'Accept' (if needed)
|
|
61
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
62
|
+
|
|
63
|
+
# form parameters
|
|
64
|
+
form_params = opts[:form_params] || {}
|
|
65
|
+
|
|
66
|
+
# http body (model)
|
|
67
|
+
post_body = opts[:debug_body]
|
|
68
|
+
|
|
69
|
+
# return_type
|
|
70
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
71
|
+
|
|
72
|
+
# auth_names
|
|
73
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
74
|
+
|
|
75
|
+
new_options = opts.merge(
|
|
76
|
+
:operation => :"ChatGPTApi.chatgpt_ask_chatgpt_a_question",
|
|
77
|
+
:header_params => header_params,
|
|
78
|
+
:query_params => query_params,
|
|
79
|
+
:form_params => form_params,
|
|
80
|
+
:body => post_body,
|
|
81
|
+
:auth_names => auth_names,
|
|
82
|
+
:return_type => return_type
|
|
83
|
+
)
|
|
84
|
+
|
|
85
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
86
|
+
if @api_client.config.debugging
|
|
87
|
+
@api_client.config.logger.debug "API called: ChatGPTApi#chatgpt_ask_chatgpt_a_question\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
88
|
+
end
|
|
89
|
+
return data, status_code, headers
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
# Ask ChatGPT a question (POST)
|
|
93
|
+
# POST form of `/ask`, for prompts too long for a query string.
|
|
94
|
+
# @param [Hash] opts the optional parameters
|
|
95
|
+
# @return [Object]
|
|
96
|
+
def chatgpt_ask_chatgpt_a_question_post(opts = {})
|
|
97
|
+
data, _status_code, _headers = chatgpt_ask_chatgpt_a_question_post_with_http_info(opts)
|
|
98
|
+
data
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# Ask ChatGPT a question (POST)
|
|
102
|
+
# POST form of `/ask`, for prompts too long for a query string.
|
|
103
|
+
# @param [Hash] opts the optional parameters
|
|
104
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
105
|
+
def chatgpt_ask_chatgpt_a_question_post_with_http_info(opts = {})
|
|
106
|
+
if @api_client.config.debugging
|
|
107
|
+
@api_client.config.logger.debug 'Calling API: ChatGPTApi.chatgpt_ask_chatgpt_a_question_post ...'
|
|
108
|
+
end
|
|
109
|
+
# resource path
|
|
110
|
+
local_var_path = '/v1/chatgpt/ask'
|
|
111
|
+
|
|
112
|
+
# query parameters
|
|
113
|
+
query_params = opts[:query_params] || {}
|
|
114
|
+
|
|
115
|
+
# header parameters
|
|
116
|
+
header_params = opts[:header_params] || {}
|
|
117
|
+
# HTTP header 'Accept' (if needed)
|
|
118
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
119
|
+
|
|
120
|
+
# form parameters
|
|
121
|
+
form_params = opts[:form_params] || {}
|
|
122
|
+
|
|
123
|
+
# http body (model)
|
|
124
|
+
post_body = opts[:debug_body]
|
|
125
|
+
|
|
126
|
+
# return_type
|
|
127
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
128
|
+
|
|
129
|
+
# auth_names
|
|
130
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
131
|
+
|
|
132
|
+
new_options = opts.merge(
|
|
133
|
+
:operation => :"ChatGPTApi.chatgpt_ask_chatgpt_a_question_post",
|
|
134
|
+
:header_params => header_params,
|
|
135
|
+
:query_params => query_params,
|
|
136
|
+
:form_params => form_params,
|
|
137
|
+
:body => post_body,
|
|
138
|
+
:auth_names => auth_names,
|
|
139
|
+
:return_type => return_type
|
|
140
|
+
)
|
|
141
|
+
|
|
142
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
143
|
+
if @api_client.config.debugging
|
|
144
|
+
@api_client.config.logger.debug "API called: ChatGPTApi#chatgpt_ask_chatgpt_a_question_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
145
|
+
end
|
|
146
|
+
return data, status_code, headers
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
# ChatGPT scraper health check
|
|
150
|
+
# Check health of the ChatGPT scraper service (accepts HEAD).
|
|
151
|
+
# @param [Hash] opts the optional parameters
|
|
152
|
+
# @return [Object]
|
|
153
|
+
def chatgpt_chatgpt_scraper_health_check(opts = {})
|
|
154
|
+
data, _status_code, _headers = chatgpt_chatgpt_scraper_health_check_with_http_info(opts)
|
|
155
|
+
data
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
# ChatGPT scraper health check
|
|
159
|
+
# Check health of the ChatGPT scraper service (accepts HEAD).
|
|
160
|
+
# @param [Hash] opts the optional parameters
|
|
161
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
162
|
+
def chatgpt_chatgpt_scraper_health_check_with_http_info(opts = {})
|
|
163
|
+
if @api_client.config.debugging
|
|
164
|
+
@api_client.config.logger.debug 'Calling API: ChatGPTApi.chatgpt_chatgpt_scraper_health_check ...'
|
|
165
|
+
end
|
|
166
|
+
# resource path
|
|
167
|
+
local_var_path = '/v1/chatgpt/health'
|
|
168
|
+
|
|
169
|
+
# query parameters
|
|
170
|
+
query_params = opts[:query_params] || {}
|
|
171
|
+
|
|
172
|
+
# header parameters
|
|
173
|
+
header_params = opts[:header_params] || {}
|
|
174
|
+
# HTTP header 'Accept' (if needed)
|
|
175
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
176
|
+
|
|
177
|
+
# form parameters
|
|
178
|
+
form_params = opts[:form_params] || {}
|
|
179
|
+
|
|
180
|
+
# http body (model)
|
|
181
|
+
post_body = opts[:debug_body]
|
|
182
|
+
|
|
183
|
+
# return_type
|
|
184
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
185
|
+
|
|
186
|
+
# auth_names
|
|
187
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
188
|
+
|
|
189
|
+
new_options = opts.merge(
|
|
190
|
+
:operation => :"ChatGPTApi.chatgpt_chatgpt_scraper_health_check",
|
|
191
|
+
:header_params => header_params,
|
|
192
|
+
:query_params => query_params,
|
|
193
|
+
:form_params => form_params,
|
|
194
|
+
:body => post_body,
|
|
195
|
+
:auth_names => auth_names,
|
|
196
|
+
:return_type => return_type
|
|
197
|
+
)
|
|
198
|
+
|
|
199
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
200
|
+
if @api_client.config.debugging
|
|
201
|
+
@api_client.config.logger.debug "API called: ChatGPTApi#chatgpt_chatgpt_scraper_health_check\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
202
|
+
end
|
|
203
|
+
return data, status_code, headers
|
|
204
|
+
end
|
|
205
|
+
|
|
206
|
+
# ChatGPT scraper health check
|
|
207
|
+
# Check health of the ChatGPT scraper service (accepts HEAD).
|
|
208
|
+
# @param [Hash] opts the optional parameters
|
|
209
|
+
# @return [Object]
|
|
210
|
+
def chatgpt_chatgpt_scraper_health_check_head(opts = {})
|
|
211
|
+
data, _status_code, _headers = chatgpt_chatgpt_scraper_health_check_head_with_http_info(opts)
|
|
212
|
+
data
|
|
213
|
+
end
|
|
214
|
+
|
|
215
|
+
# ChatGPT scraper health check
|
|
216
|
+
# Check health of the ChatGPT scraper service (accepts HEAD).
|
|
217
|
+
# @param [Hash] opts the optional parameters
|
|
218
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
219
|
+
def chatgpt_chatgpt_scraper_health_check_head_with_http_info(opts = {})
|
|
220
|
+
if @api_client.config.debugging
|
|
221
|
+
@api_client.config.logger.debug 'Calling API: ChatGPTApi.chatgpt_chatgpt_scraper_health_check_head ...'
|
|
222
|
+
end
|
|
223
|
+
# resource path
|
|
224
|
+
local_var_path = '/v1/chatgpt/health'
|
|
225
|
+
|
|
226
|
+
# query parameters
|
|
227
|
+
query_params = opts[:query_params] || {}
|
|
228
|
+
|
|
229
|
+
# header parameters
|
|
230
|
+
header_params = opts[:header_params] || {}
|
|
231
|
+
# HTTP header 'Accept' (if needed)
|
|
232
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
233
|
+
|
|
234
|
+
# form parameters
|
|
235
|
+
form_params = opts[:form_params] || {}
|
|
236
|
+
|
|
237
|
+
# http body (model)
|
|
238
|
+
post_body = opts[:debug_body]
|
|
239
|
+
|
|
240
|
+
# return_type
|
|
241
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
242
|
+
|
|
243
|
+
# auth_names
|
|
244
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
245
|
+
|
|
246
|
+
new_options = opts.merge(
|
|
247
|
+
:operation => :"ChatGPTApi.chatgpt_chatgpt_scraper_health_check_head",
|
|
248
|
+
:header_params => header_params,
|
|
249
|
+
:query_params => query_params,
|
|
250
|
+
:form_params => form_params,
|
|
251
|
+
:body => post_body,
|
|
252
|
+
:auth_names => auth_names,
|
|
253
|
+
:return_type => return_type
|
|
254
|
+
)
|
|
255
|
+
|
|
256
|
+
data, status_code, headers = @api_client.call_api(:HEAD, local_var_path, new_options)
|
|
257
|
+
if @api_client.config.debugging
|
|
258
|
+
@api_client.config.logger.debug "API called: ChatGPTApi#chatgpt_chatgpt_scraper_health_check_head\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
259
|
+
end
|
|
260
|
+
return data, status_code, headers
|
|
261
|
+
end
|
|
262
|
+
|
|
263
|
+
# List ChatGPT models
|
|
264
|
+
# Models chatgpt.com currently serves to an anonymous visitor.
|
|
265
|
+
# @param [Hash] opts the optional parameters
|
|
266
|
+
# @option opts [String] :country ISO-3166 alpha-2 egress country.
|
|
267
|
+
# @return [Object]
|
|
268
|
+
def chatgpt_list_chatgpt_models(opts = {})
|
|
269
|
+
data, _status_code, _headers = chatgpt_list_chatgpt_models_with_http_info(opts)
|
|
270
|
+
data
|
|
271
|
+
end
|
|
272
|
+
|
|
273
|
+
# List ChatGPT models
|
|
274
|
+
# Models chatgpt.com currently serves to an anonymous visitor.
|
|
275
|
+
# @param [Hash] opts the optional parameters
|
|
276
|
+
# @option opts [String] :country ISO-3166 alpha-2 egress country.
|
|
277
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
278
|
+
def chatgpt_list_chatgpt_models_with_http_info(opts = {})
|
|
279
|
+
if @api_client.config.debugging
|
|
280
|
+
@api_client.config.logger.debug 'Calling API: ChatGPTApi.chatgpt_list_chatgpt_models ...'
|
|
281
|
+
end
|
|
282
|
+
# resource path
|
|
283
|
+
local_var_path = '/v1/chatgpt/models'
|
|
284
|
+
|
|
285
|
+
# query parameters
|
|
286
|
+
query_params = opts[:query_params] || {}
|
|
287
|
+
query_params[:'country'] = opts[:'country'] if !opts[:'country'].nil?
|
|
288
|
+
|
|
289
|
+
# header parameters
|
|
290
|
+
header_params = opts[:header_params] || {}
|
|
291
|
+
# HTTP header 'Accept' (if needed)
|
|
292
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
293
|
+
|
|
294
|
+
# form parameters
|
|
295
|
+
form_params = opts[:form_params] || {}
|
|
296
|
+
|
|
297
|
+
# http body (model)
|
|
298
|
+
post_body = opts[:debug_body]
|
|
299
|
+
|
|
300
|
+
# return_type
|
|
301
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
302
|
+
|
|
303
|
+
# auth_names
|
|
304
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
305
|
+
|
|
306
|
+
new_options = opts.merge(
|
|
307
|
+
:operation => :"ChatGPTApi.chatgpt_list_chatgpt_models",
|
|
308
|
+
:header_params => header_params,
|
|
309
|
+
:query_params => query_params,
|
|
310
|
+
:form_params => form_params,
|
|
311
|
+
:body => post_body,
|
|
312
|
+
:auth_names => auth_names,
|
|
313
|
+
:return_type => return_type
|
|
314
|
+
)
|
|
315
|
+
|
|
316
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
317
|
+
if @api_client.config.debugging
|
|
318
|
+
@api_client.config.logger.debug "API called: ChatGPTApi#chatgpt_list_chatgpt_models\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
319
|
+
end
|
|
320
|
+
return data, status_code, headers
|
|
321
|
+
end
|
|
322
|
+
|
|
323
|
+
# Measure a brand's visibility in a ChatGPT answer
|
|
324
|
+
# Ask ChatGPT, then report whether the brand is mentioned, cited and how prominently.
|
|
325
|
+
# @param prompt [String] The prompt to ask ChatGPT.
|
|
326
|
+
# @param brand [String] Brand name to look for in the answer.
|
|
327
|
+
# @param [Hash] opts the optional parameters
|
|
328
|
+
# @option opts [String] :domain Brand domain, for citation matching.
|
|
329
|
+
# @option opts [String] :aliases Comma-separated alternative names.
|
|
330
|
+
# @option opts [String] :competitors Comma-separated competitor names.
|
|
331
|
+
# @option opts [String] :country ISO-3166 alpha-2 egress country.
|
|
332
|
+
# @option opts [String] :web_search auto | force | off (default to 'force')
|
|
333
|
+
# @return [Object]
|
|
334
|
+
def chatgpt_measure_a_brand_s_visibility_in_a_chatgpt_answer(prompt, brand, opts = {})
|
|
335
|
+
data, _status_code, _headers = chatgpt_measure_a_brand_s_visibility_in_a_chatgpt_answer_with_http_info(prompt, brand, opts)
|
|
336
|
+
data
|
|
337
|
+
end
|
|
338
|
+
|
|
339
|
+
# Measure a brand's visibility in a ChatGPT answer
|
|
340
|
+
# Ask ChatGPT, then report whether the brand is mentioned, cited and how prominently.
|
|
341
|
+
# @param prompt [String] The prompt to ask ChatGPT.
|
|
342
|
+
# @param brand [String] Brand name to look for in the answer.
|
|
343
|
+
# @param [Hash] opts the optional parameters
|
|
344
|
+
# @option opts [String] :domain Brand domain, for citation matching.
|
|
345
|
+
# @option opts [String] :aliases Comma-separated alternative names.
|
|
346
|
+
# @option opts [String] :competitors Comma-separated competitor names.
|
|
347
|
+
# @option opts [String] :country ISO-3166 alpha-2 egress country.
|
|
348
|
+
# @option opts [String] :web_search auto | force | off (default to 'force')
|
|
349
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
350
|
+
def chatgpt_measure_a_brand_s_visibility_in_a_chatgpt_answer_with_http_info(prompt, brand, opts = {})
|
|
351
|
+
if @api_client.config.debugging
|
|
352
|
+
@api_client.config.logger.debug 'Calling API: ChatGPTApi.chatgpt_measure_a_brand_s_visibility_in_a_chatgpt_answer ...'
|
|
353
|
+
end
|
|
354
|
+
# verify the required parameter 'prompt' is set
|
|
355
|
+
if @api_client.config.client_side_validation && prompt.nil?
|
|
356
|
+
fail ArgumentError, "Missing the required parameter 'prompt' when calling ChatGPTApi.chatgpt_measure_a_brand_s_visibility_in_a_chatgpt_answer"
|
|
357
|
+
end
|
|
358
|
+
# verify the required parameter 'brand' is set
|
|
359
|
+
if @api_client.config.client_side_validation && brand.nil?
|
|
360
|
+
fail ArgumentError, "Missing the required parameter 'brand' when calling ChatGPTApi.chatgpt_measure_a_brand_s_visibility_in_a_chatgpt_answer"
|
|
361
|
+
end
|
|
362
|
+
# resource path
|
|
363
|
+
local_var_path = '/v1/chatgpt/brand-visibility'
|
|
364
|
+
|
|
365
|
+
# query parameters
|
|
366
|
+
query_params = opts[:query_params] || {}
|
|
367
|
+
query_params[:'prompt'] = prompt
|
|
368
|
+
query_params[:'brand'] = brand
|
|
369
|
+
query_params[:'domain'] = opts[:'domain'] if !opts[:'domain'].nil?
|
|
370
|
+
query_params[:'aliases'] = opts[:'aliases'] if !opts[:'aliases'].nil?
|
|
371
|
+
query_params[:'competitors'] = opts[:'competitors'] if !opts[:'competitors'].nil?
|
|
372
|
+
query_params[:'country'] = opts[:'country'] if !opts[:'country'].nil?
|
|
373
|
+
query_params[:'web_search'] = opts[:'web_search'] if !opts[:'web_search'].nil?
|
|
374
|
+
|
|
375
|
+
# header parameters
|
|
376
|
+
header_params = opts[:header_params] || {}
|
|
377
|
+
# HTTP header 'Accept' (if needed)
|
|
378
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
379
|
+
|
|
380
|
+
# form parameters
|
|
381
|
+
form_params = opts[:form_params] || {}
|
|
382
|
+
|
|
383
|
+
# http body (model)
|
|
384
|
+
post_body = opts[:debug_body]
|
|
385
|
+
|
|
386
|
+
# return_type
|
|
387
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
388
|
+
|
|
389
|
+
# auth_names
|
|
390
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
391
|
+
|
|
392
|
+
new_options = opts.merge(
|
|
393
|
+
:operation => :"ChatGPTApi.chatgpt_measure_a_brand_s_visibility_in_a_chatgpt_answer",
|
|
394
|
+
:header_params => header_params,
|
|
395
|
+
:query_params => query_params,
|
|
396
|
+
:form_params => form_params,
|
|
397
|
+
:body => post_body,
|
|
398
|
+
:auth_names => auth_names,
|
|
399
|
+
:return_type => return_type
|
|
400
|
+
)
|
|
401
|
+
|
|
402
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
403
|
+
if @api_client.config.debugging
|
|
404
|
+
@api_client.config.logger.debug "API called: ChatGPTApi#chatgpt_measure_a_brand_s_visibility_in_a_chatgpt_answer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
405
|
+
end
|
|
406
|
+
return data, status_code, headers
|
|
407
|
+
end
|
|
408
|
+
|
|
409
|
+
# Measure a brand's visibility in a ChatGPT answer (POST)
|
|
410
|
+
# POST form, for longer prompts and larger competitor sets.
|
|
411
|
+
# @param [Hash] opts the optional parameters
|
|
412
|
+
# @return [Object]
|
|
413
|
+
def chatgpt_measure_a_brand_s_visibility_in_a_chatgpt_answer_post(opts = {})
|
|
414
|
+
data, _status_code, _headers = chatgpt_measure_a_brand_s_visibility_in_a_chatgpt_answer_post_with_http_info(opts)
|
|
415
|
+
data
|
|
416
|
+
end
|
|
417
|
+
|
|
418
|
+
# Measure a brand's visibility in a ChatGPT answer (POST)
|
|
419
|
+
# POST form, for longer prompts and larger competitor sets.
|
|
420
|
+
# @param [Hash] opts the optional parameters
|
|
421
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
422
|
+
def chatgpt_measure_a_brand_s_visibility_in_a_chatgpt_answer_post_with_http_info(opts = {})
|
|
423
|
+
if @api_client.config.debugging
|
|
424
|
+
@api_client.config.logger.debug 'Calling API: ChatGPTApi.chatgpt_measure_a_brand_s_visibility_in_a_chatgpt_answer_post ...'
|
|
425
|
+
end
|
|
426
|
+
# resource path
|
|
427
|
+
local_var_path = '/v1/chatgpt/brand-visibility'
|
|
428
|
+
|
|
429
|
+
# query parameters
|
|
430
|
+
query_params = opts[:query_params] || {}
|
|
431
|
+
|
|
432
|
+
# header parameters
|
|
433
|
+
header_params = opts[:header_params] || {}
|
|
434
|
+
# HTTP header 'Accept' (if needed)
|
|
435
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
436
|
+
|
|
437
|
+
# form parameters
|
|
438
|
+
form_params = opts[:form_params] || {}
|
|
439
|
+
|
|
440
|
+
# http body (model)
|
|
441
|
+
post_body = opts[:debug_body]
|
|
442
|
+
|
|
443
|
+
# return_type
|
|
444
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
445
|
+
|
|
446
|
+
# auth_names
|
|
447
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
448
|
+
|
|
449
|
+
new_options = opts.merge(
|
|
450
|
+
:operation => :"ChatGPTApi.chatgpt_measure_a_brand_s_visibility_in_a_chatgpt_answer_post",
|
|
451
|
+
:header_params => header_params,
|
|
452
|
+
:query_params => query_params,
|
|
453
|
+
:form_params => form_params,
|
|
454
|
+
:body => post_body,
|
|
455
|
+
:auth_names => auth_names,
|
|
456
|
+
:return_type => return_type
|
|
457
|
+
)
|
|
458
|
+
|
|
459
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
460
|
+
if @api_client.config.debugging
|
|
461
|
+
@api_client.config.logger.debug "API called: ChatGPTApi#chatgpt_measure_a_brand_s_visibility_in_a_chatgpt_answer_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
462
|
+
end
|
|
463
|
+
return data, status_code, headers
|
|
464
|
+
end
|
|
465
|
+
end
|
|
466
|
+
end
|