All URIs are relative to https://api.phrase.com/v2
Method | HTTP request | Description |
---|---|---|
distribution_create | POST /accounts/{account_id}/distributions | Create a distribution |
distribution_delete | DELETE /accounts/{account_id}/distributions/{id} | Delete a distribution |
distribution_show | GET /accounts/{account_id}/distributions/{id} | Get a single distribution |
distribution_update | PATCH /accounts/{account_id}/distributions/{id} | Update a distribution |
distributions_list | GET /accounts/{account_id}/distributions | List distributions |
Distribution distribution_create(account_id, distribution_create_parameters, opts)
Create a distribution
Create a new distribution.
# load the gem
require 'phrase'
# setup authorization
Phrase.configure do |config|
# Configure HTTP basic authorization: Basic
config.username = 'YOUR USERNAME'
config.password = 'YOUR PASSWORD'
# Configure API key authorization: Token
config.api_key['Authorization'] = 'YOUR API KEY'
config.api_key_prefix['Authorization'] = 'token'
end
api_instance = Phrase::DistributionsApi.new
account_id = 'account_id_example' # String | Account ID
distribution_create_parameters = Phrase::DistributionCreateParameters.new({name: 'My Android Distribution', project_id: 'abcd1234abcd1234abcd1234'}) # DistributionCreateParameters |
opts = {
x_phrase_app_otp: 'x_phrase_app_otp_example' # String | Two-Factor-Authentication token (optional)
}
begin
#Create a distribution
result = api_instance.distribution_create(account_id, distribution_create_parameters, opts)
pp result
rescue Phrase::ApiError => e
puts "Exception when calling DistributionsApi->distribution_create: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
account_id | String | Account ID | |
distribution_create_parameters | DistributionCreateParameters | ||
x_phrase_app_otp | String | Two-Factor-Authentication token (optional) | [optional] |
Response<(Distribution)>
- Content-Type: application/json
- Accept: application/json
distribution_delete(account_id, id, opts)
Delete a distribution
Delete an existing distribution.
# load the gem
require 'phrase'
# setup authorization
Phrase.configure do |config|
# Configure HTTP basic authorization: Basic
config.username = 'YOUR USERNAME'
config.password = 'YOUR PASSWORD'
# Configure API key authorization: Token
config.api_key['Authorization'] = 'YOUR API KEY'
config.api_key_prefix['Authorization'] = 'token'
end
api_instance = Phrase::DistributionsApi.new
account_id = 'account_id_example' # String | Account ID
id = 'id_example' # String | ID
opts = {
x_phrase_app_otp: 'x_phrase_app_otp_example' # String | Two-Factor-Authentication token (optional)
}
begin
#Delete a distribution
api_instance.distribution_delete(account_id, id, opts)
rescue Phrase::ApiError => e
puts "Exception when calling DistributionsApi->distribution_delete: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
account_id | String | Account ID | |
id | String | ID | |
x_phrase_app_otp | String | Two-Factor-Authentication token (optional) | [optional] |
Response<(nil (empty response body))>
- Content-Type: Not defined
- Accept: Not defined
Distribution distribution_show(account_id, id, opts)
Get a single distribution
Get details on a single distribution.
# load the gem
require 'phrase'
# setup authorization
Phrase.configure do |config|
# Configure HTTP basic authorization: Basic
config.username = 'YOUR USERNAME'
config.password = 'YOUR PASSWORD'
# Configure API key authorization: Token
config.api_key['Authorization'] = 'YOUR API KEY'
config.api_key_prefix['Authorization'] = 'token'
end
api_instance = Phrase::DistributionsApi.new
account_id = 'account_id_example' # String | Account ID
id = 'id_example' # String | ID
opts = {
x_phrase_app_otp: 'x_phrase_app_otp_example' # String | Two-Factor-Authentication token (optional)
}
begin
#Get a single distribution
result = api_instance.distribution_show(account_id, id, opts)
pp result
rescue Phrase::ApiError => e
puts "Exception when calling DistributionsApi->distribution_show: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
account_id | String | Account ID | |
id | String | ID | |
x_phrase_app_otp | String | Two-Factor-Authentication token (optional) | [optional] |
Response<(Distribution)>
- Content-Type: Not defined
- Accept: application/json
Distribution distribution_update(account_id, id, distribution_update_parameters, opts)
Update a distribution
Update an existing distribution.
# load the gem
require 'phrase'
# setup authorization
Phrase.configure do |config|
# Configure HTTP basic authorization: Basic
config.username = 'YOUR USERNAME'
config.password = 'YOUR PASSWORD'
# Configure API key authorization: Token
config.api_key['Authorization'] = 'YOUR API KEY'
config.api_key_prefix['Authorization'] = 'token'
end
api_instance = Phrase::DistributionsApi.new
account_id = 'account_id_example' # String | Account ID
id = 'id_example' # String | ID
distribution_update_parameters = Phrase::DistributionUpdateParameters.new # DistributionUpdateParameters |
opts = {
x_phrase_app_otp: 'x_phrase_app_otp_example' # String | Two-Factor-Authentication token (optional)
}
begin
#Update a distribution
result = api_instance.distribution_update(account_id, id, distribution_update_parameters, opts)
pp result
rescue Phrase::ApiError => e
puts "Exception when calling DistributionsApi->distribution_update: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
account_id | String | Account ID | |
id | String | ID | |
distribution_update_parameters | DistributionUpdateParameters | ||
x_phrase_app_otp | String | Two-Factor-Authentication token (optional) | [optional] |
Response<(Distribution)>
- Content-Type: application/json
- Accept: application/json
Array<DistributionPreview> distributions_list(account_id, opts)
List distributions
List all distributions for the given account.
# load the gem
require 'phrase'
# setup authorization
Phrase.configure do |config|
# Configure HTTP basic authorization: Basic
config.username = 'YOUR USERNAME'
config.password = 'YOUR PASSWORD'
# Configure API key authorization: Token
config.api_key['Authorization'] = 'YOUR API KEY'
config.api_key_prefix['Authorization'] = 'token'
end
api_instance = Phrase::DistributionsApi.new
account_id = 'account_id_example' # String | Account ID
opts = {
x_phrase_app_otp: 'x_phrase_app_otp_example', # String | Two-Factor-Authentication token (optional)
page: 1, # Integer | Page number
per_page: 25 # Integer | Limit on the number of objects to be returned, between 1 and 100. 25 by default
}
begin
#List distributions
result = api_instance.distributions_list(account_id, opts)
pp result
rescue Phrase::ApiError => e
puts "Exception when calling DistributionsApi->distributions_list: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
account_id | String | Account ID | |
x_phrase_app_otp | String | Two-Factor-Authentication token (optional) | [optional] |
page | Integer | Page number | [optional] |
per_page | Integer | Limit on the number of objects to be returned, between 1 and 100. 25 by default | [optional] |
Response<(Array<DistributionPreview>)>
- Content-Type: Not defined
- Accept: application/json