Skip to content
This repository has been archived by the owner on Nov 2, 2023. It is now read-only.

WeKeyPedia/api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

api

node.js api for the wekeypedia project

API endpoints

GET /users

CYPHER query:

MATCH (u:User) RETURN DISTINCT u

JSON response:

[
  {
    "google_id": google id [OPTIONAL],
    "christos_id": id [OPTIONAL]    
  },...
]

GET /pages

CYPHER query:

MATCH (p:Page) RETURN DISTINCT p

JSON response:

[
  {
    "url": url,
    "title": title    
  },...
]

GET /page/:wikipedia_page_url_encoded

Give a some meta information about available data about this page:

  • number of revisions stored as datasets
  • last revision

GET /page/:wikipedia_page_url_encoded/timeline

Give a list of all revisions ordered by timestamps.

  • info:
    • revision id
    • timestamp

GET /page/:wikipedia_page_url_encoded/revision/:revision_id

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

GET /visits

CYPHER query:

MATCH (u:User)-[r:visited]->(p:Page) RETURN u, r, p

JSON response:

[
  {
    "page": page url, 
    "time": timestamp, 
    "user": user id
  },...
]

installation

Easy peasy!

# git clone https://github.com/WeKeyPedia/api
# cd api
# npm install
# forever -c coffee server.coffee

About

node.js api for the wekeypedia project

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published