Class: Factual::Crosswalk

Inherits:
Object
  • Object
show all
Defined in:
lib/factual/crosswalk.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#clientObject

Returns the value of attribute client.



4
5
6
# File 'lib/factual/crosswalk.rb', line 4

def client
  @client
end

Instance Method Details

#namespacesObject



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 = {})
  options = {:factual_id => factual_id}
  process(options, 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 = {})
  options = {:namespace => namespace, :namespace_id => namespace_id}
  process(options, optional)
end