Class: TrackerApi::Endpoints::Project

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ Project

Returns a new instance of Project.



6
7
8
# File 'lib/tracker_api/endpoints/project.rb', line 6

def initialize(client)
  @client = client
end

Instance Attribute Details

#clientObject

Returns the value of attribute client.



4
5
6
# File 'lib/tracker_api/endpoints/project.rb', line 4

def client
  @client
end

Instance Method Details

#get(id, params = {}) ⇒ Object



10
11
12
13
14
# File 'lib/tracker_api/endpoints/project.rb', line 10

def get(id, params={})
  data = client.get("/projects/#{id}", params: params).body

  Resources::Project.new({ client: client }.merge(data))
end