Class: WhosGotDirt::Requests::Entity::OpenDuka

Inherits:
WhosGotDirt::Request show all
Defined in:
lib/whos_got_dirt/requests/entity/open_duka.rb

Overview

Requests for entities from the OpenDuka API.

Examples:

Supply an API key.

"open_duka_api_key": "..."

Instance Method Summary collapse

Constructor Details

This class inherits a constructor from WhosGotDirt::Request

Instance Method Details

#convertHash

Converts the MQL parameters to API-specific parameters.

Returns:

  • (Hash)

    API-specific parameters

See Also:



22
23
24
25
26
27
28
29
# File 'lib/whos_got_dirt/requests/entity/open_duka.rb', line 22

def convert
  match('term', 'name')

  # API-specific parameters.
  equal('key', 'open_duka_api_key')

  output
end

#to_sString

Returns the URL to request.

Returns:

  • (String)

    the URL to request



14
15
16
# File 'lib/whos_got_dirt/requests/entity/open_duka.rb', line 14

def to_s
  "#{base_url}?#{to_query(convert)}"
end