Class: Factual::Crosswalk
- Inherits:
-
Object
- Object
- Factual::Crosswalk
- Defined in:
- lib/factual/crosswalk.rb
Instance Attribute Summary collapse
-
#client ⇒ Object
Returns the value of attribute client.
Instance Method Summary collapse
-
#initialize(client) ⇒ Crosswalk
constructor
A new instance of Crosswalk.
- #namespaces ⇒ Object
-
#search_by_factual_id(factual_id, optional = {}) ⇒ Object
optional parameters include: limit: default is 50, must use OAuth to exceed only: namespace_id to restrict returns.
-
#search_by_namespace(namespace, namespace_id, optional = {}) ⇒ Object
optional parameters include: limit: default is 50, must use OAuth to exceed only: namespace_id to restrict returns.
Constructor Details
#initialize(client) ⇒ Crosswalk
Returns a new instance of Crosswalk.
6 7 8 |
# File 'lib/factual/crosswalk.rb', line 6 def initialize(client) @client = client end |
Instance Attribute Details
#client ⇒ Object
Returns the value of attribute client.
4 5 6 |
# File 'lib/factual/crosswalk.rb', line 4 def client @client end |
Instance Method Details
#namespaces ⇒ Object
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/factual/crosswalk.rb', line 26 def namespaces [ "allmenus", "allpages", "aol", "chow", "citysearch", "dexknows", "explore_to", "facebook", "foursquare", "fwix", "gogobot", "gowalla", "greatschools", "grubhub", "hotelscombined", "hunch", "insiderpages", "loopt", "manta", "menupages", "menupix", "menuplatform", "merchantcircle", "openmenu", "opentable", "restaurants", "retailigence", "simplegeo", "superpages", "urbanspoon", "yahoolocal", "yellowbook", "yelp", "yp", "zagat" ] end |
#search_by_factual_id(factual_id, optional = {}) ⇒ Object
optional parameters include:
limit: default is 50, must use OAuth to exceed
only: namespace_id to restrict returns
13 14 15 16 |
# File 'lib/factual/crosswalk.rb', line 13 def search_by_factual_id(factual_id, optional = {}) = {:factual_id => factual_id} process(, optional) end |
#search_by_namespace(namespace, namespace_id, optional = {}) ⇒ Object
optional parameters include:
limit: default is 50, must use OAuth to exceed
only: namespace_id to restrict returns
21 22 23 24 |
# File 'lib/factual/crosswalk.rb', line 21 def search_by_namespace(namespace, namespace_id, optional = {}) = {:namespace => namespace, :namespace_id => namespace_id} process(, optional) end |