Class: AppLocale::Client

Inherits:
Object
  • Object
show all
Includes:
HTTParty
Defined in:
lib/applocale/client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params = {}) ⇒ Client

Returns a new instance of Client.



8
9
10
# File 'lib/applocale/client.rb', line 8

def initialize(params = {})
  @params = params
end

Instance Attribute Details

#paramsObject (readonly)

Returns the value of attribute params.



6
7
8
# File 'lib/applocale/client.rb', line 6

def params
  @params
end

Instance Method Details

#export(language = nil) ⇒ Object

Required params:

  • api_key

  • project_id

Optionally:

  • locale

pass single code of language for export



19
20
21
# File 'lib/applocale/client.rb', line 19

def export(language = nil)
  request(:export, body: export_params(language))
end

#project_informationObject



23
24
25
# File 'lib/applocale/client.rb', line 23

def project_information
  request(:project_show)
end