late-sdk 0.0.697 → 0.0.698

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +8 -0
  3. data/docs/ConnectApi.md +155 -1
  4. data/docs/ListInstagramPages200Response.md +18 -0
  5. data/docs/ListInstagramPages200ResponsePagesInner.md +24 -0
  6. data/docs/ListInstagramPages200ResponsePagesInnerInstagramBusinessAccount.md +22 -0
  7. data/docs/SelectInstagramAccount200Response.md +22 -0
  8. data/docs/SelectInstagramAccount200ResponseAccount.md +30 -0
  9. data/docs/SelectInstagramAccountRequest.md +24 -0
  10. data/lib/zernio-sdk/api/connect_api.rb +146 -0
  11. data/lib/zernio-sdk/models/list_instagram_pages200_response.rb +149 -0
  12. data/lib/zernio-sdk/models/list_instagram_pages200_response_pages_inner.rb +177 -0
  13. data/lib/zernio-sdk/models/list_instagram_pages200_response_pages_inner_instagram_business_account.rb +167 -0
  14. data/lib/zernio-sdk/models/select_instagram_account200_response.rb +166 -0
  15. data/lib/zernio-sdk/models/select_instagram_account200_response_account.rb +249 -0
  16. data/lib/zernio-sdk/models/select_instagram_account_request.rb +229 -0
  17. data/lib/zernio-sdk/version.rb +1 -1
  18. data/lib/zernio-sdk.rb +6 -0
  19. data/openapi.yaml +147 -0
  20. data/spec/api/connect_api_spec.rb +26 -0
  21. data/spec/models/list_instagram_pages200_response_pages_inner_instagram_business_account_spec.rb +48 -0
  22. data/spec/models/list_instagram_pages200_response_pages_inner_spec.rb +54 -0
  23. data/spec/models/list_instagram_pages200_response_spec.rb +36 -0
  24. data/spec/models/select_instagram_account200_response_account_spec.rb +80 -0
  25. data/spec/models/select_instagram_account200_response_spec.rb +48 -0
  26. data/spec/models/select_instagram_account_request_spec.rb +54 -0
  27. data/zernio-sdk-0.0.698.gem +0 -0
  28. metadata +27 -3
  29. data/zernio-sdk-0.0.697.gem +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b9fb7862bf09ea4b3a1750659a8875dc2ae8baff5859afcff3a9a6dd3d0f65d3
4
- data.tar.gz: d6c5bcd0de1ac34353c3d25e7e0f07ef956e782cdd4d378879ae1863e99725c2
3
+ metadata.gz: ab84531fd1bcf2c9b2c57932282d430e1870bca9ff602b37dd31191e0c9b8d07
4
+ data.tar.gz: f28ca982652b8bd26449c6f8c6f32e4e20b66d4742776beaf0b25e53db9c086d
5
5
  SHA512:
6
- metadata.gz: b2fdfcd4da7b34eb660a467910a951a119da56182efea8f8338d2504e30793ba810a4715045740b3d6f91c8ce69cd25da795307156f34af8ac0398b15c6c49f7
7
- data.tar.gz: e9b01a21a98bc508fb69d093e13303094f0369c503bf3309ee8b7707fab98d9d40207029f15c9f8ea6122b57955dccfbcac3546f7489387cd492934815d8b349
6
+ metadata.gz: eee1029d98cd9e980c336058b0504d9cf5388ba8a5e2909ba3e248f79e09ccadbb4e3984accedf8ed41afa4e6b7d70e6efbd00d6d413176d8adcc880b43a1502
7
+ data.tar.gz: 44835e5adc53ac3be0b266eeb71a52ac5bbc4a8e24110b142483842d45b759a8903e6aab22caedf71210f1666c29acccfad1175f74088f64bad737aa483fae31
data/README.md CHANGED
@@ -241,12 +241,14 @@ Class | Method | HTTP request | Description
241
241
  *Zernio::ConnectApi* | [**initiate_telegram_connect**](docs/ConnectApi.md#initiate_telegram_connect) | **POST** /v1/connect/telegram | Connect Telegram directly
242
242
  *Zernio::ConnectApi* | [**list_facebook_pages**](docs/ConnectApi.md#list_facebook_pages) | **GET** /v1/connect/facebook/select-page | List Facebook pages
243
243
  *Zernio::ConnectApi* | [**list_google_business_locations**](docs/ConnectApi.md#list_google_business_locations) | **GET** /v1/connect/googlebusiness/locations | List GBP locations
244
+ *Zernio::ConnectApi* | [**list_instagram_pages**](docs/ConnectApi.md#list_instagram_pages) | **GET** /v1/connect/instagram/select-account | List Pages with a linked Instagram account
244
245
  *Zernio::ConnectApi* | [**list_linked_in_organizations**](docs/ConnectApi.md#list_linked_in_organizations) | **GET** /v1/connect/linkedin/organizations | List LinkedIn orgs
245
246
  *Zernio::ConnectApi* | [**list_pinterest_boards_for_selection**](docs/ConnectApi.md#list_pinterest_boards_for_selection) | **GET** /v1/connect/pinterest/select-board | List Pinterest boards
246
247
  *Zernio::ConnectApi* | [**list_snapchat_profiles**](docs/ConnectApi.md#list_snapchat_profiles) | **GET** /v1/connect/snapchat/select-profile | List Snapchat profiles
247
248
  *Zernio::ConnectApi* | [**list_whats_app_phone_numbers**](docs/ConnectApi.md#list_whats_app_phone_numbers) | **GET** /v1/connect/whatsapp/select-phone-number | List numbers for selection
248
249
  *Zernio::ConnectApi* | [**select_facebook_page**](docs/ConnectApi.md#select_facebook_page) | **POST** /v1/connect/facebook/select-page | Select Facebook page
249
250
  *Zernio::ConnectApi* | [**select_google_business_location**](docs/ConnectApi.md#select_google_business_location) | **POST** /v1/connect/googlebusiness/select-location | Select GBP location
251
+ *Zernio::ConnectApi* | [**select_instagram_account**](docs/ConnectApi.md#select_instagram_account) | **POST** /v1/connect/instagram/select-account | Select the Page whose Instagram account to connect
250
252
  *Zernio::ConnectApi* | [**select_linked_in_organization**](docs/ConnectApi.md#select_linked_in_organization) | **POST** /v1/connect/linkedin/select-organization | Select LinkedIn org
251
253
  *Zernio::ConnectApi* | [**select_pinterest_board**](docs/ConnectApi.md#select_pinterest_board) | **POST** /v1/connect/pinterest/select-board | Select Pinterest board
252
254
  *Zernio::ConnectApi* | [**select_snapchat_profile**](docs/ConnectApi.md#select_snapchat_profile) | **POST** /v1/connect/snapchat/select-profile | Select Snapchat profile
@@ -1498,6 +1500,9 @@ Class | Method | HTTP request | Description
1498
1500
  - [Zernio::ListInboxReviews200ResponseDataInnerReply](docs/ListInboxReviews200ResponseDataInnerReply.md)
1499
1501
  - [Zernio::ListInboxReviews200ResponseDataInnerReviewer](docs/ListInboxReviews200ResponseDataInnerReviewer.md)
1500
1502
  - [Zernio::ListInboxReviews200ResponseSummary](docs/ListInboxReviews200ResponseSummary.md)
1503
+ - [Zernio::ListInstagramPages200Response](docs/ListInstagramPages200Response.md)
1504
+ - [Zernio::ListInstagramPages200ResponsePagesInner](docs/ListInstagramPages200ResponsePagesInner.md)
1505
+ - [Zernio::ListInstagramPages200ResponsePagesInnerInstagramBusinessAccount](docs/ListInstagramPages200ResponsePagesInnerInstagramBusinessAccount.md)
1501
1506
  - [Zernio::ListInstagramStories200Response](docs/ListInstagramStories200Response.md)
1502
1507
  - [Zernio::ListInstagramStories200ResponseDataInner](docs/ListInstagramStories200ResponseDataInner.md)
1503
1508
  - [Zernio::ListLeadForms200Response](docs/ListLeadForms200Response.md)
@@ -1743,6 +1748,9 @@ Class | Method | HTTP request | Description
1743
1748
  - [Zernio::SelectGoogleBusinessLocation200Response](docs/SelectGoogleBusinessLocation200Response.md)
1744
1749
  - [Zernio::SelectGoogleBusinessLocation200ResponseAccount](docs/SelectGoogleBusinessLocation200ResponseAccount.md)
1745
1750
  - [Zernio::SelectGoogleBusinessLocationRequest](docs/SelectGoogleBusinessLocationRequest.md)
1751
+ - [Zernio::SelectInstagramAccount200Response](docs/SelectInstagramAccount200Response.md)
1752
+ - [Zernio::SelectInstagramAccount200ResponseAccount](docs/SelectInstagramAccount200ResponseAccount.md)
1753
+ - [Zernio::SelectInstagramAccountRequest](docs/SelectInstagramAccountRequest.md)
1746
1754
  - [Zernio::SelectLinkedInOrganization200Response](docs/SelectLinkedInOrganization200Response.md)
1747
1755
  - [Zernio::SelectLinkedInOrganization200ResponseAccount](docs/SelectLinkedInOrganization200ResponseAccount.md)
1748
1756
  - [Zernio::SelectLinkedInOrganization200ResponseBulkRefresh](docs/SelectLinkedInOrganization200ResponseBulkRefresh.md)
data/docs/ConnectApi.md CHANGED
@@ -28,12 +28,14 @@ All URIs are relative to *https://zernio.com/api*
28
28
  | [**initiate_telegram_connect**](ConnectApi.md#initiate_telegram_connect) | **POST** /v1/connect/telegram | Connect Telegram directly |
29
29
  | [**list_facebook_pages**](ConnectApi.md#list_facebook_pages) | **GET** /v1/connect/facebook/select-page | List Facebook pages |
30
30
  | [**list_google_business_locations**](ConnectApi.md#list_google_business_locations) | **GET** /v1/connect/googlebusiness/locations | List GBP locations |
31
+ | [**list_instagram_pages**](ConnectApi.md#list_instagram_pages) | **GET** /v1/connect/instagram/select-account | List Pages with a linked Instagram account |
31
32
  | [**list_linked_in_organizations**](ConnectApi.md#list_linked_in_organizations) | **GET** /v1/connect/linkedin/organizations | List LinkedIn orgs |
32
33
  | [**list_pinterest_boards_for_selection**](ConnectApi.md#list_pinterest_boards_for_selection) | **GET** /v1/connect/pinterest/select-board | List Pinterest boards |
33
34
  | [**list_snapchat_profiles**](ConnectApi.md#list_snapchat_profiles) | **GET** /v1/connect/snapchat/select-profile | List Snapchat profiles |
34
35
  | [**list_whats_app_phone_numbers**](ConnectApi.md#list_whats_app_phone_numbers) | **GET** /v1/connect/whatsapp/select-phone-number | List numbers for selection |
35
36
  | [**select_facebook_page**](ConnectApi.md#select_facebook_page) | **POST** /v1/connect/facebook/select-page | Select Facebook page |
36
37
  | [**select_google_business_location**](ConnectApi.md#select_google_business_location) | **POST** /v1/connect/googlebusiness/select-location | Select GBP location |
38
+ | [**select_instagram_account**](ConnectApi.md#select_instagram_account) | **POST** /v1/connect/instagram/select-account | Select the Page whose Instagram account to connect |
37
39
  | [**select_linked_in_organization**](ConnectApi.md#select_linked_in_organization) | **POST** /v1/connect/linkedin/select-organization | Select LinkedIn org |
38
40
  | [**select_pinterest_board**](ConnectApi.md#select_pinterest_board) | **POST** /v1/connect/pinterest/select-board | Select Pinterest board |
39
41
  | [**select_snapchat_profile**](ConnectApi.md#select_snapchat_profile) | **POST** /v1/connect/snapchat/select-profile | Select Snapchat profile |
@@ -716,7 +718,8 @@ platform = 'facebook' # String | Social media platform to connect
716
718
  profile_id = 'profile_id_example' # String | Your Zernio profile ID (get from /v1/profiles). For WhatsApp, a Zernio-provisioned number can only be connected on the profile it was provisioned to; connecting from any other profile is rejected with a 409.
717
719
  opts = {
718
720
  redirect_url: 'redirect_url_example', # String | Your custom redirect URL after connection completes. Accepts an http(s) URL, a custom app scheme for mobile deeplinks (e.g. myapp://callback), or a relative path. Result params are appended with the URL API, so an existing query string is preserved. Standard mode appends connected={platform}&profileId=X&accountId=Y&username=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.
719
- headless: true # Boolean | When true, the user is redirected to your redirect_url with raw OAuth data (code, state) instead of Zernio's default account selection UI. Use this to build a custom connect experience.
721
+ headless: true, # Boolean | When true, the user is redirected to your redirect_url with raw OAuth data (code, state) instead of Zernio's default account selection UI. Use this to build a custom connect experience.
722
+ login_method: 'instagram_login' # String | Instagram only. Which of the two Instagram connection methods to use. Ignored for every other platform. `instagram_login` (the default, and what you get if you omit this): the Instagram Login dialog. The user authorizes their Instagram professional account directly, no Facebook Page required. `facebook_login`: the Facebook Login dialog, i.e. \"Instagram API with Facebook Login\". The user authorizes a Facebook Page that has a linked Instagram professional account, and every API call for that account then runs through the Page. Use this when the customer manages Instagram through a Page and expects the Facebook consent screen. Because the user has to pick which Page to connect, the callback continues at the account-selection step, `/v1/connect/instagram/select-account`. `facebook_login` does not support `headless=true`: its callback always redirects to Zernio's hosted account-selection page. Pass a `redirect_url` and let the standard flow return the user to you.
720
723
  }
721
724
 
722
725
  begin
@@ -754,6 +757,7 @@ end
754
757
  | **profile_id** | **String** | Your Zernio profile ID (get from /v1/profiles). For WhatsApp, a Zernio-provisioned number can only be connected on the profile it was provisioned to; connecting from any other profile is rejected with a 409. | |
755
758
  | **redirect_url** | **String** | Your custom redirect URL after connection completes. Accepts an http(s) URL, a custom app scheme for mobile deeplinks (e.g. myapp://callback), or a relative path. Result params are appended with the URL API, so an existing query string is preserved. Standard mode appends connected={platform}&profileId=X&accountId=Y&username=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. | [optional] |
756
759
  | **headless** | **Boolean** | When true, the user is redirected to your redirect_url with raw OAuth data (code, state) instead of Zernio's default account selection UI. Use this to build a custom connect experience. | [optional][default to false] |
760
+ | **login_method** | **String** | Instagram only. Which of the two Instagram connection methods to use. Ignored for every other platform. `instagram_login` (the default, and what you get if you omit this): the Instagram Login dialog. The user authorizes their Instagram professional account directly, no Facebook Page required. `facebook_login`: the Facebook Login dialog, i.e. \"Instagram API with Facebook Login\". The user authorizes a Facebook Page that has a linked Instagram professional account, and every API call for that account then runs through the Page. Use this when the customer manages Instagram through a Page and expects the Facebook consent screen. Because the user has to pick which Page to connect, the callback continues at the account-selection step, `/v1/connect/instagram/select-account`. `facebook_login` does not support `headless=true`: its callback always redirects to Zernio's hosted account-selection page. Pass a `redirect_url` and let the standard flow return the user to you. | [optional][default to 'instagram_login'] |
757
761
 
758
762
  ### Return type
759
763
 
@@ -1774,6 +1778,82 @@ end
1774
1778
  - **Accept**: application/json
1775
1779
 
1776
1780
 
1781
+ ## list_instagram_pages
1782
+
1783
+ > <ListInstagramPages200Response> list_instagram_pages(profile_id, temp_token)
1784
+
1785
+ List Pages with a linked Instagram account
1786
+
1787
+ Completes the `loginMethod=facebook_login` Instagram flow, i.e. \"Instagram API with Facebook Login\". After the user authorizes on Facebook, extract `tempToken` from the redirect params and pass it here to list the Facebook Pages they manage. Only Pages that have a linked Instagram professional account are returned, so an empty array means the user has no eligible Page. Use the X-Connect-Token header if connecting via API key. Not used by the default `instagram_login` flow, which creates the account without a selection step.
1788
+
1789
+ ### Examples
1790
+
1791
+ ```ruby
1792
+ require 'time'
1793
+ require 'zernio-sdk'
1794
+ # setup authorization
1795
+ Zernio.configure do |config|
1796
+ # Configure API key authorization: connectToken
1797
+ config.api_key['X-Connect-Token'] = 'YOUR API KEY'
1798
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
1799
+ # config.api_key_prefix['X-Connect-Token'] = 'Bearer'
1800
+
1801
+ # Configure Bearer authorization (JWT): bearerAuth
1802
+ config.access_token = 'YOUR_BEARER_TOKEN'
1803
+ end
1804
+
1805
+ api_instance = Zernio::ConnectApi.new
1806
+ profile_id = 'profile_id_example' # String | Profile ID from your connection flow
1807
+ temp_token = 'temp_token_example' # String | Long-lived Facebook user access token from the OAuth callback redirect
1808
+
1809
+ begin
1810
+ # List Pages with a linked Instagram account
1811
+ result = api_instance.list_instagram_pages(profile_id, temp_token)
1812
+ p result
1813
+ rescue Zernio::ApiError => e
1814
+ puts "Error when calling ConnectApi->list_instagram_pages: #{e}"
1815
+ end
1816
+ ```
1817
+
1818
+ #### Using the list_instagram_pages_with_http_info variant
1819
+
1820
+ This returns an Array which contains the response data, status code and headers.
1821
+
1822
+ > <Array(<ListInstagramPages200Response>, Integer, Hash)> list_instagram_pages_with_http_info(profile_id, temp_token)
1823
+
1824
+ ```ruby
1825
+ begin
1826
+ # List Pages with a linked Instagram account
1827
+ data, status_code, headers = api_instance.list_instagram_pages_with_http_info(profile_id, temp_token)
1828
+ p status_code # => 2xx
1829
+ p headers # => { ... }
1830
+ p data # => <ListInstagramPages200Response>
1831
+ rescue Zernio::ApiError => e
1832
+ puts "Error when calling ConnectApi->list_instagram_pages_with_http_info: #{e}"
1833
+ end
1834
+ ```
1835
+
1836
+ ### Parameters
1837
+
1838
+ | Name | Type | Description | Notes |
1839
+ | ---- | ---- | ----------- | ----- |
1840
+ | **profile_id** | **String** | Profile ID from your connection flow | |
1841
+ | **temp_token** | **String** | Long-lived Facebook user access token from the OAuth callback redirect | |
1842
+
1843
+ ### Return type
1844
+
1845
+ [**ListInstagramPages200Response**](ListInstagramPages200Response.md)
1846
+
1847
+ ### Authorization
1848
+
1849
+ [connectToken](../README.md#connectToken), [bearerAuth](../README.md#bearerAuth)
1850
+
1851
+ ### HTTP request headers
1852
+
1853
+ - **Content-Type**: Not defined
1854
+ - **Accept**: application/json
1855
+
1856
+
1777
1857
  ## list_linked_in_organizations
1778
1858
 
1779
1859
  > <ListLinkedInOrganizations200Response> list_linked_in_organizations(temp_token, org_ids)
@@ -2214,6 +2294,80 @@ end
2214
2294
  - **Accept**: application/json
2215
2295
 
2216
2296
 
2297
+ ## select_instagram_account
2298
+
2299
+ > <SelectInstagramAccount200Response> select_instagram_account(select_instagram_account_request)
2300
+
2301
+ Select the Page whose Instagram account to connect
2302
+
2303
+ Saves the selected Page as an Instagram account connected via Facebook Login. The Page access token becomes the account's access token, so every Instagram call for it runs against the Facebook Graph host. One Instagram account per profile: if the profile already has an Instagram account, this replaces it, and picking a different Instagram identity purges the previous account's conversations, external posts and stats.
2304
+
2305
+ ### Examples
2306
+
2307
+ ```ruby
2308
+ require 'time'
2309
+ require 'zernio-sdk'
2310
+ # setup authorization
2311
+ Zernio.configure do |config|
2312
+ # Configure API key authorization: connectToken
2313
+ config.api_key['X-Connect-Token'] = 'YOUR API KEY'
2314
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
2315
+ # config.api_key_prefix['X-Connect-Token'] = 'Bearer'
2316
+
2317
+ # Configure Bearer authorization (JWT): bearerAuth
2318
+ config.access_token = 'YOUR_BEARER_TOKEN'
2319
+ end
2320
+
2321
+ api_instance = Zernio::ConnectApi.new
2322
+ select_instagram_account_request = Zernio::SelectInstagramAccountRequest.new({profile_id: 'profile_id_example', page_id: 'page_id_example', temp_token: 'temp_token_example'}) # SelectInstagramAccountRequest |
2323
+
2324
+ begin
2325
+ # Select the Page whose Instagram account to connect
2326
+ result = api_instance.select_instagram_account(select_instagram_account_request)
2327
+ p result
2328
+ rescue Zernio::ApiError => e
2329
+ puts "Error when calling ConnectApi->select_instagram_account: #{e}"
2330
+ end
2331
+ ```
2332
+
2333
+ #### Using the select_instagram_account_with_http_info variant
2334
+
2335
+ This returns an Array which contains the response data, status code and headers.
2336
+
2337
+ > <Array(<SelectInstagramAccount200Response>, Integer, Hash)> select_instagram_account_with_http_info(select_instagram_account_request)
2338
+
2339
+ ```ruby
2340
+ begin
2341
+ # Select the Page whose Instagram account to connect
2342
+ data, status_code, headers = api_instance.select_instagram_account_with_http_info(select_instagram_account_request)
2343
+ p status_code # => 2xx
2344
+ p headers # => { ... }
2345
+ p data # => <SelectInstagramAccount200Response>
2346
+ rescue Zernio::ApiError => e
2347
+ puts "Error when calling ConnectApi->select_instagram_account_with_http_info: #{e}"
2348
+ end
2349
+ ```
2350
+
2351
+ ### Parameters
2352
+
2353
+ | Name | Type | Description | Notes |
2354
+ | ---- | ---- | ----------- | ----- |
2355
+ | **select_instagram_account_request** | [**SelectInstagramAccountRequest**](SelectInstagramAccountRequest.md) | | |
2356
+
2357
+ ### Return type
2358
+
2359
+ [**SelectInstagramAccount200Response**](SelectInstagramAccount200Response.md)
2360
+
2361
+ ### Authorization
2362
+
2363
+ [connectToken](../README.md#connectToken), [bearerAuth](../README.md#bearerAuth)
2364
+
2365
+ ### HTTP request headers
2366
+
2367
+ - **Content-Type**: application/json
2368
+ - **Accept**: application/json
2369
+
2370
+
2217
2371
  ## select_linked_in_organization
2218
2372
 
2219
2373
  > <SelectLinkedInOrganization200Response> select_linked_in_organization(select_linked_in_organization_request)
@@ -0,0 +1,18 @@
1
+ # Zernio::ListInstagramPages200Response
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **pages** | [**Array&lt;ListInstagramPages200ResponsePagesInner&gt;**](ListInstagramPages200ResponsePagesInner.md) | | [optional] |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'zernio-sdk'
13
+
14
+ instance = Zernio::ListInstagramPages200Response.new(
15
+ pages: null
16
+ )
17
+ ```
18
+
@@ -0,0 +1,24 @@
1
+ # Zernio::ListInstagramPages200ResponsePagesInner
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **id** | **String** | Facebook Page ID | [optional] |
8
+ | **name** | **String** | Page name | [optional] |
9
+ | **access_token** | **String** | Page-specific access token | [optional] |
10
+ | **instagram_business_account** | [**ListInstagramPages200ResponsePagesInnerInstagramBusinessAccount**](ListInstagramPages200ResponsePagesInnerInstagramBusinessAccount.md) | | [optional] |
11
+
12
+ ## Example
13
+
14
+ ```ruby
15
+ require 'zernio-sdk'
16
+
17
+ instance = Zernio::ListInstagramPages200ResponsePagesInner.new(
18
+ id: null,
19
+ name: null,
20
+ access_token: null,
21
+ instagram_business_account: null
22
+ )
23
+ ```
24
+
@@ -0,0 +1,22 @@
1
+ # Zernio::ListInstagramPages200ResponsePagesInnerInstagramBusinessAccount
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **id** | **String** | Instagram Business Account ID | [optional] |
8
+ | **username** | **String** | | [optional] |
9
+ | **profile_picture_url** | **String** | | [optional] |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'zernio-sdk'
15
+
16
+ instance = Zernio::ListInstagramPages200ResponsePagesInnerInstagramBusinessAccount.new(
17
+ id: null,
18
+ username: null,
19
+ profile_picture_url: null
20
+ )
21
+ ```
22
+
@@ -0,0 +1,22 @@
1
+ # Zernio::SelectInstagramAccount200Response
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **message** | **String** | | [optional] |
8
+ | **redirect_url** | **String** | Redirect URL if a custom redirect_url was provided | [optional] |
9
+ | **account** | [**SelectInstagramAccount200ResponseAccount**](SelectInstagramAccount200ResponseAccount.md) | | [optional] |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'zernio-sdk'
15
+
16
+ instance = Zernio::SelectInstagramAccount200Response.new(
17
+ message: null,
18
+ redirect_url: null,
19
+ account: null
20
+ )
21
+ ```
22
+
@@ -0,0 +1,30 @@
1
+ # Zernio::SelectInstagramAccount200ResponseAccount
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **account_id** | **String** | ID of the created SocialAccount | [optional] |
8
+ | **platform** | **String** | | [optional] |
9
+ | **username** | **String** | | [optional] |
10
+ | **display_name** | **String** | Name of the Facebook Page backing this account | [optional] |
11
+ | **profile_picture** | **String** | | [optional] |
12
+ | **is_active** | **Boolean** | | [optional] |
13
+ | **login_method** | **String** | | [optional] |
14
+
15
+ ## Example
16
+
17
+ ```ruby
18
+ require 'zernio-sdk'
19
+
20
+ instance = Zernio::SelectInstagramAccount200ResponseAccount.new(
21
+ account_id: null,
22
+ platform: null,
23
+ username: null,
24
+ display_name: null,
25
+ profile_picture: null,
26
+ is_active: null,
27
+ login_method: null
28
+ )
29
+ ```
30
+
@@ -0,0 +1,24 @@
1
+ # Zernio::SelectInstagramAccountRequest
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **profile_id** | **String** | Profile ID from your connection flow | |
8
+ | **page_id** | **String** | The Facebook Page ID selected by the user, from GET /v1/connect/instagram/select-account | |
9
+ | **temp_token** | **String** | Long-lived Facebook user access token from the OAuth callback redirect | |
10
+ | **redirect_url** | **String** | Optional custom redirect URL to return to after selection | [optional] |
11
+
12
+ ## Example
13
+
14
+ ```ruby
15
+ require 'zernio-sdk'
16
+
17
+ instance = Zernio::SelectInstagramAccountRequest.new(
18
+ profile_id: null,
19
+ page_id: null,
20
+ temp_token: null,
21
+ redirect_url: null
22
+ )
23
+ ```
24
+
@@ -674,6 +674,7 @@ module Zernio
674
674
  # @param [Hash] opts the optional parameters
675
675
  # @option opts [String] :redirect_url Your custom redirect URL after connection completes. Accepts an http(s) URL, a custom app scheme for mobile deeplinks (e.g. myapp://callback), or a relative path. Result params are appended with the URL API, so an existing query string is preserved. 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.
676
676
  # @option opts [Boolean] :headless When true, the user is redirected to your redirect_url with raw OAuth data (code, state) instead of Zernio&#39;s default account selection UI. Use this to build a custom connect experience. (default to false)
677
+ # @option opts [String] :login_method Instagram only. Which of the two Instagram connection methods to use. Ignored for every other platform. &#x60;instagram_login&#x60; (the default, and what you get if you omit this): the Instagram Login dialog. The user authorizes their Instagram professional account directly, no Facebook Page required. &#x60;facebook_login&#x60;: the Facebook Login dialog, i.e. \&quot;Instagram API with Facebook Login\&quot;. The user authorizes a Facebook Page that has a linked Instagram professional account, and every API call for that account then runs through the Page. Use this when the customer manages Instagram through a Page and expects the Facebook consent screen. Because the user has to pick which Page to connect, the callback continues at the account-selection step, &#x60;/v1/connect/instagram/select-account&#x60;. &#x60;facebook_login&#x60; does not support &#x60;headless&#x3D;true&#x60;: its callback always redirects to Zernio&#39;s hosted account-selection page. Pass a &#x60;redirect_url&#x60; and let the standard flow return the user to you. (default to 'instagram_login')
677
678
  # @return [GetConnectUrl200Response]
678
679
  def get_connect_url(platform, profile_id, opts = {})
679
680
  data, _status_code, _headers = get_connect_url_with_http_info(platform, profile_id, opts)
@@ -687,6 +688,7 @@ module Zernio
687
688
  # @param [Hash] opts the optional parameters
688
689
  # @option opts [String] :redirect_url Your custom redirect URL after connection completes. Accepts an http(s) URL, a custom app scheme for mobile deeplinks (e.g. myapp://callback), or a relative path. Result params are appended with the URL API, so an existing query string is preserved. 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.
689
690
  # @option opts [Boolean] :headless When true, the user is redirected to your redirect_url with raw OAuth data (code, state) instead of Zernio&#39;s default account selection UI. Use this to build a custom connect experience. (default to false)
691
+ # @option opts [String] :login_method Instagram only. Which of the two Instagram connection methods to use. Ignored for every other platform. &#x60;instagram_login&#x60; (the default, and what you get if you omit this): the Instagram Login dialog. The user authorizes their Instagram professional account directly, no Facebook Page required. &#x60;facebook_login&#x60;: the Facebook Login dialog, i.e. \&quot;Instagram API with Facebook Login\&quot;. The user authorizes a Facebook Page that has a linked Instagram professional account, and every API call for that account then runs through the Page. Use this when the customer manages Instagram through a Page and expects the Facebook consent screen. Because the user has to pick which Page to connect, the callback continues at the account-selection step, &#x60;/v1/connect/instagram/select-account&#x60;. &#x60;facebook_login&#x60; does not support &#x60;headless&#x3D;true&#x60;: its callback always redirects to Zernio&#39;s hosted account-selection page. Pass a &#x60;redirect_url&#x60; and let the standard flow return the user to you. (default to 'instagram_login')
690
692
  # @return [Array<(GetConnectUrl200Response, Integer, Hash)>] GetConnectUrl200Response data, response status code and response headers
691
693
  def get_connect_url_with_http_info(platform, profile_id, opts = {})
692
694
  if @api_client.config.debugging
@@ -705,6 +707,10 @@ module Zernio
705
707
  if @api_client.config.client_side_validation && profile_id.nil?
706
708
  fail ArgumentError, "Missing the required parameter 'profile_id' when calling ConnectApi.get_connect_url"
707
709
  end
710
+ allowable_values = ["instagram_login", "facebook_login"]
711
+ if @api_client.config.client_side_validation && opts[:'login_method'] && !allowable_values.include?(opts[:'login_method'])
712
+ fail ArgumentError, "invalid value for \"login_method\", must be one of #{allowable_values}"
713
+ end
708
714
  # resource path
709
715
  local_var_path = '/v1/connect/{platform}'.sub('{' + 'platform' + '}', CGI.escape(platform.to_s))
710
716
 
@@ -713,6 +719,7 @@ module Zernio
713
719
  query_params[:'profileId'] = profile_id
714
720
  query_params[:'redirect_url'] = opts[:'redirect_url'] if !opts[:'redirect_url'].nil?
715
721
  query_params[:'headless'] = opts[:'headless'] if !opts[:'headless'].nil?
722
+ query_params[:'loginMethod'] = opts[:'login_method'] if !opts[:'login_method'].nil?
716
723
 
717
724
  # header parameters
718
725
  header_params = opts[:header_params] || {}
@@ -1702,6 +1709,77 @@ module Zernio
1702
1709
  return data, status_code, headers
1703
1710
  end
1704
1711
 
1712
+ # List Pages with a linked Instagram account
1713
+ # Completes the `loginMethod=facebook_login` Instagram flow, i.e. \"Instagram API with Facebook Login\". After the user authorizes on Facebook, extract `tempToken` from the redirect params and pass it here to list the Facebook Pages they manage. Only Pages that have a linked Instagram professional account are returned, so an empty array means the user has no eligible Page. Use the X-Connect-Token header if connecting via API key. Not used by the default `instagram_login` flow, which creates the account without a selection step.
1714
+ # @param profile_id [String] Profile ID from your connection flow
1715
+ # @param temp_token [String] Long-lived Facebook user access token from the OAuth callback redirect
1716
+ # @param [Hash] opts the optional parameters
1717
+ # @return [ListInstagramPages200Response]
1718
+ def list_instagram_pages(profile_id, temp_token, opts = {})
1719
+ data, _status_code, _headers = list_instagram_pages_with_http_info(profile_id, temp_token, opts)
1720
+ data
1721
+ end
1722
+
1723
+ # List Pages with a linked Instagram account
1724
+ # Completes the &#x60;loginMethod&#x3D;facebook_login&#x60; Instagram flow, i.e. \&quot;Instagram API with Facebook Login\&quot;. After the user authorizes on Facebook, extract &#x60;tempToken&#x60; from the redirect params and pass it here to list the Facebook Pages they manage. Only Pages that have a linked Instagram professional account are returned, so an empty array means the user has no eligible Page. Use the X-Connect-Token header if connecting via API key. Not used by the default &#x60;instagram_login&#x60; flow, which creates the account without a selection step.
1725
+ # @param profile_id [String] Profile ID from your connection flow
1726
+ # @param temp_token [String] Long-lived Facebook user access token from the OAuth callback redirect
1727
+ # @param [Hash] opts the optional parameters
1728
+ # @return [Array<(ListInstagramPages200Response, Integer, Hash)>] ListInstagramPages200Response data, response status code and response headers
1729
+ def list_instagram_pages_with_http_info(profile_id, temp_token, opts = {})
1730
+ if @api_client.config.debugging
1731
+ @api_client.config.logger.debug 'Calling API: ConnectApi.list_instagram_pages ...'
1732
+ end
1733
+ # verify the required parameter 'profile_id' is set
1734
+ if @api_client.config.client_side_validation && profile_id.nil?
1735
+ fail ArgumentError, "Missing the required parameter 'profile_id' when calling ConnectApi.list_instagram_pages"
1736
+ end
1737
+ # verify the required parameter 'temp_token' is set
1738
+ if @api_client.config.client_side_validation && temp_token.nil?
1739
+ fail ArgumentError, "Missing the required parameter 'temp_token' when calling ConnectApi.list_instagram_pages"
1740
+ end
1741
+ # resource path
1742
+ local_var_path = '/v1/connect/instagram/select-account'
1743
+
1744
+ # query parameters
1745
+ query_params = opts[:query_params] || {}
1746
+ query_params[:'profileId'] = profile_id
1747
+ query_params[:'tempToken'] = temp_token
1748
+
1749
+ # header parameters
1750
+ header_params = opts[:header_params] || {}
1751
+ # HTTP header 'Accept' (if needed)
1752
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1753
+
1754
+ # form parameters
1755
+ form_params = opts[:form_params] || {}
1756
+
1757
+ # http body (model)
1758
+ post_body = opts[:debug_body]
1759
+
1760
+ # return_type
1761
+ return_type = opts[:debug_return_type] || 'ListInstagramPages200Response'
1762
+
1763
+ # auth_names
1764
+ auth_names = opts[:debug_auth_names] || ['connectToken', 'bearerAuth']
1765
+
1766
+ new_options = opts.merge(
1767
+ :operation => :"ConnectApi.list_instagram_pages",
1768
+ :header_params => header_params,
1769
+ :query_params => query_params,
1770
+ :form_params => form_params,
1771
+ :body => post_body,
1772
+ :auth_names => auth_names,
1773
+ :return_type => return_type
1774
+ )
1775
+
1776
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1777
+ if @api_client.config.debugging
1778
+ @api_client.config.logger.debug "API called: ConnectApi#list_instagram_pages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1779
+ end
1780
+ return data, status_code, headers
1781
+ end
1782
+
1705
1783
  # List LinkedIn orgs
1706
1784
  # Fetch full LinkedIn organization details (logos, vanity names, websites) for custom UI. No authentication required, just the tempToken from OAuth.
1707
1785
  # @param temp_token [String] The temporary LinkedIn access token from the OAuth redirect
@@ -2139,6 +2217,74 @@ module Zernio
2139
2217
  return data, status_code, headers
2140
2218
  end
2141
2219
 
2220
+ # Select the Page whose Instagram account to connect
2221
+ # Saves the selected Page as an Instagram account connected via Facebook Login. The Page access token becomes the account's access token, so every Instagram call for it runs against the Facebook Graph host. One Instagram account per profile: if the profile already has an Instagram account, this replaces it, and picking a different Instagram identity purges the previous account's conversations, external posts and stats.
2222
+ # @param select_instagram_account_request [SelectInstagramAccountRequest]
2223
+ # @param [Hash] opts the optional parameters
2224
+ # @return [SelectInstagramAccount200Response]
2225
+ def select_instagram_account(select_instagram_account_request, opts = {})
2226
+ data, _status_code, _headers = select_instagram_account_with_http_info(select_instagram_account_request, opts)
2227
+ data
2228
+ end
2229
+
2230
+ # Select the Page whose Instagram account to connect
2231
+ # Saves the selected Page as an Instagram account connected via Facebook Login. The Page access token becomes the account&#39;s access token, so every Instagram call for it runs against the Facebook Graph host. One Instagram account per profile: if the profile already has an Instagram account, this replaces it, and picking a different Instagram identity purges the previous account&#39;s conversations, external posts and stats.
2232
+ # @param select_instagram_account_request [SelectInstagramAccountRequest]
2233
+ # @param [Hash] opts the optional parameters
2234
+ # @return [Array<(SelectInstagramAccount200Response, Integer, Hash)>] SelectInstagramAccount200Response data, response status code and response headers
2235
+ def select_instagram_account_with_http_info(select_instagram_account_request, opts = {})
2236
+ if @api_client.config.debugging
2237
+ @api_client.config.logger.debug 'Calling API: ConnectApi.select_instagram_account ...'
2238
+ end
2239
+ # verify the required parameter 'select_instagram_account_request' is set
2240
+ if @api_client.config.client_side_validation && select_instagram_account_request.nil?
2241
+ fail ArgumentError, "Missing the required parameter 'select_instagram_account_request' when calling ConnectApi.select_instagram_account"
2242
+ end
2243
+ # resource path
2244
+ local_var_path = '/v1/connect/instagram/select-account'
2245
+
2246
+ # query parameters
2247
+ query_params = opts[:query_params] || {}
2248
+
2249
+ # header parameters
2250
+ header_params = opts[:header_params] || {}
2251
+ # HTTP header 'Accept' (if needed)
2252
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
2253
+ # HTTP header 'Content-Type'
2254
+ content_type = @api_client.select_header_content_type(['application/json'])
2255
+ if !content_type.nil?
2256
+ header_params['Content-Type'] = content_type
2257
+ end
2258
+
2259
+ # form parameters
2260
+ form_params = opts[:form_params] || {}
2261
+
2262
+ # http body (model)
2263
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(select_instagram_account_request)
2264
+
2265
+ # return_type
2266
+ return_type = opts[:debug_return_type] || 'SelectInstagramAccount200Response'
2267
+
2268
+ # auth_names
2269
+ auth_names = opts[:debug_auth_names] || ['connectToken', 'bearerAuth']
2270
+
2271
+ new_options = opts.merge(
2272
+ :operation => :"ConnectApi.select_instagram_account",
2273
+ :header_params => header_params,
2274
+ :query_params => query_params,
2275
+ :form_params => form_params,
2276
+ :body => post_body,
2277
+ :auth_names => auth_names,
2278
+ :return_type => return_type
2279
+ )
2280
+
2281
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
2282
+ if @api_client.config.debugging
2283
+ @api_client.config.logger.debug "API called: ConnectApi#select_instagram_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2284
+ end
2285
+ return data, status_code, headers
2286
+ end
2287
+
2142
2288
  # Select LinkedIn org
2143
2289
  # 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.
2144
2290
  # @param select_linked_in_organization_request [SelectLinkedInOrganizationRequest]