Class: ScrapeBadger::FacebookApi

Inherits:
Object
  • Object
show all
Defined in:
lib/scrapebadger/api/facebook_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ FacebookApi

Returns a new instance of FacebookApi.



19
20
21
# File 'lib/scrapebadger/api/facebook_api.rb', line 19

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/scrapebadger/api/facebook_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#facebook_browse_a_marketplace_category(category, opts = {}) ⇒ Object

Browse a Marketplace category Browse Marketplace listings in a category (vehicles, electronics, ...).

Parameters:

  • category (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :location (String) — default: default to 'nyc'
  • :min_price (Integer)
  • :max_price (Integer)
  • :sort_by (String)
  • :after (String)

Returns:

  • (Object)


32
33
34
35
# File 'lib/scrapebadger/api/facebook_api.rb', line 32

def facebook_browse_a_marketplace_category(category, opts = {})
  data, _status_code, _headers = facebook_browse_a_marketplace_category_with_http_info(category, opts)
  data
end

#facebook_browse_a_marketplace_category_with_http_info(category, opts = {}) ⇒ Array<(Object, Integer, Hash)>

Browse a Marketplace category Browse Marketplace listings in a category (vehicles, electronics, ...).

Parameters:

  • category (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :location (String) — default: default to 'nyc'
  • :min_price (Integer)
  • :max_price (Integer)
  • :sort_by (String)
  • :after (String)

Returns:

  • (Array<(Object, Integer, Hash)>)

    Object data, response status code and response headers



47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
# File 'lib/scrapebadger/api/facebook_api.rb', line 47

def facebook_browse_a_marketplace_category_with_http_info(category, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: FacebookApi.facebook_browse_a_marketplace_category ...'
  end
  # verify the required parameter 'category' is set
  if @api_client.config.client_side_validation && category.nil?
    fail ArgumentError, "Missing the required parameter 'category' when calling FacebookApi.facebook_browse_a_marketplace_category"
  end
  # resource path
  local_var_path = '/v1/facebook/marketplace/category/{category}'.sub('{' + 'category' + '}', CGI.escape(category.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'location'] = opts[:'location'] if !opts[:'location'].nil?
  query_params[:'min_price'] = opts[:'min_price'] if !opts[:'min_price'].nil?
  query_params[:'max_price'] = opts[:'max_price'] if !opts[:'max_price'].nil?
  query_params[:'sort_by'] = opts[:'sort_by'] if !opts[:'sort_by'].nil?
  query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Object'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']

  new_options = opts.merge(
    :operation => :"FacebookApi.facebook_browse_a_marketplace_category",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: FacebookApi#facebook_browse_a_marketplace_category\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#facebook_get_a_marketplace_item(item_id, opts = {}) ⇒ Object

Get a Marketplace item Get full detail for a single Marketplace listing.

Parameters:

  • item_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Object)


105
106
107
108
# File 'lib/scrapebadger/api/facebook_api.rb', line 105

def facebook_get_a_marketplace_item(item_id, opts = {})
  data, _status_code, _headers = facebook_get_a_marketplace_item_with_http_info(item_id, opts)
  data
end

#facebook_get_a_marketplace_item_with_http_info(item_id, opts = {}) ⇒ Array<(Object, Integer, Hash)>

Get a Marketplace item Get full detail for a single Marketplace listing.

Parameters:

  • item_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Object, Integer, Hash)>)

    Object data, response status code and response headers



115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
# File 'lib/scrapebadger/api/facebook_api.rb', line 115

def facebook_get_a_marketplace_item_with_http_info(item_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: FacebookApi.facebook_get_a_marketplace_item ...'
  end
  # verify the required parameter 'item_id' is set
  if @api_client.config.client_side_validation && item_id.nil?
    fail ArgumentError, "Missing the required parameter 'item_id' when calling FacebookApi.facebook_get_a_marketplace_item"
  end
  # resource path
  local_var_path = '/v1/facebook/marketplace/item/{item_id}'.sub('{' + 'item_id' + '}', CGI.escape(item_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Object'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']

  new_options = opts.merge(
    :operation => :"FacebookApi.facebook_get_a_marketplace_item",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: FacebookApi#facebook_get_a_marketplace_item\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#facebook_get_an_ad(ad_archive_id, opts = {}) ⇒ Object

Get an ad Get a single Ad Library ad by its archive id.

Parameters:

  • ad_archive_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Object)


168
169
170
171
# File 'lib/scrapebadger/api/facebook_api.rb', line 168

def facebook_get_an_ad(ad_archive_id, opts = {})
  data, _status_code, _headers = facebook_get_an_ad_with_http_info(ad_archive_id, opts)
  data
end

#facebook_get_an_ad_with_http_info(ad_archive_id, opts = {}) ⇒ Array<(Object, Integer, Hash)>

Get an ad Get a single Ad Library ad by its archive id.

Parameters:

  • ad_archive_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Object, Integer, Hash)>)

    Object data, response status code and response headers



178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
# File 'lib/scrapebadger/api/facebook_api.rb', line 178

def facebook_get_an_ad_with_http_info(ad_archive_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: FacebookApi.facebook_get_an_ad ...'
  end
  # verify the required parameter 'ad_archive_id' is set
  if @api_client.config.client_side_validation && ad_archive_id.nil?
    fail ArgumentError, "Missing the required parameter 'ad_archive_id' when calling FacebookApi.facebook_get_an_ad"
  end
  # resource path
  local_var_path = '/v1/facebook/ads/{ad_archive_id}'.sub('{' + 'ad_archive_id' + '}', CGI.escape(ad_archive_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Object'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']

  new_options = opts.merge(
    :operation => :"FacebookApi.facebook_get_an_ad",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: FacebookApi#facebook_get_an_ad\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#facebook_get_group_detail(group_id, opts = {}) ⇒ Object

Get group detail Get a Facebook group's details.

Parameters:

  • group_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Object)


231
232
233
234
# File 'lib/scrapebadger/api/facebook_api.rb', line 231

def facebook_get_group_detail(group_id, opts = {})
  data, _status_code, _headers = facebook_get_group_detail_with_http_info(group_id, opts)
  data
end

#facebook_get_group_detail_with_http_info(group_id, opts = {}) ⇒ Array<(Object, Integer, Hash)>

Get group detail Get a Facebook group's details.

Parameters:

  • group_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Object, Integer, Hash)>)

    Object data, response status code and response headers



241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
# File 'lib/scrapebadger/api/facebook_api.rb', line 241

def facebook_get_group_detail_with_http_info(group_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: FacebookApi.facebook_get_group_detail ...'
  end
  # verify the required parameter 'group_id' is set
  if @api_client.config.client_side_validation && group_id.nil?
    fail ArgumentError, "Missing the required parameter 'group_id' when calling FacebookApi.facebook_get_group_detail"
  end
  # resource path
  local_var_path = '/v1/facebook/groups/{group_id}'.sub('{' + 'group_id' + '}', CGI.escape(group_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Object'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']

  new_options = opts.merge(
    :operation => :"FacebookApi.facebook_get_group_detail",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: FacebookApi#facebook_get_group_detail\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#facebook_get_group_posts(group_id, opts = {}) ⇒ Object

Get group posts Get a Facebook group's post feed.

Parameters:

  • group_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :after (String)

Returns:

  • (Object)


295
296
297
298
# File 'lib/scrapebadger/api/facebook_api.rb', line 295

def facebook_get_group_posts(group_id, opts = {})
  data, _status_code, _headers = facebook_get_group_posts_with_http_info(group_id, opts)
  data
end

#facebook_get_group_posts_with_http_info(group_id, opts = {}) ⇒ Array<(Object, Integer, Hash)>

Get group posts Get a Facebook group's post feed.

Parameters:

  • group_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :after (String)

Returns:

  • (Array<(Object, Integer, Hash)>)

    Object data, response status code and response headers



306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
# File 'lib/scrapebadger/api/facebook_api.rb', line 306

def facebook_get_group_posts_with_http_info(group_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: FacebookApi.facebook_get_group_posts ...'
  end
  # verify the required parameter 'group_id' is set
  if @api_client.config.client_side_validation && group_id.nil?
    fail ArgumentError, "Missing the required parameter 'group_id' when calling FacebookApi.facebook_get_group_posts"
  end
  # resource path
  local_var_path = '/v1/facebook/groups/{group_id}/posts'.sub('{' + 'group_id' + '}', CGI.escape(group_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Object'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']

  new_options = opts.merge(
    :operation => :"FacebookApi.facebook_get_group_posts",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: FacebookApi#facebook_get_group_posts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#facebook_get_page_detail(identifier, opts = {}) ⇒ Object

Get page detail Get a Facebook Page's profile (name, category, followers, about).

Parameters:

  • identifier (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Object)


360
361
362
363
# File 'lib/scrapebadger/api/facebook_api.rb', line 360

def facebook_get_page_detail(identifier, opts = {})
  data, _status_code, _headers = facebook_get_page_detail_with_http_info(identifier, opts)
  data
end

#facebook_get_page_detail_with_http_info(identifier, opts = {}) ⇒ Array<(Object, Integer, Hash)>

Get page detail Get a Facebook Page's profile (name, category, followers, about).

Parameters:

  • identifier (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Object, Integer, Hash)>)

    Object data, response status code and response headers



370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
# File 'lib/scrapebadger/api/facebook_api.rb', line 370

def facebook_get_page_detail_with_http_info(identifier, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: FacebookApi.facebook_get_page_detail ...'
  end
  # verify the required parameter 'identifier' is set
  if @api_client.config.client_side_validation && identifier.nil?
    fail ArgumentError, "Missing the required parameter 'identifier' when calling FacebookApi.facebook_get_page_detail"
  end
  # resource path
  local_var_path = '/v1/facebook/pages/{identifier}'.sub('{' + 'identifier' + '}', CGI.escape(identifier.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Object'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']

  new_options = opts.merge(
    :operation => :"FacebookApi.facebook_get_page_detail",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: FacebookApi#facebook_get_page_detail\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#facebook_get_page_posts(identifier, opts = {}) ⇒ Object

Get page posts Get a Facebook Page's timeline posts.

Parameters:

  • identifier (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :after (String)

Returns:

  • (Object)


424
425
426
427
# File 'lib/scrapebadger/api/facebook_api.rb', line 424

def facebook_get_page_posts(identifier, opts = {})
  data, _status_code, _headers = facebook_get_page_posts_with_http_info(identifier, opts)
  data
end

#facebook_get_page_posts_with_http_info(identifier, opts = {}) ⇒ Array<(Object, Integer, Hash)>

Get page posts Get a Facebook Page's timeline posts.

Parameters:

  • identifier (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :after (String)

Returns:

  • (Array<(Object, Integer, Hash)>)

    Object data, response status code and response headers



435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
# File 'lib/scrapebadger/api/facebook_api.rb', line 435

def facebook_get_page_posts_with_http_info(identifier, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: FacebookApi.facebook_get_page_posts ...'
  end
  # verify the required parameter 'identifier' is set
  if @api_client.config.client_side_validation && identifier.nil?
    fail ArgumentError, "Missing the required parameter 'identifier' when calling FacebookApi.facebook_get_page_posts"
  end
  # resource path
  local_var_path = '/v1/facebook/pages/{identifier}/posts'.sub('{' + 'identifier' + '}', CGI.escape(identifier.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Object'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']

  new_options = opts.merge(
    :operation => :"FacebookApi.facebook_get_page_posts",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: FacebookApi#facebook_get_page_posts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#facebook_get_post_comments(post_id, opts = {}) ⇒ Object

Get post comments Get a Facebook post's comment thread (paginated).

Parameters:

  • post_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :after (String)
  • :sort (String) — default: default to 'relevance'

Returns:

  • (Object)


491
492
493
494
# File 'lib/scrapebadger/api/facebook_api.rb', line 491

def facebook_get_post_comments(post_id, opts = {})
  data, _status_code, _headers = facebook_get_post_comments_with_http_info(post_id, opts)
  data
end

#facebook_get_post_comments_with_http_info(post_id, opts = {}) ⇒ Array<(Object, Integer, Hash)>

Get post comments Get a Facebook post's comment thread (paginated).

Parameters:

  • post_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :after (String)
  • :sort (String) — default: default to 'relevance'

Returns:

  • (Array<(Object, Integer, Hash)>)

    Object data, response status code and response headers



503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
# File 'lib/scrapebadger/api/facebook_api.rb', line 503

def facebook_get_post_comments_with_http_info(post_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: FacebookApi.facebook_get_post_comments ...'
  end
  # verify the required parameter 'post_id' is set
  if @api_client.config.client_side_validation && post_id.nil?
    fail ArgumentError, "Missing the required parameter 'post_id' when calling FacebookApi.facebook_get_post_comments"
  end
  # resource path
  local_var_path = '/v1/facebook/posts/{post_id}/comments'.sub('{' + 'post_id' + '}', CGI.escape(post_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil?
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Object'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']

  new_options = opts.merge(
    :operation => :"FacebookApi.facebook_get_post_comments",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: FacebookApi#facebook_get_post_comments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#facebook_get_post_detail(post_id, opts = {}) ⇒ Object

Get post detail Get a Facebook post's detail plus its top comments.

Parameters:

  • post_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Object)


558
559
560
561
# File 'lib/scrapebadger/api/facebook_api.rb', line 558

def facebook_get_post_detail(post_id, opts = {})
  data, _status_code, _headers = facebook_get_post_detail_with_http_info(post_id, opts)
  data
end

#facebook_get_post_detail_with_http_info(post_id, opts = {}) ⇒ Array<(Object, Integer, Hash)>

Get post detail Get a Facebook post's detail plus its top comments.

Parameters:

  • post_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Object, Integer, Hash)>)

    Object data, response status code and response headers



568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
# File 'lib/scrapebadger/api/facebook_api.rb', line 568

def facebook_get_post_detail_with_http_info(post_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: FacebookApi.facebook_get_post_detail ...'
  end
  # verify the required parameter 'post_id' is set
  if @api_client.config.client_side_validation && post_id.nil?
    fail ArgumentError, "Missing the required parameter 'post_id' when calling FacebookApi.facebook_get_post_detail"
  end
  # resource path
  local_var_path = '/v1/facebook/posts/{post_id}'.sub('{' + 'post_id' + '}', CGI.escape(post_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Object'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']

  new_options = opts.merge(
    :operation => :"FacebookApi.facebook_get_post_detail",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: FacebookApi#facebook_get_post_detail\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#facebook_get_profile_detail(identifier, opts = {}) ⇒ Object

Get profile detail Get a Facebook profile's details.

Parameters:

  • identifier (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Object)


621
622
623
624
# File 'lib/scrapebadger/api/facebook_api.rb', line 621

def facebook_get_profile_detail(identifier, opts = {})
  data, _status_code, _headers = facebook_get_profile_detail_with_http_info(identifier, opts)
  data
end

#facebook_get_profile_detail_with_http_info(identifier, opts = {}) ⇒ Array<(Object, Integer, Hash)>

Get profile detail Get a Facebook profile's details.

Parameters:

  • identifier (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Object, Integer, Hash)>)

    Object data, response status code and response headers



631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
# File 'lib/scrapebadger/api/facebook_api.rb', line 631

def facebook_get_profile_detail_with_http_info(identifier, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: FacebookApi.facebook_get_profile_detail ...'
  end
  # verify the required parameter 'identifier' is set
  if @api_client.config.client_side_validation && identifier.nil?
    fail ArgumentError, "Missing the required parameter 'identifier' when calling FacebookApi.facebook_get_profile_detail"
  end
  # resource path
  local_var_path = '/v1/facebook/profiles/{identifier}'.sub('{' + 'identifier' + '}', CGI.escape(identifier.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Object'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']

  new_options = opts.merge(
    :operation => :"FacebookApi.facebook_get_profile_detail",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: FacebookApi#facebook_get_profile_detail\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#facebook_get_profile_posts(identifier, opts = {}) ⇒ Object

Get profile posts Get a Facebook profile's timeline posts.

Parameters:

  • identifier (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :after (String)

Returns:

  • (Object)


685
686
687
688
# File 'lib/scrapebadger/api/facebook_api.rb', line 685

def facebook_get_profile_posts(identifier, opts = {})
  data, _status_code, _headers = facebook_get_profile_posts_with_http_info(identifier, opts)
  data
end

#facebook_get_profile_posts_with_http_info(identifier, opts = {}) ⇒ Array<(Object, Integer, Hash)>

Get profile posts Get a Facebook profile's timeline posts.

Parameters:

  • identifier (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :after (String)

Returns:

  • (Array<(Object, Integer, Hash)>)

    Object data, response status code and response headers



696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
# File 'lib/scrapebadger/api/facebook_api.rb', line 696

def facebook_get_profile_posts_with_http_info(identifier, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: FacebookApi.facebook_get_profile_posts ...'
  end
  # verify the required parameter 'identifier' is set
  if @api_client.config.client_side_validation && identifier.nil?
    fail ArgumentError, "Missing the required parameter 'identifier' when calling FacebookApi.facebook_get_profile_posts"
  end
  # resource path
  local_var_path = '/v1/facebook/profiles/{identifier}/posts'.sub('{' + 'identifier' + '}', CGI.escape(identifier.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Object'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']

  new_options = opts.merge(
    :operation => :"FacebookApi.facebook_get_profile_posts",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: FacebookApi#facebook_get_profile_posts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#facebook_list_categories(opts = {}) ⇒ Object

List categories List Marketplace category slugs (free).

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Object)


749
750
751
752
# File 'lib/scrapebadger/api/facebook_api.rb', line 749

def facebook_list_categories(opts = {})
  data, _status_code, _headers = facebook_list_categories_with_http_info(opts)
  data
end

#facebook_list_categories_with_http_info(opts = {}) ⇒ Array<(Object, Integer, Hash)>

List categories List Marketplace category slugs (free).

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Object, Integer, Hash)>)

    Object data, response status code and response headers



758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
# File 'lib/scrapebadger/api/facebook_api.rb', line 758

def facebook_list_categories_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: FacebookApi.facebook_list_categories ...'
  end
  # resource path
  local_var_path = '/v1/facebook/marketplace/categories'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Object'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']

  new_options = opts.merge(
    :operation => :"FacebookApi.facebook_list_categories",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: FacebookApi#facebook_list_categories\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#facebook_list_locations(opts = {}) ⇒ Object

List locations List common Marketplace location slugs (free).

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Object)


806
807
808
809
# File 'lib/scrapebadger/api/facebook_api.rb', line 806

def facebook_list_locations(opts = {})
  data, _status_code, _headers = facebook_list_locations_with_http_info(opts)
  data
end

#facebook_list_locations_with_http_info(opts = {}) ⇒ Array<(Object, Integer, Hash)>

List locations List common Marketplace location slugs (free).

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Object, Integer, Hash)>)

    Object data, response status code and response headers



815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
# File 'lib/scrapebadger/api/facebook_api.rb', line 815

def facebook_list_locations_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: FacebookApi.facebook_list_locations ...'
  end
  # resource path
  local_var_path = '/v1/facebook/marketplace/locations'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Object'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']

  new_options = opts.merge(
    :operation => :"FacebookApi.facebook_list_locations",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: FacebookApi#facebook_list_locations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#facebook_search_events(q, opts = {}) ⇒ Object

Search events Search Facebook events.

Parameters:

  • q (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :after (String)

Returns:

  • (Object)


865
866
867
868
# File 'lib/scrapebadger/api/facebook_api.rb', line 865

def facebook_search_events(q, opts = {})
  data, _status_code, _headers = facebook_search_events_with_http_info(q, opts)
  data
end

#facebook_search_events_with_http_info(q, opts = {}) ⇒ Array<(Object, Integer, Hash)>

Search events Search Facebook events.

Parameters:

  • q (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :after (String)

Returns:

  • (Array<(Object, Integer, Hash)>)

    Object data, response status code and response headers



876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
# File 'lib/scrapebadger/api/facebook_api.rb', line 876

def facebook_search_events_with_http_info(q, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: FacebookApi.facebook_search_events ...'
  end
  # verify the required parameter 'q' is set
  if @api_client.config.client_side_validation && q.nil?
    fail ArgumentError, "Missing the required parameter 'q' when calling FacebookApi.facebook_search_events"
  end
  # resource path
  local_var_path = '/v1/facebook/search/events'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'q'] = q
  query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Object'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']

  new_options = opts.merge(
    :operation => :"FacebookApi.facebook_search_events",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: FacebookApi#facebook_search_events\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#facebook_search_everything(q, opts = {}) ⇒ Object

Search everything Global Facebook search (top results across pages, people, groups, posts).

Parameters:

  • q (String)

    Search query

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :after (String)

Returns:

  • (Object)


932
933
934
935
# File 'lib/scrapebadger/api/facebook_api.rb', line 932

def facebook_search_everything(q, opts = {})
  data, _status_code, _headers = facebook_search_everything_with_http_info(q, opts)
  data
end

#facebook_search_everything_with_http_info(q, opts = {}) ⇒ Array<(Object, Integer, Hash)>

Search everything Global Facebook search (top results across pages, people, groups, posts).

Parameters:

  • q (String)

    Search query

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :after (String)

Returns:

  • (Array<(Object, Integer, Hash)>)

    Object data, response status code and response headers



943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
# File 'lib/scrapebadger/api/facebook_api.rb', line 943

def facebook_search_everything_with_http_info(q, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: FacebookApi.facebook_search_everything ...'
  end
  # verify the required parameter 'q' is set
  if @api_client.config.client_side_validation && q.nil?
    fail ArgumentError, "Missing the required parameter 'q' when calling FacebookApi.facebook_search_everything"
  end
  # resource path
  local_var_path = '/v1/facebook/search'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'q'] = q
  query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Object'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']

  new_options = opts.merge(
    :operation => :"FacebookApi.facebook_search_everything",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: FacebookApi#facebook_search_everything\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#facebook_search_groups(q, opts = {}) ⇒ Object

Search groups Search Facebook groups.

Parameters:

  • q (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :after (String)

Returns:

  • (Object)


999
1000
1001
1002
# File 'lib/scrapebadger/api/facebook_api.rb', line 999

def facebook_search_groups(q, opts = {})
  data, _status_code, _headers = facebook_search_groups_with_http_info(q, opts)
  data
end

#facebook_search_groups_with_http_info(q, opts = {}) ⇒ Array<(Object, Integer, Hash)>

Search groups Search Facebook groups.

Parameters:

  • q (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :after (String)

Returns:

  • (Array<(Object, Integer, Hash)>)

    Object data, response status code and response headers



1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
# File 'lib/scrapebadger/api/facebook_api.rb', line 1010

def facebook_search_groups_with_http_info(q, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: FacebookApi.facebook_search_groups ...'
  end
  # verify the required parameter 'q' is set
  if @api_client.config.client_side_validation && q.nil?
    fail ArgumentError, "Missing the required parameter 'q' when calling FacebookApi.facebook_search_groups"
  end
  # resource path
  local_var_path = '/v1/facebook/search/groups'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'q'] = q
  query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Object'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']

  new_options = opts.merge(
    :operation => :"FacebookApi.facebook_search_groups",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: FacebookApi#facebook_search_groups\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#facebook_search_marketplace(query, opts = {}) ⇒ Object

Search Marketplace Search Facebook Marketplace listings by keyword and location.

Parameters:

  • query (String)

    Search keywords

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :location (String)

    Marketplace location slug (default to 'nyc')

  • :min_price (Integer)
  • :max_price (Integer)
  • :days_since_listed (Integer)
  • :sort_by (String)
  • :item_condition (String)
  • :delivery_method (String)
  • :after (String)

Returns:

  • (Object)


1073
1074
1075
1076
# File 'lib/scrapebadger/api/facebook_api.rb', line 1073

def facebook_search_marketplace(query, opts = {})
  data, _status_code, _headers = facebook_search_marketplace_with_http_info(query, opts)
  data
end

#facebook_search_marketplace_with_http_info(query, opts = {}) ⇒ Array<(Object, Integer, Hash)>

Search Marketplace Search Facebook Marketplace listings by keyword and location.

Parameters:

  • query (String)

    Search keywords

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :location (String)

    Marketplace location slug (default to 'nyc')

  • :min_price (Integer)
  • :max_price (Integer)
  • :days_since_listed (Integer)
  • :sort_by (String)
  • :item_condition (String)
  • :delivery_method (String)
  • :after (String)

Returns:

  • (Array<(Object, Integer, Hash)>)

    Object data, response status code and response headers



1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
# File 'lib/scrapebadger/api/facebook_api.rb', line 1091

def facebook_search_marketplace_with_http_info(query, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: FacebookApi.facebook_search_marketplace ...'
  end
  # verify the required parameter 'query' is set
  if @api_client.config.client_side_validation && query.nil?
    fail ArgumentError, "Missing the required parameter 'query' when calling FacebookApi.facebook_search_marketplace"
  end
  # resource path
  local_var_path = '/v1/facebook/marketplace/search'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'query'] = query
  query_params[:'location'] = opts[:'location'] if !opts[:'location'].nil?
  query_params[:'min_price'] = opts[:'min_price'] if !opts[:'min_price'].nil?
  query_params[:'max_price'] = opts[:'max_price'] if !opts[:'max_price'].nil?
  query_params[:'days_since_listed'] = opts[:'days_since_listed'] if !opts[:'days_since_listed'].nil?
  query_params[:'sort_by'] = opts[:'sort_by'] if !opts[:'sort_by'].nil?
  query_params[:'item_condition'] = opts[:'item_condition'] if !opts[:'item_condition'].nil?
  query_params[:'delivery_method'] = opts[:'delivery_method'] if !opts[:'delivery_method'].nil?
  query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Object'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']

  new_options = opts.merge(
    :operation => :"FacebookApi.facebook_search_marketplace",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: FacebookApi#facebook_search_marketplace\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#facebook_search_pages(q, opts = {}) ⇒ Object

Search Pages Search Facebook Pages.

Parameters:

  • q (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :after (String)

Returns:

  • (Object)


1154
1155
1156
1157
# File 'lib/scrapebadger/api/facebook_api.rb', line 1154

def facebook_search_pages(q, opts = {})
  data, _status_code, _headers = facebook_search_pages_with_http_info(q, opts)
  data
end

#facebook_search_pages_with_http_info(q, opts = {}) ⇒ Array<(Object, Integer, Hash)>

Search Pages Search Facebook Pages.

Parameters:

  • q (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :after (String)

Returns:

  • (Array<(Object, Integer, Hash)>)

    Object data, response status code and response headers



1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
# File 'lib/scrapebadger/api/facebook_api.rb', line 1165

def facebook_search_pages_with_http_info(q, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: FacebookApi.facebook_search_pages ...'
  end
  # verify the required parameter 'q' is set
  if @api_client.config.client_side_validation && q.nil?
    fail ArgumentError, "Missing the required parameter 'q' when calling FacebookApi.facebook_search_pages"
  end
  # resource path
  local_var_path = '/v1/facebook/search/pages'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'q'] = q
  query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Object'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']

  new_options = opts.merge(
    :operation => :"FacebookApi.facebook_search_pages",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: FacebookApi#facebook_search_pages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#facebook_search_people(q, opts = {}) ⇒ Object

Search people Search Facebook profiles.

Parameters:

  • q (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :after (String)

Returns:

  • (Object)


1221
1222
1223
1224
# File 'lib/scrapebadger/api/facebook_api.rb', line 1221

def facebook_search_people(q, opts = {})
  data, _status_code, _headers = facebook_search_people_with_http_info(q, opts)
  data
end

#facebook_search_people_with_http_info(q, opts = {}) ⇒ Array<(Object, Integer, Hash)>

Search people Search Facebook profiles.

Parameters:

  • q (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :after (String)

Returns:

  • (Array<(Object, Integer, Hash)>)

    Object data, response status code and response headers



1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
# File 'lib/scrapebadger/api/facebook_api.rb', line 1232

def facebook_search_people_with_http_info(q, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: FacebookApi.facebook_search_people ...'
  end
  # verify the required parameter 'q' is set
  if @api_client.config.client_side_validation && q.nil?
    fail ArgumentError, "Missing the required parameter 'q' when calling FacebookApi.facebook_search_people"
  end
  # resource path
  local_var_path = '/v1/facebook/search/people'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'q'] = q
  query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Object'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']

  new_options = opts.merge(
    :operation => :"FacebookApi.facebook_search_people",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: FacebookApi#facebook_search_people\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#facebook_search_places(q, opts = {}) ⇒ Object

Search places Search Facebook places.

Parameters:

  • q (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :after (String)

Returns:

  • (Object)


1288
1289
1290
1291
# File 'lib/scrapebadger/api/facebook_api.rb', line 1288

def facebook_search_places(q, opts = {})
  data, _status_code, _headers = facebook_search_places_with_http_info(q, opts)
  data
end

#facebook_search_places_with_http_info(q, opts = {}) ⇒ Array<(Object, Integer, Hash)>

Search places Search Facebook places.

Parameters:

  • q (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :after (String)

Returns:

  • (Array<(Object, Integer, Hash)>)

    Object data, response status code and response headers



1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
# File 'lib/scrapebadger/api/facebook_api.rb', line 1299

def facebook_search_places_with_http_info(q, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: FacebookApi.facebook_search_places ...'
  end
  # verify the required parameter 'q' is set
  if @api_client.config.client_side_validation && q.nil?
    fail ArgumentError, "Missing the required parameter 'q' when calling FacebookApi.facebook_search_places"
  end
  # resource path
  local_var_path = '/v1/facebook/search/places'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'q'] = q
  query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Object'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']

  new_options = opts.merge(
    :operation => :"FacebookApi.facebook_search_places",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: FacebookApi#facebook_search_places\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#facebook_search_posts(q, opts = {}) ⇒ Object

Search posts Search public Facebook posts.

Parameters:

  • q (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :after (String)

Returns:

  • (Object)


1355
1356
1357
1358
# File 'lib/scrapebadger/api/facebook_api.rb', line 1355

def facebook_search_posts(q, opts = {})
  data, _status_code, _headers = facebook_search_posts_with_http_info(q, opts)
  data
end

#facebook_search_posts_with_http_info(q, opts = {}) ⇒ Array<(Object, Integer, Hash)>

Search posts Search public Facebook posts.

Parameters:

  • q (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :after (String)

Returns:

  • (Array<(Object, Integer, Hash)>)

    Object data, response status code and response headers



1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
# File 'lib/scrapebadger/api/facebook_api.rb', line 1366

def facebook_search_posts_with_http_info(q, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: FacebookApi.facebook_search_posts ...'
  end
  # verify the required parameter 'q' is set
  if @api_client.config.client_side_validation && q.nil?
    fail ArgumentError, "Missing the required parameter 'q' when calling FacebookApi.facebook_search_posts"
  end
  # resource path
  local_var_path = '/v1/facebook/search/posts'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'q'] = q
  query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Object'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']

  new_options = opts.merge(
    :operation => :"FacebookApi.facebook_search_posts",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: FacebookApi#facebook_search_posts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#facebook_search_the_ad_library(query, opts = {}) ⇒ Object

Search the Ad Library Search the Facebook Ad Library.

Parameters:

  • query (String)

    Advertiser or keyword

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :country (String) — default: default to 'US'
  • :ad_type (String) — default: default to 'all'
  • :active_status (String) — default: default to 'active'
  • :after (String)

Returns:

  • (Object)


1425
1426
1427
1428
# File 'lib/scrapebadger/api/facebook_api.rb', line 1425

def facebook_search_the_ad_library(query, opts = {})
  data, _status_code, _headers = facebook_search_the_ad_library_with_http_info(query, opts)
  data
end

#facebook_search_the_ad_library_with_http_info(query, opts = {}) ⇒ Array<(Object, Integer, Hash)>

Search the Ad Library Search the Facebook Ad Library.

Parameters:

  • query (String)

    Advertiser or keyword

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :country (String) — default: default to 'US'
  • :ad_type (String) — default: default to 'all'
  • :active_status (String) — default: default to 'active'
  • :after (String)

Returns:

  • (Array<(Object, Integer, Hash)>)

    Object data, response status code and response headers



1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
# File 'lib/scrapebadger/api/facebook_api.rb', line 1439

def facebook_search_the_ad_library_with_http_info(query, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: FacebookApi.facebook_search_the_ad_library ...'
  end
  # verify the required parameter 'query' is set
  if @api_client.config.client_side_validation && query.nil?
    fail ArgumentError, "Missing the required parameter 'query' when calling FacebookApi.facebook_search_the_ad_library"
  end
  # resource path
  local_var_path = '/v1/facebook/ads/search'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'query'] = query
  query_params[:'country'] = opts[:'country'] if !opts[:'country'].nil?
  query_params[:'ad_type'] = opts[:'ad_type'] if !opts[:'ad_type'].nil?
  query_params[:'active_status'] = opts[:'active_status'] if !opts[:'active_status'].nil?
  query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Object'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']

  new_options = opts.merge(
    :operation => :"FacebookApi.facebook_search_the_ad_library",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: FacebookApi#facebook_search_the_ad_library\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end