Module: AgileZen::Stories
- Included in:
- Client
- Defined in:
- lib/agilezen/stories.rb
Overview
AgileZen::Stories module.
Instance Method Summary collapse
-
#project_stories(project_id, options = {}) ⇒ Object
Retrieve information for all stories of a given project.
-
#project_story(project_id, story_id, options = {}) ⇒ Object
Retrieve information for an individual story of a given project.
Instance Method Details
#project_stories(project_id, options = {}) ⇒ Object
Retrieve information for all stories of a given project.
6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/agilezen/stories.rb', line 6 def project_stories(project_id, ={}) response_body = nil begin response = connection.get do |req| req.url "/api/v1/projects/#{project_id}/stories", end response_body = response.body rescue MultiJson::DecodeError => e #p 'Unable to parse JSON.' end response_body end |
#project_story(project_id, story_id, options = {}) ⇒ Object
Retrieve information for an individual story of a given project.
21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/agilezen/stories.rb', line 21 def project_story(project_id, story_id, ={}) response_body = nil begin response = connection.get do |req| req.url "/api/v1/projects/#{project_id}/story/#{story_id}", end response_body = response.body rescue MultiJson::DecodeError => e #p 'Unable to parse JSON.' end response_body end |