Class: WhosGotDirt::Requests::List::LittleSis
- Inherits:
-
WhosGotDirt::Request
- Object
- WhosGotDirt::Request
- WhosGotDirt::Requests::List::LittleSis
- Defined in:
- lib/whos_got_dirt/requests/list/little_sis.rb
Overview
Requests for lists from the LittleSis API.
The q
parameter matches names and descriptions.
Instance Method Summary collapse
-
#convert ⇒ Hash
Converts the MQL parameters to API-specific parameters.
-
#to_s ⇒ String
Returns the URL to request.
Constructor Details
This class inherits a constructor from WhosGotDirt::Request
Instance Method Details
#convert ⇒ Hash
Converts the MQL parameters to API-specific parameters.
25 26 27 28 29 30 31 32 33 34 |
# File 'lib/whos_got_dirt/requests/list/little_sis.rb', line 25 def convert match('q', 'name') equal('num', 'limit') # default 100, maximum 100 equal('page', 'page') # API-specific parameters. equal('_key', 'little_sis_api_key') output end |
#to_s ⇒ String
Returns the URL to request.
17 18 19 |
# File 'lib/whos_got_dirt/requests/list/little_sis.rb', line 17 def to_s "#{base_url}?#{to_query(convert)}" end |