-
Notifications
You must be signed in to change notification settings - Fork 4
API
GET
[{ "id": 1, "title": "", "author": "", "normal_url": "", "resolved_url": "", "date_saved": "", "date_published": "", "excerpt": "", "cover_image": "", "video": "", "audio": "", "html":"", "images": "", "text": "", "user": 1 }]
Returning a list of objects for each article that are in the database.
User is a foreign key indicating which user saves the article.
POST
{ "id": 1, "title": "", "author": "", "normal_url": "", "resolved_url": "", "date_saved": "", "date_published": "", "excerpt": "", "cover_image": "", "video": "", "audio": "", "html":"", "images": "", "text": "", "user": 1 }
Adding an article.
-
idis auto generated. -
titleanduserare required fields. -
date_savedis default to today's date. No input necessary. Format is YYYY-MM-DDT00:00:00.000000Z.
<int:id> is an integer id number auto incremented by the database.
Actual url should look like this /api/users/pages/1/
GET
{ "id": 1, "title": "", "author": "", "normal_url": "", "resolved_url": "", "date_saved": "", "date_published": "", "excerpt": "", "cover_image": "", "tags": "", "text": "" }
Returning a detail object of the targeted article.
PUT (not currently in use)
Edit an existing article. title is required.
DELETE (in progress) Delete an existing article.
Stripe payment endpoint. It's easiest to test this from the web client, as the POST format is a bit involved.
POST Post `{"url": "https://url.to.article/somewhere"} returns new article JSON object