Class: Zernio::AccountsApi
- Inherits:
-
Object
- Object
- Zernio::AccountsApi
- Defined in:
- lib/zernio-sdk/api/accounts_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#delete_account(account_id, opts = {}) ⇒ DeleteAccountGroup200Response
Disconnect account Disconnects and removes a connected social account.
-
#delete_account_with_http_info(account_id, opts = {}) ⇒ Array<(DeleteAccountGroup200Response, Integer, Hash)>
Disconnect account Disconnects and removes a connected social account.
-
#get_account_health(account_id, opts = {}) ⇒ GetAccountHealth200Response
Check account health Returns detailed health info for a specific account including token status, permissions, and recommendations.
-
#get_account_health_with_http_info(account_id, opts = {}) ⇒ Array<(GetAccountHealth200Response, Integer, Hash)>
Check account health Returns detailed health info for a specific account including token status, permissions, and recommendations.
-
#get_all_accounts_health(opts = {}) ⇒ GetAllAccountsHealth200Response
Check accounts health Returns health status of all connected accounts including token validity, permissions, and issues needing attention.
-
#get_all_accounts_health_with_http_info(opts = {}) ⇒ Array<(GetAllAccountsHealth200Response, Integer, Hash)>
Check accounts health Returns health status of all connected accounts including token validity, permissions, and issues needing attention.
-
#get_follower_stats(opts = {}) ⇒ FollowerStatsResponse
Get follower stats Returns follower count history and growth metrics for connected social accounts.
-
#get_follower_stats_with_http_info(opts = {}) ⇒ Array<(FollowerStatsResponse, Integer, Hash)>
Get follower stats Returns follower count history and growth metrics for connected social accounts.
-
#get_slack_settings(account_id, opts = {}) ⇒ GetSlackSettings200Response
Get Slack account settings Returns the connected Slack channel details and the default message identity (name and avatar shown as the author on every post, with Slack's APP badge).
-
#get_slack_settings_with_http_info(account_id, opts = {}) ⇒ Array<(GetSlackSettings200Response, Integer, Hash)>
Get Slack account settings Returns the connected Slack channel details and the default message identity (name and avatar shown as the author on every post, with Slack's APP badge).
-
#get_tik_tok_creator_info(account_id, opts = {}) ⇒ GetTikTokCreatorInfo200Response
Get TikTok creator info Returns TikTok creator details, available privacy levels, posting limits, and commercial content options for a specific TikTok account.
-
#get_tik_tok_creator_info_with_http_info(account_id, opts = {}) ⇒ Array<(GetTikTokCreatorInfo200Response, Integer, Hash)>
Get TikTok creator info Returns TikTok creator details, available privacy levels, posting limits, and commercial content options for a specific TikTok account.
-
#initialize(api_client = ApiClient.default) ⇒ AccountsApi
constructor
A new instance of AccountsApi.
-
#list_accounts(opts = {}) ⇒ AccountsListResponse
List accounts Returns connected social accounts.
-
#list_accounts_with_http_info(opts = {}) ⇒ Array<(AccountsListResponse, Integer, Hash)>
List accounts Returns connected social accounts.
-
#move_account_to_profile(account_id, move_account_to_profile_request, opts = {}) ⇒ MoveAccountToProfile200Response
Move account to another profile Moves a connected social account to a different profile owned by the same user.
-
#move_account_to_profile_with_http_info(account_id, move_account_to_profile_request, opts = {}) ⇒ Array<(MoveAccountToProfile200Response, Integer, Hash)>
Move account to another profile Moves a connected social account to a different profile owned by the same user.
-
#update_account(account_id, update_account_request, opts = {}) ⇒ UpdateAccount200Response
Update account Updates a connected social account's display name or username override.
-
#update_account_with_http_info(account_id, update_account_request, opts = {}) ⇒ Array<(UpdateAccount200Response, Integer, Hash)>
Update account Updates a connected social account's display name or username override.
-
#update_slack_settings(account_id, update_slack_settings_request, opts = {}) ⇒ nil
Update Slack account settings Set or clear the default message identity for this channel.
-
#update_slack_settings_with_http_info(account_id, update_slack_settings_request, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Update Slack account settings Set or clear the default message identity for this channel.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ AccountsApi
Returns a new instance of AccountsApi.
19 20 21 |
# File 'lib/zernio-sdk/api/accounts_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/accounts_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#delete_account(account_id, opts = {}) ⇒ DeleteAccountGroup200Response
Disconnect account Disconnects and removes a connected social account.
27 28 29 30 |
# File 'lib/zernio-sdk/api/accounts_api.rb', line 27 def delete_account(account_id, opts = {}) data, _status_code, _headers = delete_account_with_http_info(account_id, opts) data end |
#delete_account_with_http_info(account_id, opts = {}) ⇒ Array<(DeleteAccountGroup200Response, Integer, Hash)>
Disconnect account Disconnects and removes a connected social account.
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
# File 'lib/zernio-sdk/api/accounts_api.rb', line 37 def delete_account_with_http_info(account_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountsApi.delete_account ...' 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 AccountsApi.delete_account" end # resource path local_var_path = '/v1/accounts/{accountId}'.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] || 'DeleteAccountGroup200Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"AccountsApi.delete_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(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountsApi#delete_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_account_health(account_id, opts = {}) ⇒ GetAccountHealth200Response
Check account health Returns detailed health info for a specific account including token status, permissions, and recommendations.
90 91 92 93 |
# File 'lib/zernio-sdk/api/accounts_api.rb', line 90 def get_account_health(account_id, opts = {}) data, _status_code, _headers = get_account_health_with_http_info(account_id, opts) data end |
#get_account_health_with_http_info(account_id, opts = {}) ⇒ Array<(GetAccountHealth200Response, Integer, Hash)>
Check account health Returns detailed health info for a specific account including token status, permissions, and recommendations.
100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 |
# File 'lib/zernio-sdk/api/accounts_api.rb', line 100 def get_account_health_with_http_info(account_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountsApi.get_account_health ...' 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 AccountsApi.get_account_health" end # resource path local_var_path = '/v1/accounts/{accountId}/health'.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] || 'GetAccountHealth200Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"AccountsApi.get_account_health", :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: AccountsApi#get_account_health\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_all_accounts_health(opts = {}) ⇒ GetAllAccountsHealth200Response
Check accounts health Returns health status of all connected accounts including token validity, permissions, and issues needing attention.
155 156 157 158 |
# File 'lib/zernio-sdk/api/accounts_api.rb', line 155 def get_all_accounts_health(opts = {}) data, _status_code, _headers = get_all_accounts_health_with_http_info(opts) data end |
#get_all_accounts_health_with_http_info(opts = {}) ⇒ Array<(GetAllAccountsHealth200Response, Integer, Hash)>
Check accounts health Returns health status of all connected accounts including token validity, permissions, and issues needing attention.
167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 |
# File 'lib/zernio-sdk/api/accounts_api.rb', line 167 def get_all_accounts_health_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountsApi.get_all_accounts_health ...' end allowable_values = ["facebook", "instagram", "linkedin", "twitter", "tiktok", "youtube", "threads", "pinterest", "reddit", "bluesky", "googlebusiness", "telegram", "snapchat", "discord", "slack", "whatsapp"] if @api_client.config.client_side_validation && opts[:'platform'] && !allowable_values.include?(opts[:'platform']) fail ArgumentError, "invalid value for \"platform\", must be one of #{allowable_values}" end allowable_values = ["healthy", "warning", "error"] if @api_client.config.client_side_validation && opts[:'status'] && !allowable_values.include?(opts[:'status']) fail ArgumentError, "invalid value for \"status\", must be one of #{allowable_values}" end # resource path local_var_path = '/v1/accounts/health' # query parameters query_params = opts[:query_params] || {} query_params[:'profileId'] = opts[:'profile_id'] if !opts[:'profile_id'].nil? query_params[:'platform'] = opts[:'platform'] if !opts[:'platform'].nil? query_params[:'status'] = opts[:'status'] if !opts[:'status'].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] || 'GetAllAccountsHealth200Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"AccountsApi.get_all_accounts_health", :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: AccountsApi#get_all_accounts_health\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_follower_stats(opts = {}) ⇒ FollowerStatsResponse
Get follower stats Returns follower count history and growth metrics for connected social accounts. Requires analytics add-on subscription. Follower counts are refreshed once per day.
231 232 233 234 |
# File 'lib/zernio-sdk/api/accounts_api.rb', line 231 def get_follower_stats(opts = {}) data, _status_code, _headers = get_follower_stats_with_http_info(opts) data end |
#get_follower_stats_with_http_info(opts = {}) ⇒ Array<(FollowerStatsResponse, Integer, Hash)>
Get follower stats Returns follower count history and growth metrics for connected social accounts. Requires analytics add-on subscription. Follower counts are refreshed once per day.
245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 |
# File 'lib/zernio-sdk/api/accounts_api.rb', line 245 def get_follower_stats_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountsApi.get_follower_stats ...' end allowable_values = ["daily", "weekly", "monthly"] if @api_client.config.client_side_validation && opts[:'granularity'] && !allowable_values.include?(opts[:'granularity']) fail ArgumentError, "invalid value for \"granularity\", must be one of #{allowable_values}" end # resource path local_var_path = '/v1/accounts/follower-stats' # query parameters query_params = opts[:query_params] || {} query_params[:'accountIds'] = opts[:'account_ids'] if !opts[:'account_ids'].nil? query_params[:'profileId'] = opts[:'profile_id'] if !opts[:'profile_id'].nil? query_params[:'fromDate'] = opts[:'from_date'] if !opts[:'from_date'].nil? query_params[:'toDate'] = opts[:'to_date'] if !opts[:'to_date'].nil? query_params[:'granularity'] = opts[:'granularity'] if !opts[:'granularity'].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] || 'FollowerStatsResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"AccountsApi.get_follower_stats", :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: AccountsApi#get_follower_stats\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_slack_settings(account_id, opts = {}) ⇒ GetSlackSettings200Response
Get Slack account settings Returns the connected Slack channel details and the default message identity (name and avatar shown as the author on every post, with Slack's APP badge). The identity applies to messages only; the app's own Slack profile is global and cannot be changed per workspace.
303 304 305 306 |
# File 'lib/zernio-sdk/api/accounts_api.rb', line 303 def get_slack_settings(account_id, opts = {}) data, _status_code, _headers = get_slack_settings_with_http_info(account_id, opts) data end |
#get_slack_settings_with_http_info(account_id, opts = {}) ⇒ Array<(GetSlackSettings200Response, Integer, Hash)>
Get Slack account settings Returns the connected Slack channel details and the default message identity (name and avatar shown as the author on every post, with Slack's APP badge). The identity applies to messages only; the app's own Slack profile is global and cannot be changed per workspace.
313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 |
# File 'lib/zernio-sdk/api/accounts_api.rb', line 313 def get_slack_settings_with_http_info(account_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountsApi.get_slack_settings ...' 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 AccountsApi.get_slack_settings" end # resource path local_var_path = '/v1/accounts/{accountId}/slack-settings'.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] || 'GetSlackSettings200Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"AccountsApi.get_slack_settings", :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: AccountsApi#get_slack_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_tik_tok_creator_info(account_id, opts = {}) ⇒ GetTikTokCreatorInfo200Response
Get TikTok creator info Returns TikTok creator details, available privacy levels, posting limits, and commercial content options for a specific TikTok account. Only works with TikTok accounts.
367 368 369 370 |
# File 'lib/zernio-sdk/api/accounts_api.rb', line 367 def get_tik_tok_creator_info(account_id, opts = {}) data, _status_code, _headers = get_tik_tok_creator_info_with_http_info(account_id, opts) data end |
#get_tik_tok_creator_info_with_http_info(account_id, opts = {}) ⇒ Array<(GetTikTokCreatorInfo200Response, Integer, Hash)>
Get TikTok creator info Returns TikTok creator details, available privacy levels, posting limits, and commercial content options for a specific TikTok account. Only works with TikTok accounts.
378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 |
# File 'lib/zernio-sdk/api/accounts_api.rb', line 378 def get_tik_tok_creator_info_with_http_info(account_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountsApi.get_tik_tok_creator_info ...' 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 AccountsApi.get_tik_tok_creator_info" end allowable_values = ["video", "photo"] if @api_client.config.client_side_validation && opts[:'media_type'] && !allowable_values.include?(opts[:'media_type']) fail ArgumentError, "invalid value for \"media_type\", must be one of #{allowable_values}" end # resource path local_var_path = '/v1/accounts/{accountId}/tiktok/creator-info'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'mediaType'] = opts[:'media_type'] if !opts[:'media_type'].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] || 'GetTikTokCreatorInfo200Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"AccountsApi.get_tik_tok_creator_info", :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: AccountsApi#get_tik_tok_creator_info\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_accounts(opts = {}) ⇒ AccountsListResponse
List accounts Returns connected social accounts. Only includes accounts within the plan limit by default. Follower data requires analytics add-on. Supports optional server-side pagination via page/limit params. When omitted, returns all accounts (backward-compatible). page and limit must be supplied together; out-of-range page/limit values are rejected with 400 rather than silently clamped.
441 442 443 444 |
# File 'lib/zernio-sdk/api/accounts_api.rb', line 441 def list_accounts(opts = {}) data, _status_code, _headers = list_accounts_with_http_info(opts) data end |
#list_accounts_with_http_info(opts = {}) ⇒ Array<(AccountsListResponse, Integer, Hash)>
List accounts Returns connected social accounts. Only includes accounts within the plan limit by default. Follower data requires analytics add-on. Supports optional server-side pagination via page/limit params. When omitted, returns all accounts (backward-compatible). page and limit must be supplied together; out-of-range page/limit values are rejected with 400 rather than silently clamped.
456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 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 |
# File 'lib/zernio-sdk/api/accounts_api.rb', line 456 def list_accounts_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountsApi.list_accounts ...' end allowable_values = ["connected", "disconnected"] if @api_client.config.client_side_validation && opts[:'status'] && !allowable_values.include?(opts[:'status']) fail ArgumentError, "invalid value for \"status\", must be one of #{allowable_values}" end if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1 fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AccountsApi.list_accounts, must be greater than or equal to 1.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling AccountsApi.list_accounts, must be smaller than or equal to 100.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling AccountsApi.list_accounts, must be greater than or equal to 1.' end # resource path local_var_path = '/v1/accounts' # query parameters query_params = opts[:query_params] || {} query_params[:'profileId'] = opts[:'profile_id'] if !opts[:'profile_id'].nil? query_params[:'platform'] = opts[:'platform'] if !opts[:'platform'].nil? query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil? query_params[:'includeOverLimit'] = opts[:'include_over_limit'] if !opts[:'include_over_limit'].nil? query_params[:'page'] = opts[:'page'] if !opts[:'page'].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] || 'AccountsListResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"AccountsApi.list_accounts", :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: AccountsApi#list_accounts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#move_account_to_profile(account_id, move_account_to_profile_request, opts = {}) ⇒ MoveAccountToProfile200Response
Move account to another profile Moves a connected social account to a different profile owned by the same user. The target profile must belong to the same user as the account. For API keys restricted to specific profiles, BOTH the source account's current profile AND the target profile must be in the key's allowed set. Calls with a target profile outside the key's scope return 403.
528 529 530 531 |
# File 'lib/zernio-sdk/api/accounts_api.rb', line 528 def move_account_to_profile(account_id, move_account_to_profile_request, opts = {}) data, _status_code, _headers = move_account_to_profile_with_http_info(account_id, move_account_to_profile_request, opts) data end |
#move_account_to_profile_with_http_info(account_id, move_account_to_profile_request, opts = {}) ⇒ Array<(MoveAccountToProfile200Response, Integer, Hash)>
Move account to another profile Moves a connected social account to a different profile owned by the same user. The target profile must belong to the same user as the account. For API keys restricted to specific profiles, BOTH the source account's current profile AND the target profile must be in the key's allowed set. Calls with a target profile outside the key's scope return 403.
539 540 541 542 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/accounts_api.rb', line 539 def move_account_to_profile_with_http_info(account_id, move_account_to_profile_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountsApi.move_account_to_profile ...' 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 AccountsApi.move_account_to_profile" end # verify the required parameter 'move_account_to_profile_request' is set if @api_client.config.client_side_validation && move_account_to_profile_request.nil? fail ArgumentError, "Missing the required parameter 'move_account_to_profile_request' when calling AccountsApi.move_account_to_profile" end # resource path local_var_path = '/v1/accounts/{accountId}'.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(move_account_to_profile_request) # return_type return_type = opts[:debug_return_type] || 'MoveAccountToProfile200Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"AccountsApi.move_account_to_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(:PATCH, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountsApi#move_account_to_profile\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_account(account_id, update_account_request, opts = {}) ⇒ UpdateAccount200Response
Update account
Updates a connected social account's display name or username override. For X/Twitter accounts on usage-based billing, also accepts an xCapabilities object to toggle background API operations that incur X API pass-through costs. Both fields are opt-in (default false) — when off, no analytics syncs or DM polling are performed for that account, and no API call is metered for those operations. Publishing and deleting posts are always available regardless of these toggles. Setting xCapabilities on a non-X account returns 400.
602 603 604 605 |
# File 'lib/zernio-sdk/api/accounts_api.rb', line 602 def update_account(account_id, update_account_request, opts = {}) data, _status_code, _headers = update_account_with_http_info(account_id, update_account_request, opts) data end |
#update_account_with_http_info(account_id, update_account_request, opts = {}) ⇒ Array<(UpdateAccount200Response, Integer, Hash)>
Update account Updates a connected social account's display name or username override. For X/Twitter accounts on usage-based billing, also accepts an `xCapabilities` object to toggle background API operations that incur X API pass-through costs. Both fields are opt-in (default `false`) — when off, no analytics syncs or DM polling are performed for that account, and no API call is metered for those operations. Publishing and deleting posts are always available regardless of these toggles. Setting `xCapabilities` on a non-X account returns 400.
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 663 664 665 666 667 668 |
# File 'lib/zernio-sdk/api/accounts_api.rb', line 613 def update_account_with_http_info(account_id, update_account_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountsApi.update_account ...' 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 AccountsApi.update_account" end # verify the required parameter 'update_account_request' is set if @api_client.config.client_side_validation && update_account_request.nil? fail ArgumentError, "Missing the required parameter 'update_account_request' when calling AccountsApi.update_account" end # resource path local_var_path = '/v1/accounts/{accountId}'.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_account_request) # return_type return_type = opts[:debug_return_type] || 'UpdateAccount200Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"AccountsApi.update_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(:PUT, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountsApi#update_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_slack_settings(account_id, update_slack_settings_request, opts = {}) ⇒ nil
Update Slack account settings Set or clear the default message identity for this channel. Empty string clears a field; per-post platformSpecificData.username/iconUrl still override these defaults.
676 677 678 679 |
# File 'lib/zernio-sdk/api/accounts_api.rb', line 676 def update_slack_settings(account_id, update_slack_settings_request, opts = {}) update_slack_settings_with_http_info(account_id, update_slack_settings_request, opts) nil end |
#update_slack_settings_with_http_info(account_id, update_slack_settings_request, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Update Slack account settings Set or clear the default message identity for this channel. Empty string clears a field; per-post platformSpecificData.username/iconUrl still override these defaults.
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 731 732 733 734 735 736 737 738 739 740 741 742 |
# File 'lib/zernio-sdk/api/accounts_api.rb', line 687 def update_slack_settings_with_http_info(account_id, update_slack_settings_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountsApi.update_slack_settings ...' 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 AccountsApi.update_slack_settings" end # verify the required parameter 'update_slack_settings_request' is set if @api_client.config.client_side_validation && update_slack_settings_request.nil? fail ArgumentError, "Missing the required parameter 'update_slack_settings_request' when calling AccountsApi.update_slack_settings" end # resource path local_var_path = '/v1/accounts/{accountId}/slack-settings'.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_slack_settings_request) # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"AccountsApi.update_slack_settings", :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: AccountsApi#update_slack_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |