-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathREADME
More file actions
88 lines (75 loc) · 1.91 KB
/
README
File metadata and controls
88 lines (75 loc) · 1.91 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
API to give you a list of wikipedia article suggestions based on articles you have also read. See https://github.com/ilvar/hack17extension for the browser extension which uses this.
You need the neo4j python driver in order for this code to be useful, and for neo4j to be running in an obvious place.
You also need a graphdb installed in a neo4j database, like the one included in the project.
_pip install neo4j-driver_
My machine makes me do "pip2 install neo4j-driver". IMMV.
usage:
HTTP GET http://localhost:8080/graph/SOME_ARTICLE_NAME
HTTP GET http://localhost:8080/multigraph/SOME_ARTICLE_NAME,SOME_OTHER_ARTICLE_NAME,YET_ANOTHER_ARTICLE_NAME
e.g. GET http://localhost:8080/multigraph/Belfast,Dublin
response:
{
"pages": [
{
"url": "https://en.wikipedia.org/wiki/United_Kingdom",
"rev_link": "true",
"rel_count": 3808,
"title": "United Kingdom"
},
{
"url": "https://en.wikipedia.org/wiki/Ireland",
"rev_link": "true",
"rel_count": 2218,
"title": "Ireland"
},
{
"url": "https://en.wikipedia.org/wiki/Republic_of_Ireland",
"rev_link": "true",
"rel_count": 407,
"title": "Republic of Ireland"
},
{
"url": "https://en.wikipedia.org/wiki/Northern_Ireland",
"rev_link": "true",
"rel_count": 381,
"title": "Northern Ireland"
},
{
"url": "https://en.wikipedia.org/wiki/YouTube",
"rev_link": "true",
"rel_count": 344,
"title": "YouTube"
},
{
"url": "https://en.wikipedia.org/wiki/Barcelona",
"rev_link": "true",
"rel_count": 323,
"title": "Barcelona"
},
{
"url": "https://en.wikipedia.org/wiki/May_13",
"rev_link": "true",
"rel_count": 188,
"title": "May 13"
},
{
"url": "https://en.wikipedia.org/wiki/Municipal_corporation",
"rev_link": "true",
"rel_count": 187,
"title": "Municipal corporation"
},
{
"url": "https://en.wikipedia.org/wiki/WWE_Raw",
"rev_link": "true",
"rel_count": 184,
"title": "WWE Raw"
},
{
"url": "https://en.wikipedia.org/wiki/July_10",
"rev_link": "true",
"rel_count": 156,
"title": "July 10"
}
]
}
Yes, "WWE Raw".