lib/tracker_api/endpoints/stories.rb in tracker_api-1.5.0 vs lib/tracker_api/endpoints/stories.rb in tracker_api-1.6.0
- old
+ new
@@ -6,10 +6,12 @@
def initialize(client)
@client = client
end
def get(project_id, params={})
- data = client.paginate("/projects/#{project_id}/stories", params: params)
+ url = params[:ids] ? "/projects/#{project_id}/stories/bulk" : "/projects/#{project_id}/stories"
+ data = client.paginate(url, params: params)
+
raise Errors::UnexpectedData, 'Array of stories expected' unless data.is_a? Array
data.map do |story|
Resources::Story.new({ client: client, project_id: project_id }.merge(story))
end