factual-api 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +3 -0
- data/README.md +5 -0
- data/lib/factual.rb +6 -2
- metadata +2 -2
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -69,6 +69,11 @@ factual.table("restaurants-us")
|
|
69
69
|
FACTUAL_ID = "110ace9f-80a7-47d3-9170-e9317624ebd9"
|
70
70
|
query = factual.crosswalk(FACTUAL_ID)
|
71
71
|
query.rows
|
72
|
+
|
73
|
+
# Or specify a place with its namespace_id and namespace
|
74
|
+
SIMPLEGEO_ID = "SG_6XIEi3qehN44LH8m8i86v0"
|
75
|
+
query = factual.crosswalk(SIMPLEGEO_ID, :simplegeo)
|
76
|
+
query.rows
|
72
77
|
````
|
73
78
|
|
74
79
|
## Simple Resolve Example
|
data/lib/factual.rb
CHANGED
@@ -13,8 +13,12 @@ class Factual
|
|
13
13
|
Query::Table.new(@api, "t/#{table_id_or_alias}")
|
14
14
|
end
|
15
15
|
|
16
|
-
def crosswalk(
|
17
|
-
|
16
|
+
def crosswalk(namespace_id, namespace = nil)
|
17
|
+
if namespace
|
18
|
+
Query::Crosswalk.new(@api, :namespace_id => namespace_id, :namespace => namespace)
|
19
|
+
else
|
20
|
+
Query::Crosswalk.new(@api, :factual_id => namespace_id)
|
21
|
+
end
|
18
22
|
end
|
19
23
|
|
20
24
|
def resolve(values)
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: factual-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 1.0.
|
5
|
+
version: 1.0.3
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Rudiger Lippert
|
@@ -11,7 +11,7 @@ autorequire:
|
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
13
|
|
14
|
-
date: 2012-03-
|
14
|
+
date: 2012-03-13 00:00:00 +08:00
|
15
15
|
default_executable:
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|