|
1 | 1 | You need the neo4j python driver in order for this code to be useful, and for neo4j to be running in an obvious place. |
2 | 2 |
|
| 3 | +You also need a graphdb installed in a neo4j database, like the one included in the project. |
| 4 | + |
3 | 5 | _pip install neo4j-driver_ |
4 | 6 |
|
5 | 7 | My machine makes me do "pip2 install neo4j-driver". IMMV. |
6 | 8 |
|
7 | | -usage: HTTP GET http://localhost:8080/graph/SOME_ARTICLE_NAME |
| 9 | +usage: |
| 10 | + |
| 11 | +HTTP GET http://localhost:8080/graph/SOME_ARTICLE_NAME |
| 12 | +HTTP GET http://localhost:8080/multigraph/SOME_ARTICLE_NAME,SOME_OTHER_ARTICLE_NAME,YET_ANOTHER_ARTICLE_NAME |
| 13 | + |
8 | 14 |
|
9 | | -response: { |
10 | | -"data": [ |
| 15 | +e.g. GET http://localhost:8080/multigraph/Belfast,Dublin |
| 16 | + |
| 17 | +response: |
| 18 | + |
| 19 | +{ |
| 20 | +"pages": [ |
| 21 | +{ |
| 22 | +"url": "https://en.wikipedia.org/wiki/United_Kingdom", |
| 23 | +"rev_link": "true", |
| 24 | +"rel_count": 3808, |
| 25 | +"title": "United Kingdom" |
| 26 | +}, |
| 27 | +{ |
| 28 | +"url": "https://en.wikipedia.org/wiki/Ireland", |
| 29 | +"rev_link": "true", |
| 30 | +"rel_count": 2218, |
| 31 | +"title": "Ireland" |
| 32 | +}, |
| 33 | +{ |
| 34 | +"url": "https://en.wikipedia.org/wiki/Republic_of_Ireland", |
| 35 | +"rev_link": "true", |
| 36 | +"rel_count": 407, |
| 37 | +"title": "Republic of Ireland" |
| 38 | +}, |
11 | 39 | { |
12 | | -"url": "https://en.wikipedia.org/wiki/Perl", |
13 | | -"id": 1, |
14 | | -"title": "Perl" |
| 40 | +"url": "https://en.wikipedia.org/wiki/Northern_Ireland", |
| 41 | +"rev_link": "true", |
| 42 | +"rel_count": 381, |
| 43 | +"title": "Northern Ireland" |
15 | 44 | }, |
16 | 45 | { |
17 | | -"url": "https://en.wikipedia.org/wiki/Python", |
18 | | -"id": 2, |
19 | | -"name": "Python" |
| 46 | +"url": "https://en.wikipedia.org/wiki/YouTube", |
| 47 | +"rev_link": "true", |
| 48 | +"rel_count": 344, |
| 49 | +"title": "YouTube" |
| 50 | +}, |
| 51 | +{ |
| 52 | +"url": "https://en.wikipedia.org/wiki/Barcelona", |
| 53 | +"rev_link": "true", |
| 54 | +"rel_count": 323, |
| 55 | +"title": "Barcelona" |
| 56 | +}, |
| 57 | +{ |
| 58 | +"url": "https://en.wikipedia.org/wiki/May_13", |
| 59 | +"rev_link": "true", |
| 60 | +"rel_count": 188, |
| 61 | +"title": "May 13" |
| 62 | +}, |
| 63 | +{ |
| 64 | +"url": "https://en.wikipedia.org/wiki/Municipal_corporation", |
| 65 | +"rev_link": "true", |
| 66 | +"rel_count": 187, |
| 67 | +"title": "Municipal corporation" |
| 68 | +}, |
| 69 | +{ |
| 70 | +"url": "https://en.wikipedia.org/wiki/WWE_Raw", |
| 71 | +"rev_link": "true", |
| 72 | +"rel_count": 184, |
| 73 | +"title": "WWE Raw" |
| 74 | +}, |
| 75 | +{ |
| 76 | +"url": "https://en.wikipedia.org/wiki/July_10", |
| 77 | +"rev_link": "true", |
| 78 | +"rel_count": 156, |
| 79 | +"title": "July 10" |
20 | 80 | } |
21 | 81 | ] |
22 | 82 | } |
23 | 83 |
|
24 | | - |
|
0 commit comments