Skip to content

Latest commit

 

History

History
144 lines (102 loc) · 3.91 KB

ReportsApi.md

File metadata and controls

144 lines (102 loc) · 3.91 KB

Phrase::ReportsApi

All URIs are relative to https://api.phrase.com/v2

Method HTTP request Description
report_locales_list GET /projects/{project_id}/report/locales List Locale Reports
report_show GET /projects/{project_id}/report Get Project Report

report_locales_list

Array<LocaleReport> report_locales_list(project_id, opts)

List Locale Reports

List all locale reports for the given project

Example

# 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::ReportsApi.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
  locale_codes: 'locale_codes_example', # String | Locale Code
  tag: 'tag_example', # String | tag
  branch: 'my-feature-branch' # String | specify the branch to use
}

begin
  #List Locale Reports
  result = api_instance.report_locales_list(project_id, opts)
  pp result
rescue Phrase::ApiError => e
  puts "Exception when calling ReportsApi->report_locales_list: #{e}"
end

Parameters

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]
locale_codes String Locale Code [optional]
tag String tag [optional]
branch String specify the branch to use [optional]

Return type

Response<(Array<LocaleReport>)>

Authorization

Basic, Token

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

report_show

ProjectReport report_show(project_id, opts)

Get Project Report

Get report of a single project.

Example

# 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::ReportsApi.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: 'my-feature-branch' # String | specify the branch to use
}

begin
  #Get Project Report
  result = api_instance.report_show(project_id, opts)
  pp result
rescue Phrase::ApiError => e
  puts "Exception when calling ReportsApi->report_show: #{e}"
end

Parameters

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]

Return type

Response<(ProjectReport)>

Authorization

Basic, Token

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json