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/BingApi.md
ADDED
|
@@ -0,0 +1,610 @@
|
|
|
1
|
+
# ScrapeBadger::BingApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *https://scrapebadger.com*
|
|
4
|
+
|
|
5
|
+
| Method | HTTP request | Description |
|
|
6
|
+
| ------ | ------------ | ----------- |
|
|
7
|
+
| [**bing_bing_scraper_health_check**](BingApi.md#bing_bing_scraper_health_check) | **GET** /v1/bing/health | Bing scraper health check |
|
|
8
|
+
| [**bing_bing_scraper_health_check_head**](BingApi.md#bing_bing_scraper_health_check_head) | **HEAD** /v1/bing/health | Bing scraper health check |
|
|
9
|
+
| [**bing_image_search**](BingApi.md#bing_image_search) | **GET** /v1/bing/images | Image search |
|
|
10
|
+
| [**bing_list_supported_markets**](BingApi.md#bing_list_supported_markets) | **GET** /v1/bing/markets | List supported markets |
|
|
11
|
+
| [**bing_news_search**](BingApi.md#bing_news_search) | **GET** /v1/bing/news | News search |
|
|
12
|
+
| [**bing_search_suggestions**](BingApi.md#bing_search_suggestions) | **GET** /v1/bing/autocomplete | Search suggestions |
|
|
13
|
+
| [**bing_video_search**](BingApi.md#bing_video_search) | **GET** /v1/bing/videos | Video search |
|
|
14
|
+
| [**bing_web_search**](BingApi.md#bing_web_search) | **GET** /v1/bing/search | Web search |
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## bing_bing_scraper_health_check
|
|
18
|
+
|
|
19
|
+
> Object bing_bing_scraper_health_check
|
|
20
|
+
|
|
21
|
+
Bing scraper health check
|
|
22
|
+
|
|
23
|
+
Check health of the Bing scraper service (accepts HEAD for UptimeRobot).
|
|
24
|
+
|
|
25
|
+
### Examples
|
|
26
|
+
|
|
27
|
+
```ruby
|
|
28
|
+
require 'time'
|
|
29
|
+
require 'scrapebadger'
|
|
30
|
+
# setup authorization
|
|
31
|
+
ScrapeBadger.configure do |config|
|
|
32
|
+
# Configure API key authorization: ApiKeyAuth
|
|
33
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
34
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
35
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
api_instance = ScrapeBadger::BingApi.new
|
|
39
|
+
|
|
40
|
+
begin
|
|
41
|
+
# Bing scraper health check
|
|
42
|
+
result = api_instance.bing_bing_scraper_health_check
|
|
43
|
+
p result
|
|
44
|
+
rescue ScrapeBadger::ApiError => e
|
|
45
|
+
puts "Error when calling BingApi->bing_bing_scraper_health_check: #{e}"
|
|
46
|
+
end
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
#### Using the bing_bing_scraper_health_check_with_http_info variant
|
|
50
|
+
|
|
51
|
+
This returns an Array which contains the response data, status code and headers.
|
|
52
|
+
|
|
53
|
+
> <Array(Object, Integer, Hash)> bing_bing_scraper_health_check_with_http_info
|
|
54
|
+
|
|
55
|
+
```ruby
|
|
56
|
+
begin
|
|
57
|
+
# Bing scraper health check
|
|
58
|
+
data, status_code, headers = api_instance.bing_bing_scraper_health_check_with_http_info
|
|
59
|
+
p status_code # => 2xx
|
|
60
|
+
p headers # => { ... }
|
|
61
|
+
p data # => Object
|
|
62
|
+
rescue ScrapeBadger::ApiError => e
|
|
63
|
+
puts "Error when calling BingApi->bing_bing_scraper_health_check_with_http_info: #{e}"
|
|
64
|
+
end
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### Parameters
|
|
68
|
+
|
|
69
|
+
This endpoint does not need any parameter.
|
|
70
|
+
|
|
71
|
+
### Return type
|
|
72
|
+
|
|
73
|
+
**Object**
|
|
74
|
+
|
|
75
|
+
### Authorization
|
|
76
|
+
|
|
77
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
78
|
+
|
|
79
|
+
### HTTP request headers
|
|
80
|
+
|
|
81
|
+
- **Content-Type**: Not defined
|
|
82
|
+
- **Accept**: application/json
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
## bing_bing_scraper_health_check_head
|
|
86
|
+
|
|
87
|
+
> Object bing_bing_scraper_health_check_head
|
|
88
|
+
|
|
89
|
+
Bing scraper health check
|
|
90
|
+
|
|
91
|
+
Check health of the Bing scraper service (accepts HEAD for UptimeRobot).
|
|
92
|
+
|
|
93
|
+
### Examples
|
|
94
|
+
|
|
95
|
+
```ruby
|
|
96
|
+
require 'time'
|
|
97
|
+
require 'scrapebadger'
|
|
98
|
+
# setup authorization
|
|
99
|
+
ScrapeBadger.configure do |config|
|
|
100
|
+
# Configure API key authorization: ApiKeyAuth
|
|
101
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
102
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
103
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
api_instance = ScrapeBadger::BingApi.new
|
|
107
|
+
|
|
108
|
+
begin
|
|
109
|
+
# Bing scraper health check
|
|
110
|
+
result = api_instance.bing_bing_scraper_health_check_head
|
|
111
|
+
p result
|
|
112
|
+
rescue ScrapeBadger::ApiError => e
|
|
113
|
+
puts "Error when calling BingApi->bing_bing_scraper_health_check_head: #{e}"
|
|
114
|
+
end
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
#### Using the bing_bing_scraper_health_check_head_with_http_info variant
|
|
118
|
+
|
|
119
|
+
This returns an Array which contains the response data, status code and headers.
|
|
120
|
+
|
|
121
|
+
> <Array(Object, Integer, Hash)> bing_bing_scraper_health_check_head_with_http_info
|
|
122
|
+
|
|
123
|
+
```ruby
|
|
124
|
+
begin
|
|
125
|
+
# Bing scraper health check
|
|
126
|
+
data, status_code, headers = api_instance.bing_bing_scraper_health_check_head_with_http_info
|
|
127
|
+
p status_code # => 2xx
|
|
128
|
+
p headers # => { ... }
|
|
129
|
+
p data # => Object
|
|
130
|
+
rescue ScrapeBadger::ApiError => e
|
|
131
|
+
puts "Error when calling BingApi->bing_bing_scraper_health_check_head_with_http_info: #{e}"
|
|
132
|
+
end
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
### Parameters
|
|
136
|
+
|
|
137
|
+
This endpoint does not need any parameter.
|
|
138
|
+
|
|
139
|
+
### Return type
|
|
140
|
+
|
|
141
|
+
**Object**
|
|
142
|
+
|
|
143
|
+
### Authorization
|
|
144
|
+
|
|
145
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
146
|
+
|
|
147
|
+
### HTTP request headers
|
|
148
|
+
|
|
149
|
+
- **Content-Type**: Not defined
|
|
150
|
+
- **Accept**: application/json
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
## bing_image_search
|
|
154
|
+
|
|
155
|
+
> Object bing_image_search(query, opts)
|
|
156
|
+
|
|
157
|
+
Image search
|
|
158
|
+
|
|
159
|
+
Bing Images — thumbnail, full-size and source URL per result.
|
|
160
|
+
|
|
161
|
+
### Examples
|
|
162
|
+
|
|
163
|
+
```ruby
|
|
164
|
+
require 'time'
|
|
165
|
+
require 'scrapebadger'
|
|
166
|
+
# setup authorization
|
|
167
|
+
ScrapeBadger.configure do |config|
|
|
168
|
+
# Configure API key authorization: ApiKeyAuth
|
|
169
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
170
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
171
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
api_instance = ScrapeBadger::BingApi.new
|
|
175
|
+
query = 'query_example' # String | Search keywords, e.g. 'golden retriever'
|
|
176
|
+
opts = {
|
|
177
|
+
market: 'market_example', # String | Bing market code, e.g. 'en-US', 'en-GB', 'de-DE'. See /markets.
|
|
178
|
+
count: 56, # Integer | Results to return
|
|
179
|
+
safe_search: 'safe_search_example' # String | off | moderate | strict
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
begin
|
|
183
|
+
# Image search
|
|
184
|
+
result = api_instance.bing_image_search(query, opts)
|
|
185
|
+
p result
|
|
186
|
+
rescue ScrapeBadger::ApiError => e
|
|
187
|
+
puts "Error when calling BingApi->bing_image_search: #{e}"
|
|
188
|
+
end
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
#### Using the bing_image_search_with_http_info variant
|
|
192
|
+
|
|
193
|
+
This returns an Array which contains the response data, status code and headers.
|
|
194
|
+
|
|
195
|
+
> <Array(Object, Integer, Hash)> bing_image_search_with_http_info(query, opts)
|
|
196
|
+
|
|
197
|
+
```ruby
|
|
198
|
+
begin
|
|
199
|
+
# Image search
|
|
200
|
+
data, status_code, headers = api_instance.bing_image_search_with_http_info(query, opts)
|
|
201
|
+
p status_code # => 2xx
|
|
202
|
+
p headers # => { ... }
|
|
203
|
+
p data # => Object
|
|
204
|
+
rescue ScrapeBadger::ApiError => e
|
|
205
|
+
puts "Error when calling BingApi->bing_image_search_with_http_info: #{e}"
|
|
206
|
+
end
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
### Parameters
|
|
210
|
+
|
|
211
|
+
| Name | Type | Description | Notes |
|
|
212
|
+
| ---- | ---- | ----------- | ----- |
|
|
213
|
+
| **query** | **String** | Search keywords, e.g. 'golden retriever' | |
|
|
214
|
+
| **market** | **String** | Bing market code, e.g. 'en-US', 'en-GB', 'de-DE'. See /markets. | [optional][default to 'en-US'] |
|
|
215
|
+
| **count** | **Integer** | Results to return | [optional][default to 35] |
|
|
216
|
+
| **safe_search** | **String** | off | moderate | strict | [optional] |
|
|
217
|
+
|
|
218
|
+
### Return type
|
|
219
|
+
|
|
220
|
+
**Object**
|
|
221
|
+
|
|
222
|
+
### Authorization
|
|
223
|
+
|
|
224
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
225
|
+
|
|
226
|
+
### HTTP request headers
|
|
227
|
+
|
|
228
|
+
- **Content-Type**: Not defined
|
|
229
|
+
- **Accept**: application/json
|
|
230
|
+
|
|
231
|
+
|
|
232
|
+
## bing_list_supported_markets
|
|
233
|
+
|
|
234
|
+
> Object bing_list_supported_markets
|
|
235
|
+
|
|
236
|
+
List supported markets
|
|
237
|
+
|
|
238
|
+
Supported Bing market codes. Free — costs no credits.
|
|
239
|
+
|
|
240
|
+
### Examples
|
|
241
|
+
|
|
242
|
+
```ruby
|
|
243
|
+
require 'time'
|
|
244
|
+
require 'scrapebadger'
|
|
245
|
+
# setup authorization
|
|
246
|
+
ScrapeBadger.configure do |config|
|
|
247
|
+
# Configure API key authorization: ApiKeyAuth
|
|
248
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
249
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
250
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
251
|
+
end
|
|
252
|
+
|
|
253
|
+
api_instance = ScrapeBadger::BingApi.new
|
|
254
|
+
|
|
255
|
+
begin
|
|
256
|
+
# List supported markets
|
|
257
|
+
result = api_instance.bing_list_supported_markets
|
|
258
|
+
p result
|
|
259
|
+
rescue ScrapeBadger::ApiError => e
|
|
260
|
+
puts "Error when calling BingApi->bing_list_supported_markets: #{e}"
|
|
261
|
+
end
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
#### Using the bing_list_supported_markets_with_http_info variant
|
|
265
|
+
|
|
266
|
+
This returns an Array which contains the response data, status code and headers.
|
|
267
|
+
|
|
268
|
+
> <Array(Object, Integer, Hash)> bing_list_supported_markets_with_http_info
|
|
269
|
+
|
|
270
|
+
```ruby
|
|
271
|
+
begin
|
|
272
|
+
# List supported markets
|
|
273
|
+
data, status_code, headers = api_instance.bing_list_supported_markets_with_http_info
|
|
274
|
+
p status_code # => 2xx
|
|
275
|
+
p headers # => { ... }
|
|
276
|
+
p data # => Object
|
|
277
|
+
rescue ScrapeBadger::ApiError => e
|
|
278
|
+
puts "Error when calling BingApi->bing_list_supported_markets_with_http_info: #{e}"
|
|
279
|
+
end
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
### Parameters
|
|
283
|
+
|
|
284
|
+
This endpoint does not need any parameter.
|
|
285
|
+
|
|
286
|
+
### Return type
|
|
287
|
+
|
|
288
|
+
**Object**
|
|
289
|
+
|
|
290
|
+
### Authorization
|
|
291
|
+
|
|
292
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
293
|
+
|
|
294
|
+
### HTTP request headers
|
|
295
|
+
|
|
296
|
+
- **Content-Type**: Not defined
|
|
297
|
+
- **Accept**: application/json
|
|
298
|
+
|
|
299
|
+
|
|
300
|
+
## bing_news_search
|
|
301
|
+
|
|
302
|
+
> Object bing_news_search(query, opts)
|
|
303
|
+
|
|
304
|
+
News search
|
|
305
|
+
|
|
306
|
+
Bing News — headline, source, published time and snippet per article.
|
|
307
|
+
|
|
308
|
+
### Examples
|
|
309
|
+
|
|
310
|
+
```ruby
|
|
311
|
+
require 'time'
|
|
312
|
+
require 'scrapebadger'
|
|
313
|
+
# setup authorization
|
|
314
|
+
ScrapeBadger.configure do |config|
|
|
315
|
+
# Configure API key authorization: ApiKeyAuth
|
|
316
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
317
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
318
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
319
|
+
end
|
|
320
|
+
|
|
321
|
+
api_instance = ScrapeBadger::BingApi.new
|
|
322
|
+
query = 'query_example' # String | Search keywords, e.g. 'interest rates'
|
|
323
|
+
opts = {
|
|
324
|
+
market: 'market_example', # String | Bing market code, e.g. 'en-US', 'en-GB', 'de-DE'. See /markets.
|
|
325
|
+
freshness: 'freshness_example' # String | day | week | month — restrict to recent articles
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
begin
|
|
329
|
+
# News search
|
|
330
|
+
result = api_instance.bing_news_search(query, opts)
|
|
331
|
+
p result
|
|
332
|
+
rescue ScrapeBadger::ApiError => e
|
|
333
|
+
puts "Error when calling BingApi->bing_news_search: #{e}"
|
|
334
|
+
end
|
|
335
|
+
```
|
|
336
|
+
|
|
337
|
+
#### Using the bing_news_search_with_http_info variant
|
|
338
|
+
|
|
339
|
+
This returns an Array which contains the response data, status code and headers.
|
|
340
|
+
|
|
341
|
+
> <Array(Object, Integer, Hash)> bing_news_search_with_http_info(query, opts)
|
|
342
|
+
|
|
343
|
+
```ruby
|
|
344
|
+
begin
|
|
345
|
+
# News search
|
|
346
|
+
data, status_code, headers = api_instance.bing_news_search_with_http_info(query, opts)
|
|
347
|
+
p status_code # => 2xx
|
|
348
|
+
p headers # => { ... }
|
|
349
|
+
p data # => Object
|
|
350
|
+
rescue ScrapeBadger::ApiError => e
|
|
351
|
+
puts "Error when calling BingApi->bing_news_search_with_http_info: #{e}"
|
|
352
|
+
end
|
|
353
|
+
```
|
|
354
|
+
|
|
355
|
+
### Parameters
|
|
356
|
+
|
|
357
|
+
| Name | Type | Description | Notes |
|
|
358
|
+
| ---- | ---- | ----------- | ----- |
|
|
359
|
+
| **query** | **String** | Search keywords, e.g. 'interest rates' | |
|
|
360
|
+
| **market** | **String** | Bing market code, e.g. 'en-US', 'en-GB', 'de-DE'. See /markets. | [optional][default to 'en-US'] |
|
|
361
|
+
| **freshness** | **String** | day | week | month — restrict to recent articles | [optional] |
|
|
362
|
+
|
|
363
|
+
### Return type
|
|
364
|
+
|
|
365
|
+
**Object**
|
|
366
|
+
|
|
367
|
+
### Authorization
|
|
368
|
+
|
|
369
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
370
|
+
|
|
371
|
+
### HTTP request headers
|
|
372
|
+
|
|
373
|
+
- **Content-Type**: Not defined
|
|
374
|
+
- **Accept**: application/json
|
|
375
|
+
|
|
376
|
+
|
|
377
|
+
## bing_search_suggestions
|
|
378
|
+
|
|
379
|
+
> Object bing_search_suggestions(query, opts)
|
|
380
|
+
|
|
381
|
+
Search suggestions
|
|
382
|
+
|
|
383
|
+
Bing search-box query suggestions.
|
|
384
|
+
|
|
385
|
+
### Examples
|
|
386
|
+
|
|
387
|
+
```ruby
|
|
388
|
+
require 'time'
|
|
389
|
+
require 'scrapebadger'
|
|
390
|
+
# setup authorization
|
|
391
|
+
ScrapeBadger.configure do |config|
|
|
392
|
+
# Configure API key authorization: ApiKeyAuth
|
|
393
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
394
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
395
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
396
|
+
end
|
|
397
|
+
|
|
398
|
+
api_instance = ScrapeBadger::BingApi.new
|
|
399
|
+
query = 'query_example' # String | Partial search term, e.g. 'coff'
|
|
400
|
+
opts = {
|
|
401
|
+
market: 'market_example' # String | Bing market code, e.g. 'en-US', 'en-GB', 'de-DE'. See /markets.
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
begin
|
|
405
|
+
# Search suggestions
|
|
406
|
+
result = api_instance.bing_search_suggestions(query, opts)
|
|
407
|
+
p result
|
|
408
|
+
rescue ScrapeBadger::ApiError => e
|
|
409
|
+
puts "Error when calling BingApi->bing_search_suggestions: #{e}"
|
|
410
|
+
end
|
|
411
|
+
```
|
|
412
|
+
|
|
413
|
+
#### Using the bing_search_suggestions_with_http_info variant
|
|
414
|
+
|
|
415
|
+
This returns an Array which contains the response data, status code and headers.
|
|
416
|
+
|
|
417
|
+
> <Array(Object, Integer, Hash)> bing_search_suggestions_with_http_info(query, opts)
|
|
418
|
+
|
|
419
|
+
```ruby
|
|
420
|
+
begin
|
|
421
|
+
# Search suggestions
|
|
422
|
+
data, status_code, headers = api_instance.bing_search_suggestions_with_http_info(query, opts)
|
|
423
|
+
p status_code # => 2xx
|
|
424
|
+
p headers # => { ... }
|
|
425
|
+
p data # => Object
|
|
426
|
+
rescue ScrapeBadger::ApiError => e
|
|
427
|
+
puts "Error when calling BingApi->bing_search_suggestions_with_http_info: #{e}"
|
|
428
|
+
end
|
|
429
|
+
```
|
|
430
|
+
|
|
431
|
+
### Parameters
|
|
432
|
+
|
|
433
|
+
| Name | Type | Description | Notes |
|
|
434
|
+
| ---- | ---- | ----------- | ----- |
|
|
435
|
+
| **query** | **String** | Partial search term, e.g. 'coff' | |
|
|
436
|
+
| **market** | **String** | Bing market code, e.g. 'en-US', 'en-GB', 'de-DE'. See /markets. | [optional][default to 'en-US'] |
|
|
437
|
+
|
|
438
|
+
### Return type
|
|
439
|
+
|
|
440
|
+
**Object**
|
|
441
|
+
|
|
442
|
+
### Authorization
|
|
443
|
+
|
|
444
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
445
|
+
|
|
446
|
+
### HTTP request headers
|
|
447
|
+
|
|
448
|
+
- **Content-Type**: Not defined
|
|
449
|
+
- **Accept**: application/json
|
|
450
|
+
|
|
451
|
+
|
|
452
|
+
## bing_video_search
|
|
453
|
+
|
|
454
|
+
> Object bing_video_search(query, opts)
|
|
455
|
+
|
|
456
|
+
Video search
|
|
457
|
+
|
|
458
|
+
Bing Videos — title, thumbnail, duration, publisher and source per result.
|
|
459
|
+
|
|
460
|
+
### Examples
|
|
461
|
+
|
|
462
|
+
```ruby
|
|
463
|
+
require 'time'
|
|
464
|
+
require 'scrapebadger'
|
|
465
|
+
# setup authorization
|
|
466
|
+
ScrapeBadger.configure do |config|
|
|
467
|
+
# Configure API key authorization: ApiKeyAuth
|
|
468
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
469
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
470
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
471
|
+
end
|
|
472
|
+
|
|
473
|
+
api_instance = ScrapeBadger::BingApi.new
|
|
474
|
+
query = 'query_example' # String | Search keywords, e.g. 'espresso tutorial'
|
|
475
|
+
opts = {
|
|
476
|
+
market: 'market_example', # String | Bing market code, e.g. 'en-US', 'en-GB', 'de-DE'. See /markets.
|
|
477
|
+
count: 56, # Integer | Results to return
|
|
478
|
+
safe_search: 'safe_search_example' # String | off | moderate | strict
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
begin
|
|
482
|
+
# Video search
|
|
483
|
+
result = api_instance.bing_video_search(query, opts)
|
|
484
|
+
p result
|
|
485
|
+
rescue ScrapeBadger::ApiError => e
|
|
486
|
+
puts "Error when calling BingApi->bing_video_search: #{e}"
|
|
487
|
+
end
|
|
488
|
+
```
|
|
489
|
+
|
|
490
|
+
#### Using the bing_video_search_with_http_info variant
|
|
491
|
+
|
|
492
|
+
This returns an Array which contains the response data, status code and headers.
|
|
493
|
+
|
|
494
|
+
> <Array(Object, Integer, Hash)> bing_video_search_with_http_info(query, opts)
|
|
495
|
+
|
|
496
|
+
```ruby
|
|
497
|
+
begin
|
|
498
|
+
# Video search
|
|
499
|
+
data, status_code, headers = api_instance.bing_video_search_with_http_info(query, opts)
|
|
500
|
+
p status_code # => 2xx
|
|
501
|
+
p headers # => { ... }
|
|
502
|
+
p data # => Object
|
|
503
|
+
rescue ScrapeBadger::ApiError => e
|
|
504
|
+
puts "Error when calling BingApi->bing_video_search_with_http_info: #{e}"
|
|
505
|
+
end
|
|
506
|
+
```
|
|
507
|
+
|
|
508
|
+
### Parameters
|
|
509
|
+
|
|
510
|
+
| Name | Type | Description | Notes |
|
|
511
|
+
| ---- | ---- | ----------- | ----- |
|
|
512
|
+
| **query** | **String** | Search keywords, e.g. 'espresso tutorial' | |
|
|
513
|
+
| **market** | **String** | Bing market code, e.g. 'en-US', 'en-GB', 'de-DE'. See /markets. | [optional][default to 'en-US'] |
|
|
514
|
+
| **count** | **Integer** | Results to return | [optional][default to 35] |
|
|
515
|
+
| **safe_search** | **String** | off | moderate | strict | [optional] |
|
|
516
|
+
|
|
517
|
+
### Return type
|
|
518
|
+
|
|
519
|
+
**Object**
|
|
520
|
+
|
|
521
|
+
### Authorization
|
|
522
|
+
|
|
523
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
524
|
+
|
|
525
|
+
### HTTP request headers
|
|
526
|
+
|
|
527
|
+
- **Content-Type**: Not defined
|
|
528
|
+
- **Accept**: application/json
|
|
529
|
+
|
|
530
|
+
|
|
531
|
+
## bing_web_search
|
|
532
|
+
|
|
533
|
+
> Object bing_web_search(query, opts)
|
|
534
|
+
|
|
535
|
+
Web search
|
|
536
|
+
|
|
537
|
+
Bing web SERP — organic results, ads, related searches and total count.
|
|
538
|
+
|
|
539
|
+
### Examples
|
|
540
|
+
|
|
541
|
+
```ruby
|
|
542
|
+
require 'time'
|
|
543
|
+
require 'scrapebadger'
|
|
544
|
+
# setup authorization
|
|
545
|
+
ScrapeBadger.configure do |config|
|
|
546
|
+
# Configure API key authorization: ApiKeyAuth
|
|
547
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
548
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
549
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
550
|
+
end
|
|
551
|
+
|
|
552
|
+
api_instance = ScrapeBadger::BingApi.new
|
|
553
|
+
query = 'query_example' # String | Search keywords, e.g. 'coffee machine'
|
|
554
|
+
opts = {
|
|
555
|
+
market: 'market_example', # String | Bing market code, e.g. 'en-US', 'en-GB', 'de-DE'. See /markets.
|
|
556
|
+
count: 56, # Integer | Results per page (1-50)
|
|
557
|
+
offset: 56, # Integer | Zero-based result offset for pagination
|
|
558
|
+
safe_search: 'safe_search_example' # String | off | moderate | strict (default moderate)
|
|
559
|
+
}
|
|
560
|
+
|
|
561
|
+
begin
|
|
562
|
+
# Web search
|
|
563
|
+
result = api_instance.bing_web_search(query, opts)
|
|
564
|
+
p result
|
|
565
|
+
rescue ScrapeBadger::ApiError => e
|
|
566
|
+
puts "Error when calling BingApi->bing_web_search: #{e}"
|
|
567
|
+
end
|
|
568
|
+
```
|
|
569
|
+
|
|
570
|
+
#### Using the bing_web_search_with_http_info variant
|
|
571
|
+
|
|
572
|
+
This returns an Array which contains the response data, status code and headers.
|
|
573
|
+
|
|
574
|
+
> <Array(Object, Integer, Hash)> bing_web_search_with_http_info(query, opts)
|
|
575
|
+
|
|
576
|
+
```ruby
|
|
577
|
+
begin
|
|
578
|
+
# Web search
|
|
579
|
+
data, status_code, headers = api_instance.bing_web_search_with_http_info(query, opts)
|
|
580
|
+
p status_code # => 2xx
|
|
581
|
+
p headers # => { ... }
|
|
582
|
+
p data # => Object
|
|
583
|
+
rescue ScrapeBadger::ApiError => e
|
|
584
|
+
puts "Error when calling BingApi->bing_web_search_with_http_info: #{e}"
|
|
585
|
+
end
|
|
586
|
+
```
|
|
587
|
+
|
|
588
|
+
### Parameters
|
|
589
|
+
|
|
590
|
+
| Name | Type | Description | Notes |
|
|
591
|
+
| ---- | ---- | ----------- | ----- |
|
|
592
|
+
| **query** | **String** | Search keywords, e.g. 'coffee machine' | |
|
|
593
|
+
| **market** | **String** | Bing market code, e.g. 'en-US', 'en-GB', 'de-DE'. See /markets. | [optional][default to 'en-US'] |
|
|
594
|
+
| **count** | **Integer** | Results per page (1-50) | [optional][default to 10] |
|
|
595
|
+
| **offset** | **Integer** | Zero-based result offset for pagination | [optional][default to 0] |
|
|
596
|
+
| **safe_search** | **String** | off | moderate | strict (default moderate) | [optional] |
|
|
597
|
+
|
|
598
|
+
### Return type
|
|
599
|
+
|
|
600
|
+
**Object**
|
|
601
|
+
|
|
602
|
+
### Authorization
|
|
603
|
+
|
|
604
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
605
|
+
|
|
606
|
+
### HTTP request headers
|
|
607
|
+
|
|
608
|
+
- **Content-Type**: Not defined
|
|
609
|
+
- **Accept**: application/json
|
|
610
|
+
|