Sha256: 5bd2f5de20a390c0e0d79742dee22892c36f8f7ef7c6d8468dac3663c81b1fa1

Contents?: true

Size: 516 Bytes

Versions: 16

Compression:

Stored size: 516 Bytes

Contents

module TrackerApi
  module Endpoints
    class Workspace
      attr_accessor :client

      def initialize(client)
        @client = client
      end

      def get(id, params={})
        data = client.get("/my/workspaces/#{id}", params: params).body

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

      def create(params={})
        data = client.post("/my/workspaces", params: params).body

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

Version data entries

16 entries across 16 versions & 1 rubygems

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