Class: Late::ConnectApi

Inherits:
Object
  • Object
show all
Defined in:
lib/late-sdk/api/connect_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ ConnectApi

Returns a new instance of ConnectApi.



19
20
21
# File 'lib/late-sdk/api/connect_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/late-sdk/api/connect_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#complete_telegram_connect(code, opts = {}) ⇒ CompleteTelegramConnect200Response

Check Telegram status Poll this endpoint to check if a Telegram access code has been used to connect a channel/group. Recommended polling interval: 3 seconds. Status values: pending (waiting for user), connected (channel/group linked), expired (generate a new code).

Parameters:

  • code (String)

    The access code to check status for

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

    the optional parameters

Returns:



27
28
29
30
# File 'lib/late-sdk/api/connect_api.rb', line 27

def complete_telegram_connect(code, opts = {})
  data, _status_code, _headers = complete_telegram_connect_with_http_info(code, opts)
  data
end

#complete_telegram_connect_with_http_info(code, opts = {}) ⇒ Array<(CompleteTelegramConnect200Response, Integer, Hash)>

Check Telegram status Poll this endpoint to check if a Telegram access code has been used to connect a channel/group. Recommended polling interval: 3 seconds. Status values: pending (waiting for user), connected (channel/group linked), expired (generate a new code).

Parameters:

  • code (String)

    The access code to check status for

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

    the optional parameters

Returns:



37
38
39
40
41
42
43
44
45
46
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
# File 'lib/late-sdk/api/connect_api.rb', line 37

def complete_telegram_connect_with_http_info(code, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConnectApi.complete_telegram_connect ...'
  end
  # verify the required parameter 'code' is set
  if @api_client.config.client_side_validation && code.nil?
    fail ArgumentError, "Missing the required parameter 'code' when calling ConnectApi.complete_telegram_connect"
  end
  # resource path
  local_var_path = '/v1/connect/telegram'

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

  # 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] || 'CompleteTelegramConnect200Response'

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

  new_options = opts.merge(
    :operation => :"ConnectApi.complete_telegram_connect",
    :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(:PATCH, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConnectApi#complete_telegram_connect\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#connect_bluesky_credentials(connect_bluesky_credentials_request, opts = {}) ⇒ ConnectBlueskyCredentials200Response

Connect Bluesky account Connect a Bluesky account using identifier (handle or email) and an app password. To get your userId for the state parameter, call GET /v1/users which includes a currentUserId field.

Parameters:

Returns:



91
92
93
94
# File 'lib/late-sdk/api/connect_api.rb', line 91

def connect_bluesky_credentials(connect_bluesky_credentials_request, opts = {})
  data, _status_code, _headers = connect_bluesky_credentials_with_http_info(connect_bluesky_credentials_request, opts)
  data
end

#connect_bluesky_credentials_with_http_info(connect_bluesky_credentials_request, opts = {}) ⇒ Array<(ConnectBlueskyCredentials200Response, Integer, Hash)>

Connect Bluesky account Connect a Bluesky account using identifier (handle or email) and an app password. To get your userId for the state parameter, call GET /v1/users which includes a currentUserId field.

Parameters:

Returns:



101
102
103
104
105
106
107
108
109
110
111
112
113
114
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
# File 'lib/late-sdk/api/connect_api.rb', line 101

def connect_bluesky_credentials_with_http_info(connect_bluesky_credentials_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConnectApi.connect_bluesky_credentials ...'
  end
  # verify the required parameter 'connect_bluesky_credentials_request' is set
  if @api_client.config.client_side_validation && connect_bluesky_credentials_request.nil?
    fail ArgumentError, "Missing the required parameter 'connect_bluesky_credentials_request' when calling ConnectApi.connect_bluesky_credentials"
  end
  # resource path
  local_var_path = '/v1/connect/bluesky/credentials'

  # 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']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

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

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(connect_bluesky_credentials_request)

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

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

  new_options = opts.merge(
    :operation => :"ConnectApi.connect_bluesky_credentials",
    :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(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConnectApi#connect_bluesky_credentials\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_connect_url(platform, profile_id, opts = {}) ⇒ GetConnectUrl200Response

Get OAuth connect URL Initiate an OAuth connection flow. Returns an authUrl to redirect the user to. Standard flow: Late hosts the selection UI, then redirects to your redirect_url. Headless mode (headless=true): user is redirected to your redirect_url with OAuth data for custom UI. Use the platform-specific selection endpoints to complete.

Parameters:

  • platform (String)

    Social media platform to connect

  • profile_id (String)

    Your Late profile ID (get from /v1/profiles)

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

    the optional parameters

Options Hash (opts):

  • :redirect_url (String)

    Your custom redirect URL after connection completes. Standard mode appends ?connected&#x3D;platform&amp;profileId&#x3D;X&amp;accountId&#x3D;Y&amp;username&#x3D;Z. Headless mode appends OAuth data params for platforms requiring selection (e.g. LinkedIn orgs, Facebook pages). If no selection is needed, the account is created directly and the redirect includes accountId.

  • :headless (Boolean)

    When true, the user is redirected to your redirect_url with raw OAuth data (code, state) instead of Late&#39;s default account selection UI. Use this to build a custom connect experience. (default to false)

Returns:



162
163
164
165
# File 'lib/late-sdk/api/connect_api.rb', line 162

def get_connect_url(platform, profile_id, opts = {})
  data, _status_code, _headers = get_connect_url_with_http_info(platform, profile_id, opts)
  data
end

#get_connect_url_with_http_info(platform, profile_id, opts = {}) ⇒ Array<(GetConnectUrl200Response, Integer, Hash)>

Get OAuth connect URL Initiate an OAuth connection flow. Returns an authUrl to redirect the user to. Standard flow: Late hosts the selection UI, then redirects to your redirect_url. Headless mode (headless&#x3D;true): user is redirected to your redirect_url with OAuth data for custom UI. Use the platform-specific selection endpoints to complete.

Parameters:

  • platform (String)

    Social media platform to connect

  • profile_id (String)

    Your Late profile ID (get from /v1/profiles)

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

    the optional parameters

Options Hash (opts):

  • :redirect_url (String)

    Your custom redirect URL after connection completes. Standard mode appends ?connected&#x3D;platform&amp;profileId&#x3D;X&amp;accountId&#x3D;Y&amp;username&#x3D;Z. Headless mode appends OAuth data params for platforms requiring selection (e.g. LinkedIn orgs, Facebook pages). If no selection is needed, the account is created directly and the redirect includes accountId.

  • :headless (Boolean)

    When true, the user is redirected to your redirect_url with raw OAuth data (code, state) instead of Late&#39;s default account selection UI. Use this to build a custom connect experience. (default to false)

Returns:

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

    GetConnectUrl200Response data, response status code and response headers



175
176
177
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
225
226
227
228
229
230
231
232
233
# File 'lib/late-sdk/api/connect_api.rb', line 175

def get_connect_url_with_http_info(platform, profile_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConnectApi.get_connect_url ...'
  end
  # verify the required parameter 'platform' is set
  if @api_client.config.client_side_validation && platform.nil?
    fail ArgumentError, "Missing the required parameter 'platform' when calling ConnectApi.get_connect_url"
  end
  # verify enum value
  allowable_values = ["facebook", "instagram", "linkedin", "twitter", "tiktok", "youtube", "threads", "reddit", "pinterest", "bluesky", "googlebusiness", "telegram", "snapchat"]
  if @api_client.config.client_side_validation && !allowable_values.include?(platform)
    fail ArgumentError, "invalid value for \"platform\", must be one of #{allowable_values}"
  end
  # verify the required parameter 'profile_id' is set
  if @api_client.config.client_side_validation && profile_id.nil?
    fail ArgumentError, "Missing the required parameter 'profile_id' when calling ConnectApi.get_connect_url"
  end
  # resource path
  local_var_path = '/v1/connect/{platform}'.sub('{' + 'platform' + '}', CGI.escape(platform.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'profileId'] = profile_id
  query_params[:'redirect_url'] = opts[:'redirect_url'] if !opts[:'redirect_url'].nil?
  query_params[:'headless'] = opts[:'headless'] if !opts[:'headless'].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] || 'GetConnectUrl200Response'

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

  new_options = opts.merge(
    :operation => :"ConnectApi.get_connect_url",
    :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: ConnectApi#get_connect_url\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_facebook_pages(account_id, opts = {}) ⇒ GetFacebookPages200Response

List Facebook pages Returns all Facebook pages the connected account has access to, including the currently selected page.

Parameters:

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

    the optional parameters

Returns:



240
241
242
243
# File 'lib/late-sdk/api/connect_api.rb', line 240

def get_facebook_pages(, opts = {})
  data, _status_code, _headers = get_facebook_pages_with_http_info(, opts)
  data
end

#get_facebook_pages_with_http_info(account_id, opts = {}) ⇒ Array<(GetFacebookPages200Response, Integer, Hash)>

List Facebook pages Returns all Facebook pages the connected account has access to, including the currently selected page.

Parameters:

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

    the optional parameters

Returns:

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

    GetFacebookPages200Response data, response status code and response headers



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
288
289
290
291
292
293
294
295
296
# File 'lib/late-sdk/api/connect_api.rb', line 250

def get_facebook_pages_with_http_info(, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConnectApi.get_facebook_pages ...'
  end
  # verify the required parameter 'account_id' is set
  if @api_client.config.client_side_validation && .nil?
    fail ArgumentError, "Missing the required parameter 'account_id' when calling ConnectApi.get_facebook_pages"
  end
  # resource path
  local_var_path = '/v1/accounts/{accountId}/facebook-page'.sub('{' + 'accountId' + '}', CGI.escape(.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] || 'GetFacebookPages200Response'

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

  new_options = opts.merge(
    :operation => :"ConnectApi.get_facebook_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: ConnectApi#get_facebook_pages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_gmb_locations(account_id, opts = {}) ⇒ GetGmbLocations200Response

List GBP locations Returns all Google Business Profile locations the connected account has access to, including the currently selected location.

Parameters:

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

    the optional parameters

Returns:



303
304
305
306
# File 'lib/late-sdk/api/connect_api.rb', line 303

def get_gmb_locations(, opts = {})
  data, _status_code, _headers = get_gmb_locations_with_http_info(, opts)
  data
end

#get_gmb_locations_with_http_info(account_id, opts = {}) ⇒ Array<(GetGmbLocations200Response, Integer, Hash)>

List GBP locations Returns all Google Business Profile locations the connected account has access to, including the currently selected location.

Parameters:

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

    the optional parameters

Returns:

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

    GetGmbLocations200Response data, response status code and response headers



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
354
355
356
357
358
359
# File 'lib/late-sdk/api/connect_api.rb', line 313

def get_gmb_locations_with_http_info(, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConnectApi.get_gmb_locations ...'
  end
  # verify the required parameter 'account_id' is set
  if @api_client.config.client_side_validation && .nil?
    fail ArgumentError, "Missing the required parameter 'account_id' when calling ConnectApi.get_gmb_locations"
  end
  # resource path
  local_var_path = '/v1/accounts/{accountId}/gmb-locations'.sub('{' + 'accountId' + '}', CGI.escape(.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] || 'GetGmbLocations200Response'

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

  new_options = opts.merge(
    :operation => :"ConnectApi.get_gmb_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: ConnectApi#get_gmb_locations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_linked_in_organizations(account_id, opts = {}) ⇒ GetLinkedInOrganizations200Response

List LinkedIn orgs Returns LinkedIn organizations (company pages) the connected account has admin access to.

Parameters:

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

    the optional parameters

Returns:



366
367
368
369
# File 'lib/late-sdk/api/connect_api.rb', line 366

def get_linked_in_organizations(, opts = {})
  data, _status_code, _headers = get_linked_in_organizations_with_http_info(, opts)
  data
end

#get_linked_in_organizations_with_http_info(account_id, opts = {}) ⇒ Array<(GetLinkedInOrganizations200Response, Integer, Hash)>

List LinkedIn orgs Returns LinkedIn organizations (company pages) the connected account has admin access to.

Parameters:

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

    the optional parameters

Returns:



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
417
418
419
420
421
422
# File 'lib/late-sdk/api/connect_api.rb', line 376

def get_linked_in_organizations_with_http_info(, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConnectApi.get_linked_in_organizations ...'
  end
  # verify the required parameter 'account_id' is set
  if @api_client.config.client_side_validation && .nil?
    fail ArgumentError, "Missing the required parameter 'account_id' when calling ConnectApi.get_linked_in_organizations"
  end
  # resource path
  local_var_path = '/v1/accounts/{accountId}/linkedin-organizations'.sub('{' + 'accountId' + '}', CGI.escape(.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] || 'GetLinkedInOrganizations200Response'

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

  new_options = opts.merge(
    :operation => :"ConnectApi.get_linked_in_organizations",
    :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: ConnectApi#get_linked_in_organizations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_pending_o_auth_data(token, opts = {}) ⇒ GetPendingOAuthData200Response

Get pending OAuth data Fetch pending OAuth data for headless mode using the pendingDataToken from the redirect URL. One-time use, expires after 10 minutes. No authentication required.

Parameters:

  • token (String)

    The pending data token from the OAuth redirect URL (pendingDataToken parameter)

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

    the optional parameters

Returns:



429
430
431
432
# File 'lib/late-sdk/api/connect_api.rb', line 429

def get_pending_o_auth_data(token, opts = {})
  data, _status_code, _headers = get_pending_o_auth_data_with_http_info(token, opts)
  data
end

#get_pending_o_auth_data_with_http_info(token, opts = {}) ⇒ Array<(GetPendingOAuthData200Response, Integer, Hash)>

Get pending OAuth data Fetch pending OAuth data for headless mode using the pendingDataToken from the redirect URL. One-time use, expires after 10 minutes. No authentication required.

Parameters:

  • token (String)

    The pending data token from the OAuth redirect URL (pendingDataToken parameter)

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

    the optional parameters

Returns:



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
483
484
485
486
# File 'lib/late-sdk/api/connect_api.rb', line 439

def get_pending_o_auth_data_with_http_info(token, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConnectApi.get_pending_o_auth_data ...'
  end
  # verify the required parameter 'token' is set
  if @api_client.config.client_side_validation && token.nil?
    fail ArgumentError, "Missing the required parameter 'token' when calling ConnectApi.get_pending_o_auth_data"
  end
  # resource path
  local_var_path = '/v1/connect/pending-data'

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

  # 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] || 'GetPendingOAuthData200Response'

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

  new_options = opts.merge(
    :operation => :"ConnectApi.get_pending_o_auth_data",
    :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: ConnectApi#get_pending_o_auth_data\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_pinterest_boards(account_id, opts = {}) ⇒ GetPinterestBoards200Response

List Pinterest boards Returns the boards available for a connected Pinterest account. Use this to get a board ID when creating a Pinterest post.

Parameters:

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

    the optional parameters

Returns:



493
494
495
496
# File 'lib/late-sdk/api/connect_api.rb', line 493

def get_pinterest_boards(, opts = {})
  data, _status_code, _headers = get_pinterest_boards_with_http_info(, opts)
  data
end

#get_pinterest_boards_with_http_info(account_id, opts = {}) ⇒ Array<(GetPinterestBoards200Response, Integer, Hash)>

List Pinterest boards Returns the boards available for a connected Pinterest account. Use this to get a board ID when creating a Pinterest post.

Parameters:

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

    the optional parameters

Returns:



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
# File 'lib/late-sdk/api/connect_api.rb', line 503

def get_pinterest_boards_with_http_info(, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConnectApi.get_pinterest_boards ...'
  end
  # verify the required parameter 'account_id' is set
  if @api_client.config.client_side_validation && .nil?
    fail ArgumentError, "Missing the required parameter 'account_id' when calling ConnectApi.get_pinterest_boards"
  end
  # resource path
  local_var_path = '/v1/accounts/{accountId}/pinterest-boards'.sub('{' + 'accountId' + '}', CGI.escape(.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] || 'GetPinterestBoards200Response'

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

  new_options = opts.merge(
    :operation => :"ConnectApi.get_pinterest_boards",
    :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: ConnectApi#get_pinterest_boards\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_reddit_flairs(account_id, subreddit, opts = {}) ⇒ GetRedditFlairs200Response

List subreddit flairs Returns available post flairs for a subreddit. Some subreddits require a flair when posting.

Parameters:

  • account_id (String)
  • subreddit (String)

    Subreddit name (without &quot;r/&quot; prefix) to fetch flairs for

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

    the optional parameters

Returns:



557
558
559
560
# File 'lib/late-sdk/api/connect_api.rb', line 557

def get_reddit_flairs(, subreddit, opts = {})
  data, _status_code, _headers = get_reddit_flairs_with_http_info(, subreddit, opts)
  data
end

#get_reddit_flairs_with_http_info(account_id, subreddit, opts = {}) ⇒ Array<(GetRedditFlairs200Response, Integer, Hash)>

List subreddit flairs Returns available post flairs for a subreddit. Some subreddits require a flair when posting.

Parameters:

  • account_id (String)
  • subreddit (String)

    Subreddit name (without &quot;r/&quot; prefix) to fetch flairs for

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

    the optional parameters

Returns:

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

    GetRedditFlairs200Response 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
615
616
617
618
619
# File 'lib/late-sdk/api/connect_api.rb', line 568

def get_reddit_flairs_with_http_info(, subreddit, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConnectApi.get_reddit_flairs ...'
  end
  # verify the required parameter 'account_id' is set
  if @api_client.config.client_side_validation && .nil?
    fail ArgumentError, "Missing the required parameter 'account_id' when calling ConnectApi.get_reddit_flairs"
  end
  # verify the required parameter 'subreddit' is set
  if @api_client.config.client_side_validation && subreddit.nil?
    fail ArgumentError, "Missing the required parameter 'subreddit' when calling ConnectApi.get_reddit_flairs"
  end
  # resource path
  local_var_path = '/v1/accounts/{accountId}/reddit-flairs'.sub('{' + 'accountId' + '}', CGI.escape(.to_s))

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

  # 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] || 'GetRedditFlairs200Response'

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

  new_options = opts.merge(
    :operation => :"ConnectApi.get_reddit_flairs",
    :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: ConnectApi#get_reddit_flairs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_reddit_subreddits(account_id, opts = {}) ⇒ GetRedditSubreddits200Response

List Reddit subreddits Returns the subreddits the connected Reddit account can post to. Use this to get a subreddit name when creating a Reddit post.

Parameters:

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

    the optional parameters

Returns:



626
627
628
629
# File 'lib/late-sdk/api/connect_api.rb', line 626

def get_reddit_subreddits(, opts = {})
  data, _status_code, _headers = get_reddit_subreddits_with_http_info(, opts)
  data
end

#get_reddit_subreddits_with_http_info(account_id, opts = {}) ⇒ Array<(GetRedditSubreddits200Response, Integer, Hash)>

List Reddit subreddits Returns the subreddits the connected Reddit account can post to. Use this to get a subreddit name when creating a Reddit post.

Parameters:

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

    the optional parameters

Returns:



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
678
679
680
681
682
# File 'lib/late-sdk/api/connect_api.rb', line 636

def get_reddit_subreddits_with_http_info(, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConnectApi.get_reddit_subreddits ...'
  end
  # verify the required parameter 'account_id' is set
  if @api_client.config.client_side_validation && .nil?
    fail ArgumentError, "Missing the required parameter 'account_id' when calling ConnectApi.get_reddit_subreddits"
  end
  # resource path
  local_var_path = '/v1/accounts/{accountId}/reddit-subreddits'.sub('{' + 'accountId' + '}', CGI.escape(.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] || 'GetRedditSubreddits200Response'

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

  new_options = opts.merge(
    :operation => :"ConnectApi.get_reddit_subreddits",
    :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: ConnectApi#get_reddit_subreddits\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_telegram_connect_status(profile_id, opts = {}) ⇒ GetTelegramConnectStatus200Response

Generate Telegram code Generate an access code (valid 15 minutes) for connecting a Telegram channel or group. Add the bot as admin, then send the code + @yourchannel to the bot. Poll PATCH /v1/connect/telegram to check status.

Parameters:

  • profile_id (String)

    The profile ID to connect the Telegram account to

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

    the optional parameters

Returns:



689
690
691
692
# File 'lib/late-sdk/api/connect_api.rb', line 689

def get_telegram_connect_status(profile_id, opts = {})
  data, _status_code, _headers = get_telegram_connect_status_with_http_info(profile_id, opts)
  data
end

#get_telegram_connect_status_with_http_info(profile_id, opts = {}) ⇒ Array<(GetTelegramConnectStatus200Response, Integer, Hash)>

Generate Telegram code Generate an access code (valid 15 minutes) for connecting a Telegram channel or group. Add the bot as admin, then send the code + @yourchannel to the bot. Poll PATCH /v1/connect/telegram to check status.

Parameters:

  • profile_id (String)

    The profile ID to connect the Telegram account to

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

    the optional parameters

Returns:



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
744
745
746
# File 'lib/late-sdk/api/connect_api.rb', line 699

def get_telegram_connect_status_with_http_info(profile_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConnectApi.get_telegram_connect_status ...'
  end
  # verify the required parameter 'profile_id' is set
  if @api_client.config.client_side_validation && profile_id.nil?
    fail ArgumentError, "Missing the required parameter 'profile_id' when calling ConnectApi.get_telegram_connect_status"
  end
  # resource path
  local_var_path = '/v1/connect/telegram'

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

  # 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] || 'GetTelegramConnectStatus200Response'

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

  new_options = opts.merge(
    :operation => :"ConnectApi.get_telegram_connect_status",
    :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: ConnectApi#get_telegram_connect_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#handle_o_auth_callback(platform, handle_o_auth_callback_request, opts = {}) ⇒ nil

Complete OAuth callback Exchange the OAuth authorization code for tokens and connect the account to the specified profile.

Parameters:

  • platform (String)
  • handle_o_auth_callback_request (HandleOAuthCallbackRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


754
755
756
757
# File 'lib/late-sdk/api/connect_api.rb', line 754

def handle_o_auth_callback(platform, handle_o_auth_callback_request, opts = {})
  handle_o_auth_callback_with_http_info(platform, handle_o_auth_callback_request, opts)
  nil
end

#handle_o_auth_callback_with_http_info(platform, handle_o_auth_callback_request, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Complete OAuth callback Exchange the OAuth authorization code for tokens and connect the account to the specified profile.

Parameters:

  • platform (String)
  • handle_o_auth_callback_request (HandleOAuthCallbackRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    nil, response status code and response headers



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
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
# File 'lib/late-sdk/api/connect_api.rb', line 765

def handle_o_auth_callback_with_http_info(platform, handle_o_auth_callback_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConnectApi.handle_o_auth_callback ...'
  end
  # verify the required parameter 'platform' is set
  if @api_client.config.client_side_validation && platform.nil?
    fail ArgumentError, "Missing the required parameter 'platform' when calling ConnectApi.handle_o_auth_callback"
  end
  # verify the required parameter 'handle_o_auth_callback_request' is set
  if @api_client.config.client_side_validation && handle_o_auth_callback_request.nil?
    fail ArgumentError, "Missing the required parameter 'handle_o_auth_callback_request' when calling ConnectApi.handle_o_auth_callback"
  end
  # resource path
  local_var_path = '/v1/connect/{platform}'.sub('{' + 'platform' + '}', CGI.escape(platform.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']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

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

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(handle_o_auth_callback_request)

  # return_type
  return_type = opts[:debug_return_type]

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

  new_options = opts.merge(
    :operation => :"ConnectApi.handle_o_auth_callback",
    :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(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConnectApi#handle_o_auth_callback\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#initiate_telegram_connect(initiate_telegram_connect_request, opts = {}) ⇒ InitiateTelegramConnect200Response

Connect Telegram directly Connect a Telegram channel/group directly using the chat ID. Alternative to the access code flow. The bot must already be an admin in the channel/group.

Parameters:

Returns:



827
828
829
830
# File 'lib/late-sdk/api/connect_api.rb', line 827

def initiate_telegram_connect(initiate_telegram_connect_request, opts = {})
  data, _status_code, _headers = initiate_telegram_connect_with_http_info(initiate_telegram_connect_request, opts)
  data
end

#initiate_telegram_connect_with_http_info(initiate_telegram_connect_request, opts = {}) ⇒ Array<(InitiateTelegramConnect200Response, Integer, Hash)>

Connect Telegram directly Connect a Telegram channel/group directly using the chat ID. Alternative to the access code flow. The bot must already be an admin in the channel/group.

Parameters:

Returns:



837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
# File 'lib/late-sdk/api/connect_api.rb', line 837

def initiate_telegram_connect_with_http_info(initiate_telegram_connect_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConnectApi.initiate_telegram_connect ...'
  end
  # verify the required parameter 'initiate_telegram_connect_request' is set
  if @api_client.config.client_side_validation && initiate_telegram_connect_request.nil?
    fail ArgumentError, "Missing the required parameter 'initiate_telegram_connect_request' when calling ConnectApi.initiate_telegram_connect"
  end
  # resource path
  local_var_path = '/v1/connect/telegram'

  # 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']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

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

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(initiate_telegram_connect_request)

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

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

  new_options = opts.merge(
    :operation => :"ConnectApi.initiate_telegram_connect",
    :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(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConnectApi#initiate_telegram_connect\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_facebook_pages(profile_id, temp_token, opts = {}) ⇒ ListFacebookPages200Response

List Facebook pages Returns the list of Facebook Pages the user can manage after OAuth. Extract tempToken and userProfile from the OAuth redirect params and pass them here. Use the X-Connect-Token header if connecting via API key.

Parameters:

  • profile_id (String)

    Profile ID from your connection flow

  • temp_token (String)

    Temporary Facebook access token from the OAuth callback redirect

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

    the optional parameters

Returns:



896
897
898
899
# File 'lib/late-sdk/api/connect_api.rb', line 896

def list_facebook_pages(profile_id, temp_token, opts = {})
  data, _status_code, _headers = list_facebook_pages_with_http_info(profile_id, temp_token, opts)
  data
end

#list_facebook_pages_with_http_info(profile_id, temp_token, opts = {}) ⇒ Array<(ListFacebookPages200Response, Integer, Hash)>

List Facebook pages Returns the list of Facebook Pages the user can manage after OAuth. Extract tempToken and userProfile from the OAuth redirect params and pass them here. Use the X-Connect-Token header if connecting via API key.

Parameters:

  • profile_id (String)

    Profile ID from your connection flow

  • temp_token (String)

    Temporary Facebook access token from the OAuth callback redirect

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

    the optional parameters

Returns:



907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
# File 'lib/late-sdk/api/connect_api.rb', line 907

def list_facebook_pages_with_http_info(profile_id, temp_token, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConnectApi.list_facebook_pages ...'
  end
  # verify the required parameter 'profile_id' is set
  if @api_client.config.client_side_validation && profile_id.nil?
    fail ArgumentError, "Missing the required parameter 'profile_id' when calling ConnectApi.list_facebook_pages"
  end
  # verify the required parameter 'temp_token' is set
  if @api_client.config.client_side_validation && temp_token.nil?
    fail ArgumentError, "Missing the required parameter 'temp_token' when calling ConnectApi.list_facebook_pages"
  end
  # resource path
  local_var_path = '/v1/connect/facebook/select-page'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'profileId'] = profile_id
  query_params[:'tempToken'] = temp_token

  # 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] || 'ListFacebookPages200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['connectToken', 'bearerAuth']

  new_options = opts.merge(
    :operation => :"ConnectApi.list_facebook_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: ConnectApi#list_facebook_pages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_google_business_locations(profile_id, temp_token, opts = {}) ⇒ ListGoogleBusinessLocations200Response

List GBP locations For headless flows. Returns the list of GBP locations the user can manage. Use X-Connect-Token if connecting via API key.

Parameters:

  • profile_id (String)

    Profile ID from your connection flow

  • temp_token (String)

    Temporary Google access token from the OAuth callback redirect

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

    the optional parameters

Returns:



967
968
969
970
# File 'lib/late-sdk/api/connect_api.rb', line 967

def list_google_business_locations(profile_id, temp_token, opts = {})
  data, _status_code, _headers = list_google_business_locations_with_http_info(profile_id, temp_token, opts)
  data
end

#list_google_business_locations_with_http_info(profile_id, temp_token, opts = {}) ⇒ Array<(ListGoogleBusinessLocations200Response, Integer, Hash)>

List GBP locations For headless flows. Returns the list of GBP locations the user can manage. Use X-Connect-Token if connecting via API key.

Parameters:

  • profile_id (String)

    Profile ID from your connection flow

  • temp_token (String)

    Temporary Google access token from the OAuth callback redirect

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

    the optional parameters

Returns:



978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
# File 'lib/late-sdk/api/connect_api.rb', line 978

def list_google_business_locations_with_http_info(profile_id, temp_token, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConnectApi.list_google_business_locations ...'
  end
  # verify the required parameter 'profile_id' is set
  if @api_client.config.client_side_validation && profile_id.nil?
    fail ArgumentError, "Missing the required parameter 'profile_id' when calling ConnectApi.list_google_business_locations"
  end
  # verify the required parameter 'temp_token' is set
  if @api_client.config.client_side_validation && temp_token.nil?
    fail ArgumentError, "Missing the required parameter 'temp_token' when calling ConnectApi.list_google_business_locations"
  end
  # resource path
  local_var_path = '/v1/connect/googlebusiness/locations'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'profileId'] = profile_id
  query_params[:'tempToken'] = temp_token

  # 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] || 'ListGoogleBusinessLocations200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['connectToken', 'bearerAuth']

  new_options = opts.merge(
    :operation => :"ConnectApi.list_google_business_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: ConnectApi#list_google_business_locations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_linked_in_organizations(temp_token, org_ids, opts = {}) ⇒ ListLinkedInOrganizations200Response

List LinkedIn orgs Fetch full LinkedIn organization details (logos, vanity names, websites) for custom UI. No authentication required, just the tempToken from OAuth.

Parameters:

  • temp_token (String)

    The temporary LinkedIn access token from the OAuth redirect

  • org_ids (String)

    Comma-separated list of organization IDs to fetch details for (max 100)

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

    the optional parameters

Returns:



1038
1039
1040
1041
# File 'lib/late-sdk/api/connect_api.rb', line 1038

def list_linked_in_organizations(temp_token, org_ids, opts = {})
  data, _status_code, _headers = list_linked_in_organizations_with_http_info(temp_token, org_ids, opts)
  data
end

#list_linked_in_organizations_with_http_info(temp_token, org_ids, opts = {}) ⇒ Array<(ListLinkedInOrganizations200Response, Integer, Hash)>

List LinkedIn orgs Fetch full LinkedIn organization details (logos, vanity names, websites) for custom UI. No authentication required, just the tempToken from OAuth.

Parameters:

  • temp_token (String)

    The temporary LinkedIn access token from the OAuth redirect

  • org_ids (String)

    Comma-separated list of organization IDs to fetch details for (max 100)

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

    the optional parameters

Returns:



1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
# File 'lib/late-sdk/api/connect_api.rb', line 1049

def list_linked_in_organizations_with_http_info(temp_token, org_ids, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConnectApi.list_linked_in_organizations ...'
  end
  # verify the required parameter 'temp_token' is set
  if @api_client.config.client_side_validation && temp_token.nil?
    fail ArgumentError, "Missing the required parameter 'temp_token' when calling ConnectApi.list_linked_in_organizations"
  end
  # verify the required parameter 'org_ids' is set
  if @api_client.config.client_side_validation && org_ids.nil?
    fail ArgumentError, "Missing the required parameter 'org_ids' when calling ConnectApi.list_linked_in_organizations"
  end
  # resource path
  local_var_path = '/v1/connect/linkedin/organizations'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'tempToken'] = temp_token
  query_params[:'orgIds'] = org_ids

  # 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] || 'ListLinkedInOrganizations200Response'

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

  new_options = opts.merge(
    :operation => :"ConnectApi.list_linked_in_organizations",
    :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: ConnectApi#list_linked_in_organizations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_pinterest_boards_for_selection(x_connect_token, profile_id, temp_token, opts = {}) ⇒ ListPinterestBoardsForSelection200Response

List Pinterest boards For headless flows. Returns Pinterest boards the user can post to. Use X-Connect-Token from the redirect URL.

Parameters:

  • x_connect_token (String)

    Short-lived connect token from the OAuth redirect

  • profile_id (String)

    Your Late profile ID

  • temp_token (String)

    Temporary Pinterest access token from the OAuth callback redirect

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

    the optional parameters

Returns:



1110
1111
1112
1113
# File 'lib/late-sdk/api/connect_api.rb', line 1110

def list_pinterest_boards_for_selection(x_connect_token, profile_id, temp_token, opts = {})
  data, _status_code, _headers = list_pinterest_boards_for_selection_with_http_info(x_connect_token, profile_id, temp_token, opts)
  data
end

#list_pinterest_boards_for_selection_with_http_info(x_connect_token, profile_id, temp_token, opts = {}) ⇒ Array<(ListPinterestBoardsForSelection200Response, Integer, Hash)>

List Pinterest boards For headless flows. Returns Pinterest boards the user can post to. Use X-Connect-Token from the redirect URL.

Parameters:

  • x_connect_token (String)

    Short-lived connect token from the OAuth redirect

  • profile_id (String)

    Your Late profile ID

  • temp_token (String)

    Temporary Pinterest access token from the OAuth callback redirect

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

    the optional parameters

Returns:



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
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
# File 'lib/late-sdk/api/connect_api.rb', line 1122

def list_pinterest_boards_for_selection_with_http_info(x_connect_token, profile_id, temp_token, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConnectApi.list_pinterest_boards_for_selection ...'
  end
  # verify the required parameter 'x_connect_token' is set
  if @api_client.config.client_side_validation && x_connect_token.nil?
    fail ArgumentError, "Missing the required parameter 'x_connect_token' when calling ConnectApi.list_pinterest_boards_for_selection"
  end
  # verify the required parameter 'profile_id' is set
  if @api_client.config.client_side_validation && profile_id.nil?
    fail ArgumentError, "Missing the required parameter 'profile_id' when calling ConnectApi.list_pinterest_boards_for_selection"
  end
  # verify the required parameter 'temp_token' is set
  if @api_client.config.client_side_validation && temp_token.nil?
    fail ArgumentError, "Missing the required parameter 'temp_token' when calling ConnectApi.list_pinterest_boards_for_selection"
  end
  # resource path
  local_var_path = '/v1/connect/pinterest/select-board'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'profileId'] = profile_id
  query_params[:'tempToken'] = temp_token

  # 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']
  header_params[:'X-Connect-Token'] = x_connect_token

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

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

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

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

  new_options = opts.merge(
    :operation => :"ConnectApi.list_pinterest_boards_for_selection",
    :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: ConnectApi#list_pinterest_boards_for_selection\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_snapchat_profiles(x_connect_token, profile_id, temp_token, opts = {}) ⇒ ListSnapchatProfiles200Response

List Snapchat profiles For headless flows. Returns Snapchat Public Profiles the user can post to. Use X-Connect-Token from the redirect URL.

Parameters:

  • x_connect_token (String)

    Short-lived connect token from the OAuth redirect

  • profile_id (String)

    Your Late profile ID

  • temp_token (String)

    Temporary Snapchat access token from the OAuth callback redirect

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

    the optional parameters

Returns:



1188
1189
1190
1191
# File 'lib/late-sdk/api/connect_api.rb', line 1188

def list_snapchat_profiles(x_connect_token, profile_id, temp_token, opts = {})
  data, _status_code, _headers = list_snapchat_profiles_with_http_info(x_connect_token, profile_id, temp_token, opts)
  data
end

#list_snapchat_profiles_with_http_info(x_connect_token, profile_id, temp_token, opts = {}) ⇒ Array<(ListSnapchatProfiles200Response, Integer, Hash)>

List Snapchat profiles For headless flows. Returns Snapchat Public Profiles the user can post to. Use X-Connect-Token from the redirect URL.

Parameters:

  • x_connect_token (String)

    Short-lived connect token from the OAuth redirect

  • profile_id (String)

    Your Late profile ID

  • temp_token (String)

    Temporary Snapchat access token from the OAuth callback redirect

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

    the optional parameters

Returns:



1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
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
# File 'lib/late-sdk/api/connect_api.rb', line 1200

def list_snapchat_profiles_with_http_info(x_connect_token, profile_id, temp_token, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConnectApi.list_snapchat_profiles ...'
  end
  # verify the required parameter 'x_connect_token' is set
  if @api_client.config.client_side_validation && x_connect_token.nil?
    fail ArgumentError, "Missing the required parameter 'x_connect_token' when calling ConnectApi.list_snapchat_profiles"
  end
  # verify the required parameter 'profile_id' is set
  if @api_client.config.client_side_validation && profile_id.nil?
    fail ArgumentError, "Missing the required parameter 'profile_id' when calling ConnectApi.list_snapchat_profiles"
  end
  # verify the required parameter 'temp_token' is set
  if @api_client.config.client_side_validation && temp_token.nil?
    fail ArgumentError, "Missing the required parameter 'temp_token' when calling ConnectApi.list_snapchat_profiles"
  end
  # resource path
  local_var_path = '/v1/connect/snapchat/select-profile'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'profileId'] = profile_id
  query_params[:'tempToken'] = temp_token

  # 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']
  header_params[:'X-Connect-Token'] = x_connect_token

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

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

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

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

  new_options = opts.merge(
    :operation => :"ConnectApi.list_snapchat_profiles",
    :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: ConnectApi#list_snapchat_profiles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#select_facebook_page(select_facebook_page_request, opts = {}) ⇒ SelectFacebookPage200Response

Select Facebook page Complete the headless flow by saving the user’s selected Facebook page. Pass the userProfile from the OAuth redirect and use X-Connect-Token if connecting via API key.

Parameters:

Returns:



1264
1265
1266
1267
# File 'lib/late-sdk/api/connect_api.rb', line 1264

def select_facebook_page(select_facebook_page_request, opts = {})
  data, _status_code, _headers = select_facebook_page_with_http_info(select_facebook_page_request, opts)
  data
end

#select_facebook_page_with_http_info(select_facebook_page_request, opts = {}) ⇒ Array<(SelectFacebookPage200Response, Integer, Hash)>

Select Facebook page Complete the headless flow by saving the user&#39;s selected Facebook page. Pass the userProfile from the OAuth redirect and use X-Connect-Token if connecting via API key.

Parameters:

Returns:



1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
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
# File 'lib/late-sdk/api/connect_api.rb', line 1274

def select_facebook_page_with_http_info(select_facebook_page_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConnectApi.select_facebook_page ...'
  end
  # verify the required parameter 'select_facebook_page_request' is set
  if @api_client.config.client_side_validation && select_facebook_page_request.nil?
    fail ArgumentError, "Missing the required parameter 'select_facebook_page_request' when calling ConnectApi.select_facebook_page"
  end
  # resource path
  local_var_path = '/v1/connect/facebook/select-page'

  # 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']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

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

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(select_facebook_page_request)

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

  # auth_names
  auth_names = opts[:debug_auth_names] || ['connectToken', 'bearerAuth']

  new_options = opts.merge(
    :operation => :"ConnectApi.select_facebook_page",
    :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(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConnectApi#select_facebook_page\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#select_google_business_location(select_google_business_location_request, opts = {}) ⇒ SelectGoogleBusinessLocation200Response

Select GBP location Complete the headless flow by saving the user’s selected GBP location. Include userProfile from the OAuth redirect (contains refresh token). Use X-Connect-Token if connecting via API key.

Parameters:

Returns:



1332
1333
1334
1335
# File 'lib/late-sdk/api/connect_api.rb', line 1332

def select_google_business_location(select_google_business_location_request, opts = {})
  data, _status_code, _headers = select_google_business_location_with_http_info(select_google_business_location_request, opts)
  data
end

#select_google_business_location_with_http_info(select_google_business_location_request, opts = {}) ⇒ Array<(SelectGoogleBusinessLocation200Response, Integer, Hash)>

Select GBP location Complete the headless flow by saving the user&#39;s selected GBP location. Include userProfile from the OAuth redirect (contains refresh token). Use X-Connect-Token if connecting via API key.

Parameters:

Returns:



1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
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
# File 'lib/late-sdk/api/connect_api.rb', line 1342

def select_google_business_location_with_http_info(select_google_business_location_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConnectApi.select_google_business_location ...'
  end
  # verify the required parameter 'select_google_business_location_request' is set
  if @api_client.config.client_side_validation && select_google_business_location_request.nil?
    fail ArgumentError, "Missing the required parameter 'select_google_business_location_request' when calling ConnectApi.select_google_business_location"
  end
  # resource path
  local_var_path = '/v1/connect/googlebusiness/select-location'

  # 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']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

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

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(select_google_business_location_request)

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

  # auth_names
  auth_names = opts[:debug_auth_names] || ['connectToken', 'bearerAuth']

  new_options = opts.merge(
    :operation => :"ConnectApi.select_google_business_location",
    :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(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConnectApi#select_google_business_location\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#select_linked_in_organization(select_linked_in_organization_request, opts = {}) ⇒ SelectLinkedInOrganization200Response

Select LinkedIn org Complete the LinkedIn connection flow. Set accountType to "personal" or "organization" to connect as a company page. Use X-Connect-Token if connecting via API key.

Parameters:

Returns:



1400
1401
1402
1403
# File 'lib/late-sdk/api/connect_api.rb', line 1400

def select_linked_in_organization(select_linked_in_organization_request, opts = {})
  data, _status_code, _headers = select_linked_in_organization_with_http_info(select_linked_in_organization_request, opts)
  data
end

#select_linked_in_organization_with_http_info(select_linked_in_organization_request, opts = {}) ⇒ Array<(SelectLinkedInOrganization200Response, Integer, Hash)>

Select LinkedIn org Complete the LinkedIn connection flow. Set accountType to &quot;personal&quot; or &quot;organization&quot; to connect as a company page. Use X-Connect-Token if connecting via API key.

Parameters:

Returns:



1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
# File 'lib/late-sdk/api/connect_api.rb', line 1410

def select_linked_in_organization_with_http_info(select_linked_in_organization_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConnectApi.select_linked_in_organization ...'
  end
  # verify the required parameter 'select_linked_in_organization_request' is set
  if @api_client.config.client_side_validation && select_linked_in_organization_request.nil?
    fail ArgumentError, "Missing the required parameter 'select_linked_in_organization_request' when calling ConnectApi.select_linked_in_organization"
  end
  # resource path
  local_var_path = '/v1/connect/linkedin/select-organization'

  # 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']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

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

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(select_linked_in_organization_request)

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

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

  new_options = opts.merge(
    :operation => :"ConnectApi.select_linked_in_organization",
    :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(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConnectApi#select_linked_in_organization\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#select_pinterest_board(select_pinterest_board_request, opts = {}) ⇒ SelectPinterestBoard200Response

Select Pinterest board Complete the Pinterest connection flow. After OAuth, use this endpoint to save the selected board and complete the account connection. Use the X-Connect-Token header if you initiated the connection via API key.

Parameters:

Returns:



1468
1469
1470
1471
# File 'lib/late-sdk/api/connect_api.rb', line 1468

def select_pinterest_board(select_pinterest_board_request, opts = {})
  data, _status_code, _headers = select_pinterest_board_with_http_info(select_pinterest_board_request, opts)
  data
end

#select_pinterest_board_with_http_info(select_pinterest_board_request, opts = {}) ⇒ Array<(SelectPinterestBoard200Response, Integer, Hash)>

Select Pinterest board Complete the Pinterest connection flow. After OAuth, use this endpoint to save the selected board and complete the account connection. Use the X-Connect-Token header if you initiated the connection via API key.

Parameters:

Returns:



1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
# File 'lib/late-sdk/api/connect_api.rb', line 1478

def select_pinterest_board_with_http_info(select_pinterest_board_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConnectApi.select_pinterest_board ...'
  end
  # verify the required parameter 'select_pinterest_board_request' is set
  if @api_client.config.client_side_validation && select_pinterest_board_request.nil?
    fail ArgumentError, "Missing the required parameter 'select_pinterest_board_request' when calling ConnectApi.select_pinterest_board"
  end
  # resource path
  local_var_path = '/v1/connect/pinterest/select-board'

  # 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']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

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

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(select_pinterest_board_request)

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

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

  new_options = opts.merge(
    :operation => :"ConnectApi.select_pinterest_board",
    :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(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConnectApi#select_pinterest_board\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#select_snapchat_profile(select_snapchat_profile_request, opts = {}) ⇒ SelectSnapchatProfile200Response

Select Snapchat profile Complete the Snapchat connection flow by saving the selected Public Profile. Snapchat requires a Public Profile to publish content. Use X-Connect-Token if connecting via API key.

Parameters:

Options Hash (opts):

  • :x_connect_token (String)

    Short-lived connect token from the OAuth redirect (for API users)

Returns:



1537
1538
1539
1540
# File 'lib/late-sdk/api/connect_api.rb', line 1537

def select_snapchat_profile(select_snapchat_profile_request, opts = {})
  data, _status_code, _headers = select_snapchat_profile_with_http_info(select_snapchat_profile_request, opts)
  data
end

#select_snapchat_profile_with_http_info(select_snapchat_profile_request, opts = {}) ⇒ Array<(SelectSnapchatProfile200Response, Integer, Hash)>

Select Snapchat profile Complete the Snapchat connection flow by saving the selected Public Profile. Snapchat requires a Public Profile to publish content. Use X-Connect-Token if connecting via API key.

Parameters:

Options Hash (opts):

  • :x_connect_token (String)

    Short-lived connect token from the OAuth redirect (for API users)

Returns:



1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
# File 'lib/late-sdk/api/connect_api.rb', line 1548

def select_snapchat_profile_with_http_info(select_snapchat_profile_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConnectApi.select_snapchat_profile ...'
  end
  # verify the required parameter 'select_snapchat_profile_request' is set
  if @api_client.config.client_side_validation && select_snapchat_profile_request.nil?
    fail ArgumentError, "Missing the required parameter 'select_snapchat_profile_request' when calling ConnectApi.select_snapchat_profile"
  end
  # resource path
  local_var_path = '/v1/connect/snapchat/select-profile'

  # 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']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end
  header_params[:'X-Connect-Token'] = opts[:'x_connect_token'] if !opts[:'x_connect_token'].nil?

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

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(select_snapchat_profile_request)

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

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

  new_options = opts.merge(
    :operation => :"ConnectApi.select_snapchat_profile",
    :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(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConnectApi#select_snapchat_profile\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_facebook_page(account_id, update_facebook_page_request, opts = {}) ⇒ UpdateFacebookPage200Response

Update Facebook page Switch which Facebook Page is active for a connected account.

Parameters:

  • account_id (String)
  • update_facebook_page_request (UpdateFacebookPageRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1608
1609
1610
1611
# File 'lib/late-sdk/api/connect_api.rb', line 1608

def update_facebook_page(, update_facebook_page_request, opts = {})
  data, _status_code, _headers = update_facebook_page_with_http_info(, update_facebook_page_request, opts)
  data
end

#update_facebook_page_with_http_info(account_id, update_facebook_page_request, opts = {}) ⇒ Array<(UpdateFacebookPage200Response, Integer, Hash)>

Update Facebook page Switch which Facebook Page is active for a connected account.

Parameters:

  • account_id (String)
  • update_facebook_page_request (UpdateFacebookPageRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
# File 'lib/late-sdk/api/connect_api.rb', line 1619

def update_facebook_page_with_http_info(, update_facebook_page_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConnectApi.update_facebook_page ...'
  end
  # verify the required parameter 'account_id' is set
  if @api_client.config.client_side_validation && .nil?
    fail ArgumentError, "Missing the required parameter 'account_id' when calling ConnectApi.update_facebook_page"
  end
  # verify the required parameter 'update_facebook_page_request' is set
  if @api_client.config.client_side_validation && update_facebook_page_request.nil?
    fail ArgumentError, "Missing the required parameter 'update_facebook_page_request' when calling ConnectApi.update_facebook_page"
  end
  # resource path
  local_var_path = '/v1/accounts/{accountId}/facebook-page'.sub('{' + 'accountId' + '}', CGI.escape(.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']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

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

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(update_facebook_page_request)

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

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

  new_options = opts.merge(
    :operation => :"ConnectApi.update_facebook_page",
    :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(:PUT, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConnectApi#update_facebook_page\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_gmb_location(account_id, update_gmb_location_request, opts = {}) ⇒ UpdateGmbLocation200Response

Update GBP location Switch which GBP location is active for a connected account.

Parameters:

  • account_id (String)
  • update_gmb_location_request (UpdateGmbLocationRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1682
1683
1684
1685
# File 'lib/late-sdk/api/connect_api.rb', line 1682

def update_gmb_location(, update_gmb_location_request, opts = {})
  data, _status_code, _headers = update_gmb_location_with_http_info(, update_gmb_location_request, opts)
  data
end

#update_gmb_location_with_http_info(account_id, update_gmb_location_request, opts = {}) ⇒ Array<(UpdateGmbLocation200Response, Integer, Hash)>

Update GBP location Switch which GBP location is active for a connected account.

Parameters:

  • account_id (String)
  • update_gmb_location_request (UpdateGmbLocationRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
# File 'lib/late-sdk/api/connect_api.rb', line 1693

def update_gmb_location_with_http_info(, update_gmb_location_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConnectApi.update_gmb_location ...'
  end
  # verify the required parameter 'account_id' is set
  if @api_client.config.client_side_validation && .nil?
    fail ArgumentError, "Missing the required parameter 'account_id' when calling ConnectApi.update_gmb_location"
  end
  # verify the required parameter 'update_gmb_location_request' is set
  if @api_client.config.client_side_validation && update_gmb_location_request.nil?
    fail ArgumentError, "Missing the required parameter 'update_gmb_location_request' when calling ConnectApi.update_gmb_location"
  end
  # resource path
  local_var_path = '/v1/accounts/{accountId}/gmb-locations'.sub('{' + 'accountId' + '}', CGI.escape(.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']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

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

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(update_gmb_location_request)

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

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

  new_options = opts.merge(
    :operation => :"ConnectApi.update_gmb_location",
    :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(:PUT, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConnectApi#update_gmb_location\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_linked_in_organization(account_id, update_linked_in_organization_request, opts = {}) ⇒ ConnectBlueskyCredentials200Response

Switch LinkedIn account type Switch a LinkedIn account between personal profile and organization (company page) posting.

Parameters:

Returns:



1756
1757
1758
1759
# File 'lib/late-sdk/api/connect_api.rb', line 1756

def update_linked_in_organization(, update_linked_in_organization_request, opts = {})
  data, _status_code, _headers = update_linked_in_organization_with_http_info(, update_linked_in_organization_request, opts)
  data
end

#update_linked_in_organization_with_http_info(account_id, update_linked_in_organization_request, opts = {}) ⇒ Array<(ConnectBlueskyCredentials200Response, Integer, Hash)>

Switch LinkedIn account type Switch a LinkedIn account between personal profile and organization (company page) posting.

Parameters:

Returns:



1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
# File 'lib/late-sdk/api/connect_api.rb', line 1767

def update_linked_in_organization_with_http_info(, update_linked_in_organization_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConnectApi.update_linked_in_organization ...'
  end
  # verify the required parameter 'account_id' is set
  if @api_client.config.client_side_validation && .nil?
    fail ArgumentError, "Missing the required parameter 'account_id' when calling ConnectApi.update_linked_in_organization"
  end
  # verify the required parameter 'update_linked_in_organization_request' is set
  if @api_client.config.client_side_validation && update_linked_in_organization_request.nil?
    fail ArgumentError, "Missing the required parameter 'update_linked_in_organization_request' when calling ConnectApi.update_linked_in_organization"
  end
  # resource path
  local_var_path = '/v1/accounts/{accountId}/linkedin-organization'.sub('{' + 'accountId' + '}', CGI.escape(.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']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

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

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(update_linked_in_organization_request)

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

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

  new_options = opts.merge(
    :operation => :"ConnectApi.update_linked_in_organization",
    :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(:PUT, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConnectApi#update_linked_in_organization\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_pinterest_boards(account_id, update_pinterest_boards_request, opts = {}) ⇒ ConnectBlueskyCredentials200Response

Set default Pinterest board Sets the default board used when publishing pins for this account.

Parameters:

  • account_id (String)
  • update_pinterest_boards_request (UpdatePinterestBoardsRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1830
1831
1832
1833
# File 'lib/late-sdk/api/connect_api.rb', line 1830

def update_pinterest_boards(, update_pinterest_boards_request, opts = {})
  data, _status_code, _headers = update_pinterest_boards_with_http_info(, update_pinterest_boards_request, opts)
  data
end

#update_pinterest_boards_with_http_info(account_id, update_pinterest_boards_request, opts = {}) ⇒ Array<(ConnectBlueskyCredentials200Response, Integer, Hash)>

Set default Pinterest board Sets the default board used when publishing pins for this account.

Parameters:

  • account_id (String)
  • update_pinterest_boards_request (UpdatePinterestBoardsRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
# File 'lib/late-sdk/api/connect_api.rb', line 1841

def update_pinterest_boards_with_http_info(, update_pinterest_boards_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConnectApi.update_pinterest_boards ...'
  end
  # verify the required parameter 'account_id' is set
  if @api_client.config.client_side_validation && .nil?
    fail ArgumentError, "Missing the required parameter 'account_id' when calling ConnectApi.update_pinterest_boards"
  end
  # verify the required parameter 'update_pinterest_boards_request' is set
  if @api_client.config.client_side_validation && update_pinterest_boards_request.nil?
    fail ArgumentError, "Missing the required parameter 'update_pinterest_boards_request' when calling ConnectApi.update_pinterest_boards"
  end
  # resource path
  local_var_path = '/v1/accounts/{accountId}/pinterest-boards'.sub('{' + 'accountId' + '}', CGI.escape(.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']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

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

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(update_pinterest_boards_request)

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

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

  new_options = opts.merge(
    :operation => :"ConnectApi.update_pinterest_boards",
    :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(:PUT, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConnectApi#update_pinterest_boards\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_reddit_subreddits(account_id, update_reddit_subreddits_request, opts = {}) ⇒ UpdateRedditSubreddits200Response

Set default subreddit Sets the default subreddit used when publishing posts for this Reddit account.

Parameters:

Returns:



1904
1905
1906
1907
# File 'lib/late-sdk/api/connect_api.rb', line 1904

def update_reddit_subreddits(, update_reddit_subreddits_request, opts = {})
  data, _status_code, _headers = update_reddit_subreddits_with_http_info(, update_reddit_subreddits_request, opts)
  data
end

#update_reddit_subreddits_with_http_info(account_id, update_reddit_subreddits_request, opts = {}) ⇒ Array<(UpdateRedditSubreddits200Response, Integer, Hash)>

Set default subreddit Sets the default subreddit used when publishing posts for this Reddit account.

Parameters:

Returns:



1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
# File 'lib/late-sdk/api/connect_api.rb', line 1915

def update_reddit_subreddits_with_http_info(, update_reddit_subreddits_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConnectApi.update_reddit_subreddits ...'
  end
  # verify the required parameter 'account_id' is set
  if @api_client.config.client_side_validation && .nil?
    fail ArgumentError, "Missing the required parameter 'account_id' when calling ConnectApi.update_reddit_subreddits"
  end
  # verify the required parameter 'update_reddit_subreddits_request' is set
  if @api_client.config.client_side_validation && update_reddit_subreddits_request.nil?
    fail ArgumentError, "Missing the required parameter 'update_reddit_subreddits_request' when calling ConnectApi.update_reddit_subreddits"
  end
  # resource path
  local_var_path = '/v1/accounts/{accountId}/reddit-subreddits'.sub('{' + 'accountId' + '}', CGI.escape(.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']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

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

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(update_reddit_subreddits_request)

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

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

  new_options = opts.merge(
    :operation => :"ConnectApi.update_reddit_subreddits",
    :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(:PUT, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConnectApi#update_reddit_subreddits\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end