Sha256: ca567d46bf1917d62ef546592032cb99607db3ca2ea3a3a69673ccde8e5227d6
Contents?: true
Size: 561 Bytes
Versions: 1
Compression:
Stored size: 561 Bytes
Contents
module TrackerApi module Endpoints class Memberships attr_accessor :client def initialize(client) @client = client end def get(project_id, params={}) data = client.paginate("/projects/#{project_id}/memberships", params: params) raise TrackerApi::Errors::UnexpectedData, 'Array of memberships expected' unless data.is_a? Array data.map do |membership| Resources::ProjectMembership.new({ client: client, project_id: project_id }.merge(membership)) end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
tracker_api-0.2.6 | lib/tracker_api/endpoints/memberships.rb |