Roznoshchik / Lurnby

A tool for active reading and personal knowledge management
https://www.lurnby.com
BSD 3-Clause "New" or "Revised" License
681 stars 18 forks source link

Creating a Lurnby api #19

Closed Roznoshchik closed 1 year ago

Roznoshchik commented 2 years ago

For some of the planned features for lurnby, including offline support and native mobile apps, it's important to first separate the data from the application to allow for multiple clients. This is a sketch of the api

User

Method Endpoint Description
POST /user create new user
GET /user/<id> get user info
GET /user/<id>/email enable add by email
GET /user/<id>/senders get approved senders
PUT /user/<id>/senders update approved senders
GET /user/<id>/export export all users data
GET /user/<id>/preferences get user communication preferences
PUT /user/<id>/preferences update user communication preferences
PUT /user/<id> update user
DEL /user/<id> delete user

Auth

Method Endpoint Description
POST /authorize log in / receive tokens
POST /refresh refresh tokens

Articles

Method Endpoint Description
GET /article Get articles
POST /article create new article
GET /article/<id> get article
PUT /article/<id> update article
DEL /article/<id> delete article
GET /article/<id>/notes get article notes
PUT /article/<id>/notes update article notes
GET /article/<id>/highlights get article highlights
GET /article/<id>/export export article

Highlights

Method Endpoint Description
GET /highlight Get highlights
GET /highlight/export export highlights
POST /highlight create new highlight
GET /highlight/<id> get highlight
PUT /highlight/<id> update highlight
DEL /highlight/<id> delete highlight
GET /highlight/review get highlights for review

Tags

Method Endpoint Description
GET /tag Get tags
POST /tag create new tag
GET /tag/<id> get tag
PUT /tag/<id> update tag
DEL /tag/<id> delete tag