Class: OneSky::Project

Inherits:
Object
  • Object
show all
Defined in:
lib/one_sky/project.rb

Overview

Implements the Project Management API for a given :project_name

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#clientObject

Returns the value of attribute client.



5
6
7
# File 'lib/one_sky/project.rb', line 5

def client
  @client
end

#project_nameObject

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

#detailsObject

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

#platformsObject

Return all platforms in a project.



14
15
16
# File 'lib/one_sky/project.rb', line 14

def platforms
  get("project/platforms")["platforms"]
end