Class: TrackerApi::Endpoints::Story
- Inherits:
-
Object
- Object
- TrackerApi::Endpoints::Story
- Defined in:
- lib/tracker_api/endpoints/story.rb
Instance Attribute Summary collapse
-
#client ⇒ Object
Returns the value of attribute client.
Instance Method Summary collapse
- #create(project_id, params = {}) ⇒ Object
- #get(project_id, id) ⇒ Object
- #get_story(story_id) ⇒ Object
-
#initialize(client) ⇒ Story
constructor
A new instance of Story.
Constructor Details
#initialize(client) ⇒ Story
Returns a new instance of Story.
6 7 8 |
# File 'lib/tracker_api/endpoints/story.rb', line 6 def initialize(client) @client = client end |
Instance Attribute Details
#client ⇒ Object
Returns the value of attribute client.
4 5 6 |
# File 'lib/tracker_api/endpoints/story.rb', line 4 def client @client end |
Instance Method Details
#create(project_id, params = {}) ⇒ Object
22 23 24 25 26 |
# File 'lib/tracker_api/endpoints/story.rb', line 22 def create(project_id, params={}) data = client.post("/projects/#{project_id}/stories", params: params).body Resources::Story.new({ client: client }.merge(data)) end |