Class: HammerCLI::TaskHelper::I18n::TxApiClient

Inherits:
Object
  • Object
show all
Defined in:
lib/hammer_cli/task_helper.rb

Defined Under Namespace

Classes: GeneralError

Constant Summary collapse

TX_CONFIG_RC_FILE =
'~/.transifexrc'
TX_BASE_API_URL =
'https://rest.api.transifex.com'

Instance Method Summary collapse

Constructor Details

#initialize(domain:) ⇒ TxApiClient

Returns a new instance of TxApiClient.



27
28
29
# File 'lib/hammer_cli/task_helper.rb', line 27

def initialize(domain:)
  @domain = domain
end

Instance Method Details

#language_stats_collectionObject



31
32
33
34
35
36
37
38
39
# File 'lib/hammer_cli/task_helper.rb', line 31

def language_stats_collection
  make_call(
    path: '/resource_language_stats',
    params: {
      'filter[project]' => 'o:foreman:p:foreman',
      'filter[resource]' => "o:foreman:p:foreman:r:#{@domain.domain_name}"
    }
  )
end