Class: OneSky::Platform
- Inherits:
-
Object
- Object
- OneSky::Platform
- Defined in:
- lib/one_sky/platform.rb
Overview
Implements the Platform Management API for a given :platform_id
Instance Attribute Summary collapse
-
#client ⇒ Object
Returns the value of attribute client.
-
#platform_id ⇒ Object
Returns the value of attribute platform_id.
Instance Method Summary collapse
-
#details ⇒ Object
Get the information of the platform.
-
#initialize(platform_id, client) ⇒ Platform
constructor
Provide the id of the platform, together with an instance of OneSky::Client.
-
#locales ⇒ Object
Get the details of activated locales for a platform.
-
#translation ⇒ Object
Returns an API proxy for the Translation I/O API for this platform.
Constructor Details
#initialize(platform_id, client) ⇒ Platform
Provide the id of the platform, together with an instance of OneSky::Client.
9 10 11 12 |
# File 'lib/one_sky/platform.rb', line 9 def initialize(platform_id, client) @platform_id = platform_id @client = client end |
Instance Attribute Details
#client ⇒ Object
Returns the value of attribute client.
6 7 8 |
# File 'lib/one_sky/platform.rb', line 6 def client @client end |
#platform_id ⇒ Object
Returns the value of attribute platform_id.
6 7 8 |
# File 'lib/one_sky/platform.rb', line 6 def platform_id @platform_id end |
Instance Method Details
#details ⇒ Object
Get the information of the platform.
15 16 17 |
# File 'lib/one_sky/platform.rb', line 15 def details get("platform/details")["platform"] end |
#locales ⇒ Object
Get the details of activated locales for a platform.
20 21 22 |
# File 'lib/one_sky/platform.rb', line 20 def locales get("platform/locales")["locales"] end |
#translation ⇒ Object
Returns an API proxy for the Translation I/O API for this platform
25 26 27 |
# File 'lib/one_sky/platform.rb', line 25 def translation Translation.new(platform_id, client) end |