freebase-api 0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +4 -0
- data/.rspec +2 -0
- data/Gemfile +15 -0
- data/Gemfile.lock +53 -0
- data/LICENSE.txt +20 -0
- data/README.markdown +204 -0
- data/Rakefile +8 -0
- data/freebase-api.gemspec +19 -0
- data/lib/freebase-api.rb +32 -0
- data/lib/freebase_api/attribute.rb +29 -0
- data/lib/freebase_api/exceptions.rb +25 -0
- data/lib/freebase_api/ext/hash.rb +15 -0
- data/lib/freebase_api/image.rb +44 -0
- data/lib/freebase_api/session.rb +114 -0
- data/lib/freebase_api/topic.rb +186 -0
- data/lib/freebase_api/version.rb +3 -0
- data/spec/attribute_spec.rb +42 -0
- data/spec/fixtures/img.jpg +0 -0
- data/spec/fixtures/search.json +214 -0
- data/spec/fixtures/topic.json +477 -0
- data/spec/freebase_api_spec.rb +13 -0
- data/spec/image_spec.rb +57 -0
- data/spec/session_spec.rb +165 -0
- data/spec/spec_helper.rb +18 -0
- data/spec/support/helpers.rb +12 -0
- data/spec/topic_spec.rb +166 -0
- data/travis.yml +8 -0
- metadata +95 -0
@@ -0,0 +1,477 @@
|
|
1
|
+
{
|
2
|
+
"id": "/m/04g0kcw",
|
3
|
+
"text": "GitHub",
|
4
|
+
"lang": "en",
|
5
|
+
"property": {
|
6
|
+
"/common/topic/alias": {
|
7
|
+
"valuetype": "string",
|
8
|
+
"values": [
|
9
|
+
{
|
10
|
+
"text": "Github",
|
11
|
+
"lang": "en",
|
12
|
+
"value": "Github",
|
13
|
+
"creator": "/user/mwcl_wikipedia_en",
|
14
|
+
"timestamp": "2008-08-18T10:47:44.000Z"
|
15
|
+
}
|
16
|
+
],
|
17
|
+
"count": 1.0
|
18
|
+
},
|
19
|
+
"/common/topic/article": {
|
20
|
+
"valuetype": "compound",
|
21
|
+
"values": [
|
22
|
+
{
|
23
|
+
"text": "GitHub is a web-based hosting service for software development projects that use the Git...",
|
24
|
+
"lang": "en",
|
25
|
+
"id": "/m/04g0kc_",
|
26
|
+
"creator": "/user/mwcl_wikipedia_en",
|
27
|
+
"timestamp": "2008-08-08T06:20:46.009Z",
|
28
|
+
"property": {
|
29
|
+
"/common/document/source_uri": {
|
30
|
+
"valuetype": "uri",
|
31
|
+
"values": [
|
32
|
+
{
|
33
|
+
"text": "http://wp/en/18545292",
|
34
|
+
"lang": "",
|
35
|
+
"value": "http://wp/en/18545292",
|
36
|
+
"creator": "/user/mwcl_wikipedia_en",
|
37
|
+
"timestamp": "2008-08-08T06:20:46.009Z"
|
38
|
+
}
|
39
|
+
],
|
40
|
+
"count": 1.0
|
41
|
+
},
|
42
|
+
"/common/document/text": {
|
43
|
+
"valuetype": "string",
|
44
|
+
"values": [
|
45
|
+
{
|
46
|
+
"text": "GitHub is a web-based hosting service for software development projects that use the Git...",
|
47
|
+
"lang": "en",
|
48
|
+
"value": "GitHub is a web-based hosting service for software development projects that use the Git revision control system. GitHub offers both commercial plans and free accounts for open source projects. GitHub is the most popular Git hosting site, and the most popular open source hosting site.\nThe site provides social networking functionality such as feeds, followers and the network graph to display how developers work on their versions of a repository.\nGitHub also operates a pastebin-style site called Gist, wikis for individual repositories, and web pages that can be edited through a Git repository.\nAs of January 2010, GitHub is operated under the name GitHub, Inc.\nThe software that runs GitHub was written using Ruby on Rails and Erlang by GitHub, Inc. (previously known as Logical Awesome) developers Chris Wanstrath, PJ Hyett, and Tom Preston-Werner.\nGitHub was launched in April 2008.\nIn a talk at Yahoo! headquarters on 24 February 2009, GitHub team members announced that during the first year that GitHub was online, it accumulated 46,000 public repositories, 17,000 of them in the previous month alone. At that time, about 6,200 repositories had been forked at least once and 4,600 merged.",
|
49
|
+
"creator": "/user/mwcl_wikipedia_en",
|
50
|
+
"timestamp": "2008-08-08T06:20:46.009Z"
|
51
|
+
}
|
52
|
+
],
|
53
|
+
"count": 1.0
|
54
|
+
},
|
55
|
+
"/type/object/attribution": {
|
56
|
+
"valuetype": "object",
|
57
|
+
"values": [
|
58
|
+
{
|
59
|
+
"text": "Freebase Data Team",
|
60
|
+
"lang": "",
|
61
|
+
"id": "/m/0gs8",
|
62
|
+
"creator": "/user/mwcl_wikipedia_en",
|
63
|
+
"timestamp": "2008-08-08T06:20:46.009Z"
|
64
|
+
}
|
65
|
+
],
|
66
|
+
"count": 1.0
|
67
|
+
},
|
68
|
+
"/type/object/type": {
|
69
|
+
"valuetype": "object",
|
70
|
+
"values": [
|
71
|
+
{
|
72
|
+
"text": "Document",
|
73
|
+
"lang": "",
|
74
|
+
"id": "/common/document",
|
75
|
+
"creator": "/user/mwcl_wikipedia_en",
|
76
|
+
"timestamp": "2008-08-08T06:20:46.009Z"
|
77
|
+
}
|
78
|
+
],
|
79
|
+
"count": 1.0
|
80
|
+
}
|
81
|
+
}
|
82
|
+
}
|
83
|
+
],
|
84
|
+
"count": 1.0
|
85
|
+
},
|
86
|
+
"/common/topic/notable_for": {
|
87
|
+
"valuetype": "object",
|
88
|
+
"values": [
|
89
|
+
{
|
90
|
+
"text": "Website",
|
91
|
+
"lang": "en",
|
92
|
+
"id": "/internet/website"
|
93
|
+
}
|
94
|
+
],
|
95
|
+
"count": 1.0
|
96
|
+
},
|
97
|
+
"/common/topic/notable_types": {
|
98
|
+
"valuetype": "object",
|
99
|
+
"values": [
|
100
|
+
{
|
101
|
+
"text": "Website",
|
102
|
+
"lang": "en",
|
103
|
+
"id": "/internet/website",
|
104
|
+
"timestamp": "2013-01-17T00:03:19.118Z"
|
105
|
+
},
|
106
|
+
{
|
107
|
+
"text": "Proposal agent",
|
108
|
+
"lang": "en",
|
109
|
+
"id": "/base/technologyofdoing/proposal_agent",
|
110
|
+
"timestamp": "2013-01-17T00:03:19.118Z"
|
111
|
+
}
|
112
|
+
],
|
113
|
+
"count": 2.0
|
114
|
+
},
|
115
|
+
"/common/topic/official_website": {
|
116
|
+
"valuetype": "uri",
|
117
|
+
"values": [
|
118
|
+
{
|
119
|
+
"text": "http://github.com/",
|
120
|
+
"lang": "",
|
121
|
+
"value": "http://github.com/",
|
122
|
+
"creator": "/user/gardening_bot",
|
123
|
+
"timestamp": "2011-10-08T05:25:46.001Z"
|
124
|
+
}
|
125
|
+
],
|
126
|
+
"count": 1.0
|
127
|
+
},
|
128
|
+
"/common/topic/topic_equivalent_webpage": {
|
129
|
+
"valuetype": "uri",
|
130
|
+
"values": [
|
131
|
+
{
|
132
|
+
"text": "http://en.wikipedia.org/wiki/index.html?curid=18545292",
|
133
|
+
"lang": "",
|
134
|
+
"value": "http://en.wikipedia.org/wiki/index.html?curid=18545292",
|
135
|
+
"creator": "/user/mwcl_wikipedia_en",
|
136
|
+
"timestamp": "2008-08-08T06:20:46.009Z"
|
137
|
+
},
|
138
|
+
{
|
139
|
+
"text": "http://pt.wikipedia.org/wiki/index.html?curid=2108722",
|
140
|
+
"lang": "",
|
141
|
+
"value": "http://pt.wikipedia.org/wiki/index.html?curid=2108722",
|
142
|
+
"creator": "/user/wikipedia_intl",
|
143
|
+
"timestamp": "2010-09-24T19:25:20.000Z"
|
144
|
+
},
|
145
|
+
{
|
146
|
+
"text": "http://ru.wikipedia.org/wiki/index.html?curid=1588243",
|
147
|
+
"lang": "",
|
148
|
+
"value": "http://ru.wikipedia.org/wiki/index.html?curid=1588243",
|
149
|
+
"creator": "/user/wikipedia_intl",
|
150
|
+
"timestamp": "2010-09-25T02:43:28.000Z"
|
151
|
+
},
|
152
|
+
{
|
153
|
+
"text": "http://fr.wikipedia.org/wiki/index.html?curid=4161604",
|
154
|
+
"lang": "",
|
155
|
+
"value": "http://fr.wikipedia.org/wiki/index.html?curid=4161604",
|
156
|
+
"creator": "/user/wikipedia_intl",
|
157
|
+
"timestamp": "2010-09-25T07:46:48.001Z"
|
158
|
+
},
|
159
|
+
{
|
160
|
+
"text": "http://de.wikipedia.org/wiki/index.html?curid=5239764",
|
161
|
+
"lang": "",
|
162
|
+
"value": "http://de.wikipedia.org/wiki/index.html?curid=5239764",
|
163
|
+
"creator": "/user/wikipedia_intl",
|
164
|
+
"timestamp": "2010-09-29T20:54:44.000Z"
|
165
|
+
},
|
166
|
+
{
|
167
|
+
"text": "http://ru.wikipedia.org/wiki/GitHub",
|
168
|
+
"lang": "",
|
169
|
+
"value": "http://ru.wikipedia.org/wiki/GitHub",
|
170
|
+
"creator": "/user/wikipedia_intl",
|
171
|
+
"timestamp": "2011-05-22T03:13:18.001Z"
|
172
|
+
},
|
173
|
+
{
|
174
|
+
"text": "http://fr.wikipedia.org/wiki/GitHub",
|
175
|
+
"lang": "",
|
176
|
+
"value": "http://fr.wikipedia.org/wiki/GitHub",
|
177
|
+
"creator": "/user/wikipedia_intl",
|
178
|
+
"timestamp": "2011-05-22T06:19:45.000Z"
|
179
|
+
},
|
180
|
+
{
|
181
|
+
"text": "http://pt.wikipedia.org/wiki/GitHub",
|
182
|
+
"lang": "",
|
183
|
+
"value": "http://pt.wikipedia.org/wiki/GitHub",
|
184
|
+
"creator": "/user/wikipedia_intl",
|
185
|
+
"timestamp": "2011-05-22T09:45:11.001Z"
|
186
|
+
},
|
187
|
+
{
|
188
|
+
"text": "http://de.wikipedia.org/wiki/GitHub",
|
189
|
+
"lang": "",
|
190
|
+
"value": "http://de.wikipedia.org/wiki/GitHub",
|
191
|
+
"creator": "/user/wikipedia_intl",
|
192
|
+
"timestamp": "2011-05-22T15:41:11.000Z"
|
193
|
+
},
|
194
|
+
{
|
195
|
+
"text": "http://en.wikipedia.org/wiki/GitHub",
|
196
|
+
"lang": "",
|
197
|
+
"value": "http://en.wikipedia.org/wiki/GitHub",
|
198
|
+
"creator": "/user/mwcl_wikipedia_en",
|
199
|
+
"timestamp": "2011-05-23T10:20:05.002Z"
|
200
|
+
}
|
201
|
+
],
|
202
|
+
"count": 10.0
|
203
|
+
},
|
204
|
+
"/internet/website/category": {
|
205
|
+
"valuetype": "object",
|
206
|
+
"values": [
|
207
|
+
{
|
208
|
+
"text": "Revision control",
|
209
|
+
"lang": "en",
|
210
|
+
"id": "/m/0fj8g",
|
211
|
+
"creator": "/user/giskard",
|
212
|
+
"timestamp": "2010-01-29T12:12:43.000Z"
|
213
|
+
}
|
214
|
+
],
|
215
|
+
"count": 1.0
|
216
|
+
},
|
217
|
+
"/type/object/attribution": {
|
218
|
+
"valuetype": "object",
|
219
|
+
"values": [
|
220
|
+
{
|
221
|
+
"text": "Freebase Data Team",
|
222
|
+
"lang": "en",
|
223
|
+
"id": "/m/0gs8",
|
224
|
+
"creator": "/user/mwcl_wikipedia_en",
|
225
|
+
"timestamp": "2008-08-08T06:20:46.008Z"
|
226
|
+
}
|
227
|
+
],
|
228
|
+
"count": 1.0
|
229
|
+
},
|
230
|
+
"/type/object/key": {
|
231
|
+
"valuetype": "key",
|
232
|
+
"values": [
|
233
|
+
{
|
234
|
+
"text": "/wikipedia/en_id/18545292",
|
235
|
+
"lang": "",
|
236
|
+
"value": "/wikipedia/en_id/18545292",
|
237
|
+
"creator": "/user/mwcl_wikipedia_en",
|
238
|
+
"timestamp": "2008-08-08T06:20:46.009Z"
|
239
|
+
},
|
240
|
+
{
|
241
|
+
"text": "/en/github",
|
242
|
+
"lang": "",
|
243
|
+
"value": "/en/github",
|
244
|
+
"creator": "/user/topicns_loader",
|
245
|
+
"timestamp": "2009-02-28T15:22:15.001Z"
|
246
|
+
},
|
247
|
+
{
|
248
|
+
"text": "/wikipedia/de/GitHub",
|
249
|
+
"lang": "",
|
250
|
+
"value": "/wikipedia/de/GitHub",
|
251
|
+
"creator": "/user/wikipedia_intl",
|
252
|
+
"timestamp": "2010-09-23T09:35:04.001Z"
|
253
|
+
},
|
254
|
+
{
|
255
|
+
"text": "/wikipedia/pt/GitHub",
|
256
|
+
"lang": "",
|
257
|
+
"value": "/wikipedia/pt/GitHub",
|
258
|
+
"creator": "/user/wikipedia_intl",
|
259
|
+
"timestamp": "2010-09-23T17:54:47.000Z"
|
260
|
+
},
|
261
|
+
{
|
262
|
+
"text": "/wikipedia/ru/GitHub",
|
263
|
+
"lang": "",
|
264
|
+
"value": "/wikipedia/ru/GitHub",
|
265
|
+
"creator": "/user/wikipedia_intl",
|
266
|
+
"timestamp": "2010-09-24T11:52:03.000Z"
|
267
|
+
},
|
268
|
+
{
|
269
|
+
"text": "/wikipedia/pt_id/2108722",
|
270
|
+
"lang": "",
|
271
|
+
"value": "/wikipedia/pt_id/2108722",
|
272
|
+
"creator": "/user/wikipedia_intl",
|
273
|
+
"timestamp": "2010-09-24T19:25:20.000Z"
|
274
|
+
},
|
275
|
+
{
|
276
|
+
"text": "/wikipedia/ru_id/1588243",
|
277
|
+
"lang": "",
|
278
|
+
"value": "/wikipedia/ru_id/1588243",
|
279
|
+
"creator": "/user/wikipedia_intl",
|
280
|
+
"timestamp": "2010-09-25T02:43:28.000Z"
|
281
|
+
},
|
282
|
+
{
|
283
|
+
"text": "/wikipedia/fr_id/4161604",
|
284
|
+
"lang": "",
|
285
|
+
"value": "/wikipedia/fr_id/4161604",
|
286
|
+
"creator": "/user/wikipedia_intl",
|
287
|
+
"timestamp": "2010-09-25T07:46:48.001Z"
|
288
|
+
},
|
289
|
+
{
|
290
|
+
"text": "/wikipedia/fr/GitHub",
|
291
|
+
"lang": "",
|
292
|
+
"value": "/wikipedia/fr/GitHub",
|
293
|
+
"creator": "/user/wikipedia_intl",
|
294
|
+
"timestamp": "2010-09-25T19:05:21.000Z"
|
295
|
+
},
|
296
|
+
{
|
297
|
+
"text": "/wikipedia/de_id/5239764",
|
298
|
+
"lang": "",
|
299
|
+
"value": "/wikipedia/de_id/5239764",
|
300
|
+
"creator": "/user/wikipedia_intl",
|
301
|
+
"timestamp": "2010-09-29T20:54:44.000Z"
|
302
|
+
},
|
303
|
+
{
|
304
|
+
"text": "/wikipedia/ru_title/GitHub",
|
305
|
+
"lang": "",
|
306
|
+
"value": "/wikipedia/ru_title/GitHub",
|
307
|
+
"creator": "/user/wikipedia_intl",
|
308
|
+
"timestamp": "2011-05-22T03:13:18.001Z"
|
309
|
+
},
|
310
|
+
{
|
311
|
+
"text": "/wikipedia/fr_title/GitHub",
|
312
|
+
"lang": "",
|
313
|
+
"value": "/wikipedia/fr_title/GitHub",
|
314
|
+
"creator": "/user/wikipedia_intl",
|
315
|
+
"timestamp": "2011-05-22T06:19:45.000Z"
|
316
|
+
},
|
317
|
+
{
|
318
|
+
"text": "/wikipedia/pt_title/GitHub",
|
319
|
+
"lang": "",
|
320
|
+
"value": "/wikipedia/pt_title/GitHub",
|
321
|
+
"creator": "/user/wikipedia_intl",
|
322
|
+
"timestamp": "2011-05-22T09:45:11.001Z"
|
323
|
+
},
|
324
|
+
{
|
325
|
+
"text": "/wikipedia/de_title/GitHub",
|
326
|
+
"lang": "",
|
327
|
+
"value": "/wikipedia/de_title/GitHub",
|
328
|
+
"creator": "/user/wikipedia_intl",
|
329
|
+
"timestamp": "2011-05-22T15:41:11.000Z"
|
330
|
+
},
|
331
|
+
{
|
332
|
+
"text": "/wikipedia/en_title/GitHub",
|
333
|
+
"lang": "",
|
334
|
+
"value": "/wikipedia/en_title/GitHub",
|
335
|
+
"creator": "/user/mwcl_wikipedia_en",
|
336
|
+
"timestamp": "2011-05-23T10:20:05.002Z"
|
337
|
+
},
|
338
|
+
{
|
339
|
+
"text": "/wikipedia/en/Github",
|
340
|
+
"lang": "",
|
341
|
+
"value": "/wikipedia/en/Github",
|
342
|
+
"creator": "/user/mwcl_wikipedia_en",
|
343
|
+
"timestamp": "2012-08-15T05:11:01.000Z"
|
344
|
+
},
|
345
|
+
{
|
346
|
+
"text": "/wikipedia/en/Git_hub",
|
347
|
+
"lang": "",
|
348
|
+
"value": "/wikipedia/en/Git_hub",
|
349
|
+
"creator": "/user/mwcl_wikipedia_en",
|
350
|
+
"timestamp": "2012-08-15T05:11:03.000Z"
|
351
|
+
},
|
352
|
+
{
|
353
|
+
"text": "/wikipedia/en/Github$002Ecom",
|
354
|
+
"lang": "",
|
355
|
+
"value": "/wikipedia/en/Github$002Ecom",
|
356
|
+
"creator": "/user/mwcl_wikipedia_en",
|
357
|
+
"timestamp": "2012-08-15T05:11:05.001Z"
|
358
|
+
},
|
359
|
+
{
|
360
|
+
"text": "/wikipedia/en/GitHub",
|
361
|
+
"lang": "",
|
362
|
+
"value": "/wikipedia/en/GitHub",
|
363
|
+
"creator": "/user/mwcl_wikipedia_en",
|
364
|
+
"timestamp": "2012-08-15T05:11:07.001Z"
|
365
|
+
}
|
366
|
+
],
|
367
|
+
"count": 19.0
|
368
|
+
},
|
369
|
+
"/type/object/mid": {
|
370
|
+
"valuetype": "key",
|
371
|
+
"values": [
|
372
|
+
{
|
373
|
+
"text": "/m/04g0kcw",
|
374
|
+
"lang": "",
|
375
|
+
"value": "/m/04g0kcw"
|
376
|
+
}
|
377
|
+
],
|
378
|
+
"count": 1.0
|
379
|
+
},
|
380
|
+
"/type/object/name": {
|
381
|
+
"valuetype": "string",
|
382
|
+
"values": [
|
383
|
+
{
|
384
|
+
"text": "GitHub",
|
385
|
+
"lang": "en",
|
386
|
+
"value": "GitHub",
|
387
|
+
"creator": "/user/mwcl_wikipedia_en",
|
388
|
+
"timestamp": "2008-08-18T10:47:44.000Z"
|
389
|
+
}
|
390
|
+
],
|
391
|
+
"count": 1.0
|
392
|
+
},
|
393
|
+
"/type/object/type": {
|
394
|
+
"valuetype": "object",
|
395
|
+
"values": [
|
396
|
+
{
|
397
|
+
"text": "Topic",
|
398
|
+
"lang": "en",
|
399
|
+
"id": "/common/topic",
|
400
|
+
"creator": "/user/mwcl_wikipedia_en",
|
401
|
+
"timestamp": "2008-08-08T06:20:46.009Z"
|
402
|
+
},
|
403
|
+
{
|
404
|
+
"text": "Website",
|
405
|
+
"lang": "en",
|
406
|
+
"id": "/internet/website",
|
407
|
+
"creator": "/user/giskard",
|
408
|
+
"timestamp": "2010-01-29T12:12:03.000Z"
|
409
|
+
},
|
410
|
+
{
|
411
|
+
"text": "Proposal agent",
|
412
|
+
"lang": "en",
|
413
|
+
"id": "/base/technologyofdoing/proposal_agent",
|
414
|
+
"creator": "/user/techdoer",
|
415
|
+
"timestamp": "2012-09-10T08:18:26.000Z"
|
416
|
+
}
|
417
|
+
],
|
418
|
+
"count": 3.0
|
419
|
+
},
|
420
|
+
"/type/object/guid": {
|
421
|
+
"valuetype": "string",
|
422
|
+
"values": [
|
423
|
+
{
|
424
|
+
"text": "#9202a8c04000641f8000000008e0457b",
|
425
|
+
"lang": "",
|
426
|
+
"value": "#9202a8c04000641f8000000008e0457b"
|
427
|
+
}
|
428
|
+
],
|
429
|
+
"count": 1.0
|
430
|
+
},
|
431
|
+
"/type/object/id": {
|
432
|
+
"valuetype": "key",
|
433
|
+
"values": [
|
434
|
+
{
|
435
|
+
"text": "/en/github",
|
436
|
+
"lang": "",
|
437
|
+
"value": "/en/github"
|
438
|
+
}
|
439
|
+
],
|
440
|
+
"count": 1.0
|
441
|
+
},
|
442
|
+
"/type/object/creator": {
|
443
|
+
"valuetype": "object",
|
444
|
+
"values": [
|
445
|
+
{
|
446
|
+
"text": "mwcl_wikipedia_en",
|
447
|
+
"lang": "",
|
448
|
+
"id": "/user/mwcl_wikipedia_en",
|
449
|
+
"timestamp": "2008-08-08T06:20:46.008Z"
|
450
|
+
}
|
451
|
+
],
|
452
|
+
"count": 1.0
|
453
|
+
},
|
454
|
+
"/type/object/timestamp": {
|
455
|
+
"valuetype": "datetime",
|
456
|
+
"values": [
|
457
|
+
{
|
458
|
+
"text": "2008-08-08T06:20:46.008Z",
|
459
|
+
"lang": "en",
|
460
|
+
"value": "2008-08-08T06:20:46.008Z"
|
461
|
+
}
|
462
|
+
],
|
463
|
+
"count": 1.0
|
464
|
+
},
|
465
|
+
"/type/object/permission": {
|
466
|
+
"valuetype": "object",
|
467
|
+
"values": [
|
468
|
+
{
|
469
|
+
"text": "/boot/all_permission",
|
470
|
+
"lang": "",
|
471
|
+
"id": "/boot/all_permission"
|
472
|
+
}
|
473
|
+
],
|
474
|
+
"count": 1.0
|
475
|
+
}
|
476
|
+
}
|
477
|
+
}
|