Module: AgileZen::Projects

Included in:
Client
Defined in:
lib/agilezen/projects.rb

Overview

AgileZen::Projects module.

Instance Method Summary collapse

Instance Method Details

#project(project_id, options = {}) ⇒ Object

Retrieve information for an individual project.



14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/agilezen/projects.rb', line 14

def project(project_id, options={})
  response_body = nil
  begin
    response = connection.get do |req|
      req.url "/api/v1/projects/#{project_id}", options
    end
    response_body = response.body
  rescue MultiJson::DecodeError => e
    #p 'Unable to parse JSON.'
  end
  
  response_body
end

#projects(options = {}) ⇒ Object

Retrieve information for all projects.



6
7
8
9
10
11
# File 'lib/agilezen/projects.rb', line 6

def projects(options={})
  response = connection.get do |req|
    req.url "/api/v1/projects", options
  end
  response.body
end