An article reading list manager.
click to enlarge
Parameters written in bold text are required.
Parameters written in italic text are optional.
POST JSON to /login:
- username (string)
- password (string)
You will receive a JSON on success, as following: {"success": "ok", "token": "..."}
Send the token to every other request in a basic Authorization header. Be careful that tokens expires after a given amount of time (default is 3600 seconds, one hour).
Note: all /articles routes are protected, they need you to send a valid authorization header.
POST JSON to /articles/add:
- title (string)
- url (string)
- tags (list of strings, can be empty)
Example:
(curl "http://localhost:3000/articles/add" -Method POST -H @{"Content-Type"="application/json"; "Authorization"="Basic token..."} -Body '{"title": "hello", "url": "https://google.com", "tags": []}').ContentGET JSON from /articles/:id:
- id (integer)
(curl "http://localhost:3000/articles/0" -Method GET -H @{"Authorization"="Basic token..."}).ContentGET JSON from /articles/list:
- URL parameter page (integer), defaults to 1
- URL parameter quantity (integer), defaults to 25
Example:
(curl "http://localhost:3000/articles/list?page=1&quantity=14" -Method GET -H @{"Authorization"="Basic token..."}).ContentDELETE /articles/:id:
- id (integer)
Example:
(curl "http://localhost:3000/articles/0" -Method DELETE -H @{"Authorization"="Basic token..."}).ContentPATCH JSON to /articles/:id:
- id (integer)
- title (string)
- tags (list of strings)
- read (bool)
- url (string)
- notes (string)
Note: unknown attributes are simply ignored
Example:
(curl http://localhost:3000/articles/0 -Method PATCH -H @{"Content-Type"="application/json"; "Authorization"="Basic token..."} -Body '{"not_an_attribute": "hello", "read": true}').ContentNote: all /tags routes are protected, they need you to send a valid authorization header.
POST JSON to /tags/add:
- name (string)
- color (string), must be a valid hexcolor
Example:
(curl "http://localhost:3000/tags/add" -Method POST -H @{"Content-Type"="application/json"; "Authorization"="Basic token..."} -Body '{"name": "foo", "color": "012345"}').ContentGET JSON from /tags/:id:
- id (string)
(curl "http://localhost:3000/tags/0" -Method GET -H @{"Authorization"="Basic token..."}).ContentGET JSON from /tags/list.
Example:
(curl "http://localhost:3000/tags/list" -Method GET -H @{"Authorization"="Basic token..."}).ContentDELETE /tags/:id:
- id (string)
Example:
(curl "http://localhost:3000/tags/coffee" -Method DELETE -H @{"Authorization"="Basic token..."}).ContentPATCH JSON to /tags/:id:
- id (string), the (old) tag name
- name (string), an optional new name (must be unique)
- color (string), must be a valid hexcolor
Note: unknown attributes are simply ignored
Example:
(curl http://localhost:3000/tags/coffee -Method PATCH -H @{"Content-Type"="application/json"; "Authorization"="Basic token..."} -Body '{"not_an_attribute": "hello", "color": "ff0000"}').Content