Skip to content
Vera edited this page Dec 13, 2018 · 1 revision

/api/pages/

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.

  • id is auto generated.
  • title and user are required fields.
  • date_saved is default to today's date. No input necessary. Format is YYYY-MM-DDT00:00:00.000000Z.

/api/pages/int:id/ (not currently in use)

<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.

/api/payments/create-charge

Stripe payment endpoint. It's easiest to test this from the web client, as the POST format is a bit involved.

/api/scrape/

POST Post `{"url": "https://url.to.article/somewhere"} returns new article JSON object

Clone this wiki locally