Class: OneSky::Project
- Inherits:
-
Object
- Object
- OneSky::Project
- Defined in:
- lib/one_sky/project.rb
Overview
Implements the Project Management API for a given :project_name
Instance Attribute Summary collapse
-
#client ⇒ Object
Returns the value of attribute client.
-
#project_name ⇒ Object
Returns the value of attribute project_name.
Instance Method Summary collapse
-
#details ⇒ Object
Get the information of the project.
-
#initialize(project_name, client) ⇒ Project
constructor
Provide the name of the project, together with an instance of OneSky::Client.
-
#platform(platform_id) ⇒ Object
Returns an API proxy for the Platform Management API for the given platform_id.
-
#platforms ⇒ Object
Return all platforms in a project.
Constructor Details
#initialize(project_name, client) ⇒ Project
Provide the name of the project, together with an instance of OneSky::Client.
8 9 10 11 |
# File 'lib/one_sky/project.rb', line 8 def initialize(project_name, client) @project_name = project_name @client = client end |
Instance Attribute Details
#client ⇒ Object
Returns the value of attribute client.
5 6 7 |
# File 'lib/one_sky/project.rb', line 5 def client @client end |
#project_name ⇒ Object
Returns the value of attribute project_name.
5 6 7 |
# File 'lib/one_sky/project.rb', line 5 def project_name @project_name end |
Instance Method Details
#details ⇒ Object
Get the information of the project.
19 20 21 |
# File 'lib/one_sky/project.rb', line 19 def details get("project/details")["project"] end |
#platform(platform_id) ⇒ Object
Returns an API proxy for the Platform Management API for the given platform_id.
24 25 26 |
# File 'lib/one_sky/project.rb', line 24 def platform(platform_id) Platform.new(platform_id, client) end |
#platforms ⇒ Object
Return all platforms in a project.
14 15 16 |
# File 'lib/one_sky/project.rb', line 14 def platforms get("project/platforms")["platforms"] end |