Class: Zernio::ConnectApi
- Inherits:
-
Object
- Object
- Zernio::ConnectApi
- Defined in:
- lib/zernio-sdk/api/connect_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#assign_google_business_location(account_id, assign_google_business_location_request, opts = {}) ⇒ AssignGoogleBusinessLocation200Response
Assign GBP location to another profile Connect a Google Business location onto a DIFFERENT profile by reusing the OAuth grant from an already-connected GBP account — no browser, no re-authorization.
-
#assign_google_business_location_with_http_info(account_id, assign_google_business_location_request, opts = {}) ⇒ Array<(AssignGoogleBusinessLocation200Response, Integer, Hash)>
Assign GBP location to another profile Connect a Google Business location onto a DIFFERENT profile by reusing the OAuth grant from an already-connected GBP account — no browser, no re-authorization.
-
#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.
-
#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.
-
#complete_whats_app_phone_selection(complete_whats_app_phone_selection_request, opts = {}) ⇒ CompleteWhatsAppPhoneSelection200Response
Complete number selection Bind a specific WhatsApp phone number to the Zernio profile after the user picks one from
listWhatsAppPhoneNumbers. -
#complete_whats_app_phone_selection_with_http_info(complete_whats_app_phone_selection_request, opts = {}) ⇒ Array<(CompleteWhatsAppPhoneSelection200Response, Integer, Hash)>
Complete number selection Bind a specific WhatsApp phone number to the Zernio profile after the user picks one from `listWhatsAppPhoneNumbers`.
-
#configure_tik_tok_ads_brand_identity(configure_tik_tok_ads_brand_identity_request, opts = {}) ⇒ ConfigureTikTokAdsBrandIdentity200Response
Set TikTok brand identity Set or update the Brand Identity (display name + avatar) for a
tiktokadsSocialAccount. -
#configure_tik_tok_ads_brand_identity_with_http_info(configure_tik_tok_ads_brand_identity_request, opts = {}) ⇒ Array<(ConfigureTikTokAdsBrandIdentity200Response, Integer, Hash)>
Set TikTok brand identity Set or update the Brand Identity (display name + avatar) for a `tiktokads` SocialAccount.
-
#connect_ads(platform, profile_id, opts = {}) ⇒ ConnectAds200Response
Connect ads for a platform Unified ads connection endpoint.
-
#connect_ads_with_http_info(platform, profile_id, opts = {}) ⇒ Array<(ConnectAds200Response, Integer, Hash)>
Connect ads for a platform Unified ads connection endpoint.
-
#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.
-
#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.
-
#connect_discord_channel(connect_discord_channel_request, opts = {}) ⇒ nil
Connect a Discord channel Finalize a Discord connect by binding one channel to a profile.
-
#connect_discord_channel_with_http_info(connect_discord_channel_request, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Connect a Discord channel Finalize a Discord connect by binding one channel to a profile.
-
#connect_open_ai_ads_credentials(connect_open_ai_ads_credentials_request, opts = {}) ⇒ ConnectOpenAIAdsCredentials200Response
Connect an OpenAI Ads account Connect an OpenAI Ads account using an API key from ChatGPT Ads Manager.
-
#connect_open_ai_ads_credentials_with_http_info(connect_open_ai_ads_credentials_request, opts = {}) ⇒ Array<(ConnectOpenAIAdsCredentials200Response, Integer, Hash)>
Connect an OpenAI Ads account Connect an OpenAI Ads account using an API key from ChatGPT Ads Manager.
-
#connect_shopify_with_token(connect_shopify_with_token_request, opts = {}) ⇒ ConnectShopifyWithToken200Response
Connect a Shopify store with a custom-app Admin token Token-paste alternative to the OAuth flow: connect a store using the Admin API access token of a custom app the merchant created in their own Shopify admin (Settings → Apps and sales channels → Develop apps, with the
read_content/write_contentscopes). -
#connect_shopify_with_token_with_http_info(connect_shopify_with_token_request, opts = {}) ⇒ Array<(ConnectShopifyWithToken200Response, Integer, Hash)>
Connect a Shopify store with a custom-app Admin token Token-paste alternative to the OAuth flow: connect a store using the Admin API access token of a custom app the merchant created in their own Shopify admin (Settings → Apps and sales channels → Develop apps, with the `read_content`/`write_content` scopes).
-
#connect_slack_channel(connect_slack_channel_request, opts = {}) ⇒ nil
Connect a Slack channel Finalize a Slack connect by creating the per-channel account.
-
#connect_slack_channel_with_http_info(connect_slack_channel_request, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Connect a Slack channel Finalize a Slack connect by creating the per-channel account.
-
#connect_whats_app_credentials(connect_whats_app_credentials_request, opts = {}) ⇒ ConnectWhatsAppCredentials200Response
Connect WhatsApp via credentials Connect a WhatsApp Business Account by providing Meta credentials directly.
-
#connect_whats_app_credentials_with_http_info(connect_whats_app_credentials_request, opts = {}) ⇒ Array<(ConnectWhatsAppCredentials200Response, Integer, Hash)>
Connect WhatsApp via credentials Connect a WhatsApp Business Account by providing Meta credentials directly.
-
#connect_whats_app_embedded_signup(connect_whats_app_embedded_signup_request, opts = {}) ⇒ nil
Connect WhatsApp from Embedded Signup Exchange the authorization code Meta Embedded Signup returns to your browser SDK.
-
#connect_whats_app_embedded_signup_with_http_info(connect_whats_app_embedded_signup_request, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Connect WhatsApp from Embedded Signup Exchange the authorization code Meta Embedded Signup returns to your browser SDK.
-
#create_pinterest_board(account_id, create_pinterest_board_request, opts = {}) ⇒ CreatePinterestBoard201Response
Create Pinterest board Creates a new board on the connected Pinterest account.
-
#create_pinterest_board_with_http_info(account_id, create_pinterest_board_request, opts = {}) ⇒ Array<(CreatePinterestBoard201Response, Integer, Hash)>
Create Pinterest board Creates a new board on the connected Pinterest account.
-
#get_connect_url(platform, profile_id, opts = {}) ⇒ GetConnectUrl200Response
Get OAuth connect URL Initiate an OAuth connection flow.
-
#get_connect_url_with_http_info(platform, profile_id, opts = {}) ⇒ Array<(GetConnectUrl200Response, Integer, Hash)>
Get OAuth connect URL Initiate an OAuth connection flow.
-
#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.
-
#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.
-
#get_gmb_locations(account_id, opts = {}) ⇒ GetGmbLocations200Response
List GBP locations Returns Google Business Profile locations the connected account can access, plus the currently selected location.
-
#get_gmb_locations_with_http_info(account_id, opts = {}) ⇒ Array<(GetGmbLocations200Response, Integer, Hash)>
List GBP locations Returns Google Business Profile locations the connected account can access, plus the currently selected location.
-
#get_linked_in_organizations(account_id, opts = {}) ⇒ GetLinkedInOrganizations200Response
List LinkedIn orgs Returns LinkedIn organizations (company pages) the connected account has admin access to.
-
#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.
-
#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.
-
#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.
-
#get_pinterest_boards(account_id, opts = {}) ⇒ GetPinterestBoards200Response
List Pinterest boards Returns the boards available for a connected Pinterest account.
-
#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.
-
#get_reddit_flairs(account_id, subreddit, opts = {}) ⇒ GetRedditFlairs200Response
List subreddit flairs Returns available post flairs for a subreddit.
-
#get_reddit_flairs_with_http_info(account_id, subreddit, opts = {}) ⇒ Array<(GetRedditFlairs200Response, Integer, Hash)>
List subreddit flairs Returns available post flairs for a subreddit.
-
#get_reddit_subreddits(account_id, opts = {}) ⇒ GetRedditSubreddits200Response
List Reddit subreddits Returns the subreddits the connected Reddit account can post to.
-
#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.
-
#get_shopify_connect_url(profile_id, shop, opts = {}) ⇒ GetConnectUrl200Response
Get Shopify OAuth connect URL Initiate the Shopify OAuth flow for a store.
-
#get_shopify_connect_url_with_http_info(profile_id, shop, opts = {}) ⇒ Array<(GetConnectUrl200Response, Integer, Hash)>
Get Shopify OAuth connect URL Initiate the Shopify OAuth flow for a store.
-
#get_subreddit_rules(account_id, subreddit, opts = {}) ⇒ GetSubredditRules200Response
Get subreddit rules Returns a subreddit's posting rules plus Reddit's site-wide rules, so you can check them before submitting and avoid a removal.
-
#get_subreddit_rules_with_http_info(account_id, subreddit, opts = {}) ⇒ Array<(GetSubredditRules200Response, Integer, Hash)>
Get subreddit rules Returns a subreddit's posting rules plus Reddit's site-wide rules, so you can check them before submitting and avoid a removal.
-
#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.
-
#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.
-
#get_youtube_playlists(account_id, opts = {}) ⇒ GetYoutubePlaylists200Response
List YouTube playlists Returns the playlists available for a connected YouTube account.
-
#get_youtube_playlists_with_http_info(account_id, opts = {}) ⇒ Array<(GetYoutubePlaylists200Response, Integer, Hash)>
List YouTube playlists Returns the playlists available for a connected YouTube account.
-
#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.
-
#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.
-
#initialize(api_client = ApiClient.default) ⇒ ConnectApi
constructor
A new instance of ConnectApi.
-
#initiate_telegram_connect(initiate_telegram_connect_request, opts = {}) ⇒ InitiateTelegramConnect200Response
Connect Telegram directly Connect a Telegram channel/group directly using the chat ID.
-
#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.
-
#list_facebook_pages(profile_id, temp_token, opts = {}) ⇒ ListFacebookPages200Response
List Facebook pages Returns the list of Facebook Pages the user can manage after OAuth.
-
#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.
-
#list_google_business_locations(opts = {}) ⇒ ListGoogleBusinessLocations200Response
List GBP locations For headless flows.
-
#list_google_business_locations_with_http_info(opts = {}) ⇒ Array<(ListGoogleBusinessLocations200Response, Integer, Hash)>
List GBP locations For headless flows.
-
#list_instagram_pages(profile_id, temp_token, opts = {}) ⇒ ListInstagramPages200Response
List Pages with a linked Instagram account Completes the
loginMethod=facebook_loginInstagram flow, i.e. -
#list_instagram_pages_with_http_info(profile_id, temp_token, opts = {}) ⇒ Array<(ListInstagramPages200Response, Integer, Hash)>
List Pages with a linked Instagram account Completes the `loginMethod=facebook_login` Instagram flow, i.e.
-
#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.
-
#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.
-
#list_pinterest_boards_for_selection(x_connect_token, profile_id, temp_token, opts = {}) ⇒ ListPinterestBoardsForSelection200Response
List Pinterest boards For headless flows.
-
#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.
-
#list_snapchat_profiles(x_connect_token, profile_id, temp_token, opts = {}) ⇒ ListSnapchatProfiles200Response
List Snapchat profiles For headless flows.
-
#list_snapchat_profiles_with_http_info(x_connect_token, profile_id, temp_token, opts = {}) ⇒ Array<(ListSnapchatProfiles200Response, Integer, Hash)>
List Snapchat profiles For headless flows.
-
#list_whats_app_phone_numbers(profile_id, temp_token, opts = {}) ⇒ ListWhatsAppPhoneNumbers200Response
List numbers for selection Fetch the WhatsApp phone numbers available across the user's WhatsApp Business Accounts (WABAs) after a headless OAuth flow.
-
#list_whats_app_phone_numbers_with_http_info(profile_id, temp_token, opts = {}) ⇒ Array<(ListWhatsAppPhoneNumbers200Response, Integer, Hash)>
List numbers for selection Fetch the WhatsApp phone numbers available across the user's WhatsApp Business Accounts (WABAs) after a headless OAuth flow.
-
#select_facebook_page(select_facebook_page_request, opts = {}) ⇒ SelectFacebookPage200Response
Select Facebook page Complete the headless flow by saving the user's selected Facebook page.
-
#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's selected Facebook page.
-
#select_google_business_location(select_google_business_location_request, opts = {}) ⇒ SelectGoogleBusinessLocation200Response
Select GBP location Complete the headless GBP flow by saving the user's selected location.
-
#select_google_business_location_with_http_info(select_google_business_location_request, opts = {}) ⇒ Array<(SelectGoogleBusinessLocation200Response, Integer, Hash)>
Select GBP location Complete the headless GBP flow by saving the user's selected location.
-
#select_instagram_account(select_instagram_account_request, opts = {}) ⇒ SelectInstagramAccount200Response
Select the Page whose Instagram account to connect Saves the selected Page as an Instagram account connected via Facebook Login.
-
#select_instagram_account_with_http_info(select_instagram_account_request, opts = {}) ⇒ Array<(SelectInstagramAccount200Response, Integer, Hash)>
Select the Page whose Instagram account to connect Saves the selected Page as an Instagram account connected via Facebook Login.
-
#select_linked_in_organization(select_linked_in_organization_request, opts = {}) ⇒ SelectLinkedInOrganization200Response
Select LinkedIn org Complete the LinkedIn connection flow.
-
#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.
-
#select_pinterest_board(select_pinterest_board_request, opts = {}) ⇒ SelectPinterestBoard200Response
Select Pinterest board Complete the Pinterest connection flow.
-
#select_pinterest_board_with_http_info(select_pinterest_board_request, opts = {}) ⇒ Array<(SelectPinterestBoard200Response, Integer, Hash)>
Select Pinterest board Complete the Pinterest connection flow.
-
#select_snapchat_profile(select_snapchat_profile_request, opts = {}) ⇒ SelectSnapchatProfile200Response
Select Snapchat profile Complete the Snapchat connection flow by saving the selected Public Profile.
-
#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.
-
#set_reddit_post_flair(account_id, set_reddit_post_flair_request, opts = {}) ⇒ UpdateYoutubeDefaultPlaylist200Response
Set Reddit post flair Applies a flair to a post the connected account already published.
-
#set_reddit_post_flair_with_http_info(account_id, set_reddit_post_flair_request, opts = {}) ⇒ Array<(UpdateYoutubeDefaultPlaylist200Response, Integer, Hash)>
Set Reddit post flair Applies a flair to a post the connected account already published.
-
#update_facebook_page(account_id, update_facebook_page_request, opts = {}) ⇒ UpdateFacebookPage200Response
Update Facebook page Switch which Facebook Page is active for a connected account.
-
#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.
-
#update_gmb_location(account_id, update_gmb_location_request, opts = {}) ⇒ UpdateGmbLocation200Response
Update GBP location Switch which GBP location is active for a connected account.
-
#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.
-
#update_linked_in_organization(account_id, update_linked_in_organization_request, opts = {}) ⇒ UpdateLinkedInOrganization200Response
Switch LinkedIn account type Switch a LinkedIn account between personal profile and organization (company page) posting.
-
#update_linked_in_organization_with_http_info(account_id, update_linked_in_organization_request, opts = {}) ⇒ Array<(UpdateLinkedInOrganization200Response, Integer, Hash)>
Switch LinkedIn account type Switch a LinkedIn account between personal profile and organization (company page) posting.
-
#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.
-
#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.
-
#update_reddit_subreddits(account_id, update_reddit_subreddits_request, opts = {}) ⇒ UpdateYoutubeDefaultPlaylist200Response
Set default subreddit Sets the default subreddit used when publishing posts for this Reddit account.
-
#update_reddit_subreddits_with_http_info(account_id, update_reddit_subreddits_request, opts = {}) ⇒ Array<(UpdateYoutubeDefaultPlaylist200Response, Integer, Hash)>
Set default subreddit Sets the default subreddit used when publishing posts for this Reddit account.
-
#update_youtube_default_playlist(account_id, update_youtube_default_playlist_request, opts = {}) ⇒ UpdateYoutubeDefaultPlaylist200Response
Set default YouTube playlist Sets the default playlist used when publishing videos for this account.
-
#update_youtube_default_playlist_with_http_info(account_id, update_youtube_default_playlist_request, opts = {}) ⇒ Array<(UpdateYoutubeDefaultPlaylist200Response, Integer, Hash)>
Set default YouTube playlist Sets the default playlist used when publishing videos for this account.
-
#vote_reddit_thing(account_id, vote_reddit_thing_request, opts = {}) ⇒ UpdateYoutubeDefaultPlaylist200Response
Vote on a Reddit post or comment Cast, change, or clear the connected account's vote on a Reddit post or comment.
-
#vote_reddit_thing_with_http_info(account_id, vote_reddit_thing_request, opts = {}) ⇒ Array<(UpdateYoutubeDefaultPlaylist200Response, Integer, Hash)>
Vote on a Reddit post or comment Cast, change, or clear the connected account's vote on a Reddit post or comment.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ ConnectApi
Returns a new instance of ConnectApi.
19 20 21 |
# File 'lib/zernio-sdk/api/connect_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/zernio-sdk/api/connect_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#assign_google_business_location(account_id, assign_google_business_location_request, opts = {}) ⇒ AssignGoogleBusinessLocation200Response
Assign GBP location to another profile
Connect a Google Business location onto a DIFFERENT profile by reusing the OAuth grant from an already-connected GBP account — no browser, no re-authorization. Built for agencies whose single Google account has manager access to many client locations and who run one profile per client: connect one location the normal way (browser OAuth), then bulk-assign the rest onto each client's profile via this endpoint. The path accountId is a SOURCE connected GBP account (the token holder); the body profileId is the TARGET profile. Returns 409 if the target profile already has a Google Business connection (switch its location with PUT gmb-locations instead).
28 29 30 31 |
# File 'lib/zernio-sdk/api/connect_api.rb', line 28 def assign_google_business_location(account_id, assign_google_business_location_request, opts = {}) data, _status_code, _headers = assign_google_business_location_with_http_info(account_id, assign_google_business_location_request, opts) data end |
#assign_google_business_location_with_http_info(account_id, assign_google_business_location_request, opts = {}) ⇒ Array<(AssignGoogleBusinessLocation200Response, Integer, Hash)>
Assign GBP location to another profile Connect a Google Business location onto a DIFFERENT profile by reusing the OAuth grant from an already-connected GBP account — no browser, no re-authorization. Built for agencies whose single Google account has manager access to many client locations and who run one profile per client: connect one location the normal way (browser OAuth), then bulk-assign the rest onto each client's profile via this endpoint. The path `accountId` is a SOURCE connected GBP account (the token holder); the body `profileId` is the TARGET profile. Returns 409 if the target profile already has a Google Business connection (switch its location with PUT gmb-locations instead).
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 85 86 87 88 89 90 91 92 93 94 |
# File 'lib/zernio-sdk/api/connect_api.rb', line 39 def assign_google_business_location_with_http_info(account_id, assign_google_business_location_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ConnectApi.assign_google_business_location ...' end # verify the required parameter 'account_id' is set if @api_client.config.client_side_validation && account_id.nil? fail ArgumentError, "Missing the required parameter 'account_id' when calling ConnectApi.assign_google_business_location" end # verify the required parameter 'assign_google_business_location_request' is set if @api_client.config.client_side_validation && assign_google_business_location_request.nil? fail ArgumentError, "Missing the required parameter 'assign_google_business_location_request' when calling ConnectApi.assign_google_business_location" end # resource path local_var_path = '/v1/accounts/{accountId}/gmb-locations/assign'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # 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(assign_google_business_location_request) # return_type return_type = opts[:debug_return_type] || 'AssignGoogleBusinessLocation200Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"ConnectApi.assign_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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ConnectApi#assign_google_business_location\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#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).
101 102 103 104 |
# File 'lib/zernio-sdk/api/connect_api.rb', line 101 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).
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 153 154 155 156 157 158 |
# File 'lib/zernio-sdk/api/connect_api.rb', line 111 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'] = 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, ) 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 |
#complete_whats_app_phone_selection(complete_whats_app_phone_selection_request, opts = {}) ⇒ CompleteWhatsAppPhoneSelection200Response
Complete number selection
Bind a specific WhatsApp phone number to the Zernio profile after the user picks one from listWhatsAppPhoneNumbers. Exchanges the short-lived OAuth token for a long-lived token, subscribes the WABA to webhooks, and creates the SocialAccount.
166 167 168 169 |
# File 'lib/zernio-sdk/api/connect_api.rb', line 166 def complete_whats_app_phone_selection(complete_whats_app_phone_selection_request, opts = {}) data, _status_code, _headers = complete_whats_app_phone_selection_with_http_info(complete_whats_app_phone_selection_request, opts) data end |
#complete_whats_app_phone_selection_with_http_info(complete_whats_app_phone_selection_request, opts = {}) ⇒ Array<(CompleteWhatsAppPhoneSelection200Response, Integer, Hash)>
Complete number selection Bind a specific WhatsApp phone number to the Zernio profile after the user picks one from `listWhatsAppPhoneNumbers`. Exchanges the short-lived OAuth token for a long-lived token, subscribes the WABA to webhooks, and creates the SocialAccount.
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 |
# File 'lib/zernio-sdk/api/connect_api.rb', line 177 def complete_whats_app_phone_selection_with_http_info(complete_whats_app_phone_selection_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ConnectApi.complete_whats_app_phone_selection ...' end # verify the required parameter 'complete_whats_app_phone_selection_request' is set if @api_client.config.client_side_validation && complete_whats_app_phone_selection_request.nil? fail ArgumentError, "Missing the required parameter 'complete_whats_app_phone_selection_request' when calling ConnectApi.complete_whats_app_phone_selection" end # resource path local_var_path = '/v1/connect/whatsapp/select-phone-number' # 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(complete_whats_app_phone_selection_request) # return_type return_type = opts[:debug_return_type] || 'CompleteWhatsAppPhoneSelection200Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"ConnectApi.complete_whats_app_phone_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(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ConnectApi#complete_whats_app_phone_selection\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#configure_tik_tok_ads_brand_identity(configure_tik_tok_ads_brand_identity_request, opts = {}) ⇒ ConfigureTikTokAdsBrandIdentity200Response
Set TikTok brand identity
Set or update the Brand Identity (display name + avatar) for a tiktokads SocialAccount. TikTok requires every ad to carry an identity_id + identity_type pair. The Brand Identity is the CUSTOMIZED_USER alternative to attributing ads to a real @username (TT_USER). This route uploads the supplied image to TikTok, creates the identity via /v2/identity/create/, and caches the resulting identity_id on the account so subsequent POST /v1/ads/create calls can opt into it via identityType: 'CUSTOMIZED_USER'. Configurable on every tiktokads account, including linked-mode ones (those with a posting account on the same profile). Configuration is idempotent and harmless when posting is also connected: the default ad-create path still prefers TT_USER, and CUSTOMIZED_USER is only used per-ad when the caller explicitly opts in. TikTok identities are immutable post-creation. Re-saving creates a new identity on TikTok and swaps the cached id; the old identity stays orphaned on TikTok's side (harmless, no billing impact). Alternative: pass brandIdentity directly on POST /v1/ads/create to configure on first ad creation in a single round-trip.
236 237 238 239 |
# File 'lib/zernio-sdk/api/connect_api.rb', line 236 def configure_tik_tok_ads_brand_identity(configure_tik_tok_ads_brand_identity_request, opts = {}) data, _status_code, _headers = configure_tik_tok_ads_brand_identity_with_http_info(configure_tik_tok_ads_brand_identity_request, opts) data end |
#configure_tik_tok_ads_brand_identity_with_http_info(configure_tik_tok_ads_brand_identity_request, opts = {}) ⇒ Array<(ConfigureTikTokAdsBrandIdentity200Response, Integer, Hash)>
Set TikTok brand identity Set or update the Brand Identity (display name + avatar) for a `tiktokads` SocialAccount. TikTok requires every ad to carry an `identity_id + identity_type` pair. The Brand Identity is the CUSTOMIZED_USER alternative to attributing ads to a real @username (TT_USER). This route uploads the supplied image to TikTok, creates the identity via `/v2/identity/create/`, and caches the resulting `identity_id` on the account so subsequent `POST /v1/ads/create` calls can opt into it via `identityType: 'CUSTOMIZED_USER'`. Configurable on every `tiktokads` account, including linked-mode ones (those with a posting account on the same profile). Configuration is idempotent and harmless when posting is also connected: the default ad-create path still prefers TT_USER, and CUSTOMIZED_USER is only used per-ad when the caller explicitly opts in. TikTok identities are immutable post-creation. Re-saving creates a new identity on TikTok and swaps the cached id; the old identity stays orphaned on TikTok's side (harmless, no billing impact). Alternative: pass `brandIdentity` directly on `POST /v1/ads/create` to configure on first ad creation in a single round-trip.
246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 |
# File 'lib/zernio-sdk/api/connect_api.rb', line 246 def configure_tik_tok_ads_brand_identity_with_http_info(configure_tik_tok_ads_brand_identity_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ConnectApi.configure_tik_tok_ads_brand_identity ...' end # verify the required parameter 'configure_tik_tok_ads_brand_identity_request' is set if @api_client.config.client_side_validation && configure_tik_tok_ads_brand_identity_request.nil? fail ArgumentError, "Missing the required parameter 'configure_tik_tok_ads_brand_identity_request' when calling ConnectApi.configure_tik_tok_ads_brand_identity" end # resource path local_var_path = '/v1/connect/tiktok-ads' # 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(configure_tik_tok_ads_brand_identity_request) # return_type return_type = opts[:debug_return_type] || 'ConfigureTikTokAdsBrandIdentity200Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"ConnectApi.configure_tik_tok_ads_brand_identity", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ConnectApi#configure_tik_tok_ads_brand_identity\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#connect_ads(platform, profile_id, opts = {}) ⇒ ConnectAds200Response
Connect ads for a platform Unified ads connection endpoint. Creates a dedicated ads SocialAccount for the specified platform. Same-token platforms (facebook, instagram, linkedin, pinterest): Creates an ads SocialAccount (metaads, linkedinads, pinterestads) with a copied OAuth token from the parent posting account. If the ads account already exists, returns alreadyConnected: true. No extra OAuth needed. Separate-token platforms (tiktok, twitter): Starts the platform-specific marketing API OAuth flow and creates an ads SocialAccount (tiktokads, xads) with its own token. If the ads account already exists, returns alreadyConnected: true. - tiktok: accountId is OPTIONAL. With accountId, the new tiktokads account links to that posting account (parentAccountId set) — Spark Ads + standalone ads using the posting TT_USER identity become available. Without accountId, ads-only mode kicks in: the new tiktokads account has parentAccountId=null and standalone ads use a synthetic CUSTOMIZED_USER ("Brand Identity"); Spark Ads are unavailable because TikTok requires a posting account for them. The Brand Identity is configured separately via PATCH /v1/connect/tiktok-ads (or inline on POST /v1/ads/create via the brandIdentity field). - twitter (X Ads): accountId is REQUIRED. There's no ads-only mode — tweets need to be authored by a real X user. Standalone platforms (googleads): Starts the Google Ads OAuth flow and creates a standalone ads SocialAccount (googleads) with no parent. If the account already exists, returns alreadyConnected: true. Ads accounts appear as regular SocialAccount documents with ads platform values (e.g., metaads, tiktokads) in GET /v1/accounts.
311 312 313 314 |
# File 'lib/zernio-sdk/api/connect_api.rb', line 311 def connect_ads(platform, profile_id, opts = {}) data, _status_code, _headers = connect_ads_with_http_info(platform, profile_id, opts) data end |
#connect_ads_with_http_info(platform, profile_id, opts = {}) ⇒ Array<(ConnectAds200Response, Integer, Hash)>
Connect ads for a platform Unified ads connection endpoint. Creates a dedicated ads SocialAccount for the specified platform. Same-token platforms (facebook, instagram, linkedin, pinterest): Creates an ads SocialAccount (metaads, linkedinads, pinterestads) with a copied OAuth token from the parent posting account. If the ads account already exists, returns alreadyConnected: true. No extra OAuth needed. Separate-token platforms (tiktok, twitter): Starts the platform-specific marketing API OAuth flow and creates an ads SocialAccount (tiktokads, xads) with its own token. If the ads account already exists, returns alreadyConnected: true. - tiktok: accountId is OPTIONAL. With accountId, the new tiktokads account links to that posting account (parentAccountId set) — Spark Ads + standalone ads using the posting TT_USER identity become available. Without accountId, ads-only mode kicks in: the new tiktokads account has parentAccountId=null and standalone ads use a synthetic CUSTOMIZED_USER ("Brand Identity"); Spark Ads are unavailable because TikTok requires a posting account for them. The Brand Identity is configured separately via PATCH /v1/connect/tiktok-ads (or inline on POST /v1/ads/create via the brandIdentity field). - twitter (X Ads): accountId is REQUIRED. There's no ads-only mode — tweets need to be authored by a real X user. Standalone platforms (googleads): Starts the Google Ads OAuth flow and creates a standalone ads SocialAccount (googleads) with no parent. If the account already exists, returns alreadyConnected: true. Ads accounts appear as regular SocialAccount documents with ads platform values (e.g., metaads, tiktokads) in GET /v1/accounts.
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 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 |
# File 'lib/zernio-sdk/api/connect_api.rb', line 328 def connect_ads_with_http_info(platform, profile_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ConnectApi.connect_ads ...' 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.connect_ads" end # verify enum value allowable_values = ["facebook", "instagram", "linkedin", "tiktok", "twitter", "pinterest", "googleads"] 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.connect_ads" end # resource path local_var_path = '/v1/connect/{platform}/ads'.sub('{' + 'platform' + '}', CGI.escape(platform.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'profileId'] = profile_id query_params[:'accountId'] = opts[:'account_id'] if !opts[:'account_id'].nil? query_params[:'redirect_url'] = opts[:'redirect_url'] if !opts[:'redirect_url'].nil? query_params[:'headless'] = opts[:'headless'] if !opts[:'headless'].nil? query_params[:'force'] = opts[:'force'] if !opts[:'force'].nil? query_params[:'adAccountId'] = opts[:'ad_account_id'] if !opts[:'ad_account_id'].nil? query_params[:'adAccountIds'] = @api_client.build_collection_param(opts[:'ad_account_ids'], :multi) if !opts[:'ad_account_ids'].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] || 'ConnectAds200Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"ConnectApi.connect_ads", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ConnectApi#connect_ads\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.
397 398 399 400 |
# File 'lib/zernio-sdk/api/connect_api.rb', line 397 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.
407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 |
# File 'lib/zernio-sdk/api/connect_api.rb', line 407 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'] = 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, ) 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 |
#connect_discord_channel(connect_discord_channel_request, opts = {}) ⇒ nil
Connect a Discord channel Finalize a Discord connect by binding one channel to a profile. Served by a dedicated route, so it is not reachable through POST /v1/connect/platform. One connected account per channel: repeat the call with a different channelId to add another.
465 466 467 468 |
# File 'lib/zernio-sdk/api/connect_api.rb', line 465 def connect_discord_channel(connect_discord_channel_request, opts = {}) connect_discord_channel_with_http_info(connect_discord_channel_request, opts) nil end |
#connect_discord_channel_with_http_info(connect_discord_channel_request, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Connect a Discord channel Finalize a Discord connect by binding one channel to a profile. Served by a dedicated route, so it is not reachable through POST /v1/connect/platform. One connected account per channel: repeat the call with a different channelId to add another.
475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 |
# File 'lib/zernio-sdk/api/connect_api.rb', line 475 def connect_discord_channel_with_http_info(connect_discord_channel_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ConnectApi.connect_discord_channel ...' end # verify the required parameter 'connect_discord_channel_request' is set if @api_client.config.client_side_validation && connect_discord_channel_request.nil? fail ArgumentError, "Missing the required parameter 'connect_discord_channel_request' when calling ConnectApi.connect_discord_channel" end # resource path local_var_path = '/v1/connect/discord' # 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_discord_channel_request) # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"ConnectApi.connect_discord_channel", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ConnectApi#connect_discord_channel\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#connect_open_ai_ads_credentials(connect_open_ai_ads_credentials_request, opts = {}) ⇒ ConnectOpenAIAdsCredentials200Response
Connect an OpenAI Ads account Connect an OpenAI Ads account using an API key from ChatGPT Ads Manager. The key grants full campaign write access on OpenAI's side (OpenAI does not offer a read-only key scope). Zernio uses it to read ads and performance, and to create and manage campaigns you set up through Zernio (create, status, budget, and cancel). Campaigns created directly in ChatGPT Ads Manager can still be managed there.
533 534 535 536 |
# File 'lib/zernio-sdk/api/connect_api.rb', line 533 def connect_open_ai_ads_credentials(connect_open_ai_ads_credentials_request, opts = {}) data, _status_code, _headers = connect_open_ai_ads_credentials_with_http_info(connect_open_ai_ads_credentials_request, opts) data end |
#connect_open_ai_ads_credentials_with_http_info(connect_open_ai_ads_credentials_request, opts = {}) ⇒ Array<(ConnectOpenAIAdsCredentials200Response, Integer, Hash)>
Connect an OpenAI Ads account Connect an OpenAI Ads account using an API key from ChatGPT Ads Manager. The key grants full campaign write access on OpenAI's side (OpenAI does not offer a read-only key scope). Zernio uses it to read ads and performance, and to create and manage campaigns you set up through Zernio (create, status, budget, and cancel). Campaigns created directly in ChatGPT Ads Manager can still be managed there.
543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 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 |
# File 'lib/zernio-sdk/api/connect_api.rb', line 543 def connect_open_ai_ads_credentials_with_http_info(connect_open_ai_ads_credentials_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ConnectApi.connect_open_ai_ads_credentials ...' end # verify the required parameter 'connect_open_ai_ads_credentials_request' is set if @api_client.config.client_side_validation && connect_open_ai_ads_credentials_request.nil? fail ArgumentError, "Missing the required parameter 'connect_open_ai_ads_credentials_request' when calling ConnectApi.connect_open_ai_ads_credentials" end # resource path local_var_path = '/v1/connect/openai-ads/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_open_ai_ads_credentials_request) # return_type return_type = opts[:debug_return_type] || 'ConnectOpenAIAdsCredentials200Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"ConnectApi.connect_open_ai_ads_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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ConnectApi#connect_open_ai_ads_credentials\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#connect_shopify_with_token(connect_shopify_with_token_request, opts = {}) ⇒ ConnectShopifyWithToken200Response
Connect a Shopify store with a custom-app Admin token
Token-paste alternative to the OAuth flow: connect a store using the Admin API access token of a custom app the merchant created in their own Shopify admin (Settings → Apps and sales channels → Develop apps, with the read_content/write_content scopes). Use this when the one-click OAuth connect is unavailable or when your users prefer not to install a third-party app on their store. The token is validated against the store before anything is saved; custom-app tokens do not expire. Connecting the same profile to a store again replaces the stored token in place.
601 602 603 604 |
# File 'lib/zernio-sdk/api/connect_api.rb', line 601 def connect_shopify_with_token(connect_shopify_with_token_request, opts = {}) data, _status_code, _headers = connect_shopify_with_token_with_http_info(connect_shopify_with_token_request, opts) data end |
#connect_shopify_with_token_with_http_info(connect_shopify_with_token_request, opts = {}) ⇒ Array<(ConnectShopifyWithToken200Response, Integer, Hash)>
Connect a Shopify store with a custom-app Admin token Token-paste alternative to the OAuth flow: connect a store using the Admin API access token of a custom app the merchant created in their own Shopify admin (Settings → Apps and sales channels → Develop apps, with the `read_content`/`write_content` scopes). Use this when the one-click OAuth connect is unavailable or when your users prefer not to install a third-party app on their store. The token is validated against the store before anything is saved; custom-app tokens do not expire. Connecting the same profile to a store again replaces the stored token in place.
611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 |
# File 'lib/zernio-sdk/api/connect_api.rb', line 611 def connect_shopify_with_token_with_http_info(connect_shopify_with_token_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ConnectApi.connect_shopify_with_token ...' end # verify the required parameter 'connect_shopify_with_token_request' is set if @api_client.config.client_side_validation && connect_shopify_with_token_request.nil? fail ArgumentError, "Missing the required parameter 'connect_shopify_with_token_request' when calling ConnectApi.connect_shopify_with_token" end # resource path local_var_path = '/v1/connect/shopify/token' # 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_shopify_with_token_request) # return_type return_type = opts[:debug_return_type] || 'ConnectShopifyWithToken200Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"ConnectApi.connect_shopify_with_token", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ConnectApi#connect_shopify_with_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#connect_slack_channel(connect_slack_channel_request, opts = {}) ⇒ nil
Connect a Slack channel Finalize a Slack connect by creating the per-channel account. Served by a dedicated route, so it is not reachable through POST /v1/connect/platform. Send pendingDataToken for a first connect (the nonce from the OAuth redirect) or accountId to add another channel to a workspace already connected.
669 670 671 672 |
# File 'lib/zernio-sdk/api/connect_api.rb', line 669 def connect_slack_channel(connect_slack_channel_request, opts = {}) connect_slack_channel_with_http_info(connect_slack_channel_request, opts) nil end |
#connect_slack_channel_with_http_info(connect_slack_channel_request, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Connect a Slack channel Finalize a Slack connect by creating the per-channel account. Served by a dedicated route, so it is not reachable through POST /v1/connect/platform. Send pendingDataToken for a first connect (the nonce from the OAuth redirect) or accountId to add another channel to a workspace already connected.
679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 |
# File 'lib/zernio-sdk/api/connect_api.rb', line 679 def connect_slack_channel_with_http_info(connect_slack_channel_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ConnectApi.connect_slack_channel ...' end # verify the required parameter 'connect_slack_channel_request' is set if @api_client.config.client_side_validation && connect_slack_channel_request.nil? fail ArgumentError, "Missing the required parameter 'connect_slack_channel_request' when calling ConnectApi.connect_slack_channel" end # resource path local_var_path = '/v1/connect/slack' # 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_slack_channel_request) # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"ConnectApi.connect_slack_channel", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ConnectApi#connect_slack_channel\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#connect_whats_app_credentials(connect_whats_app_credentials_request, opts = {}) ⇒ ConnectWhatsAppCredentials200Response
Connect WhatsApp via credentials Connect a WhatsApp Business Account by providing Meta credentials directly. This is the headless alternative to the Embedded Signup browser flow. To get the required credentials: 1. Go to Meta Business Suite (business.facebook.com) 2. Create or select a WhatsApp Business Account 3. In Business Settings > System Users, create a System User 4. Assign it the whatsapp_business_management and whatsapp_business_messaging permissions 5. Generate a permanent access token 6. Get the WABA ID from WhatsApp Manager > Account Tools > Phone Numbers 7. Get the Phone Number ID from the same page (click on the number) Warning: connecting subscribes your own Meta app to this WABA with an override callback that redirects its webhook delivery to Zernio. This WABA's events stop reaching any callback URL you had configured before, immediately and with no overlap window. Do not unsubscribe your app from the WABA afterward: that also cuts off Zernio's delivery, and recovery requires calling this endpoint again.
737 738 739 740 |
# File 'lib/zernio-sdk/api/connect_api.rb', line 737 def connect_whats_app_credentials(connect_whats_app_credentials_request, opts = {}) data, _status_code, _headers = connect_whats_app_credentials_with_http_info(connect_whats_app_credentials_request, opts) data end |
#connect_whats_app_credentials_with_http_info(connect_whats_app_credentials_request, opts = {}) ⇒ Array<(ConnectWhatsAppCredentials200Response, Integer, Hash)>
Connect WhatsApp via credentials Connect a WhatsApp Business Account by providing Meta credentials directly. This is the headless alternative to the Embedded Signup browser flow. To get the required credentials: 1. Go to Meta Business Suite (business.facebook.com) 2. Create or select a WhatsApp Business Account 3. In Business Settings > System Users, create a System User 4. Assign it the whatsapp_business_management and whatsapp_business_messaging permissions 5. Generate a permanent access token 6. Get the WABA ID from WhatsApp Manager > Account Tools > Phone Numbers 7. Get the Phone Number ID from the same page (click on the number) Warning: connecting subscribes your own Meta app to this WABA with an override callback that redirects its webhook delivery to Zernio. This WABA's events stop reaching any callback URL you had configured before, immediately and with no overlap window. Do not unsubscribe your app from the WABA afterward: that also cuts off Zernio's delivery, and recovery requires calling this endpoint again.
747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 |
# File 'lib/zernio-sdk/api/connect_api.rb', line 747 def connect_whats_app_credentials_with_http_info(connect_whats_app_credentials_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ConnectApi.connect_whats_app_credentials ...' end # verify the required parameter 'connect_whats_app_credentials_request' is set if @api_client.config.client_side_validation && connect_whats_app_credentials_request.nil? fail ArgumentError, "Missing the required parameter 'connect_whats_app_credentials_request' when calling ConnectApi.connect_whats_app_credentials" end # resource path local_var_path = '/v1/connect/whatsapp/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_whats_app_credentials_request) # return_type return_type = opts[:debug_return_type] || 'ConnectWhatsAppCredentials200Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"ConnectApi.connect_whats_app_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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ConnectApi#connect_whats_app_credentials\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#connect_whats_app_embedded_signup(connect_whats_app_embedded_signup_request, opts = {}) ⇒ nil
Connect WhatsApp from Embedded Signup Exchange the authorization code Meta Embedded Signup returns to your browser SDK. This is the headless completion path for WhatsApp: the code never passes through a redirect_uri, so POST /v1/connect/platform cannot accept it.
805 806 807 808 |
# File 'lib/zernio-sdk/api/connect_api.rb', line 805 def (, opts = {}) (, opts) nil end |
#connect_whats_app_embedded_signup_with_http_info(connect_whats_app_embedded_signup_request, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Connect WhatsApp from Embedded Signup Exchange the authorization code Meta Embedded Signup returns to your browser SDK. This is the headless completion path for WhatsApp: the code never passes through a redirect_uri, so POST /v1/connect/platform cannot accept it.
815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 |
# File 'lib/zernio-sdk/api/connect_api.rb', line 815 def (, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ConnectApi.connect_whats_app_embedded_signup ...' end # verify the required parameter 'connect_whats_app_embedded_signup_request' is set if @api_client.config.client_side_validation && .nil? fail ArgumentError, "Missing the required parameter 'connect_whats_app_embedded_signup_request' when calling ConnectApi.connect_whats_app_embedded_signup" end # resource path local_var_path = '/v1/connect/whatsapp/embedded-signup' # 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() # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"ConnectApi.connect_whats_app_embedded_signup", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ConnectApi#connect_whats_app_embedded_signup\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_pinterest_board(account_id, create_pinterest_board_request, opts = {}) ⇒ CreatePinterestBoard201Response
Create Pinterest board
Creates a new board on the connected Pinterest account. The returned board ID can be used immediately as platformSpecificData.boardId when creating a Pinterest post.
874 875 876 877 |
# File 'lib/zernio-sdk/api/connect_api.rb', line 874 def create_pinterest_board(account_id, create_pinterest_board_request, opts = {}) data, _status_code, _headers = create_pinterest_board_with_http_info(account_id, create_pinterest_board_request, opts) data end |
#create_pinterest_board_with_http_info(account_id, create_pinterest_board_request, opts = {}) ⇒ Array<(CreatePinterestBoard201Response, Integer, Hash)>
Create Pinterest board Creates a new board on the connected Pinterest account. The returned board ID can be used immediately as `platformSpecificData.boardId` when creating a Pinterest post.
885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 |
# File 'lib/zernio-sdk/api/connect_api.rb', line 885 def create_pinterest_board_with_http_info(account_id, create_pinterest_board_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ConnectApi.create_pinterest_board ...' end # verify the required parameter 'account_id' is set if @api_client.config.client_side_validation && account_id.nil? fail ArgumentError, "Missing the required parameter 'account_id' when calling ConnectApi.create_pinterest_board" end # verify the required parameter 'create_pinterest_board_request' is set if @api_client.config.client_side_validation && create_pinterest_board_request.nil? fail ArgumentError, "Missing the required parameter 'create_pinterest_board_request' when calling ConnectApi.create_pinterest_board" end # resource path local_var_path = '/v1/accounts/{accountId}/pinterest-boards'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # 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(create_pinterest_board_request) # return_type return_type = opts[:debug_return_type] || 'CreatePinterestBoard201Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"ConnectApi.create_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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ConnectApi#create_pinterest_board\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: Zernio 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.
952 953 954 955 |
# File 'lib/zernio-sdk/api/connect_api.rb', line 952 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: Zernio 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.
967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 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 1031 1032 1033 1034 1035 |
# File 'lib/zernio-sdk/api/connect_api.rb', line 967 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", "discord", "slack", "whatsapp"] 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 allowable_values = ["instagram_login", "facebook_login"] if @api_client.config.client_side_validation && opts[:'login_method'] && !allowable_values.include?(opts[:'login_method']) fail ArgumentError, "invalid value for \"login_method\", must be one of #{allowable_values}" end allowable_values = ["api", "business_app"] if @api_client.config.client_side_validation && opts[:'onboarding'] && !allowable_values.include?(opts[:'onboarding']) fail ArgumentError, "invalid value for \"onboarding\", must be one of #{allowable_values}" 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? query_params[:'loginMethod'] = opts[:'login_method'] if !opts[:'login_method'].nil? query_params[:'onboarding'] = opts[:'onboarding'] if !opts[:'onboarding'].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'] = 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, ) 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.
1043 1044 1045 1046 |
# File 'lib/zernio-sdk/api/connect_api.rb', line 1043 def get_facebook_pages(account_id, opts = {}) data, _status_code, _headers = get_facebook_pages_with_http_info(account_id, 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.
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/zernio-sdk/api/connect_api.rb', line 1054 def get_facebook_pages_with_http_info(account_id, 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 && account_id.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(account_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'refresh'] = opts[:'refresh'] if !opts[:'refresh'].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] || 'GetFacebookPages200Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = 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, ) 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 Google Business Profile locations the connected account can access, plus the currently selected location. The list is bounded (see hasMore); for accounts that own many locations, use the search or filter query params to find a specific one instead of loading them all, or raise limit to enumerate an account with more than 100 locations.
1111 1112 1113 1114 |
# File 'lib/zernio-sdk/api/connect_api.rb', line 1111 def get_gmb_locations(account_id, opts = {}) data, _status_code, _headers = get_gmb_locations_with_http_info(account_id, opts) data end |
#get_gmb_locations_with_http_info(account_id, opts = {}) ⇒ Array<(GetGmbLocations200Response, Integer, Hash)>
List GBP locations Returns Google Business Profile locations the connected account can access, plus the currently selected location. The list is bounded (see hasMore); for accounts that own many locations, use the search or filter query params to find a specific one instead of loading them all, or raise limit to enumerate an account with more than 100 locations.
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 1180 1181 |
# File 'lib/zernio-sdk/api/connect_api.rb', line 1124 def get_gmb_locations_with_http_info(account_id, 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 && account_id.nil? fail ArgumentError, "Missing the required parameter 'account_id' when calling ConnectApi.get_gmb_locations" end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 500 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ConnectApi.get_gmb_locations, must be smaller than or equal to 500.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ConnectApi.get_gmb_locations, must be greater than or equal to 1.' end # resource path local_var_path = '/v1/accounts/{accountId}/gmb-locations'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil? query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].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] || 'GetGmbLocations200Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = 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, ) 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.
1188 1189 1190 1191 |
# File 'lib/zernio-sdk/api/connect_api.rb', line 1188 def get_linked_in_organizations(account_id, opts = {}) data, _status_code, _headers = get_linked_in_organizations_with_http_info(account_id, 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.
1198 1199 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 |
# File 'lib/zernio-sdk/api/connect_api.rb', line 1198 def get_linked_in_organizations_with_http_info(account_id, 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 && account_id.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(account_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'GetLinkedInOrganizations200Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = 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, ) 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. Scope: This endpoint is used for LinkedIn organizations, Snapchat profiles, and Pinterest boards, where the selection list is too large to fit in URL params. The redirect carries a pendingDataToken instead of the full payload; the response includes the corresponding selection array (e.g. boards for Pinterest). WhatsApp, Facebook, Google Business and other platforms pass selection state directly via URL query params on the redirect (profileId, tempToken, step), no pending record is created, so this endpoint will return 404 for those flows. Use the platform-specific selection endpoint instead (e.g. /v1/connect/whatsapp/select-phone-number). Token is one-time use and expires after 10 minutes. No authentication required.
1251 1252 1253 1254 |
# File 'lib/zernio-sdk/api/connect_api.rb', line 1251 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. Scope: This endpoint is used for LinkedIn organizations, Snapchat profiles, and Pinterest boards, where the selection list is too large to fit in URL params. The redirect carries a `pendingDataToken` instead of the full payload; the response includes the corresponding selection array (e.g. `boards` for Pinterest). WhatsApp, Facebook, Google Business and other platforms pass selection state directly via URL query params on the redirect (`profileId`, `tempToken`, `step`), no pending record is created, so this endpoint will return 404 for those flows. Use the platform-specific selection endpoint instead (e.g. `/v1/connect/whatsapp/select-phone-number`). Token is one-time use and expires after 10 minutes. No authentication required.
1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 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 |
# File 'lib/zernio-sdk/api/connect_api.rb', line 1261 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'] = 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, ) 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.
1315 1316 1317 1318 |
# File 'lib/zernio-sdk/api/connect_api.rb', line 1315 def get_pinterest_boards(account_id, opts = {}) data, _status_code, _headers = get_pinterest_boards_with_http_info(account_id, 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.
1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 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 |
# File 'lib/zernio-sdk/api/connect_api.rb', line 1325 def get_pinterest_boards_with_http_info(account_id, 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 && account_id.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(account_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'GetPinterestBoards200Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = 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, ) 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.
1379 1380 1381 1382 |
# File 'lib/zernio-sdk/api/connect_api.rb', line 1379 def get_reddit_flairs(account_id, subreddit, opts = {}) data, _status_code, _headers = get_reddit_flairs_with_http_info(account_id, 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.
1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 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 |
# File 'lib/zernio-sdk/api/connect_api.rb', line 1390 def get_reddit_flairs_with_http_info(account_id, 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 && account_id.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 if @api_client.config.client_side_validation && subreddit.to_s.length < 1 fail ArgumentError, 'invalid value for "subreddit" when calling ConnectApi.get_reddit_flairs, the character length must be greater than or equal to 1.' end # resource path local_var_path = '/v1/accounts/{accountId}/reddit-flairs'.sub('{' + 'accountId' + '}', CGI.escape(account_id.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'] = 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, ) 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.
1452 1453 1454 1455 |
# File 'lib/zernio-sdk/api/connect_api.rb', line 1452 def get_reddit_subreddits(account_id, opts = {}) data, _status_code, _headers = get_reddit_subreddits_with_http_info(account_id, 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.
1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 |
# File 'lib/zernio-sdk/api/connect_api.rb', line 1462 def get_reddit_subreddits_with_http_info(account_id, 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 && account_id.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(account_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'GetRedditSubreddits200Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = 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, ) 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_shopify_connect_url(profile_id, shop, opts = {}) ⇒ GetConnectUrl200Response
Get Shopify OAuth connect URL
Initiate the Shopify OAuth flow for a store. Shopify is a connect-only platform: the connected account does not publish social posts, it powers the Blogs API (/v1/accounts/{accountId}/blogs). Returns an authUrl to redirect the merchant to; after they approve the install, Shopify redirects their browser to Zernio's callback, the account is created on the profile (platform shopify), and the browser is redirected to redirect_url (or the Zernio dashboard when omitted). Requested scopes are read_content and write_content (content only; no customer or order data). Connecting the same profile to a store again refreshes the stored token in place.
1517 1518 1519 1520 |
# File 'lib/zernio-sdk/api/connect_api.rb', line 1517 def get_shopify_connect_url(profile_id, shop, opts = {}) data, _status_code, _headers = get_shopify_connect_url_with_http_info(profile_id, shop, opts) data end |
#get_shopify_connect_url_with_http_info(profile_id, shop, opts = {}) ⇒ Array<(GetConnectUrl200Response, Integer, Hash)>
Get Shopify OAuth connect URL Initiate the Shopify OAuth flow for a store. Shopify is a connect-only platform: the connected account does not publish social posts, it powers the Blogs API (`/v1/accounts/accountId/blogs`). Returns an `authUrl` to redirect the merchant to; after they approve the install, Shopify redirects their browser to Zernio's callback, the account is created on the profile (platform `shopify`), and the browser is redirected to `redirect_url` (or the Zernio dashboard when omitted). Requested scopes are `read_content` and `write_content` (content only; no customer or order data). Connecting the same profile to a store again refreshes the stored token in place.
1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 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 |
# File 'lib/zernio-sdk/api/connect_api.rb', line 1529 def get_shopify_connect_url_with_http_info(profile_id, shop, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ConnectApi.get_shopify_connect_url ...' 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_shopify_connect_url" end # verify the required parameter 'shop' is set if @api_client.config.client_side_validation && shop.nil? fail ArgumentError, "Missing the required parameter 'shop' when calling ConnectApi.get_shopify_connect_url" end # resource path local_var_path = '/v1/connect/shopify' # query parameters query_params = opts[:query_params] || {} query_params[:'profileId'] = profile_id query_params[:'shop'] = shop query_params[:'redirect_url'] = opts[:'redirect_url'] if !opts[:'redirect_url'].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'] = opts.merge( :operation => :"ConnectApi.get_shopify_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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ConnectApi#get_shopify_connect_url\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_subreddit_rules(account_id, subreddit, opts = {}) ⇒ GetSubredditRules200Response
Get subreddit rules
Returns a subreddit's posting rules plus Reddit's site-wide rules, so you can check them before submitting and avoid a removal. Use this alongside POST /v1/tools/validate/subreddit, which only confirms that a subreddit exists and reports its basic posting settings.
1590 1591 1592 1593 |
# File 'lib/zernio-sdk/api/connect_api.rb', line 1590 def get_subreddit_rules(account_id, subreddit, opts = {}) data, _status_code, _headers = get_subreddit_rules_with_http_info(account_id, subreddit, opts) data end |
#get_subreddit_rules_with_http_info(account_id, subreddit, opts = {}) ⇒ Array<(GetSubredditRules200Response, Integer, Hash)>
Get subreddit rules Returns a subreddit's posting rules plus Reddit's site-wide rules, so you can check them before submitting and avoid a removal. Use this alongside `POST /v1/tools/validate/subreddit`, which only confirms that a subreddit exists and reports its basic posting settings.
1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 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 |
# File 'lib/zernio-sdk/api/connect_api.rb', line 1601 def get_subreddit_rules_with_http_info(account_id, subreddit, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ConnectApi.get_subreddit_rules ...' end # verify the required parameter 'account_id' is set if @api_client.config.client_side_validation && account_id.nil? fail ArgumentError, "Missing the required parameter 'account_id' when calling ConnectApi.get_subreddit_rules" 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_subreddit_rules" end # resource path local_var_path = '/v1/accounts/{accountId}/reddit-subreddits/{subreddit}/rules'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)).sub('{' + 'subreddit' + '}', CGI.escape(subreddit.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] || 'GetSubredditRules200Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"ConnectApi.get_subreddit_rules", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ConnectApi#get_subreddit_rules\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.
1658 1659 1660 1661 |
# File 'lib/zernio-sdk/api/connect_api.rb', line 1658 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.
1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 |
# File 'lib/zernio-sdk/api/connect_api.rb', line 1668 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'] = 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, ) 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 |
#get_youtube_playlists(account_id, opts = {}) ⇒ GetYoutubePlaylists200Response
List YouTube playlists Returns the playlists available for a connected YouTube account. Use this to get a playlist ID when creating a YouTube post with the playlistId field.
1722 1723 1724 1725 |
# File 'lib/zernio-sdk/api/connect_api.rb', line 1722 def get_youtube_playlists(account_id, opts = {}) data, _status_code, _headers = get_youtube_playlists_with_http_info(account_id, opts) data end |
#get_youtube_playlists_with_http_info(account_id, opts = {}) ⇒ Array<(GetYoutubePlaylists200Response, Integer, Hash)>
List YouTube playlists Returns the playlists available for a connected YouTube account. Use this to get a playlist ID when creating a YouTube post with the playlistId field.
1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 |
# File 'lib/zernio-sdk/api/connect_api.rb', line 1732 def get_youtube_playlists_with_http_info(account_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ConnectApi.get_youtube_playlists ...' end # verify the required parameter 'account_id' is set if @api_client.config.client_side_validation && account_id.nil? fail ArgumentError, "Missing the required parameter 'account_id' when calling ConnectApi.get_youtube_playlists" end # resource path local_var_path = '/v1/accounts/{accountId}/youtube-playlists'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'GetYoutubePlaylists200Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"ConnectApi.get_youtube_playlists", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ConnectApi#get_youtube_playlists\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. Facebook, Google Business, Snapchat and WhatsApp are not accepted here: their account identity is a destination chosen after OAuth, which this single-shot exchange cannot do. Connect them through the redirect flow from GET /v1/connect/{platform}, or, for WhatsApp Embedded Signup, through POST /v1/connect/whatsapp/embedded-signup.
1786 1787 1788 1789 |
# File 'lib/zernio-sdk/api/connect_api.rb', line 1786 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. Facebook, Google Business, Snapchat and WhatsApp are not accepted here: their account identity is a destination chosen after OAuth, which this single-shot exchange cannot do. Connect them through the redirect flow from `GET /v1/connect/platform`, or, for WhatsApp Embedded Signup, through `POST /v1/connect/whatsapp/embedded-signup`.
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 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 |
# File 'lib/zernio-sdk/api/connect_api.rb', line 1797 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 enum value allowable_values = ["instagram", "twitter", "threads", "linkedin", "youtube", "tiktok", "reddit", "pinterest"] 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 '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'] = 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, ) 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.
1864 1865 1866 1867 |
# File 'lib/zernio-sdk/api/connect_api.rb', line 1864 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.
1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 |
# File 'lib/zernio-sdk/api/connect_api.rb', line 1874 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'] = 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, ) 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.
1933 1934 1935 1936 |
# File 'lib/zernio-sdk/api/connect_api.rb', line 1933 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.
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 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 |
# File 'lib/zernio-sdk/api/connect_api.rb', line 1944 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'] = 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, ) 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(opts = {}) ⇒ ListGoogleBusinessLocations200Response
List GBP locations For headless flows. Returns the list of GBP locations the user can manage. Use pendingDataToken (from the OAuth callback redirect) to list locations without consuming the token, so it remains available for select-location. Use X-Connect-Token header if connecting via API key.
2007 2008 2009 2010 |
# File 'lib/zernio-sdk/api/connect_api.rb', line 2007 def list_google_business_locations(opts = {}) data, _status_code, _headers = list_google_business_locations_with_http_info(opts) data end |
#list_google_business_locations_with_http_info(opts = {}) ⇒ Array<(ListGoogleBusinessLocations200Response, Integer, Hash)>
List GBP locations For headless flows. Returns the list of GBP locations the user can manage. Use pendingDataToken (from the OAuth callback redirect) to list locations without consuming the token, so it remains available for select-location. Use X-Connect-Token header if connecting via API key.
2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 |
# File 'lib/zernio-sdk/api/connect_api.rb', line 2021 def list_google_business_locations_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: 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'] = opts[:'profile_id'] if !opts[:'profile_id'].nil? query_params[:'pendingDataToken'] = opts[:'pending_data_token'] if !opts[:'pending_data_token'].nil? query_params[:'tempToken'] = opts[:'temp_token'] if !opts[:'temp_token'].nil? query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil? query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].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] || 'ListGoogleBusinessLocations200Response' # auth_names auth_names = opts[:debug_auth_names] || ['connectToken', 'bearerAuth'] = 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, ) 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_instagram_pages(profile_id, temp_token, opts = {}) ⇒ ListInstagramPages200Response
List Pages with a linked Instagram account
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 (headless mode adds step=select_account) 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.
2076 2077 2078 2079 |
# File 'lib/zernio-sdk/api/connect_api.rb', line 2076 def list_instagram_pages(profile_id, temp_token, opts = {}) data, _status_code, _headers = list_instagram_pages_with_http_info(profile_id, temp_token, opts) data end |
#list_instagram_pages_with_http_info(profile_id, temp_token, opts = {}) ⇒ Array<(ListInstagramPages200Response, Integer, Hash)>
List Pages with a linked Instagram account 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 (headless mode adds `step=select_account`) 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.
2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 |
# File 'lib/zernio-sdk/api/connect_api.rb', line 2087 def list_instagram_pages_with_http_info(profile_id, temp_token, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ConnectApi.list_instagram_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_instagram_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_instagram_pages" end # resource path local_var_path = '/v1/connect/instagram/select-account' # 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] || 'ListInstagramPages200Response' # auth_names auth_names = opts[:debug_auth_names] || ['connectToken', 'bearerAuth'] = opts.merge( :operation => :"ConnectApi.list_instagram_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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ConnectApi#list_instagram_pages\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.
2147 2148 2149 2150 |
# File 'lib/zernio-sdk/api/connect_api.rb', line 2147 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.
2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 |
# File 'lib/zernio-sdk/api/connect_api.rb', line 2158 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'] = 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, ) 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.
2219 2220 2221 2222 |
# File 'lib/zernio-sdk/api/connect_api.rb', line 2219 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.
2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 |
# File 'lib/zernio-sdk/api/connect_api.rb', line 2231 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'] = 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, ) 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.
2297 2298 2299 2300 |
# File 'lib/zernio-sdk/api/connect_api.rb', line 2297 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.
2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 |
# File 'lib/zernio-sdk/api/connect_api.rb', line 2309 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'] = 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, ) 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 |
#list_whats_app_phone_numbers(profile_id, temp_token, opts = {}) ⇒ ListWhatsAppPhoneNumbers200Response
List numbers for selection
Fetch the WhatsApp phone numbers available across the user's WhatsApp Business Accounts (WABAs) after a headless OAuth flow. WhatsApp OAuth grants access at the WABA level. When a connected WABA has 2 or more phone numbers, you must call this endpoint to list them and then POST /v1/connect/whatsapp/select-phone-number to bind one to the Zernio profile. Single-phone WABAs auto-complete during the OAuth callback and never reach this endpoint. Use the profileId and tempToken returned in the headless redirect (step=select_phone_number). Alternative: if you already know wabaId and phoneNumberId (e.g. from Meta Business Suite), use connectWhatsAppCredentials instead, which skips this two-step flow.
2375 2376 2377 2378 |
# File 'lib/zernio-sdk/api/connect_api.rb', line 2375 def list_whats_app_phone_numbers(profile_id, temp_token, opts = {}) data, _status_code, _headers = list_whats_app_phone_numbers_with_http_info(profile_id, temp_token, opts) data end |
#list_whats_app_phone_numbers_with_http_info(profile_id, temp_token, opts = {}) ⇒ Array<(ListWhatsAppPhoneNumbers200Response, Integer, Hash)>
List numbers for selection Fetch the WhatsApp phone numbers available across the user's WhatsApp Business Accounts (WABAs) after a headless OAuth flow. WhatsApp OAuth grants access at the WABA level. When a connected WABA has 2 or more phone numbers, you must call this endpoint to list them and then `POST /v1/connect/whatsapp/select-phone-number` to bind one to the Zernio profile. Single-phone WABAs auto-complete during the OAuth callback and never reach this endpoint. Use the `profileId` and `tempToken` returned in the headless redirect (`step=select_phone_number`). Alternative: if you already know `wabaId` and `phoneNumberId` (e.g. from Meta Business Suite), use `connectWhatsAppCredentials` instead, which skips this two-step flow.
2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 |
# File 'lib/zernio-sdk/api/connect_api.rb', line 2387 def list_whats_app_phone_numbers_with_http_info(profile_id, temp_token, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ConnectApi.list_whats_app_phone_numbers ...' 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_whats_app_phone_numbers" 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_whats_app_phone_numbers" end # resource path local_var_path = '/v1/connect/whatsapp/select-phone-number' # 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'] = 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] # return_type return_type = opts[:debug_return_type] || 'ListWhatsAppPhoneNumbers200Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"ConnectApi.list_whats_app_phone_numbers", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ConnectApi#list_whats_app_phone_numbers\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.
2447 2448 2449 2450 |
# File 'lib/zernio-sdk/api/connect_api.rb', line 2447 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's selected Facebook page. Pass the userProfile from the OAuth redirect and use X-Connect-Token if connecting via API key.
2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 |
# File 'lib/zernio-sdk/api/connect_api.rb', line 2457 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'] = 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, ) 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 GBP flow by saving the user's selected location. The pendingDataToken is returned in your redirect URL after OAuth completes (step=select_location). Tokens and profile data are stored server-side, so only the pendingDataToken is needed here. Use X-Connect-Token header if connecting via API key.
2515 2516 2517 2518 |
# File 'lib/zernio-sdk/api/connect_api.rb', line 2515 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 GBP flow by saving the user's selected location. The pendingDataToken is returned in your redirect URL after OAuth completes (step=select_location). Tokens and profile data are stored server-side, so only the pendingDataToken is needed here. Use X-Connect-Token header if connecting via API key.
2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 |
# File 'lib/zernio-sdk/api/connect_api.rb', line 2525 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'] = 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, ) 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_instagram_account(select_instagram_account_request, opts = {}) ⇒ SelectInstagramAccount200Response
Select the Page whose Instagram account to connect 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.
2583 2584 2585 2586 |
# File 'lib/zernio-sdk/api/connect_api.rb', line 2583 def select_instagram_account(select_instagram_account_request, opts = {}) data, _status_code, _headers = select_instagram_account_with_http_info(select_instagram_account_request, opts) data end |
#select_instagram_account_with_http_info(select_instagram_account_request, opts = {}) ⇒ Array<(SelectInstagramAccount200Response, Integer, Hash)>
Select the Page whose Instagram account to connect 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.
2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 |
# File 'lib/zernio-sdk/api/connect_api.rb', line 2593 def select_instagram_account_with_http_info(select_instagram_account_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ConnectApi.select_instagram_account ...' end # verify the required parameter 'select_instagram_account_request' is set if @api_client.config.client_side_validation && select_instagram_account_request.nil? fail ArgumentError, "Missing the required parameter 'select_instagram_account_request' when calling ConnectApi.select_instagram_account" end # resource path local_var_path = '/v1/connect/instagram/select-account' # 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_instagram_account_request) # return_type return_type = opts[:debug_return_type] || 'SelectInstagramAccount200Response' # auth_names auth_names = opts[:debug_auth_names] || ['connectToken', 'bearerAuth'] = opts.merge( :operation => :"ConnectApi.select_instagram_account", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ConnectApi#select_instagram_account\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.
2651 2652 2653 2654 |
# File 'lib/zernio-sdk/api/connect_api.rb', line 2651 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 "personal" or "organization" to connect as a company page. Use X-Connect-Token if connecting via API key.
2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 |
# File 'lib/zernio-sdk/api/connect_api.rb', line 2661 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'] = 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, ) 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.
2719 2720 2721 2722 |
# File 'lib/zernio-sdk/api/connect_api.rb', line 2719 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.
2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 |
# File 'lib/zernio-sdk/api/connect_api.rb', line 2729 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'] = 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, ) 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.
2788 2789 2790 2791 |
# File 'lib/zernio-sdk/api/connect_api.rb', line 2788 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.
2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 |
# File 'lib/zernio-sdk/api/connect_api.rb', line 2799 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'] = 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, ) 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 |
#set_reddit_post_flair(account_id, set_reddit_post_flair_request, opts = {}) ⇒ UpdateYoutubeDefaultPlaylist200Response
Set Reddit post flair
Applies a flair to a post the connected account already published. Use the GET on this path to list the available flairTemplateId values for the subreddit. Flair can also be set at submit time by passing flairId in platformSpecificData when creating the post. This endpoint is for changing it afterwards. The subreddit must allow users to select their own post flair. Setting flair on another user's post requires moderator permissions, which Zernio does not request.
2859 2860 2861 2862 |
# File 'lib/zernio-sdk/api/connect_api.rb', line 2859 def set_reddit_post_flair(account_id, set_reddit_post_flair_request, opts = {}) data, _status_code, _headers = set_reddit_post_flair_with_http_info(account_id, set_reddit_post_flair_request, opts) data end |
#set_reddit_post_flair_with_http_info(account_id, set_reddit_post_flair_request, opts = {}) ⇒ Array<(UpdateYoutubeDefaultPlaylist200Response, Integer, Hash)>
Set Reddit post flair Applies a flair to a post the connected account already published. Use the GET on this path to list the available `flairTemplateId` values for the subreddit. Flair can also be set at submit time by passing `flairId` in `platformSpecificData` when creating the post. This endpoint is for changing it afterwards. The subreddit must allow users to select their own post flair. Setting flair on another user's post requires moderator permissions, which Zernio does not request.
2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 |
# File 'lib/zernio-sdk/api/connect_api.rb', line 2870 def set_reddit_post_flair_with_http_info(account_id, set_reddit_post_flair_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ConnectApi.set_reddit_post_flair ...' end # verify the required parameter 'account_id' is set if @api_client.config.client_side_validation && account_id.nil? fail ArgumentError, "Missing the required parameter 'account_id' when calling ConnectApi.set_reddit_post_flair" end # verify the required parameter 'set_reddit_post_flair_request' is set if @api_client.config.client_side_validation && set_reddit_post_flair_request.nil? fail ArgumentError, "Missing the required parameter 'set_reddit_post_flair_request' when calling ConnectApi.set_reddit_post_flair" end # resource path local_var_path = '/v1/accounts/{accountId}/reddit-flairs'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # 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(set_reddit_post_flair_request) # return_type return_type = opts[:debug_return_type] || 'UpdateYoutubeDefaultPlaylist200Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"ConnectApi.set_reddit_post_flair", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ConnectApi#set_reddit_post_flair\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.
2933 2934 2935 2936 |
# File 'lib/zernio-sdk/api/connect_api.rb', line 2933 def update_facebook_page(account_id, update_facebook_page_request, opts = {}) data, _status_code, _headers = update_facebook_page_with_http_info(account_id, 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.
2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 |
# File 'lib/zernio-sdk/api/connect_api.rb', line 2944 def update_facebook_page_with_http_info(account_id, 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 && account_id.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(account_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # 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'] = 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, ) 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.
3007 3008 3009 3010 |
# File 'lib/zernio-sdk/api/connect_api.rb', line 3007 def update_gmb_location(account_id, update_gmb_location_request, opts = {}) data, _status_code, _headers = update_gmb_location_with_http_info(account_id, 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.
3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 |
# File 'lib/zernio-sdk/api/connect_api.rb', line 3018 def update_gmb_location_with_http_info(account_id, 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 && account_id.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(account_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # 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'] = 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, ) 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 = {}) ⇒ UpdateLinkedInOrganization200Response
Switch LinkedIn account type Switch a LinkedIn account between personal profile and organization (company page) posting.
3081 3082 3083 3084 |
# File 'lib/zernio-sdk/api/connect_api.rb', line 3081 def update_linked_in_organization(account_id, update_linked_in_organization_request, opts = {}) data, _status_code, _headers = update_linked_in_organization_with_http_info(account_id, update_linked_in_organization_request, opts) data end |
#update_linked_in_organization_with_http_info(account_id, update_linked_in_organization_request, opts = {}) ⇒ Array<(UpdateLinkedInOrganization200Response, Integer, Hash)>
Switch LinkedIn account type Switch a LinkedIn account between personal profile and organization (company page) posting.
3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 |
# File 'lib/zernio-sdk/api/connect_api.rb', line 3092 def update_linked_in_organization_with_http_info(account_id, 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 && account_id.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(account_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # 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] || 'UpdateLinkedInOrganization200Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = 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, ) 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.
3155 3156 3157 3158 |
# File 'lib/zernio-sdk/api/connect_api.rb', line 3155 def update_pinterest_boards(account_id, update_pinterest_boards_request, opts = {}) data, _status_code, _headers = update_pinterest_boards_with_http_info(account_id, 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.
3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 |
# File 'lib/zernio-sdk/api/connect_api.rb', line 3166 def update_pinterest_boards_with_http_info(account_id, 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 && account_id.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(account_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # 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'] = 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, ) 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 = {}) ⇒ UpdateYoutubeDefaultPlaylist200Response
Set default subreddit Sets the default subreddit used when publishing posts for this Reddit account.
3229 3230 3231 3232 |
# File 'lib/zernio-sdk/api/connect_api.rb', line 3229 def update_reddit_subreddits(account_id, update_reddit_subreddits_request, opts = {}) data, _status_code, _headers = update_reddit_subreddits_with_http_info(account_id, update_reddit_subreddits_request, opts) data end |
#update_reddit_subreddits_with_http_info(account_id, update_reddit_subreddits_request, opts = {}) ⇒ Array<(UpdateYoutubeDefaultPlaylist200Response, Integer, Hash)>
Set default subreddit Sets the default subreddit used when publishing posts for this Reddit account.
3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 |
# File 'lib/zernio-sdk/api/connect_api.rb', line 3240 def update_reddit_subreddits_with_http_info(account_id, 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 && account_id.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(account_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # 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] || 'UpdateYoutubeDefaultPlaylist200Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = 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, ) 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 |
#update_youtube_default_playlist(account_id, update_youtube_default_playlist_request, opts = {}) ⇒ UpdateYoutubeDefaultPlaylist200Response
Set default YouTube playlist Sets the default playlist used when publishing videos for this account. When a post does not specify a playlistId, the default playlist is not automatically used (it is stored for client-side convenience).
3303 3304 3305 3306 |
# File 'lib/zernio-sdk/api/connect_api.rb', line 3303 def update_youtube_default_playlist(account_id, update_youtube_default_playlist_request, opts = {}) data, _status_code, _headers = update_youtube_default_playlist_with_http_info(account_id, update_youtube_default_playlist_request, opts) data end |
#update_youtube_default_playlist_with_http_info(account_id, update_youtube_default_playlist_request, opts = {}) ⇒ Array<(UpdateYoutubeDefaultPlaylist200Response, Integer, Hash)>
Set default YouTube playlist Sets the default playlist used when publishing videos for this account. When a post does not specify a playlistId, the default playlist is not automatically used (it is stored for client-side convenience).
3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 |
# File 'lib/zernio-sdk/api/connect_api.rb', line 3314 def update_youtube_default_playlist_with_http_info(account_id, update_youtube_default_playlist_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ConnectApi.update_youtube_default_playlist ...' end # verify the required parameter 'account_id' is set if @api_client.config.client_side_validation && account_id.nil? fail ArgumentError, "Missing the required parameter 'account_id' when calling ConnectApi.update_youtube_default_playlist" end # verify the required parameter 'update_youtube_default_playlist_request' is set if @api_client.config.client_side_validation && update_youtube_default_playlist_request.nil? fail ArgumentError, "Missing the required parameter 'update_youtube_default_playlist_request' when calling ConnectApi.update_youtube_default_playlist" end # resource path local_var_path = '/v1/accounts/{accountId}/youtube-playlists'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # 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_youtube_default_playlist_request) # return_type return_type = opts[:debug_return_type] || 'UpdateYoutubeDefaultPlaylist200Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"ConnectApi.update_youtube_default_playlist", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ConnectApi#update_youtube_default_playlist\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#vote_reddit_thing(account_id, vote_reddit_thing_request, opts = {}) ⇒ UpdateYoutubeDefaultPlaylist200Response
Vote on a Reddit post or comment Cast, change, or clear the connected account's vote on a Reddit post or comment. Reddit requires that votes be cast by humans. Reddit's API terms permit a client to proxy a human's action one-for-one, and prohibit a bot from deciding how to vote or from amplifying a human's vote. Call this endpoint only in direct response to an explicit action by the account owner. Automated or agent-decided voting is vote manipulation and puts API access at risk.
3377 3378 3379 3380 |
# File 'lib/zernio-sdk/api/connect_api.rb', line 3377 def vote_reddit_thing(account_id, vote_reddit_thing_request, opts = {}) data, _status_code, _headers = vote_reddit_thing_with_http_info(account_id, vote_reddit_thing_request, opts) data end |
#vote_reddit_thing_with_http_info(account_id, vote_reddit_thing_request, opts = {}) ⇒ Array<(UpdateYoutubeDefaultPlaylist200Response, Integer, Hash)>
Vote on a Reddit post or comment Cast, change, or clear the connected account's vote on a Reddit post or comment. Reddit requires that votes be cast by humans. Reddit's API terms permit a client to proxy a human's action one-for-one, and prohibit a bot from deciding how to vote or from amplifying a human's vote. Call this endpoint only in direct response to an explicit action by the account owner. Automated or agent-decided voting is vote manipulation and puts API access at risk.
3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 |
# File 'lib/zernio-sdk/api/connect_api.rb', line 3388 def vote_reddit_thing_with_http_info(account_id, vote_reddit_thing_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ConnectApi.vote_reddit_thing ...' end # verify the required parameter 'account_id' is set if @api_client.config.client_side_validation && account_id.nil? fail ArgumentError, "Missing the required parameter 'account_id' when calling ConnectApi.vote_reddit_thing" end # verify the required parameter 'vote_reddit_thing_request' is set if @api_client.config.client_side_validation && vote_reddit_thing_request.nil? fail ArgumentError, "Missing the required parameter 'vote_reddit_thing_request' when calling ConnectApi.vote_reddit_thing" end # resource path local_var_path = '/v1/accounts/{accountId}/reddit-vote'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # 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(vote_reddit_thing_request) # return_type return_type = opts[:debug_return_type] || 'UpdateYoutubeDefaultPlaylist200Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"ConnectApi.vote_reddit_thing", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ConnectApi#vote_reddit_thing\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |