node.js api for the wekeypedia project
CYPHER query:
MATCH (u:User) RETURN DISTINCT u
JSON response:
[
{
"google_id": google id [OPTIONAL],
"christos_id": id [OPTIONAL]
},...
]
CYPHER query:
MATCH (p:Page) RETURN DISTINCT p
JSON response:
[
{
"url": url,
"title": title
},...
]
Give a some meta information about available data about this page:
- number of revisions stored as datasets
- last revision
Give a list of all revisions ordered by timestamps.
- info:
- revision id
- timestamp
Proxy the datasets database and give back the json result from the corresponding wikipediage page#revision from the wikipedia API.
- info
- author (IP or official id)
- timestamp
- comment
- content
- size
CYPHER query:
MATCH (u:User)-[r:visited]->(p:Page) RETURN u, r, p
JSON response:
[
{
"page": page url,
"time": timestamp,
"user": user id
},...
]
Easy peasy!
# git clone https://github.com/WeKeyPedia/api
# cd api
# npm install
# forever -c coffee server.coffee