Class: Uploadcare::Api::Rest::Project

Inherits:
Object
  • Object
show all
Defined in:
lib/uploadcare/api/rest/project.rb

Overview

REST API endpoint for project information.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(rest:) ⇒ Project

Returns a new instance of Project.

Parameters:



11
12
13
# File 'lib/uploadcare/api/rest/project.rb', line 11

def initialize(rest:)
  @rest = rest
end

Instance Attribute Details

#restUploadcare::Api::Rest (readonly)

Returns Parent REST client.

Returns:



8
9
10
# File 'lib/uploadcare/api/rest/project.rb', line 8

def rest
  @rest
end

Instance Method Details

#show(request_options: {}) ⇒ Uploadcare::Result

Get current project information.

Parameters:

  • request_options (Hash) (defaults to: {})

    Request options

Returns:

  • (Uploadcare::Result)

    Project details (name, pub_key, autostore_enabled, collaborators)

See Also:



20
21
22
# File 'lib/uploadcare/api/rest/project.rb', line 20

def show(request_options: {})
  rest.get(path: '/project/', params: {}, headers: {}, request_options: request_options)
end