From 18ef0e4a56ed8a2b516f24c9e850207babb56ef3 Mon Sep 17 00:00:00 2001 From: fenwick67 Date: Fri, 2 Aug 2019 13:33:03 -0400 Subject: [PATCH] document v2 API --- README.md | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index bc9eaff..9c65f4e 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,28 @@ The homepage has a tool for generating iframe code for you, with a sensible `san ## API -### GET `/api/feed` +### V2 + +#### GET `/apiv2/feed` + +> example: `/api/feed?userurl=https%3A%2F%2Foctodon.social%2Fusers%2Ffenwick67&scale=90&theme=light` + +Returns a html page which displays a mastodon feed for a user URL. Note that URLs must be URI encoded (i.e. `encodeURIComponent('https://octodon.social/users/fenwick67')` ). + +Querystring options: + +| option | required | description | +| ------ | -------- | ----------- | +| `userurl` | **yes** | Mastodon/ActivityPub account URL (usually `https://${instance}/users/${username}`) | +| `feedurl` | no | a URL to a page of an ActivityPub post collection. Only used for pages beyond the first. | +| `theme` | no | either `dark` or `light`, to select the UI theme (default is `dark`). | +| `boosts` | no | whether to show boosts or not | +| `replies` | no | whether to show replies or not | +| `size` | no | the scale of the UI in percent. | + +### V1 (deprecated, will now just redirect you to the v2 API) + +#### GET `/api/feed` > example: `/api/feed?url=https%3A%2F%2Foctodon.social%2Fusers%2Ffenwick67.atom&scale=90&theme=light`