class GdsApi::AssetManager

def asset(id)

Raises:
  • (HTTPErrorResponse) - if the request returns an error

Returns:
  • (Response, nil) - A response object containing the parsed JSON response. If

Parameters:
  • id (String) -- The asset identifier
def asset(id)
  get_json("#{base_url}/assets/#{id}")
end

def base_url

def base_url
  endpoint
end

def create_asset(asset)

Raises:
  • (HTTPErrorResponse) - if the request returns an error

Returns:
  • (Net::HTTPResponse) - The raw http response from the api.

Parameters:
  • asset (Hash) -- The attributes for the asset to send to the api.
def create_asset(asset)
  post_multipart("#{base_url}/assets", { :asset => asset })
end