Sha256: eeca1c9b245eccdea2bc907690e59086448eafdcfae50e9314230049b89a9e1c

Contents?: true

Size: 482 Bytes

Versions: 6

Compression:

Stored size: 482 Bytes

Contents

module TrackerApi
  module Endpoints
    class Stories
      attr_accessor :client

      def initialize(client)
        @client = client
      end

      def get(project_id, params={})
        data = client.paginate("/projects/#{project_id}/stories", params: params)
        raise TrackerApi::Errors::UnexpectedData, 'Array of stories expected' unless data.is_a? Array

        data.map { |story| Resources::Story.new({ client: client }.merge(story)) }
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
tracker_api-0.2.5 lib/tracker_api/endpoints/stories.rb
tracker_api-0.2.4 lib/tracker_api/endpoints/stories.rb
tracker_api-0.2.3 lib/tracker_api/endpoints/stories.rb
tracker_api-0.2.2 lib/tracker_api/endpoints/stories.rb
tracker_api-0.2.1 lib/tracker_api/endpoints/stories.rb
tracker_api-0.2.0 lib/tracker_api/endpoints/stories.rb