A Neo4j Based Twitter Clone Backend
MIT License
A Neo4j Based Twitter Clone Backend
Build it:
mvn clean package
Copy target/gritter-1.0-SNAPSHOT.jar to the plugins/ directory of your Neo4j server.
Configure Neo4j by adding a line to conf/neo4j.conf:
dbms.unmanaged_extension_classes=com.maxdemarzi=/v1
Start Neo4j server.
Create the Schema:
:POST /v1/schema/create
API:
:GET /v1/users/{username}
:GET /v1/users/{username}/profile
:POST /v1/users {username:'', password:'', email:'', name:''}
:GET /v1/users/{username}/followers
:GET /v1/users/{username}/following
:POST /v1/users/{username}/follows/{username2}
:DELETE /v1/users/{username}/follows/{username2}
:GET /v1/users/{username}/posts
:POST /v1/users/{username}/posts {status:''}
:PUT /v1/users/{username}/posts/{time} {status:''}
:POST /v1/users/{username}/posts/{username2}/{time}
:GET /v1/users/{username}/likes
:POST /v1/users/{username}/likes/{username2}/{time}
:DELETE /v1/users/{username}/likes/{username2}/{time}
:GET /v1/users/{username}/blocks
:POST /v1/users/{username}/blocks/{username2}
:DELETE /v1/users/{username}/blocks/{username2}
:GET /v1/users/{username}/mentions
:GET /v1/users/{username}/timeline
:GET /v1/users/{username}/recommendations/friends
:GET /v1/users/{username}/recommendations/follows
:GET /v1/tags
:GET /v1/tags/{tag}
:GET /v1/search&q=term
:GET /v1/search/latest
Query Parameters:
limit=25 or any whole number
since=<a number representing a date in linux epoc time>
See https://www.epochconverter.com/