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
data/docs/BaiduApi.md
ADDED
|
@@ -0,0 +1,447 @@
|
|
|
1
|
+
# ScrapeBadger::BaiduApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *https://scrapebadger.com*
|
|
4
|
+
|
|
5
|
+
| Method | HTTP request | Description |
|
|
6
|
+
| ------ | ------------ | ----------- |
|
|
7
|
+
| [**baidu_baidu_image_search**](BaiduApi.md#baidu_baidu_image_search) | **GET** /v1/baidu/images | Baidu image search |
|
|
8
|
+
| [**baidu_baidu_news_search**](BaiduApi.md#baidu_baidu_news_search) | **GET** /v1/baidu/news | Baidu news search |
|
|
9
|
+
| [**baidu_baidu_scraper_health_check**](BaiduApi.md#baidu_baidu_scraper_health_check) | **GET** /v1/baidu/health | Baidu scraper health check |
|
|
10
|
+
| [**baidu_baidu_scraper_health_check_head**](BaiduApi.md#baidu_baidu_scraper_health_check_head) | **HEAD** /v1/baidu/health | Baidu scraper health check |
|
|
11
|
+
| [**baidu_baidu_web_search**](BaiduApi.md#baidu_baidu_web_search) | **GET** /v1/baidu/search | Baidu web search |
|
|
12
|
+
| [**baidu_search_suggestions**](BaiduApi.md#baidu_search_suggestions) | **GET** /v1/baidu/autocomplete | Search suggestions |
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
## baidu_baidu_image_search
|
|
16
|
+
|
|
17
|
+
> Object baidu_baidu_image_search(query, opts)
|
|
18
|
+
|
|
19
|
+
Baidu image search
|
|
20
|
+
|
|
21
|
+
Baidu image search via the acjson JSON API.
|
|
22
|
+
|
|
23
|
+
### Examples
|
|
24
|
+
|
|
25
|
+
```ruby
|
|
26
|
+
require 'time'
|
|
27
|
+
require 'scrapebadger'
|
|
28
|
+
# setup authorization
|
|
29
|
+
ScrapeBadger.configure do |config|
|
|
30
|
+
# Configure API key authorization: ApiKeyAuth
|
|
31
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
32
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
33
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
api_instance = ScrapeBadger::BaiduApi.new
|
|
37
|
+
query = 'query_example' # String | Search keywords
|
|
38
|
+
opts = {
|
|
39
|
+
page: 56 # Integer | 30 images per page
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
begin
|
|
43
|
+
# Baidu image search
|
|
44
|
+
result = api_instance.baidu_baidu_image_search(query, opts)
|
|
45
|
+
p result
|
|
46
|
+
rescue ScrapeBadger::ApiError => e
|
|
47
|
+
puts "Error when calling BaiduApi->baidu_baidu_image_search: #{e}"
|
|
48
|
+
end
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
#### Using the baidu_baidu_image_search_with_http_info variant
|
|
52
|
+
|
|
53
|
+
This returns an Array which contains the response data, status code and headers.
|
|
54
|
+
|
|
55
|
+
> <Array(Object, Integer, Hash)> baidu_baidu_image_search_with_http_info(query, opts)
|
|
56
|
+
|
|
57
|
+
```ruby
|
|
58
|
+
begin
|
|
59
|
+
# Baidu image search
|
|
60
|
+
data, status_code, headers = api_instance.baidu_baidu_image_search_with_http_info(query, opts)
|
|
61
|
+
p status_code # => 2xx
|
|
62
|
+
p headers # => { ... }
|
|
63
|
+
p data # => Object
|
|
64
|
+
rescue ScrapeBadger::ApiError => e
|
|
65
|
+
puts "Error when calling BaiduApi->baidu_baidu_image_search_with_http_info: #{e}"
|
|
66
|
+
end
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### Parameters
|
|
70
|
+
|
|
71
|
+
| Name | Type | Description | Notes |
|
|
72
|
+
| ---- | ---- | ----------- | ----- |
|
|
73
|
+
| **query** | **String** | Search keywords | |
|
|
74
|
+
| **page** | **Integer** | 30 images per page | [optional][default to 1] |
|
|
75
|
+
|
|
76
|
+
### Return type
|
|
77
|
+
|
|
78
|
+
**Object**
|
|
79
|
+
|
|
80
|
+
### Authorization
|
|
81
|
+
|
|
82
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
83
|
+
|
|
84
|
+
### HTTP request headers
|
|
85
|
+
|
|
86
|
+
- **Content-Type**: Not defined
|
|
87
|
+
- **Accept**: application/json
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
## baidu_baidu_news_search
|
|
91
|
+
|
|
92
|
+
> Object baidu_baidu_news_search(query, opts)
|
|
93
|
+
|
|
94
|
+
Baidu news search
|
|
95
|
+
|
|
96
|
+
Baidu news vertical — articles with source, publish date and real URLs.
|
|
97
|
+
|
|
98
|
+
### Examples
|
|
99
|
+
|
|
100
|
+
```ruby
|
|
101
|
+
require 'time'
|
|
102
|
+
require 'scrapebadger'
|
|
103
|
+
# setup authorization
|
|
104
|
+
ScrapeBadger.configure do |config|
|
|
105
|
+
# Configure API key authorization: ApiKeyAuth
|
|
106
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
107
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
108
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
api_instance = ScrapeBadger::BaiduApi.new
|
|
112
|
+
query = 'query_example' # String | Search keywords
|
|
113
|
+
opts = {
|
|
114
|
+
page: 56 # Integer |
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
begin
|
|
118
|
+
# Baidu news search
|
|
119
|
+
result = api_instance.baidu_baidu_news_search(query, opts)
|
|
120
|
+
p result
|
|
121
|
+
rescue ScrapeBadger::ApiError => e
|
|
122
|
+
puts "Error when calling BaiduApi->baidu_baidu_news_search: #{e}"
|
|
123
|
+
end
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
#### Using the baidu_baidu_news_search_with_http_info variant
|
|
127
|
+
|
|
128
|
+
This returns an Array which contains the response data, status code and headers.
|
|
129
|
+
|
|
130
|
+
> <Array(Object, Integer, Hash)> baidu_baidu_news_search_with_http_info(query, opts)
|
|
131
|
+
|
|
132
|
+
```ruby
|
|
133
|
+
begin
|
|
134
|
+
# Baidu news search
|
|
135
|
+
data, status_code, headers = api_instance.baidu_baidu_news_search_with_http_info(query, opts)
|
|
136
|
+
p status_code # => 2xx
|
|
137
|
+
p headers # => { ... }
|
|
138
|
+
p data # => Object
|
|
139
|
+
rescue ScrapeBadger::ApiError => e
|
|
140
|
+
puts "Error when calling BaiduApi->baidu_baidu_news_search_with_http_info: #{e}"
|
|
141
|
+
end
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
### Parameters
|
|
145
|
+
|
|
146
|
+
| Name | Type | Description | Notes |
|
|
147
|
+
| ---- | ---- | ----------- | ----- |
|
|
148
|
+
| **query** | **String** | Search keywords | |
|
|
149
|
+
| **page** | **Integer** | | [optional][default to 1] |
|
|
150
|
+
|
|
151
|
+
### Return type
|
|
152
|
+
|
|
153
|
+
**Object**
|
|
154
|
+
|
|
155
|
+
### Authorization
|
|
156
|
+
|
|
157
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
158
|
+
|
|
159
|
+
### HTTP request headers
|
|
160
|
+
|
|
161
|
+
- **Content-Type**: Not defined
|
|
162
|
+
- **Accept**: application/json
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
## baidu_baidu_scraper_health_check
|
|
166
|
+
|
|
167
|
+
> Object baidu_baidu_scraper_health_check
|
|
168
|
+
|
|
169
|
+
Baidu scraper health check
|
|
170
|
+
|
|
171
|
+
Check health of the Baidu scraper service (accepts HEAD for UptimeRobot).
|
|
172
|
+
|
|
173
|
+
### Examples
|
|
174
|
+
|
|
175
|
+
```ruby
|
|
176
|
+
require 'time'
|
|
177
|
+
require 'scrapebadger'
|
|
178
|
+
# setup authorization
|
|
179
|
+
ScrapeBadger.configure do |config|
|
|
180
|
+
# Configure API key authorization: ApiKeyAuth
|
|
181
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
182
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
183
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
api_instance = ScrapeBadger::BaiduApi.new
|
|
187
|
+
|
|
188
|
+
begin
|
|
189
|
+
# Baidu scraper health check
|
|
190
|
+
result = api_instance.baidu_baidu_scraper_health_check
|
|
191
|
+
p result
|
|
192
|
+
rescue ScrapeBadger::ApiError => e
|
|
193
|
+
puts "Error when calling BaiduApi->baidu_baidu_scraper_health_check: #{e}"
|
|
194
|
+
end
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
#### Using the baidu_baidu_scraper_health_check_with_http_info variant
|
|
198
|
+
|
|
199
|
+
This returns an Array which contains the response data, status code and headers.
|
|
200
|
+
|
|
201
|
+
> <Array(Object, Integer, Hash)> baidu_baidu_scraper_health_check_with_http_info
|
|
202
|
+
|
|
203
|
+
```ruby
|
|
204
|
+
begin
|
|
205
|
+
# Baidu scraper health check
|
|
206
|
+
data, status_code, headers = api_instance.baidu_baidu_scraper_health_check_with_http_info
|
|
207
|
+
p status_code # => 2xx
|
|
208
|
+
p headers # => { ... }
|
|
209
|
+
p data # => Object
|
|
210
|
+
rescue ScrapeBadger::ApiError => e
|
|
211
|
+
puts "Error when calling BaiduApi->baidu_baidu_scraper_health_check_with_http_info: #{e}"
|
|
212
|
+
end
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
### Parameters
|
|
216
|
+
|
|
217
|
+
This endpoint does not need any parameter.
|
|
218
|
+
|
|
219
|
+
### Return type
|
|
220
|
+
|
|
221
|
+
**Object**
|
|
222
|
+
|
|
223
|
+
### Authorization
|
|
224
|
+
|
|
225
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
226
|
+
|
|
227
|
+
### HTTP request headers
|
|
228
|
+
|
|
229
|
+
- **Content-Type**: Not defined
|
|
230
|
+
- **Accept**: application/json
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
## baidu_baidu_scraper_health_check_head
|
|
234
|
+
|
|
235
|
+
> Object baidu_baidu_scraper_health_check_head
|
|
236
|
+
|
|
237
|
+
Baidu scraper health check
|
|
238
|
+
|
|
239
|
+
Check health of the Baidu scraper service (accepts HEAD for UptimeRobot).
|
|
240
|
+
|
|
241
|
+
### Examples
|
|
242
|
+
|
|
243
|
+
```ruby
|
|
244
|
+
require 'time'
|
|
245
|
+
require 'scrapebadger'
|
|
246
|
+
# setup authorization
|
|
247
|
+
ScrapeBadger.configure do |config|
|
|
248
|
+
# Configure API key authorization: ApiKeyAuth
|
|
249
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
250
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
251
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
252
|
+
end
|
|
253
|
+
|
|
254
|
+
api_instance = ScrapeBadger::BaiduApi.new
|
|
255
|
+
|
|
256
|
+
begin
|
|
257
|
+
# Baidu scraper health check
|
|
258
|
+
result = api_instance.baidu_baidu_scraper_health_check_head
|
|
259
|
+
p result
|
|
260
|
+
rescue ScrapeBadger::ApiError => e
|
|
261
|
+
puts "Error when calling BaiduApi->baidu_baidu_scraper_health_check_head: #{e}"
|
|
262
|
+
end
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
#### Using the baidu_baidu_scraper_health_check_head_with_http_info variant
|
|
266
|
+
|
|
267
|
+
This returns an Array which contains the response data, status code and headers.
|
|
268
|
+
|
|
269
|
+
> <Array(Object, Integer, Hash)> baidu_baidu_scraper_health_check_head_with_http_info
|
|
270
|
+
|
|
271
|
+
```ruby
|
|
272
|
+
begin
|
|
273
|
+
# Baidu scraper health check
|
|
274
|
+
data, status_code, headers = api_instance.baidu_baidu_scraper_health_check_head_with_http_info
|
|
275
|
+
p status_code # => 2xx
|
|
276
|
+
p headers # => { ... }
|
|
277
|
+
p data # => Object
|
|
278
|
+
rescue ScrapeBadger::ApiError => e
|
|
279
|
+
puts "Error when calling BaiduApi->baidu_baidu_scraper_health_check_head_with_http_info: #{e}"
|
|
280
|
+
end
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
### Parameters
|
|
284
|
+
|
|
285
|
+
This endpoint does not need any parameter.
|
|
286
|
+
|
|
287
|
+
### Return type
|
|
288
|
+
|
|
289
|
+
**Object**
|
|
290
|
+
|
|
291
|
+
### Authorization
|
|
292
|
+
|
|
293
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
294
|
+
|
|
295
|
+
### HTTP request headers
|
|
296
|
+
|
|
297
|
+
- **Content-Type**: Not defined
|
|
298
|
+
- **Accept**: application/json
|
|
299
|
+
|
|
300
|
+
|
|
301
|
+
## baidu_baidu_web_search
|
|
302
|
+
|
|
303
|
+
> Object baidu_baidu_web_search(query, opts)
|
|
304
|
+
|
|
305
|
+
Baidu web search
|
|
306
|
+
|
|
307
|
+
Baidu web SERP — organic results with real target URLs, related searches, total count.
|
|
308
|
+
|
|
309
|
+
### Examples
|
|
310
|
+
|
|
311
|
+
```ruby
|
|
312
|
+
require 'time'
|
|
313
|
+
require 'scrapebadger'
|
|
314
|
+
# setup authorization
|
|
315
|
+
ScrapeBadger.configure do |config|
|
|
316
|
+
# Configure API key authorization: ApiKeyAuth
|
|
317
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
318
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
319
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
320
|
+
end
|
|
321
|
+
|
|
322
|
+
api_instance = ScrapeBadger::BaiduApi.new
|
|
323
|
+
query = 'query_example' # String | Search keywords, e.g. '咖啡机' or 'coffee machine'
|
|
324
|
+
opts = {
|
|
325
|
+
page: 56, # Integer | Result page (10 results per page)
|
|
326
|
+
num: 56 # Integer | Results per page (rn)
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
begin
|
|
330
|
+
# Baidu web search
|
|
331
|
+
result = api_instance.baidu_baidu_web_search(query, opts)
|
|
332
|
+
p result
|
|
333
|
+
rescue ScrapeBadger::ApiError => e
|
|
334
|
+
puts "Error when calling BaiduApi->baidu_baidu_web_search: #{e}"
|
|
335
|
+
end
|
|
336
|
+
```
|
|
337
|
+
|
|
338
|
+
#### Using the baidu_baidu_web_search_with_http_info variant
|
|
339
|
+
|
|
340
|
+
This returns an Array which contains the response data, status code and headers.
|
|
341
|
+
|
|
342
|
+
> <Array(Object, Integer, Hash)> baidu_baidu_web_search_with_http_info(query, opts)
|
|
343
|
+
|
|
344
|
+
```ruby
|
|
345
|
+
begin
|
|
346
|
+
# Baidu web search
|
|
347
|
+
data, status_code, headers = api_instance.baidu_baidu_web_search_with_http_info(query, opts)
|
|
348
|
+
p status_code # => 2xx
|
|
349
|
+
p headers # => { ... }
|
|
350
|
+
p data # => Object
|
|
351
|
+
rescue ScrapeBadger::ApiError => e
|
|
352
|
+
puts "Error when calling BaiduApi->baidu_baidu_web_search_with_http_info: #{e}"
|
|
353
|
+
end
|
|
354
|
+
```
|
|
355
|
+
|
|
356
|
+
### Parameters
|
|
357
|
+
|
|
358
|
+
| Name | Type | Description | Notes |
|
|
359
|
+
| ---- | ---- | ----------- | ----- |
|
|
360
|
+
| **query** | **String** | Search keywords, e.g. '咖啡机' or 'coffee machine' | |
|
|
361
|
+
| **page** | **Integer** | Result page (10 results per page) | [optional][default to 1] |
|
|
362
|
+
| **num** | **Integer** | Results per page (rn) | [optional][default to 10] |
|
|
363
|
+
|
|
364
|
+
### Return type
|
|
365
|
+
|
|
366
|
+
**Object**
|
|
367
|
+
|
|
368
|
+
### Authorization
|
|
369
|
+
|
|
370
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
371
|
+
|
|
372
|
+
### HTTP request headers
|
|
373
|
+
|
|
374
|
+
- **Content-Type**: Not defined
|
|
375
|
+
- **Accept**: application/json
|
|
376
|
+
|
|
377
|
+
|
|
378
|
+
## baidu_search_suggestions
|
|
379
|
+
|
|
380
|
+
> Object baidu_search_suggestions(query)
|
|
381
|
+
|
|
382
|
+
Search suggestions
|
|
383
|
+
|
|
384
|
+
Baidu search-box suggestions.
|
|
385
|
+
|
|
386
|
+
### Examples
|
|
387
|
+
|
|
388
|
+
```ruby
|
|
389
|
+
require 'time'
|
|
390
|
+
require 'scrapebadger'
|
|
391
|
+
# setup authorization
|
|
392
|
+
ScrapeBadger.configure do |config|
|
|
393
|
+
# Configure API key authorization: ApiKeyAuth
|
|
394
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
395
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
396
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
397
|
+
end
|
|
398
|
+
|
|
399
|
+
api_instance = ScrapeBadger::BaiduApi.new
|
|
400
|
+
query = 'query_example' # String | Partial search term, e.g. '咖啡' or 'coff'
|
|
401
|
+
|
|
402
|
+
begin
|
|
403
|
+
# Search suggestions
|
|
404
|
+
result = api_instance.baidu_search_suggestions(query)
|
|
405
|
+
p result
|
|
406
|
+
rescue ScrapeBadger::ApiError => e
|
|
407
|
+
puts "Error when calling BaiduApi->baidu_search_suggestions: #{e}"
|
|
408
|
+
end
|
|
409
|
+
```
|
|
410
|
+
|
|
411
|
+
#### Using the baidu_search_suggestions_with_http_info variant
|
|
412
|
+
|
|
413
|
+
This returns an Array which contains the response data, status code and headers.
|
|
414
|
+
|
|
415
|
+
> <Array(Object, Integer, Hash)> baidu_search_suggestions_with_http_info(query)
|
|
416
|
+
|
|
417
|
+
```ruby
|
|
418
|
+
begin
|
|
419
|
+
# Search suggestions
|
|
420
|
+
data, status_code, headers = api_instance.baidu_search_suggestions_with_http_info(query)
|
|
421
|
+
p status_code # => 2xx
|
|
422
|
+
p headers # => { ... }
|
|
423
|
+
p data # => Object
|
|
424
|
+
rescue ScrapeBadger::ApiError => e
|
|
425
|
+
puts "Error when calling BaiduApi->baidu_search_suggestions_with_http_info: #{e}"
|
|
426
|
+
end
|
|
427
|
+
```
|
|
428
|
+
|
|
429
|
+
### Parameters
|
|
430
|
+
|
|
431
|
+
| Name | Type | Description | Notes |
|
|
432
|
+
| ---- | ---- | ----------- | ----- |
|
|
433
|
+
| **query** | **String** | Partial search term, e.g. '咖啡' or 'coff' | |
|
|
434
|
+
|
|
435
|
+
### Return type
|
|
436
|
+
|
|
437
|
+
**Object**
|
|
438
|
+
|
|
439
|
+
### Authorization
|
|
440
|
+
|
|
441
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
442
|
+
|
|
443
|
+
### HTTP request headers
|
|
444
|
+
|
|
445
|
+
- **Content-Type**: Not defined
|
|
446
|
+
- **Accept**: application/json
|
|
447
|
+
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# ScrapeBadger::BillingLogListResponse
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **logs** | [**Array<BillingLogResponse>**](BillingLogResponse.md) | | |
|
|
8
|
+
| **total** | **Integer** | | |
|
|
9
|
+
| **page** | **Integer** | | |
|
|
10
|
+
| **page_size** | **Integer** | | |
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```ruby
|
|
15
|
+
require 'scrapebadger'
|
|
16
|
+
|
|
17
|
+
instance = ScrapeBadger::BillingLogListResponse.new(
|
|
18
|
+
logs: null,
|
|
19
|
+
total: null,
|
|
20
|
+
page: null,
|
|
21
|
+
page_size: null
|
|
22
|
+
)
|
|
23
|
+
```
|
|
24
|
+
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# ScrapeBadger::BillingLogResponse
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **id** | **String** | | |
|
|
8
|
+
| **monitor_id** | **String** | | |
|
|
9
|
+
| **monitor_name** | **String** | | |
|
|
10
|
+
| **billed_at** | **Time** | | |
|
|
11
|
+
| **num_accounts** | **Integer** | | |
|
|
12
|
+
| **credits_deducted** | **Float** | | |
|
|
13
|
+
| **tier_label** | **String** | | |
|
|
14
|
+
| **rate_applied** | **Float** | | |
|
|
15
|
+
|
|
16
|
+
## Example
|
|
17
|
+
|
|
18
|
+
```ruby
|
|
19
|
+
require 'scrapebadger'
|
|
20
|
+
|
|
21
|
+
instance = ScrapeBadger::BillingLogResponse.new(
|
|
22
|
+
id: null,
|
|
23
|
+
monitor_id: null,
|
|
24
|
+
monitor_name: null,
|
|
25
|
+
billed_at: null,
|
|
26
|
+
num_accounts: null,
|
|
27
|
+
credits_deducted: null,
|
|
28
|
+
tier_label: null,
|
|
29
|
+
rate_applied: null
|
|
30
|
+
)
|
|
31
|
+
```
|
|
32
|
+
|