Sha256: 6b417db0ea544327c8b077ae6ebc602f1828944609b0a4a61178fae31a07e925
Contents?: true
Size: 516 Bytes
Versions: 3
Compression:
Stored size: 516 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 { |membership| Resources::ProjectMembership.new({ client: client }.merge(membership)) } end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
tracker_api-0.2.5 | lib/tracker_api/endpoints/memberships.rb |
tracker_api-0.2.4 | lib/tracker_api/endpoints/memberships.rb |
tracker_api-0.2.3 | lib/tracker_api/endpoints/memberships.rb |