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.
Files changed (185) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/LICENSE +21 -0
  4. data/README.md +548 -0
  5. data/Rakefile +10 -0
  6. data/docs/AccountApi.md +76 -0
  7. data/docs/AccountInfo.md +28 -0
  8. data/docs/AmazonApi.md +1244 -0
  9. data/docs/ApartmentsApi.md +373 -0
  10. data/docs/BaiduApi.md +447 -0
  11. data/docs/BillingLogListResponse.md +24 -0
  12. data/docs/BillingLogResponse.md +32 -0
  13. data/docs/BingApi.md +610 -0
  14. data/docs/ChatGPTApi.md +521 -0
  15. data/docs/DepopApi.md +542 -0
  16. data/docs/DuckDuckGoApi.md +700 -0
  17. data/docs/EBayApi.md +1019 -0
  18. data/docs/FacebookApi.md +1671 -0
  19. data/docs/FilterRuleCreate.md +28 -0
  20. data/docs/FilterRuleDeliveryLogListResponse.md +24 -0
  21. data/docs/FilterRuleDeliveryLogResponse.md +44 -0
  22. data/docs/FilterRuleListResponse.md +24 -0
  23. data/docs/FilterRuleResponse.md +40 -0
  24. data/docs/FilterRuleUpdate.md +30 -0
  25. data/docs/FilterRuleValidateRequest.md +18 -0
  26. data/docs/FilterRuleValidateResponse.md +22 -0
  27. data/docs/GoogleApi.md +3175 -0
  28. data/docs/HTTPValidationError.md +18 -0
  29. data/docs/IdealistaApi.md +822 -0
  30. data/docs/ImmobiliareApi.md +773 -0
  31. data/docs/InstagramApi.md +1673 -0
  32. data/docs/LeboncoinApi.md +884 -0
  33. data/docs/LinkedInApi.md +925 -0
  34. data/docs/LoopNetApi.md +529 -0
  35. data/docs/PortalApiRoutersV1TwitterFilterRulesFilterRulePricingResponse.md +20 -0
  36. data/docs/RealtorApi.md +474 -0
  37. data/docs/RedditApi.md +1677 -0
  38. data/docs/RedfinApi.md +616 -0
  39. data/docs/StreamMonitorCreate.md +26 -0
  40. data/docs/StreamMonitorListResponse.md +24 -0
  41. data/docs/StreamMonitorResponse.md +42 -0
  42. data/docs/StreamMonitorUpdate.md +28 -0
  43. data/docs/SubscriptionInfo.md +40 -0
  44. data/docs/TikTokApi.md +2104 -0
  45. data/docs/TweetDeliveryLogListResponse.md +24 -0
  46. data/docs/TweetDeliveryLogResponse.md +44 -0
  47. data/docs/TwitterApi.md +4091 -0
  48. data/docs/ValidationError.md +22 -0
  49. data/docs/ValidationErrorLocInner.md +15 -0
  50. data/docs/VintedApi.md +766 -0
  51. data/docs/WalmartApi.md +904 -0
  52. data/docs/WebApi.md +634 -0
  53. data/docs/WebhookCreate.md +22 -0
  54. data/docs/WebhookListItem.md +28 -0
  55. data/docs/WebhookListResponse.md +20 -0
  56. data/docs/WebhookResponse.md +26 -0
  57. data/docs/WebhookTestRequest.md +18 -0
  58. data/docs/WebhookTestResponse.md +24 -0
  59. data/docs/YahooApi.md +602 -0
  60. data/docs/YandexApi.md +450 -0
  61. data/docs/YouTubeApi.md +2872 -0
  62. data/docs/ZillowApi.md +622 -0
  63. data/git_push.sh +57 -0
  64. data/lib/scrapebadger/api/account_api.rb +79 -0
  65. data/lib/scrapebadger/api/amazon_api.rb +1165 -0
  66. data/lib/scrapebadger/api/apartments_api.rb +377 -0
  67. data/lib/scrapebadger/api/baidu_api.rb +436 -0
  68. data/lib/scrapebadger/api/bing_api.rb +580 -0
  69. data/lib/scrapebadger/api/chat_gpt_api.rb +466 -0
  70. data/lib/scrapebadger/api/depop_api.rb +518 -0
  71. data/lib/scrapebadger/api/duck_duck_go_api.rb +675 -0
  72. data/lib/scrapebadger/api/e_bay_api.rb +1029 -0
  73. data/lib/scrapebadger/api/facebook_api.rb +1492 -0
  74. data/lib/scrapebadger/api/google_api.rb +3191 -0
  75. data/lib/scrapebadger/api/idealista_api.rb +864 -0
  76. data/lib/scrapebadger/api/immobiliare_api.rb +734 -0
  77. data/lib/scrapebadger/api/instagram_api.rb +1555 -0
  78. data/lib/scrapebadger/api/leboncoin_api.rb +818 -0
  79. data/lib/scrapebadger/api/linked_in_api.rb +832 -0
  80. data/lib/scrapebadger/api/loop_net_api.rb +503 -0
  81. data/lib/scrapebadger/api/realtor_api.rb +481 -0
  82. data/lib/scrapebadger/api/reddit_api.rb +1601 -0
  83. data/lib/scrapebadger/api/redfin_api.rb +625 -0
  84. data/lib/scrapebadger/api/tik_tok_api.rb +2029 -0
  85. data/lib/scrapebadger/api/twitter_api.rb +3696 -0
  86. data/lib/scrapebadger/api/vinted_api.rb +705 -0
  87. data/lib/scrapebadger/api/walmart_api.rb +876 -0
  88. data/lib/scrapebadger/api/web_api.rb +547 -0
  89. data/lib/scrapebadger/api/yahoo_api.rb +560 -0
  90. data/lib/scrapebadger/api/yandex_api.rb +422 -0
  91. data/lib/scrapebadger/api/you_tube_api.rb +2520 -0
  92. data/lib/scrapebadger/api/zillow_api.rb +634 -0
  93. data/lib/scrapebadger/api_client.rb +394 -0
  94. data/lib/scrapebadger/api_error.rb +58 -0
  95. data/lib/scrapebadger/configuration.rb +308 -0
  96. data/lib/scrapebadger/models/account_info.rb +288 -0
  97. data/lib/scrapebadger/models/billing_log_list_response.rb +272 -0
  98. data/lib/scrapebadger/models/billing_log_response.rb +334 -0
  99. data/lib/scrapebadger/models/filter_rule_create.rb +427 -0
  100. data/lib/scrapebadger/models/filter_rule_delivery_log_list_response.rb +272 -0
  101. data/lib/scrapebadger/models/filter_rule_delivery_log_response.rb +422 -0
  102. data/lib/scrapebadger/models/filter_rule_list_response.rb +272 -0
  103. data/lib/scrapebadger/models/filter_rule_response.rb +390 -0
  104. data/lib/scrapebadger/models/filter_rule_update.rb +389 -0
  105. data/lib/scrapebadger/models/filter_rule_validate_request.rb +250 -0
  106. data/lib/scrapebadger/models/filter_rule_validate_response.rb +248 -0
  107. data/lib/scrapebadger/models/http_validation_error.rb +216 -0
  108. data/lib/scrapebadger/models/portal_api_routers_v1_twitter_filter_rules_filter_rule_pricing_response.rb +238 -0
  109. data/lib/scrapebadger/models/stream_monitor_create.rb +373 -0
  110. data/lib/scrapebadger/models/stream_monitor_list_response.rb +272 -0
  111. data/lib/scrapebadger/models/stream_monitor_response.rb +406 -0
  112. data/lib/scrapebadger/models/stream_monitor_update.rb +335 -0
  113. data/lib/scrapebadger/models/subscription_info.rb +352 -0
  114. data/lib/scrapebadger/models/tweet_delivery_log_list_response.rb +272 -0
  115. data/lib/scrapebadger/models/tweet_delivery_log_response.rb +422 -0
  116. data/lib/scrapebadger/models/validation_error.rb +255 -0
  117. data/lib/scrapebadger/models/validation_error_loc_inner.rb +104 -0
  118. data/lib/scrapebadger/models/webhook_create.rb +282 -0
  119. data/lib/scrapebadger/models/webhook_list_item.rb +302 -0
  120. data/lib/scrapebadger/models/webhook_list_response.rb +240 -0
  121. data/lib/scrapebadger/models/webhook_response.rb +286 -0
  122. data/lib/scrapebadger/models/webhook_test_request.rb +223 -0
  123. data/lib/scrapebadger/models/webhook_test_response.rb +259 -0
  124. data/lib/scrapebadger/version.rb +15 -0
  125. data/lib/scrapebadger.rb +96 -0
  126. data/scrapebadger.gemspec +39 -0
  127. data/spec/api/account_api_spec.rb +46 -0
  128. data/spec/api/amazon_api_spec.rb +258 -0
  129. data/spec/api/apartments_api_spec.rb +98 -0
  130. data/spec/api/baidu_api_spec.rb +109 -0
  131. data/spec/api/bing_api_spec.rb +141 -0
  132. data/spec/api/chat_gpt_api_spec.rb +123 -0
  133. data/spec/api/depop_api_spec.rb +132 -0
  134. data/spec/api/duck_duck_go_api_spec.rb +162 -0
  135. data/spec/api/e_bay_api_spec.rb +222 -0
  136. data/spec/api/facebook_api_spec.rb +326 -0
  137. data/spec/api/google_api_spec.rb +649 -0
  138. data/spec/api/idealista_api_spec.rb +197 -0
  139. data/spec/api/immobiliare_api_spec.rb +174 -0
  140. data/spec/api/instagram_api_spec.rb +309 -0
  141. data/spec/api/leboncoin_api_spec.rb +184 -0
  142. data/spec/api/linked_in_api_spec.rb +197 -0
  143. data/spec/api/loop_net_api_spec.rb +127 -0
  144. data/spec/api/realtor_api_spec.rb +123 -0
  145. data/spec/api/reddit_api_spec.rb +331 -0
  146. data/spec/api/redfin_api_spec.rb +147 -0
  147. data/spec/api/tik_tok_api_spec.rb +413 -0
  148. data/spec/api/twitter_api_spec.rb +735 -0
  149. data/spec/api/vinted_api_spec.rb +169 -0
  150. data/spec/api/walmart_api_spec.rb +192 -0
  151. data/spec/api/web_api_spec.rb +136 -0
  152. data/spec/api/yahoo_api_spec.rb +137 -0
  153. data/spec/api/yandex_api_spec.rb +111 -0
  154. data/spec/api/you_tube_api_spec.rb +500 -0
  155. data/spec/api/zillow_api_spec.rb +150 -0
  156. data/spec/models/account_info_spec.rb +66 -0
  157. data/spec/models/billing_log_list_response_spec.rb +54 -0
  158. data/spec/models/billing_log_response_spec.rb +78 -0
  159. data/spec/models/filter_rule_create_spec.rb +66 -0
  160. data/spec/models/filter_rule_delivery_log_list_response_spec.rb +54 -0
  161. data/spec/models/filter_rule_delivery_log_response_spec.rb +114 -0
  162. data/spec/models/filter_rule_list_response_spec.rb +54 -0
  163. data/spec/models/filter_rule_response_spec.rb +102 -0
  164. data/spec/models/filter_rule_update_spec.rb +72 -0
  165. data/spec/models/filter_rule_validate_request_spec.rb +36 -0
  166. data/spec/models/filter_rule_validate_response_spec.rb +48 -0
  167. data/spec/models/http_validation_error_spec.rb +36 -0
  168. data/spec/models/portal_api_routers_v1_twitter_filter_rules_filter_rule_pricing_response_spec.rb +42 -0
  169. data/spec/models/stream_monitor_create_spec.rb +60 -0
  170. data/spec/models/stream_monitor_list_response_spec.rb +54 -0
  171. data/spec/models/stream_monitor_response_spec.rb +108 -0
  172. data/spec/models/stream_monitor_update_spec.rb +66 -0
  173. data/spec/models/subscription_info_spec.rb +102 -0
  174. data/spec/models/tweet_delivery_log_list_response_spec.rb +54 -0
  175. data/spec/models/tweet_delivery_log_response_spec.rb +114 -0
  176. data/spec/models/validation_error_loc_inner_spec.rb +21 -0
  177. data/spec/models/validation_error_spec.rb +48 -0
  178. data/spec/models/webhook_create_spec.rb +48 -0
  179. data/spec/models/webhook_list_item_spec.rb +66 -0
  180. data/spec/models/webhook_list_response_spec.rb +42 -0
  181. data/spec/models/webhook_response_spec.rb +60 -0
  182. data/spec/models/webhook_test_request_spec.rb +36 -0
  183. data/spec/models/webhook_test_response_spec.rb +54 -0
  184. data/spec/spec_helper.rb +111 -0
  185. metadata +324 -0
@@ -0,0 +1,1492 @@
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 FacebookApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Browse a Marketplace category
23
+ # Browse Marketplace listings in a category (vehicles, electronics, ...).
24
+ # @param category [String]
25
+ # @param [Hash] opts the optional parameters
26
+ # @option opts [String] :location (default to 'nyc')
27
+ # @option opts [Integer] :min_price
28
+ # @option opts [Integer] :max_price
29
+ # @option opts [String] :sort_by
30
+ # @option opts [String] :after
31
+ # @return [Object]
32
+ def facebook_browse_a_marketplace_category(category, opts = {})
33
+ data, _status_code, _headers = facebook_browse_a_marketplace_category_with_http_info(category, opts)
34
+ data
35
+ end
36
+
37
+ # Browse a Marketplace category
38
+ # Browse Marketplace listings in a category (vehicles, electronics, ...).
39
+ # @param category [String]
40
+ # @param [Hash] opts the optional parameters
41
+ # @option opts [String] :location (default to 'nyc')
42
+ # @option opts [Integer] :min_price
43
+ # @option opts [Integer] :max_price
44
+ # @option opts [String] :sort_by
45
+ # @option opts [String] :after
46
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
47
+ def facebook_browse_a_marketplace_category_with_http_info(category, opts = {})
48
+ if @api_client.config.debugging
49
+ @api_client.config.logger.debug 'Calling API: FacebookApi.facebook_browse_a_marketplace_category ...'
50
+ end
51
+ # verify the required parameter 'category' is set
52
+ if @api_client.config.client_side_validation && category.nil?
53
+ fail ArgumentError, "Missing the required parameter 'category' when calling FacebookApi.facebook_browse_a_marketplace_category"
54
+ end
55
+ # resource path
56
+ local_var_path = '/v1/facebook/marketplace/category/{category}'.sub('{' + 'category' + '}', CGI.escape(category.to_s))
57
+
58
+ # query parameters
59
+ query_params = opts[:query_params] || {}
60
+ query_params[:'location'] = opts[:'location'] if !opts[:'location'].nil?
61
+ query_params[:'min_price'] = opts[:'min_price'] if !opts[:'min_price'].nil?
62
+ query_params[:'max_price'] = opts[:'max_price'] if !opts[:'max_price'].nil?
63
+ query_params[:'sort_by'] = opts[:'sort_by'] if !opts[:'sort_by'].nil?
64
+ query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil?
65
+
66
+ # header parameters
67
+ header_params = opts[:header_params] || {}
68
+ # HTTP header 'Accept' (if needed)
69
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
70
+
71
+ # form parameters
72
+ form_params = opts[:form_params] || {}
73
+
74
+ # http body (model)
75
+ post_body = opts[:debug_body]
76
+
77
+ # return_type
78
+ return_type = opts[:debug_return_type] || 'Object'
79
+
80
+ # auth_names
81
+ auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
82
+
83
+ new_options = opts.merge(
84
+ :operation => :"FacebookApi.facebook_browse_a_marketplace_category",
85
+ :header_params => header_params,
86
+ :query_params => query_params,
87
+ :form_params => form_params,
88
+ :body => post_body,
89
+ :auth_names => auth_names,
90
+ :return_type => return_type
91
+ )
92
+
93
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
94
+ if @api_client.config.debugging
95
+ @api_client.config.logger.debug "API called: FacebookApi#facebook_browse_a_marketplace_category\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
96
+ end
97
+ return data, status_code, headers
98
+ end
99
+
100
+ # Get a Marketplace item
101
+ # Get full detail for a single Marketplace listing.
102
+ # @param item_id [String]
103
+ # @param [Hash] opts the optional parameters
104
+ # @return [Object]
105
+ def facebook_get_a_marketplace_item(item_id, opts = {})
106
+ data, _status_code, _headers = facebook_get_a_marketplace_item_with_http_info(item_id, opts)
107
+ data
108
+ end
109
+
110
+ # Get a Marketplace item
111
+ # Get full detail for a single Marketplace listing.
112
+ # @param item_id [String]
113
+ # @param [Hash] opts the optional parameters
114
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
115
+ def facebook_get_a_marketplace_item_with_http_info(item_id, opts = {})
116
+ if @api_client.config.debugging
117
+ @api_client.config.logger.debug 'Calling API: FacebookApi.facebook_get_a_marketplace_item ...'
118
+ end
119
+ # verify the required parameter 'item_id' is set
120
+ if @api_client.config.client_side_validation && item_id.nil?
121
+ fail ArgumentError, "Missing the required parameter 'item_id' when calling FacebookApi.facebook_get_a_marketplace_item"
122
+ end
123
+ # resource path
124
+ local_var_path = '/v1/facebook/marketplace/item/{item_id}'.sub('{' + 'item_id' + '}', CGI.escape(item_id.to_s))
125
+
126
+ # query parameters
127
+ query_params = opts[:query_params] || {}
128
+
129
+ # header parameters
130
+ header_params = opts[:header_params] || {}
131
+ # HTTP header 'Accept' (if needed)
132
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
133
+
134
+ # form parameters
135
+ form_params = opts[:form_params] || {}
136
+
137
+ # http body (model)
138
+ post_body = opts[:debug_body]
139
+
140
+ # return_type
141
+ return_type = opts[:debug_return_type] || 'Object'
142
+
143
+ # auth_names
144
+ auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
145
+
146
+ new_options = opts.merge(
147
+ :operation => :"FacebookApi.facebook_get_a_marketplace_item",
148
+ :header_params => header_params,
149
+ :query_params => query_params,
150
+ :form_params => form_params,
151
+ :body => post_body,
152
+ :auth_names => auth_names,
153
+ :return_type => return_type
154
+ )
155
+
156
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
157
+ if @api_client.config.debugging
158
+ @api_client.config.logger.debug "API called: FacebookApi#facebook_get_a_marketplace_item\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
159
+ end
160
+ return data, status_code, headers
161
+ end
162
+
163
+ # Get an ad
164
+ # Get a single Ad Library ad by its archive id.
165
+ # @param ad_archive_id [String]
166
+ # @param [Hash] opts the optional parameters
167
+ # @return [Object]
168
+ def facebook_get_an_ad(ad_archive_id, opts = {})
169
+ data, _status_code, _headers = facebook_get_an_ad_with_http_info(ad_archive_id, opts)
170
+ data
171
+ end
172
+
173
+ # Get an ad
174
+ # Get a single Ad Library ad by its archive id.
175
+ # @param ad_archive_id [String]
176
+ # @param [Hash] opts the optional parameters
177
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
178
+ def facebook_get_an_ad_with_http_info(ad_archive_id, opts = {})
179
+ if @api_client.config.debugging
180
+ @api_client.config.logger.debug 'Calling API: FacebookApi.facebook_get_an_ad ...'
181
+ end
182
+ # verify the required parameter 'ad_archive_id' is set
183
+ if @api_client.config.client_side_validation && ad_archive_id.nil?
184
+ fail ArgumentError, "Missing the required parameter 'ad_archive_id' when calling FacebookApi.facebook_get_an_ad"
185
+ end
186
+ # resource path
187
+ local_var_path = '/v1/facebook/ads/{ad_archive_id}'.sub('{' + 'ad_archive_id' + '}', CGI.escape(ad_archive_id.to_s))
188
+
189
+ # query parameters
190
+ query_params = opts[:query_params] || {}
191
+
192
+ # header parameters
193
+ header_params = opts[:header_params] || {}
194
+ # HTTP header 'Accept' (if needed)
195
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
196
+
197
+ # form parameters
198
+ form_params = opts[:form_params] || {}
199
+
200
+ # http body (model)
201
+ post_body = opts[:debug_body]
202
+
203
+ # return_type
204
+ return_type = opts[:debug_return_type] || 'Object'
205
+
206
+ # auth_names
207
+ auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
208
+
209
+ new_options = opts.merge(
210
+ :operation => :"FacebookApi.facebook_get_an_ad",
211
+ :header_params => header_params,
212
+ :query_params => query_params,
213
+ :form_params => form_params,
214
+ :body => post_body,
215
+ :auth_names => auth_names,
216
+ :return_type => return_type
217
+ )
218
+
219
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
220
+ if @api_client.config.debugging
221
+ @api_client.config.logger.debug "API called: FacebookApi#facebook_get_an_ad\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
222
+ end
223
+ return data, status_code, headers
224
+ end
225
+
226
+ # Get group detail
227
+ # Get a Facebook group's details.
228
+ # @param group_id [String]
229
+ # @param [Hash] opts the optional parameters
230
+ # @return [Object]
231
+ def facebook_get_group_detail(group_id, opts = {})
232
+ data, _status_code, _headers = facebook_get_group_detail_with_http_info(group_id, opts)
233
+ data
234
+ end
235
+
236
+ # Get group detail
237
+ # Get a Facebook group&#39;s details.
238
+ # @param group_id [String]
239
+ # @param [Hash] opts the optional parameters
240
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
241
+ def facebook_get_group_detail_with_http_info(group_id, opts = {})
242
+ if @api_client.config.debugging
243
+ @api_client.config.logger.debug 'Calling API: FacebookApi.facebook_get_group_detail ...'
244
+ end
245
+ # verify the required parameter 'group_id' is set
246
+ if @api_client.config.client_side_validation && group_id.nil?
247
+ fail ArgumentError, "Missing the required parameter 'group_id' when calling FacebookApi.facebook_get_group_detail"
248
+ end
249
+ # resource path
250
+ local_var_path = '/v1/facebook/groups/{group_id}'.sub('{' + 'group_id' + '}', CGI.escape(group_id.to_s))
251
+
252
+ # query parameters
253
+ query_params = opts[:query_params] || {}
254
+
255
+ # header parameters
256
+ header_params = opts[:header_params] || {}
257
+ # HTTP header 'Accept' (if needed)
258
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
259
+
260
+ # form parameters
261
+ form_params = opts[:form_params] || {}
262
+
263
+ # http body (model)
264
+ post_body = opts[:debug_body]
265
+
266
+ # return_type
267
+ return_type = opts[:debug_return_type] || 'Object'
268
+
269
+ # auth_names
270
+ auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
271
+
272
+ new_options = opts.merge(
273
+ :operation => :"FacebookApi.facebook_get_group_detail",
274
+ :header_params => header_params,
275
+ :query_params => query_params,
276
+ :form_params => form_params,
277
+ :body => post_body,
278
+ :auth_names => auth_names,
279
+ :return_type => return_type
280
+ )
281
+
282
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
283
+ if @api_client.config.debugging
284
+ @api_client.config.logger.debug "API called: FacebookApi#facebook_get_group_detail\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
285
+ end
286
+ return data, status_code, headers
287
+ end
288
+
289
+ # Get group posts
290
+ # Get a Facebook group's post feed.
291
+ # @param group_id [String]
292
+ # @param [Hash] opts the optional parameters
293
+ # @option opts [String] :after
294
+ # @return [Object]
295
+ def facebook_get_group_posts(group_id, opts = {})
296
+ data, _status_code, _headers = facebook_get_group_posts_with_http_info(group_id, opts)
297
+ data
298
+ end
299
+
300
+ # Get group posts
301
+ # Get a Facebook group&#39;s post feed.
302
+ # @param group_id [String]
303
+ # @param [Hash] opts the optional parameters
304
+ # @option opts [String] :after
305
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
306
+ def facebook_get_group_posts_with_http_info(group_id, opts = {})
307
+ if @api_client.config.debugging
308
+ @api_client.config.logger.debug 'Calling API: FacebookApi.facebook_get_group_posts ...'
309
+ end
310
+ # verify the required parameter 'group_id' is set
311
+ if @api_client.config.client_side_validation && group_id.nil?
312
+ fail ArgumentError, "Missing the required parameter 'group_id' when calling FacebookApi.facebook_get_group_posts"
313
+ end
314
+ # resource path
315
+ local_var_path = '/v1/facebook/groups/{group_id}/posts'.sub('{' + 'group_id' + '}', CGI.escape(group_id.to_s))
316
+
317
+ # query parameters
318
+ query_params = opts[:query_params] || {}
319
+ query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil?
320
+
321
+ # header parameters
322
+ header_params = opts[:header_params] || {}
323
+ # HTTP header 'Accept' (if needed)
324
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
325
+
326
+ # form parameters
327
+ form_params = opts[:form_params] || {}
328
+
329
+ # http body (model)
330
+ post_body = opts[:debug_body]
331
+
332
+ # return_type
333
+ return_type = opts[:debug_return_type] || 'Object'
334
+
335
+ # auth_names
336
+ auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
337
+
338
+ new_options = opts.merge(
339
+ :operation => :"FacebookApi.facebook_get_group_posts",
340
+ :header_params => header_params,
341
+ :query_params => query_params,
342
+ :form_params => form_params,
343
+ :body => post_body,
344
+ :auth_names => auth_names,
345
+ :return_type => return_type
346
+ )
347
+
348
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
349
+ if @api_client.config.debugging
350
+ @api_client.config.logger.debug "API called: FacebookApi#facebook_get_group_posts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
351
+ end
352
+ return data, status_code, headers
353
+ end
354
+
355
+ # Get page detail
356
+ # Get a Facebook Page's profile (name, category, followers, about).
357
+ # @param identifier [String]
358
+ # @param [Hash] opts the optional parameters
359
+ # @return [Object]
360
+ def facebook_get_page_detail(identifier, opts = {})
361
+ data, _status_code, _headers = facebook_get_page_detail_with_http_info(identifier, opts)
362
+ data
363
+ end
364
+
365
+ # Get page detail
366
+ # Get a Facebook Page&#39;s profile (name, category, followers, about).
367
+ # @param identifier [String]
368
+ # @param [Hash] opts the optional parameters
369
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
370
+ def facebook_get_page_detail_with_http_info(identifier, opts = {})
371
+ if @api_client.config.debugging
372
+ @api_client.config.logger.debug 'Calling API: FacebookApi.facebook_get_page_detail ...'
373
+ end
374
+ # verify the required parameter 'identifier' is set
375
+ if @api_client.config.client_side_validation && identifier.nil?
376
+ fail ArgumentError, "Missing the required parameter 'identifier' when calling FacebookApi.facebook_get_page_detail"
377
+ end
378
+ # resource path
379
+ local_var_path = '/v1/facebook/pages/{identifier}'.sub('{' + 'identifier' + '}', CGI.escape(identifier.to_s))
380
+
381
+ # query parameters
382
+ query_params = opts[:query_params] || {}
383
+
384
+ # header parameters
385
+ header_params = opts[:header_params] || {}
386
+ # HTTP header 'Accept' (if needed)
387
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
388
+
389
+ # form parameters
390
+ form_params = opts[:form_params] || {}
391
+
392
+ # http body (model)
393
+ post_body = opts[:debug_body]
394
+
395
+ # return_type
396
+ return_type = opts[:debug_return_type] || 'Object'
397
+
398
+ # auth_names
399
+ auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
400
+
401
+ new_options = opts.merge(
402
+ :operation => :"FacebookApi.facebook_get_page_detail",
403
+ :header_params => header_params,
404
+ :query_params => query_params,
405
+ :form_params => form_params,
406
+ :body => post_body,
407
+ :auth_names => auth_names,
408
+ :return_type => return_type
409
+ )
410
+
411
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
412
+ if @api_client.config.debugging
413
+ @api_client.config.logger.debug "API called: FacebookApi#facebook_get_page_detail\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
414
+ end
415
+ return data, status_code, headers
416
+ end
417
+
418
+ # Get page posts
419
+ # Get a Facebook Page's timeline posts.
420
+ # @param identifier [String]
421
+ # @param [Hash] opts the optional parameters
422
+ # @option opts [String] :after
423
+ # @return [Object]
424
+ def facebook_get_page_posts(identifier, opts = {})
425
+ data, _status_code, _headers = facebook_get_page_posts_with_http_info(identifier, opts)
426
+ data
427
+ end
428
+
429
+ # Get page posts
430
+ # Get a Facebook Page&#39;s timeline posts.
431
+ # @param identifier [String]
432
+ # @param [Hash] opts the optional parameters
433
+ # @option opts [String] :after
434
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
435
+ def facebook_get_page_posts_with_http_info(identifier, opts = {})
436
+ if @api_client.config.debugging
437
+ @api_client.config.logger.debug 'Calling API: FacebookApi.facebook_get_page_posts ...'
438
+ end
439
+ # verify the required parameter 'identifier' is set
440
+ if @api_client.config.client_side_validation && identifier.nil?
441
+ fail ArgumentError, "Missing the required parameter 'identifier' when calling FacebookApi.facebook_get_page_posts"
442
+ end
443
+ # resource path
444
+ local_var_path = '/v1/facebook/pages/{identifier}/posts'.sub('{' + 'identifier' + '}', CGI.escape(identifier.to_s))
445
+
446
+ # query parameters
447
+ query_params = opts[:query_params] || {}
448
+ query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil?
449
+
450
+ # header parameters
451
+ header_params = opts[:header_params] || {}
452
+ # HTTP header 'Accept' (if needed)
453
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
454
+
455
+ # form parameters
456
+ form_params = opts[:form_params] || {}
457
+
458
+ # http body (model)
459
+ post_body = opts[:debug_body]
460
+
461
+ # return_type
462
+ return_type = opts[:debug_return_type] || 'Object'
463
+
464
+ # auth_names
465
+ auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
466
+
467
+ new_options = opts.merge(
468
+ :operation => :"FacebookApi.facebook_get_page_posts",
469
+ :header_params => header_params,
470
+ :query_params => query_params,
471
+ :form_params => form_params,
472
+ :body => post_body,
473
+ :auth_names => auth_names,
474
+ :return_type => return_type
475
+ )
476
+
477
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
478
+ if @api_client.config.debugging
479
+ @api_client.config.logger.debug "API called: FacebookApi#facebook_get_page_posts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
480
+ end
481
+ return data, status_code, headers
482
+ end
483
+
484
+ # Get post comments
485
+ # Get a Facebook post's comment thread (paginated).
486
+ # @param post_id [String]
487
+ # @param [Hash] opts the optional parameters
488
+ # @option opts [String] :after
489
+ # @option opts [String] :sort (default to 'relevance')
490
+ # @return [Object]
491
+ def facebook_get_post_comments(post_id, opts = {})
492
+ data, _status_code, _headers = facebook_get_post_comments_with_http_info(post_id, opts)
493
+ data
494
+ end
495
+
496
+ # Get post comments
497
+ # Get a Facebook post&#39;s comment thread (paginated).
498
+ # @param post_id [String]
499
+ # @param [Hash] opts the optional parameters
500
+ # @option opts [String] :after
501
+ # @option opts [String] :sort (default to 'relevance')
502
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
503
+ def facebook_get_post_comments_with_http_info(post_id, opts = {})
504
+ if @api_client.config.debugging
505
+ @api_client.config.logger.debug 'Calling API: FacebookApi.facebook_get_post_comments ...'
506
+ end
507
+ # verify the required parameter 'post_id' is set
508
+ if @api_client.config.client_side_validation && post_id.nil?
509
+ fail ArgumentError, "Missing the required parameter 'post_id' when calling FacebookApi.facebook_get_post_comments"
510
+ end
511
+ # resource path
512
+ local_var_path = '/v1/facebook/posts/{post_id}/comments'.sub('{' + 'post_id' + '}', CGI.escape(post_id.to_s))
513
+
514
+ # query parameters
515
+ query_params = opts[:query_params] || {}
516
+ query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil?
517
+ query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
518
+
519
+ # header parameters
520
+ header_params = opts[:header_params] || {}
521
+ # HTTP header 'Accept' (if needed)
522
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
523
+
524
+ # form parameters
525
+ form_params = opts[:form_params] || {}
526
+
527
+ # http body (model)
528
+ post_body = opts[:debug_body]
529
+
530
+ # return_type
531
+ return_type = opts[:debug_return_type] || 'Object'
532
+
533
+ # auth_names
534
+ auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
535
+
536
+ new_options = opts.merge(
537
+ :operation => :"FacebookApi.facebook_get_post_comments",
538
+ :header_params => header_params,
539
+ :query_params => query_params,
540
+ :form_params => form_params,
541
+ :body => post_body,
542
+ :auth_names => auth_names,
543
+ :return_type => return_type
544
+ )
545
+
546
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
547
+ if @api_client.config.debugging
548
+ @api_client.config.logger.debug "API called: FacebookApi#facebook_get_post_comments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
549
+ end
550
+ return data, status_code, headers
551
+ end
552
+
553
+ # Get post detail
554
+ # Get a Facebook post's detail plus its top comments.
555
+ # @param post_id [String]
556
+ # @param [Hash] opts the optional parameters
557
+ # @return [Object]
558
+ def facebook_get_post_detail(post_id, opts = {})
559
+ data, _status_code, _headers = facebook_get_post_detail_with_http_info(post_id, opts)
560
+ data
561
+ end
562
+
563
+ # Get post detail
564
+ # Get a Facebook post&#39;s detail plus its top comments.
565
+ # @param post_id [String]
566
+ # @param [Hash] opts the optional parameters
567
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
568
+ def facebook_get_post_detail_with_http_info(post_id, opts = {})
569
+ if @api_client.config.debugging
570
+ @api_client.config.logger.debug 'Calling API: FacebookApi.facebook_get_post_detail ...'
571
+ end
572
+ # verify the required parameter 'post_id' is set
573
+ if @api_client.config.client_side_validation && post_id.nil?
574
+ fail ArgumentError, "Missing the required parameter 'post_id' when calling FacebookApi.facebook_get_post_detail"
575
+ end
576
+ # resource path
577
+ local_var_path = '/v1/facebook/posts/{post_id}'.sub('{' + 'post_id' + '}', CGI.escape(post_id.to_s))
578
+
579
+ # query parameters
580
+ query_params = opts[:query_params] || {}
581
+
582
+ # header parameters
583
+ header_params = opts[:header_params] || {}
584
+ # HTTP header 'Accept' (if needed)
585
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
586
+
587
+ # form parameters
588
+ form_params = opts[:form_params] || {}
589
+
590
+ # http body (model)
591
+ post_body = opts[:debug_body]
592
+
593
+ # return_type
594
+ return_type = opts[:debug_return_type] || 'Object'
595
+
596
+ # auth_names
597
+ auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
598
+
599
+ new_options = opts.merge(
600
+ :operation => :"FacebookApi.facebook_get_post_detail",
601
+ :header_params => header_params,
602
+ :query_params => query_params,
603
+ :form_params => form_params,
604
+ :body => post_body,
605
+ :auth_names => auth_names,
606
+ :return_type => return_type
607
+ )
608
+
609
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
610
+ if @api_client.config.debugging
611
+ @api_client.config.logger.debug "API called: FacebookApi#facebook_get_post_detail\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
612
+ end
613
+ return data, status_code, headers
614
+ end
615
+
616
+ # Get profile detail
617
+ # Get a Facebook profile's details.
618
+ # @param identifier [String]
619
+ # @param [Hash] opts the optional parameters
620
+ # @return [Object]
621
+ def facebook_get_profile_detail(identifier, opts = {})
622
+ data, _status_code, _headers = facebook_get_profile_detail_with_http_info(identifier, opts)
623
+ data
624
+ end
625
+
626
+ # Get profile detail
627
+ # Get a Facebook profile&#39;s details.
628
+ # @param identifier [String]
629
+ # @param [Hash] opts the optional parameters
630
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
631
+ def facebook_get_profile_detail_with_http_info(identifier, opts = {})
632
+ if @api_client.config.debugging
633
+ @api_client.config.logger.debug 'Calling API: FacebookApi.facebook_get_profile_detail ...'
634
+ end
635
+ # verify the required parameter 'identifier' is set
636
+ if @api_client.config.client_side_validation && identifier.nil?
637
+ fail ArgumentError, "Missing the required parameter 'identifier' when calling FacebookApi.facebook_get_profile_detail"
638
+ end
639
+ # resource path
640
+ local_var_path = '/v1/facebook/profiles/{identifier}'.sub('{' + 'identifier' + '}', CGI.escape(identifier.to_s))
641
+
642
+ # query parameters
643
+ query_params = opts[:query_params] || {}
644
+
645
+ # header parameters
646
+ header_params = opts[:header_params] || {}
647
+ # HTTP header 'Accept' (if needed)
648
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
649
+
650
+ # form parameters
651
+ form_params = opts[:form_params] || {}
652
+
653
+ # http body (model)
654
+ post_body = opts[:debug_body]
655
+
656
+ # return_type
657
+ return_type = opts[:debug_return_type] || 'Object'
658
+
659
+ # auth_names
660
+ auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
661
+
662
+ new_options = opts.merge(
663
+ :operation => :"FacebookApi.facebook_get_profile_detail",
664
+ :header_params => header_params,
665
+ :query_params => query_params,
666
+ :form_params => form_params,
667
+ :body => post_body,
668
+ :auth_names => auth_names,
669
+ :return_type => return_type
670
+ )
671
+
672
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
673
+ if @api_client.config.debugging
674
+ @api_client.config.logger.debug "API called: FacebookApi#facebook_get_profile_detail\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
675
+ end
676
+ return data, status_code, headers
677
+ end
678
+
679
+ # Get profile posts
680
+ # Get a Facebook profile's timeline posts.
681
+ # @param identifier [String]
682
+ # @param [Hash] opts the optional parameters
683
+ # @option opts [String] :after
684
+ # @return [Object]
685
+ def facebook_get_profile_posts(identifier, opts = {})
686
+ data, _status_code, _headers = facebook_get_profile_posts_with_http_info(identifier, opts)
687
+ data
688
+ end
689
+
690
+ # Get profile posts
691
+ # Get a Facebook profile&#39;s timeline posts.
692
+ # @param identifier [String]
693
+ # @param [Hash] opts the optional parameters
694
+ # @option opts [String] :after
695
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
696
+ def facebook_get_profile_posts_with_http_info(identifier, opts = {})
697
+ if @api_client.config.debugging
698
+ @api_client.config.logger.debug 'Calling API: FacebookApi.facebook_get_profile_posts ...'
699
+ end
700
+ # verify the required parameter 'identifier' is set
701
+ if @api_client.config.client_side_validation && identifier.nil?
702
+ fail ArgumentError, "Missing the required parameter 'identifier' when calling FacebookApi.facebook_get_profile_posts"
703
+ end
704
+ # resource path
705
+ local_var_path = '/v1/facebook/profiles/{identifier}/posts'.sub('{' + 'identifier' + '}', CGI.escape(identifier.to_s))
706
+
707
+ # query parameters
708
+ query_params = opts[:query_params] || {}
709
+ query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil?
710
+
711
+ # header parameters
712
+ header_params = opts[:header_params] || {}
713
+ # HTTP header 'Accept' (if needed)
714
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
715
+
716
+ # form parameters
717
+ form_params = opts[:form_params] || {}
718
+
719
+ # http body (model)
720
+ post_body = opts[:debug_body]
721
+
722
+ # return_type
723
+ return_type = opts[:debug_return_type] || 'Object'
724
+
725
+ # auth_names
726
+ auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
727
+
728
+ new_options = opts.merge(
729
+ :operation => :"FacebookApi.facebook_get_profile_posts",
730
+ :header_params => header_params,
731
+ :query_params => query_params,
732
+ :form_params => form_params,
733
+ :body => post_body,
734
+ :auth_names => auth_names,
735
+ :return_type => return_type
736
+ )
737
+
738
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
739
+ if @api_client.config.debugging
740
+ @api_client.config.logger.debug "API called: FacebookApi#facebook_get_profile_posts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
741
+ end
742
+ return data, status_code, headers
743
+ end
744
+
745
+ # List categories
746
+ # List Marketplace category slugs (free).
747
+ # @param [Hash] opts the optional parameters
748
+ # @return [Object]
749
+ def facebook_list_categories(opts = {})
750
+ data, _status_code, _headers = facebook_list_categories_with_http_info(opts)
751
+ data
752
+ end
753
+
754
+ # List categories
755
+ # List Marketplace category slugs (free).
756
+ # @param [Hash] opts the optional parameters
757
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
758
+ def facebook_list_categories_with_http_info(opts = {})
759
+ if @api_client.config.debugging
760
+ @api_client.config.logger.debug 'Calling API: FacebookApi.facebook_list_categories ...'
761
+ end
762
+ # resource path
763
+ local_var_path = '/v1/facebook/marketplace/categories'
764
+
765
+ # query parameters
766
+ query_params = opts[:query_params] || {}
767
+
768
+ # header parameters
769
+ header_params = opts[:header_params] || {}
770
+ # HTTP header 'Accept' (if needed)
771
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
772
+
773
+ # form parameters
774
+ form_params = opts[:form_params] || {}
775
+
776
+ # http body (model)
777
+ post_body = opts[:debug_body]
778
+
779
+ # return_type
780
+ return_type = opts[:debug_return_type] || 'Object'
781
+
782
+ # auth_names
783
+ auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
784
+
785
+ new_options = opts.merge(
786
+ :operation => :"FacebookApi.facebook_list_categories",
787
+ :header_params => header_params,
788
+ :query_params => query_params,
789
+ :form_params => form_params,
790
+ :body => post_body,
791
+ :auth_names => auth_names,
792
+ :return_type => return_type
793
+ )
794
+
795
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
796
+ if @api_client.config.debugging
797
+ @api_client.config.logger.debug "API called: FacebookApi#facebook_list_categories\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
798
+ end
799
+ return data, status_code, headers
800
+ end
801
+
802
+ # List locations
803
+ # List common Marketplace location slugs (free).
804
+ # @param [Hash] opts the optional parameters
805
+ # @return [Object]
806
+ def facebook_list_locations(opts = {})
807
+ data, _status_code, _headers = facebook_list_locations_with_http_info(opts)
808
+ data
809
+ end
810
+
811
+ # List locations
812
+ # List common Marketplace location slugs (free).
813
+ # @param [Hash] opts the optional parameters
814
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
815
+ def facebook_list_locations_with_http_info(opts = {})
816
+ if @api_client.config.debugging
817
+ @api_client.config.logger.debug 'Calling API: FacebookApi.facebook_list_locations ...'
818
+ end
819
+ # resource path
820
+ local_var_path = '/v1/facebook/marketplace/locations'
821
+
822
+ # query parameters
823
+ query_params = opts[:query_params] || {}
824
+
825
+ # header parameters
826
+ header_params = opts[:header_params] || {}
827
+ # HTTP header 'Accept' (if needed)
828
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
829
+
830
+ # form parameters
831
+ form_params = opts[:form_params] || {}
832
+
833
+ # http body (model)
834
+ post_body = opts[:debug_body]
835
+
836
+ # return_type
837
+ return_type = opts[:debug_return_type] || 'Object'
838
+
839
+ # auth_names
840
+ auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
841
+
842
+ new_options = opts.merge(
843
+ :operation => :"FacebookApi.facebook_list_locations",
844
+ :header_params => header_params,
845
+ :query_params => query_params,
846
+ :form_params => form_params,
847
+ :body => post_body,
848
+ :auth_names => auth_names,
849
+ :return_type => return_type
850
+ )
851
+
852
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
853
+ if @api_client.config.debugging
854
+ @api_client.config.logger.debug "API called: FacebookApi#facebook_list_locations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
855
+ end
856
+ return data, status_code, headers
857
+ end
858
+
859
+ # Search events
860
+ # Search Facebook events.
861
+ # @param q [String]
862
+ # @param [Hash] opts the optional parameters
863
+ # @option opts [String] :after
864
+ # @return [Object]
865
+ def facebook_search_events(q, opts = {})
866
+ data, _status_code, _headers = facebook_search_events_with_http_info(q, opts)
867
+ data
868
+ end
869
+
870
+ # Search events
871
+ # Search Facebook events.
872
+ # @param q [String]
873
+ # @param [Hash] opts the optional parameters
874
+ # @option opts [String] :after
875
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
876
+ def facebook_search_events_with_http_info(q, opts = {})
877
+ if @api_client.config.debugging
878
+ @api_client.config.logger.debug 'Calling API: FacebookApi.facebook_search_events ...'
879
+ end
880
+ # verify the required parameter 'q' is set
881
+ if @api_client.config.client_side_validation && q.nil?
882
+ fail ArgumentError, "Missing the required parameter 'q' when calling FacebookApi.facebook_search_events"
883
+ end
884
+ # resource path
885
+ local_var_path = '/v1/facebook/search/events'
886
+
887
+ # query parameters
888
+ query_params = opts[:query_params] || {}
889
+ query_params[:'q'] = q
890
+ query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil?
891
+
892
+ # header parameters
893
+ header_params = opts[:header_params] || {}
894
+ # HTTP header 'Accept' (if needed)
895
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
896
+
897
+ # form parameters
898
+ form_params = opts[:form_params] || {}
899
+
900
+ # http body (model)
901
+ post_body = opts[:debug_body]
902
+
903
+ # return_type
904
+ return_type = opts[:debug_return_type] || 'Object'
905
+
906
+ # auth_names
907
+ auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
908
+
909
+ new_options = opts.merge(
910
+ :operation => :"FacebookApi.facebook_search_events",
911
+ :header_params => header_params,
912
+ :query_params => query_params,
913
+ :form_params => form_params,
914
+ :body => post_body,
915
+ :auth_names => auth_names,
916
+ :return_type => return_type
917
+ )
918
+
919
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
920
+ if @api_client.config.debugging
921
+ @api_client.config.logger.debug "API called: FacebookApi#facebook_search_events\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
922
+ end
923
+ return data, status_code, headers
924
+ end
925
+
926
+ # Search everything
927
+ # Global Facebook search (top results across pages, people, groups, posts).
928
+ # @param q [String] Search query
929
+ # @param [Hash] opts the optional parameters
930
+ # @option opts [String] :after
931
+ # @return [Object]
932
+ def facebook_search_everything(q, opts = {})
933
+ data, _status_code, _headers = facebook_search_everything_with_http_info(q, opts)
934
+ data
935
+ end
936
+
937
+ # Search everything
938
+ # Global Facebook search (top results across pages, people, groups, posts).
939
+ # @param q [String] Search query
940
+ # @param [Hash] opts the optional parameters
941
+ # @option opts [String] :after
942
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
943
+ def facebook_search_everything_with_http_info(q, opts = {})
944
+ if @api_client.config.debugging
945
+ @api_client.config.logger.debug 'Calling API: FacebookApi.facebook_search_everything ...'
946
+ end
947
+ # verify the required parameter 'q' is set
948
+ if @api_client.config.client_side_validation && q.nil?
949
+ fail ArgumentError, "Missing the required parameter 'q' when calling FacebookApi.facebook_search_everything"
950
+ end
951
+ # resource path
952
+ local_var_path = '/v1/facebook/search'
953
+
954
+ # query parameters
955
+ query_params = opts[:query_params] || {}
956
+ query_params[:'q'] = q
957
+ query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil?
958
+
959
+ # header parameters
960
+ header_params = opts[:header_params] || {}
961
+ # HTTP header 'Accept' (if needed)
962
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
963
+
964
+ # form parameters
965
+ form_params = opts[:form_params] || {}
966
+
967
+ # http body (model)
968
+ post_body = opts[:debug_body]
969
+
970
+ # return_type
971
+ return_type = opts[:debug_return_type] || 'Object'
972
+
973
+ # auth_names
974
+ auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
975
+
976
+ new_options = opts.merge(
977
+ :operation => :"FacebookApi.facebook_search_everything",
978
+ :header_params => header_params,
979
+ :query_params => query_params,
980
+ :form_params => form_params,
981
+ :body => post_body,
982
+ :auth_names => auth_names,
983
+ :return_type => return_type
984
+ )
985
+
986
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
987
+ if @api_client.config.debugging
988
+ @api_client.config.logger.debug "API called: FacebookApi#facebook_search_everything\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
989
+ end
990
+ return data, status_code, headers
991
+ end
992
+
993
+ # Search groups
994
+ # Search Facebook groups.
995
+ # @param q [String]
996
+ # @param [Hash] opts the optional parameters
997
+ # @option opts [String] :after
998
+ # @return [Object]
999
+ def facebook_search_groups(q, opts = {})
1000
+ data, _status_code, _headers = facebook_search_groups_with_http_info(q, opts)
1001
+ data
1002
+ end
1003
+
1004
+ # Search groups
1005
+ # Search Facebook groups.
1006
+ # @param q [String]
1007
+ # @param [Hash] opts the optional parameters
1008
+ # @option opts [String] :after
1009
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
1010
+ def facebook_search_groups_with_http_info(q, opts = {})
1011
+ if @api_client.config.debugging
1012
+ @api_client.config.logger.debug 'Calling API: FacebookApi.facebook_search_groups ...'
1013
+ end
1014
+ # verify the required parameter 'q' is set
1015
+ if @api_client.config.client_side_validation && q.nil?
1016
+ fail ArgumentError, "Missing the required parameter 'q' when calling FacebookApi.facebook_search_groups"
1017
+ end
1018
+ # resource path
1019
+ local_var_path = '/v1/facebook/search/groups'
1020
+
1021
+ # query parameters
1022
+ query_params = opts[:query_params] || {}
1023
+ query_params[:'q'] = q
1024
+ query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil?
1025
+
1026
+ # header parameters
1027
+ header_params = opts[:header_params] || {}
1028
+ # HTTP header 'Accept' (if needed)
1029
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1030
+
1031
+ # form parameters
1032
+ form_params = opts[:form_params] || {}
1033
+
1034
+ # http body (model)
1035
+ post_body = opts[:debug_body]
1036
+
1037
+ # return_type
1038
+ return_type = opts[:debug_return_type] || 'Object'
1039
+
1040
+ # auth_names
1041
+ auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
1042
+
1043
+ new_options = opts.merge(
1044
+ :operation => :"FacebookApi.facebook_search_groups",
1045
+ :header_params => header_params,
1046
+ :query_params => query_params,
1047
+ :form_params => form_params,
1048
+ :body => post_body,
1049
+ :auth_names => auth_names,
1050
+ :return_type => return_type
1051
+ )
1052
+
1053
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1054
+ if @api_client.config.debugging
1055
+ @api_client.config.logger.debug "API called: FacebookApi#facebook_search_groups\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1056
+ end
1057
+ return data, status_code, headers
1058
+ end
1059
+
1060
+ # Search Marketplace
1061
+ # Search Facebook Marketplace listings by keyword and location.
1062
+ # @param query [String] Search keywords
1063
+ # @param [Hash] opts the optional parameters
1064
+ # @option opts [String] :location Marketplace location slug (default to 'nyc')
1065
+ # @option opts [Integer] :min_price
1066
+ # @option opts [Integer] :max_price
1067
+ # @option opts [Integer] :days_since_listed
1068
+ # @option opts [String] :sort_by
1069
+ # @option opts [String] :item_condition
1070
+ # @option opts [String] :delivery_method
1071
+ # @option opts [String] :after
1072
+ # @return [Object]
1073
+ def facebook_search_marketplace(query, opts = {})
1074
+ data, _status_code, _headers = facebook_search_marketplace_with_http_info(query, opts)
1075
+ data
1076
+ end
1077
+
1078
+ # Search Marketplace
1079
+ # Search Facebook Marketplace listings by keyword and location.
1080
+ # @param query [String] Search keywords
1081
+ # @param [Hash] opts the optional parameters
1082
+ # @option opts [String] :location Marketplace location slug (default to 'nyc')
1083
+ # @option opts [Integer] :min_price
1084
+ # @option opts [Integer] :max_price
1085
+ # @option opts [Integer] :days_since_listed
1086
+ # @option opts [String] :sort_by
1087
+ # @option opts [String] :item_condition
1088
+ # @option opts [String] :delivery_method
1089
+ # @option opts [String] :after
1090
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
1091
+ def facebook_search_marketplace_with_http_info(query, opts = {})
1092
+ if @api_client.config.debugging
1093
+ @api_client.config.logger.debug 'Calling API: FacebookApi.facebook_search_marketplace ...'
1094
+ end
1095
+ # verify the required parameter 'query' is set
1096
+ if @api_client.config.client_side_validation && query.nil?
1097
+ fail ArgumentError, "Missing the required parameter 'query' when calling FacebookApi.facebook_search_marketplace"
1098
+ end
1099
+ # resource path
1100
+ local_var_path = '/v1/facebook/marketplace/search'
1101
+
1102
+ # query parameters
1103
+ query_params = opts[:query_params] || {}
1104
+ query_params[:'query'] = query
1105
+ query_params[:'location'] = opts[:'location'] if !opts[:'location'].nil?
1106
+ query_params[:'min_price'] = opts[:'min_price'] if !opts[:'min_price'].nil?
1107
+ query_params[:'max_price'] = opts[:'max_price'] if !opts[:'max_price'].nil?
1108
+ query_params[:'days_since_listed'] = opts[:'days_since_listed'] if !opts[:'days_since_listed'].nil?
1109
+ query_params[:'sort_by'] = opts[:'sort_by'] if !opts[:'sort_by'].nil?
1110
+ query_params[:'item_condition'] = opts[:'item_condition'] if !opts[:'item_condition'].nil?
1111
+ query_params[:'delivery_method'] = opts[:'delivery_method'] if !opts[:'delivery_method'].nil?
1112
+ query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil?
1113
+
1114
+ # header parameters
1115
+ header_params = opts[:header_params] || {}
1116
+ # HTTP header 'Accept' (if needed)
1117
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1118
+
1119
+ # form parameters
1120
+ form_params = opts[:form_params] || {}
1121
+
1122
+ # http body (model)
1123
+ post_body = opts[:debug_body]
1124
+
1125
+ # return_type
1126
+ return_type = opts[:debug_return_type] || 'Object'
1127
+
1128
+ # auth_names
1129
+ auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
1130
+
1131
+ new_options = opts.merge(
1132
+ :operation => :"FacebookApi.facebook_search_marketplace",
1133
+ :header_params => header_params,
1134
+ :query_params => query_params,
1135
+ :form_params => form_params,
1136
+ :body => post_body,
1137
+ :auth_names => auth_names,
1138
+ :return_type => return_type
1139
+ )
1140
+
1141
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1142
+ if @api_client.config.debugging
1143
+ @api_client.config.logger.debug "API called: FacebookApi#facebook_search_marketplace\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1144
+ end
1145
+ return data, status_code, headers
1146
+ end
1147
+
1148
+ # Search Pages
1149
+ # Search Facebook Pages.
1150
+ # @param q [String]
1151
+ # @param [Hash] opts the optional parameters
1152
+ # @option opts [String] :after
1153
+ # @return [Object]
1154
+ def facebook_search_pages(q, opts = {})
1155
+ data, _status_code, _headers = facebook_search_pages_with_http_info(q, opts)
1156
+ data
1157
+ end
1158
+
1159
+ # Search Pages
1160
+ # Search Facebook Pages.
1161
+ # @param q [String]
1162
+ # @param [Hash] opts the optional parameters
1163
+ # @option opts [String] :after
1164
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
1165
+ def facebook_search_pages_with_http_info(q, opts = {})
1166
+ if @api_client.config.debugging
1167
+ @api_client.config.logger.debug 'Calling API: FacebookApi.facebook_search_pages ...'
1168
+ end
1169
+ # verify the required parameter 'q' is set
1170
+ if @api_client.config.client_side_validation && q.nil?
1171
+ fail ArgumentError, "Missing the required parameter 'q' when calling FacebookApi.facebook_search_pages"
1172
+ end
1173
+ # resource path
1174
+ local_var_path = '/v1/facebook/search/pages'
1175
+
1176
+ # query parameters
1177
+ query_params = opts[:query_params] || {}
1178
+ query_params[:'q'] = q
1179
+ query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil?
1180
+
1181
+ # header parameters
1182
+ header_params = opts[:header_params] || {}
1183
+ # HTTP header 'Accept' (if needed)
1184
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1185
+
1186
+ # form parameters
1187
+ form_params = opts[:form_params] || {}
1188
+
1189
+ # http body (model)
1190
+ post_body = opts[:debug_body]
1191
+
1192
+ # return_type
1193
+ return_type = opts[:debug_return_type] || 'Object'
1194
+
1195
+ # auth_names
1196
+ auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
1197
+
1198
+ new_options = opts.merge(
1199
+ :operation => :"FacebookApi.facebook_search_pages",
1200
+ :header_params => header_params,
1201
+ :query_params => query_params,
1202
+ :form_params => form_params,
1203
+ :body => post_body,
1204
+ :auth_names => auth_names,
1205
+ :return_type => return_type
1206
+ )
1207
+
1208
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1209
+ if @api_client.config.debugging
1210
+ @api_client.config.logger.debug "API called: FacebookApi#facebook_search_pages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1211
+ end
1212
+ return data, status_code, headers
1213
+ end
1214
+
1215
+ # Search people
1216
+ # Search Facebook profiles.
1217
+ # @param q [String]
1218
+ # @param [Hash] opts the optional parameters
1219
+ # @option opts [String] :after
1220
+ # @return [Object]
1221
+ def facebook_search_people(q, opts = {})
1222
+ data, _status_code, _headers = facebook_search_people_with_http_info(q, opts)
1223
+ data
1224
+ end
1225
+
1226
+ # Search people
1227
+ # Search Facebook profiles.
1228
+ # @param q [String]
1229
+ # @param [Hash] opts the optional parameters
1230
+ # @option opts [String] :after
1231
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
1232
+ def facebook_search_people_with_http_info(q, opts = {})
1233
+ if @api_client.config.debugging
1234
+ @api_client.config.logger.debug 'Calling API: FacebookApi.facebook_search_people ...'
1235
+ end
1236
+ # verify the required parameter 'q' is set
1237
+ if @api_client.config.client_side_validation && q.nil?
1238
+ fail ArgumentError, "Missing the required parameter 'q' when calling FacebookApi.facebook_search_people"
1239
+ end
1240
+ # resource path
1241
+ local_var_path = '/v1/facebook/search/people'
1242
+
1243
+ # query parameters
1244
+ query_params = opts[:query_params] || {}
1245
+ query_params[:'q'] = q
1246
+ query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil?
1247
+
1248
+ # header parameters
1249
+ header_params = opts[:header_params] || {}
1250
+ # HTTP header 'Accept' (if needed)
1251
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1252
+
1253
+ # form parameters
1254
+ form_params = opts[:form_params] || {}
1255
+
1256
+ # http body (model)
1257
+ post_body = opts[:debug_body]
1258
+
1259
+ # return_type
1260
+ return_type = opts[:debug_return_type] || 'Object'
1261
+
1262
+ # auth_names
1263
+ auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
1264
+
1265
+ new_options = opts.merge(
1266
+ :operation => :"FacebookApi.facebook_search_people",
1267
+ :header_params => header_params,
1268
+ :query_params => query_params,
1269
+ :form_params => form_params,
1270
+ :body => post_body,
1271
+ :auth_names => auth_names,
1272
+ :return_type => return_type
1273
+ )
1274
+
1275
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1276
+ if @api_client.config.debugging
1277
+ @api_client.config.logger.debug "API called: FacebookApi#facebook_search_people\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1278
+ end
1279
+ return data, status_code, headers
1280
+ end
1281
+
1282
+ # Search places
1283
+ # Search Facebook places.
1284
+ # @param q [String]
1285
+ # @param [Hash] opts the optional parameters
1286
+ # @option opts [String] :after
1287
+ # @return [Object]
1288
+ def facebook_search_places(q, opts = {})
1289
+ data, _status_code, _headers = facebook_search_places_with_http_info(q, opts)
1290
+ data
1291
+ end
1292
+
1293
+ # Search places
1294
+ # Search Facebook places.
1295
+ # @param q [String]
1296
+ # @param [Hash] opts the optional parameters
1297
+ # @option opts [String] :after
1298
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
1299
+ def facebook_search_places_with_http_info(q, opts = {})
1300
+ if @api_client.config.debugging
1301
+ @api_client.config.logger.debug 'Calling API: FacebookApi.facebook_search_places ...'
1302
+ end
1303
+ # verify the required parameter 'q' is set
1304
+ if @api_client.config.client_side_validation && q.nil?
1305
+ fail ArgumentError, "Missing the required parameter 'q' when calling FacebookApi.facebook_search_places"
1306
+ end
1307
+ # resource path
1308
+ local_var_path = '/v1/facebook/search/places'
1309
+
1310
+ # query parameters
1311
+ query_params = opts[:query_params] || {}
1312
+ query_params[:'q'] = q
1313
+ query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil?
1314
+
1315
+ # header parameters
1316
+ header_params = opts[:header_params] || {}
1317
+ # HTTP header 'Accept' (if needed)
1318
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1319
+
1320
+ # form parameters
1321
+ form_params = opts[:form_params] || {}
1322
+
1323
+ # http body (model)
1324
+ post_body = opts[:debug_body]
1325
+
1326
+ # return_type
1327
+ return_type = opts[:debug_return_type] || 'Object'
1328
+
1329
+ # auth_names
1330
+ auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
1331
+
1332
+ new_options = opts.merge(
1333
+ :operation => :"FacebookApi.facebook_search_places",
1334
+ :header_params => header_params,
1335
+ :query_params => query_params,
1336
+ :form_params => form_params,
1337
+ :body => post_body,
1338
+ :auth_names => auth_names,
1339
+ :return_type => return_type
1340
+ )
1341
+
1342
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1343
+ if @api_client.config.debugging
1344
+ @api_client.config.logger.debug "API called: FacebookApi#facebook_search_places\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1345
+ end
1346
+ return data, status_code, headers
1347
+ end
1348
+
1349
+ # Search posts
1350
+ # Search public Facebook posts.
1351
+ # @param q [String]
1352
+ # @param [Hash] opts the optional parameters
1353
+ # @option opts [String] :after
1354
+ # @return [Object]
1355
+ def facebook_search_posts(q, opts = {})
1356
+ data, _status_code, _headers = facebook_search_posts_with_http_info(q, opts)
1357
+ data
1358
+ end
1359
+
1360
+ # Search posts
1361
+ # Search public Facebook posts.
1362
+ # @param q [String]
1363
+ # @param [Hash] opts the optional parameters
1364
+ # @option opts [String] :after
1365
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
1366
+ def facebook_search_posts_with_http_info(q, opts = {})
1367
+ if @api_client.config.debugging
1368
+ @api_client.config.logger.debug 'Calling API: FacebookApi.facebook_search_posts ...'
1369
+ end
1370
+ # verify the required parameter 'q' is set
1371
+ if @api_client.config.client_side_validation && q.nil?
1372
+ fail ArgumentError, "Missing the required parameter 'q' when calling FacebookApi.facebook_search_posts"
1373
+ end
1374
+ # resource path
1375
+ local_var_path = '/v1/facebook/search/posts'
1376
+
1377
+ # query parameters
1378
+ query_params = opts[:query_params] || {}
1379
+ query_params[:'q'] = q
1380
+ query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil?
1381
+
1382
+ # header parameters
1383
+ header_params = opts[:header_params] || {}
1384
+ # HTTP header 'Accept' (if needed)
1385
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1386
+
1387
+ # form parameters
1388
+ form_params = opts[:form_params] || {}
1389
+
1390
+ # http body (model)
1391
+ post_body = opts[:debug_body]
1392
+
1393
+ # return_type
1394
+ return_type = opts[:debug_return_type] || 'Object'
1395
+
1396
+ # auth_names
1397
+ auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
1398
+
1399
+ new_options = opts.merge(
1400
+ :operation => :"FacebookApi.facebook_search_posts",
1401
+ :header_params => header_params,
1402
+ :query_params => query_params,
1403
+ :form_params => form_params,
1404
+ :body => post_body,
1405
+ :auth_names => auth_names,
1406
+ :return_type => return_type
1407
+ )
1408
+
1409
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1410
+ if @api_client.config.debugging
1411
+ @api_client.config.logger.debug "API called: FacebookApi#facebook_search_posts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1412
+ end
1413
+ return data, status_code, headers
1414
+ end
1415
+
1416
+ # Search the Ad Library
1417
+ # Search the Facebook Ad Library.
1418
+ # @param query [String] Advertiser or keyword
1419
+ # @param [Hash] opts the optional parameters
1420
+ # @option opts [String] :country (default to 'US')
1421
+ # @option opts [String] :ad_type (default to 'all')
1422
+ # @option opts [String] :active_status (default to 'active')
1423
+ # @option opts [String] :after
1424
+ # @return [Object]
1425
+ def facebook_search_the_ad_library(query, opts = {})
1426
+ data, _status_code, _headers = facebook_search_the_ad_library_with_http_info(query, opts)
1427
+ data
1428
+ end
1429
+
1430
+ # Search the Ad Library
1431
+ # Search the Facebook Ad Library.
1432
+ # @param query [String] Advertiser or keyword
1433
+ # @param [Hash] opts the optional parameters
1434
+ # @option opts [String] :country (default to 'US')
1435
+ # @option opts [String] :ad_type (default to 'all')
1436
+ # @option opts [String] :active_status (default to 'active')
1437
+ # @option opts [String] :after
1438
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
1439
+ def facebook_search_the_ad_library_with_http_info(query, opts = {})
1440
+ if @api_client.config.debugging
1441
+ @api_client.config.logger.debug 'Calling API: FacebookApi.facebook_search_the_ad_library ...'
1442
+ end
1443
+ # verify the required parameter 'query' is set
1444
+ if @api_client.config.client_side_validation && query.nil?
1445
+ fail ArgumentError, "Missing the required parameter 'query' when calling FacebookApi.facebook_search_the_ad_library"
1446
+ end
1447
+ # resource path
1448
+ local_var_path = '/v1/facebook/ads/search'
1449
+
1450
+ # query parameters
1451
+ query_params = opts[:query_params] || {}
1452
+ query_params[:'query'] = query
1453
+ query_params[:'country'] = opts[:'country'] if !opts[:'country'].nil?
1454
+ query_params[:'ad_type'] = opts[:'ad_type'] if !opts[:'ad_type'].nil?
1455
+ query_params[:'active_status'] = opts[:'active_status'] if !opts[:'active_status'].nil?
1456
+ query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil?
1457
+
1458
+ # header parameters
1459
+ header_params = opts[:header_params] || {}
1460
+ # HTTP header 'Accept' (if needed)
1461
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1462
+
1463
+ # form parameters
1464
+ form_params = opts[:form_params] || {}
1465
+
1466
+ # http body (model)
1467
+ post_body = opts[:debug_body]
1468
+
1469
+ # return_type
1470
+ return_type = opts[:debug_return_type] || 'Object'
1471
+
1472
+ # auth_names
1473
+ auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
1474
+
1475
+ new_options = opts.merge(
1476
+ :operation => :"FacebookApi.facebook_search_the_ad_library",
1477
+ :header_params => header_params,
1478
+ :query_params => query_params,
1479
+ :form_params => form_params,
1480
+ :body => post_body,
1481
+ :auth_names => auth_names,
1482
+ :return_type => return_type
1483
+ )
1484
+
1485
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1486
+ if @api_client.config.debugging
1487
+ @api_client.config.logger.debug "API called: FacebookApi#facebook_search_the_ad_library\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1488
+ end
1489
+ return data, status_code, headers
1490
+ end
1491
+ end
1492
+ end