Sha256: 8619d060fc0d1846530042c910143e241135780bbdc5aa46d570481c2bff1d65

Contents?: true

Size: 523 Bytes

Versions: 8

Compression:

Stored size: 523 Bytes

Contents

module TrackerApi
  module Endpoints
    class Releases
      attr_accessor :client

      def initialize(client)
        @client = client
      end

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

        data.map do |release|
          Resources::Release.new({ client: client, project_id: project_id }.merge(release))
        end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
tracker_api-1.16.0 lib/tracker_api/endpoints/releases.rb
tracker_api-1.15.0 lib/tracker_api/endpoints/releases.rb
tracker_api-1.14.0 lib/tracker_api/endpoints/releases.rb
tracker_api-1.13.0 lib/tracker_api/endpoints/releases.rb
tracker_api-1.12.0 lib/tracker_api/endpoints/releases.rb
tracker_api-1.11.0 lib/tracker_api/endpoints/releases.rb
tracker_api-1.10.0 lib/tracker_api/endpoints/releases.rb
tracker_api-1.9.1 lib/tracker_api/endpoints/releases.rb