Class: Uploadcare::Resources::Project

Inherits:
BaseResource
  • Object
show all
Defined in:
lib/uploadcare/resources/project.rb

Overview

Project resource representing the current Uploadcare project.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#autostore_enabledObject

Returns the value of attribute autostore_enabled.



7
8
9
# File 'lib/uploadcare/resources/project.rb', line 7

def autostore_enabled
  @autostore_enabled
end

#collaboratorsObject

Returns the value of attribute collaborators.



7
8
9
# File 'lib/uploadcare/resources/project.rb', line 7

def collaborators
  @collaborators
end

#nameObject

Returns the value of attribute name.



7
8
9
# File 'lib/uploadcare/resources/project.rb', line 7

def name
  @name
end

#pub_keyObject

Returns the value of attribute pub_key.



7
8
9
# File 'lib/uploadcare/resources/project.rb', line 7

def pub_key
  @pub_key
end

Class Method Details

.current(client: nil, config: Uploadcare.configuration, request_options: {}) ⇒ Uploadcare::Resources::Project Also known as: show

Get current project information.

Parameters:

  • client (Uploadcare::Client, nil) (defaults to: nil)

    Client instance

  • config (Uploadcare::Configuration) (defaults to: Uploadcare.configuration)

    Configuration fallback

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

    Request options

Returns:



15
16
17
18
19
20
21
# File 'lib/uploadcare/resources/project.rb', line 15

def self.current(client: nil, config: Uploadcare.configuration, request_options: {})
  resolved_client = resolve_client(client: client, config: config)
  response = Uploadcare::Result.unwrap(
    resolved_client.api.rest.project.show(request_options: request_options)
  )
  new(response, resolved_client)
end