All URIs are relative to https://zernio.com/api
| Method | HTTP request | Description |
|---|---|---|
| create_account_group | POST /v1/account-groups | Create group |
| delete_account_group | DELETE /v1/account-groups/{groupId} | Delete group |
| list_account_groups | GET /v1/account-groups | List groups |
| update_account_group | PUT /v1/account-groups/{groupId} | Update group |
create_account_group(create_account_group_request)
Create group
Creates a new account group with a name and a list of social account IDs.
require 'time'
require 'zernio-sdk'
# setup authorization
Zernio.configure do |config|
# Configure Bearer authorization (JWT): bearerAuth
config.access_token = 'YOUR_BEARER_TOKEN'
end
api_instance = Zernio::AccountGroupsApi.new
create_account_group_request = Zernio::CreateAccountGroupRequest.new({name: 'name_example', account_ids: ['account_ids_example']}) # CreateAccountGroupRequest |
begin
# Create group
result = api_instance.create_account_group(create_account_group_request)
p result
rescue Zernio::ApiError => e
puts "Error when calling AccountGroupsApi->create_account_group: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> create_account_group_with_http_info(create_account_group_request)
begin
# Create group
data, status_code, headers = api_instance.create_account_group_with_http_info(create_account_group_request)
p status_code # => 2xx
p headers # => { ... }
p data # => <CreateAccountGroup201Response>
rescue Zernio::ApiError => e
puts "Error when calling AccountGroupsApi->create_account_group_with_http_info: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| create_account_group_request | CreateAccountGroupRequest |
- Content-Type: application/json
- Accept: application/json
delete_account_group(group_id)
Delete group
Permanently deletes an account group. The accounts themselves are not affected.
require 'time'
require 'zernio-sdk'
# setup authorization
Zernio.configure do |config|
# Configure Bearer authorization (JWT): bearerAuth
config.access_token = 'YOUR_BEARER_TOKEN'
end
api_instance = Zernio::AccountGroupsApi.new
group_id = 'group_id_example' # String |
begin
# Delete group
result = api_instance.delete_account_group(group_id)
p result
rescue Zernio::ApiError => e
puts "Error when calling AccountGroupsApi->delete_account_group: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> delete_account_group_with_http_info(group_id)
begin
# Delete group
data, status_code, headers = api_instance.delete_account_group_with_http_info(group_id)
p status_code # => 2xx
p headers # => { ... }
p data # => <DeleteAccountGroup200Response>
rescue Zernio::ApiError => e
puts "Error when calling AccountGroupsApi->delete_account_group_with_http_info: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| group_id | String |
- Content-Type: Not defined
- Accept: application/json
list_account_groups
List groups
Returns all account groups for the authenticated user, including group names and associated account IDs.
require 'time'
require 'zernio-sdk'
# setup authorization
Zernio.configure do |config|
# Configure Bearer authorization (JWT): bearerAuth
config.access_token = 'YOUR_BEARER_TOKEN'
end
api_instance = Zernio::AccountGroupsApi.new
begin
# List groups
result = api_instance.list_account_groups
p result
rescue Zernio::ApiError => e
puts "Error when calling AccountGroupsApi->list_account_groups: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> list_account_groups_with_http_info
begin
# List groups
data, status_code, headers = api_instance.list_account_groups_with_http_info
p status_code # => 2xx
p headers # => { ... }
p data # => <ListAccountGroups200Response>
rescue Zernio::ApiError => e
puts "Error when calling AccountGroupsApi->list_account_groups_with_http_info: #{e}"
endThis endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
update_account_group(group_id, update_account_group_request)
Update group
Updates the name or account list of an existing group. You can rename the group, change its accounts, or both.
require 'time'
require 'zernio-sdk'
# setup authorization
Zernio.configure do |config|
# Configure Bearer authorization (JWT): bearerAuth
config.access_token = 'YOUR_BEARER_TOKEN'
end
api_instance = Zernio::AccountGroupsApi.new
group_id = 'group_id_example' # String |
update_account_group_request = Zernio::UpdateAccountGroupRequest.new # UpdateAccountGroupRequest |
begin
# Update group
result = api_instance.update_account_group(group_id, update_account_group_request)
p result
rescue Zernio::ApiError => e
puts "Error when calling AccountGroupsApi->update_account_group: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> update_account_group_with_http_info(group_id, update_account_group_request)
begin
# Update group
data, status_code, headers = api_instance.update_account_group_with_http_info(group_id, update_account_group_request)
p status_code # => 2xx
p headers # => { ... }
p data # => <UpdateAccountGroup200Response>
rescue Zernio::ApiError => e
puts "Error when calling AccountGroupsApi->update_account_group_with_http_info: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| group_id | String | ||
| update_account_group_request | UpdateAccountGroupRequest |
- Content-Type: application/json
- Accept: application/json