Class: AppLocale::Client
- Inherits:
-
Object
- Object
- AppLocale::Client
- Includes:
- HTTParty
- Defined in:
- lib/applocale/client.rb
Instance Attribute Summary collapse
-
#params ⇒ Object
readonly
Returns the value of attribute params.
Instance Method Summary collapse
-
#export(language = nil) ⇒ Object
Required params: - api_key - project_id.
-
#initialize(params = {}) ⇒ Client
constructor
A new instance of Client.
- #project_information ⇒ Object
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
#params ⇒ Object (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_information ⇒ Object
23 24 25 |
# File 'lib/applocale/client.rb', line 23 def project_information request(:project_show) end |