Sha256: 4996259b5169cce2cd3bfe1b3da625463ff6373959de0daaf0c692892b0d35bc
Contents?: true
Size: 715 Bytes
Versions: 6
Compression:
Stored size: 715 Bytes
Contents
module TrackerApi module Endpoints class Reviews attr_accessor :client def initialize(client) @client = client end def get(project_id, story_id, params={}) params[:fields] ||= ":default,review_type" data = client.paginate("/projects/#{project_id}/stories/#{story_id}/reviews", params: params) raise Errors::UnexpectedData, 'Successful responses to this request return an array containing zero or more instances of the review resource. This response was not an array.' unless data.is_a? Array data.map do |review| Resources::Review.new({ client: client, project_id: project_id }.merge(review)) end end end end end
Version data entries
6 entries across 6 versions & 1 rubygems