lib/tracker_api/endpoints/story.rb in tracker_api-0.2.5 vs lib/tracker_api/endpoints/story.rb in tracker_api-0.2.6

- old
+ new

@@ -8,14 +8,20 @@ end def get(project_id, id) data = client.get("/projects/#{project_id}/stories/#{id}").body - Resources::Story.new({ client: client }.merge(data)) + Resources::Story.new({ client: client, project_id: project_id }.merge(data)) end def get_story(story_id) data = client.get("/stories/#{story_id}").body + + Resources::Story.new({ client: client }.merge(data)) + end + + def create(project_id, params={}) + data = client.post("/projects/#{project_id}/stories", params: params).body Resources::Story.new({ client: client }.merge(data)) end end end