Class: One40Proof::Search

Inherits:
Base
  • Object
show all
Defined in:
lib/one40_proof/simple/search.rb

Instance Method Summary collapse

Methods inherited from Base

#action_urls, #byline, #image_url, #status, #text, #user, #validate_impression!

Constructor Details

#initialize(options = {}) ⇒ Search

Options:

  • user_id. Required. The Twitter ID or screen name of a user.

  • app_id. Required. Your 140 Proof app id.

    1. Required. The query the user entered. Query strings should be URL encoded. Queries are limited 140 URL encoded characters.

  • lat. Optional. The user’s current latitude. Note: The valid ranges for latitude is -90.0 to +90.0 (North is positive) inclusive. This parameter will be ignored if outside that range, if it is not a number, or if there not a corresponding long parameter with this request.

  • long. Optional. The user’s current longitude. Note: The valid ranges for longitude is -180.0 to +180.0 (East is positive) inclusive. This parameter will be ignored if outside that range, if it is not a number, or if there not a corresponding lat parameter with this request.

  • lang. Optional. Restricts ads to the given language, specified by an ISO 639-1 code - en.wikipedia.org/wiki/ISO_639-1



19
20
21
# File 'lib/one40_proof/simple/search.rb', line 19

def initialize(options={})
  super('/ads/search.json', {:query => options})
end