Module: Echowrap::API::Sandbox

Includes:
Utils
Included in:
Client
Defined in:
lib/echowrap/api/sandbox.rb

Constant Summary

Constants included from Utils

Utils::API_KEY_CANNOT_CALL_THIS_METHOD, Utils::INVALID_PARAMETER, Utils::MISSING_OR_INVALID_KEY, Utils::MISSING_PARAMETER, Utils::RATE_LIMIT_EXCEEDED, Utils::SUCCESS

Instance Method Summary collapse

Instance Method Details

#sandbox_access(options = {}) ⇒ Echowrap::Sandbox

Gets access to the listed assets. This method returns a secure token or URL that can be used by the application to access the asset. This method requires an API key that has been approved for the sandbox. NOTE: This method uses Oauth, the oauth parameters are generated and inserted by this gem automatically and do not need to be manually added.

Examples:

sandbox_access

Echowrap.sandbox_access(:sandbox => 'emi_evanescence', :id => 'c1b89c9b9e0ee9e53650f1d4e393d716')

Parameters:

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

    A customizable set of options.

Options Hash (options):

  • :sandbox (String)

    The name of the sandbox. Required. Example: ‘emi_evanescence’.

  • :The (String)

    ID of the asset. Required, may send multiple. Example: ‘c1b89c9b9e0ee9e53650f1d4e393d716’.

Returns:

Raises:

See Also:



40
41
42
# File 'lib/echowrap/api/sandbox.rb', line 40

def sandbox_access(options={})
  objects_from_response(Echowrap::Asset, :get, '/api/v4/sandbox/access', :assets, options.merge(:oauth_request => true))
end

#sandbox_list(options = {}) ⇒ Echowrap::Sandbox

Lists detailed information about each asset in the sandbox. This method describes each asset in detail but does not provide direct access to the assets. This method does not require an approved API key. Note that different sandboxes may return different sets of data and metadata.

Examples:

sandbox_list

Echowrap.sandbox_list(:sandbox => 'emi_evanescence')

Parameters:

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

    A customizable set of options.

Options Hash (options):

  • :sandbox (String)

    The name of the sandbox. Required. Example: ‘emi_evanescence’.

  • :results (Integer)

    The number of results desired. Not required, defaults to 15, must be between 0 and 100.

  • :start (Integer)

    The desired index of the first result returned. Not required, defaults to 0, must be one of [0, 15, 30].

Returns:

Raises:

See Also:



22
23
24
# File 'lib/echowrap/api/sandbox.rb', line 22

def sandbox_list(options={})
  object_from_response(Echowrap::Sandbox, :get, '/api/v4/sandbox/list', nil, options)
end