Sha256: 4f1af346c2159c05c04fb9106c1ddc9f6f27e12b330dc737ab98a5201fd833f9

Contents?: true

Size: 467 Bytes

Versions: 18

Compression:

Stored size: 467 Bytes

Contents

module TrackerApi
  module Endpoints
    class Workspaces
      attr_accessor :client

      def initialize(client)
        @client = client
      end

      def get(params={})
        data = client.paginate('/my/workspaces', params: params)
        raise Errors::UnexpectedData, 'Array of workspaces expected' unless data.is_a? Array

        data.map { |workspace| Resources::Workspace.new({ client: client }.merge(workspace))
        }
      end
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
tracker_api-1.16.0 lib/tracker_api/endpoints/workspaces.rb
tracker_api-1.15.0 lib/tracker_api/endpoints/workspaces.rb
tracker_api-1.14.0 lib/tracker_api/endpoints/workspaces.rb
tracker_api-1.13.0 lib/tracker_api/endpoints/workspaces.rb
tracker_api-1.12.0 lib/tracker_api/endpoints/workspaces.rb
tracker_api-1.11.0 lib/tracker_api/endpoints/workspaces.rb
tracker_api-1.10.0 lib/tracker_api/endpoints/workspaces.rb
tracker_api-1.9.1 lib/tracker_api/endpoints/workspaces.rb
tracker_api-1.9.0 lib/tracker_api/endpoints/workspaces.rb
tracker_api-1.8.0 lib/tracker_api/endpoints/workspaces.rb
tracker_api-1.7.1 lib/tracker_api/endpoints/workspaces.rb
tracker_api-1.7.0 lib/tracker_api/endpoints/workspaces.rb
tracker_api-1.6.0 lib/tracker_api/endpoints/workspaces.rb
tracker_api-1.5.0 lib/tracker_api/endpoints/workspaces.rb
tracker_api-1.4.1 lib/tracker_api/endpoints/workspaces.rb
tracker_api-1.4.0 lib/tracker_api/endpoints/workspaces.rb
tracker_api-1.3.0 lib/tracker_api/endpoints/workspaces.rb
tracker_api-1.2.1 lib/tracker_api/endpoints/workspaces.rb