All URIs are relative to https://api.phrase.com/v2
Method | HTTP request | Description |
---|---|---|
screenshot_create | POST /projects/{project_id}/screenshots | Create a screenshot |
screenshot_delete | DELETE /projects/{project_id}/screenshots/{id} | Delete a screenshot |
screenshot_show | GET /projects/{project_id}/screenshots/{id} | Get a single screenshot |
screenshot_update | PATCH /projects/{project_id}/screenshots/{id} | Update a screenshot |
screenshots_list | GET /projects/{project_id}/screenshots | List screenshots |
Screenshot screenshot_create(project_id, opts)
Create a screenshot
Create a new screenshot.
# 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::ScreenshotsApi.new
project_id = 'project_id_example' # String | Project ID
opts = {
x_phrase_app_otp: 'x_phrase_app_otp_example', # String | Two-Factor-Authentication token (optional)
branch: 'branch_example', # String | specify the branch to use
name: 'name_example', # String | Name of the screenshot
description: 'description_example', # String | Description of the screenshot
filename: File.new('/path/to/some/file') # File | Screenshot file
}
begin
#Create a screenshot
result = api_instance.screenshot_create(project_id, opts)
pp result
rescue Phrase::ApiError => e
puts "Exception when calling ScreenshotsApi->screenshot_create: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
project_id | String | Project ID | |
x_phrase_app_otp | String | Two-Factor-Authentication token (optional) | [optional] |
branch | String | specify the branch to use | [optional] |
name | String | Name of the screenshot | [optional] |
description | String | Description of the screenshot | [optional] |
filename | File | Screenshot file | [optional] |
Response<(Screenshot)>
- Content-Type: multipart/form-data
- Accept: application/json
screenshot_delete(project_id, id, opts)
Delete a screenshot
Delete an existing screenshot.
# 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::ScreenshotsApi.new
project_id = 'project_id_example' # String | Project ID
id = 'id_example' # String | ID
opts = {
x_phrase_app_otp: 'x_phrase_app_otp_example', # String | Two-Factor-Authentication token (optional)
branch: 'my-feature-branch' # String | specify the branch to use
}
begin
#Delete a screenshot
api_instance.screenshot_delete(project_id, id, opts)
rescue Phrase::ApiError => e
puts "Exception when calling ScreenshotsApi->screenshot_delete: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
project_id | String | Project ID | |
id | String | ID | |
x_phrase_app_otp | String | Two-Factor-Authentication token (optional) | [optional] |
branch | String | specify the branch to use | [optional] |
Response<(nil (empty response body))>
- Content-Type: Not defined
- Accept: Not defined
Screenshot screenshot_show(project_id, id, opts)
Get a single screenshot
Get details on a single screenshot for a given project.
# 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::ScreenshotsApi.new
project_id = 'project_id_example' # String | Project ID
id = 'id_example' # String | ID
opts = {
x_phrase_app_otp: 'x_phrase_app_otp_example', # String | Two-Factor-Authentication token (optional)
branch: 'my-feature-branch' # String | specify the branch to use
}
begin
#Get a single screenshot
result = api_instance.screenshot_show(project_id, id, opts)
pp result
rescue Phrase::ApiError => e
puts "Exception when calling ScreenshotsApi->screenshot_show: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
project_id | String | Project ID | |
id | String | ID | |
x_phrase_app_otp | String | Two-Factor-Authentication token (optional) | [optional] |
branch | String | specify the branch to use | [optional] |
Response<(Screenshot)>
- Content-Type: Not defined
- Accept: application/json
Screenshot screenshot_update(project_id, id, screenshot_update_parameters, opts)
Update a screenshot
Update an existing screenshot.
# 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::ScreenshotsApi.new
project_id = 'project_id_example' # String | Project ID
id = 'id_example' # String | ID
screenshot_update_parameters = Phrase::ScreenshotUpdateParameters.new # ScreenshotUpdateParameters |
opts = {
x_phrase_app_otp: 'x_phrase_app_otp_example' # String | Two-Factor-Authentication token (optional)
}
begin
#Update a screenshot
result = api_instance.screenshot_update(project_id, id, screenshot_update_parameters, opts)
pp result
rescue Phrase::ApiError => e
puts "Exception when calling ScreenshotsApi->screenshot_update: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
project_id | String | Project ID | |
id | String | ID | |
screenshot_update_parameters | ScreenshotUpdateParameters | ||
x_phrase_app_otp | String | Two-Factor-Authentication token (optional) | [optional] |
Response<(Screenshot)>
- Content-Type: application/json
- Accept: application/json
Array<Screenshot> screenshots_list(project_id, opts)
List screenshots
List all screenshots for the given project.
# 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::ScreenshotsApi.new
project_id = 'project_id_example' # String | Project 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
branch: 'my-feature-branch', # String | specify the branch to use
key_id: 'abcd1234cdef1234abcd1234cdef1234' # String | filter by key
}
begin
#List screenshots
result = api_instance.screenshots_list(project_id, opts)
pp result
rescue Phrase::ApiError => e
puts "Exception when calling ScreenshotsApi->screenshots_list: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
project_id | String | Project 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] |
branch | String | specify the branch to use | [optional] |
key_id | String | filter by key | [optional] |
Response<(Array<Screenshot>)>
- Content-Type: Not defined
- Accept: application/json