freebase-importers 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -12,23 +12,3 @@ module FreebaseImporters
12
12
  images!
13
13
  end
14
14
  end
15
- # module FreebaseImporters
16
- # class President < Base
17
- # map :name
18
- # map :id
19
- #
20
- # add_to_mql :"/government/us_president/presidency_number", []
21
- # add_method :presidency_numbers, -> { data["/government/us_president/presidency_number"] }
22
- #
23
- # map :"/people/person/date_of_birth"
24
- # add_method :date_of_birth, -> {
25
- # date = data["/people/person/date_of_birth"]
26
- # date ? Date.parse(date) : nil rescue date
27
- # }
28
- #
29
- # map :"/people/person/height_meters"
30
- #
31
- # add_to_mql :type, "/government/us_president"
32
- # images!
33
- # end
34
- # end
@@ -4,6 +4,10 @@ module FreebaseImporters
4
4
  map :characters, []
5
5
 
6
6
  add_to_mql :"type", "/book/book"
7
+ # # This limits books somewhat to works significant enough to have been translated.
8
+ # add_to_mql :"ns0:type", "/book/translated_work"
9
+
10
+ map :"/book/book/editions", []
7
11
 
8
12
  add_to_mql :"/book/written_work/author", []
9
13
  add_method :authors, CommonAccessors.single(:"/book/written_work/author")
@@ -17,5 +21,6 @@ module FreebaseImporters
17
21
  pub = data["/book/written_work/date_of_first_publication"]
18
22
  pub ? Date.parse(pub) : nil rescue pub
19
23
  }
24
+ images!
20
25
  end
21
26
  end
@@ -42,7 +42,8 @@ module FreebaseImporters
42
42
  url = base_url
43
43
  url.query_values = {
44
44
  'query' => [mql].to_json,
45
- 'cursor' => cursor
45
+ 'cursor' => cursor,
46
+ 'key' => FreebaseImporters.api_key
46
47
  }
47
48
  RestClient.get url.normalize.to_s, format: :json
48
49
  end
@@ -1,3 +1,3 @@
1
1
  module FreebaseImporters
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: freebase-importers
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-04-26 00:00:00.000000000 Z
12
+ date: 2013-04-28 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -166,7 +166,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
166
166
  version: '0'
167
167
  segments:
168
168
  - 0
169
- hash: 1306700090854972905
169
+ hash: 3184633909339633274
170
170
  required_rubygems_version: !ruby/object:Gem::Requirement
171
171
  none: false
172
172
  requirements:
@@ -175,7 +175,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
175
175
  version: '0'
176
176
  segments:
177
177
  - 0
178
- hash: 1306700090854972905
178
+ hash: 3184633909339633274
179
179
  requirements: []
180
180
  rubyforge_project:
181
181
  rubygems_version: 1.8.25