summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authoreltrac <hi@eltr.ac>2026-04-27 16:31:44 +0800
committereltrac <hi@eltr.ac>2026-04-27 16:31:44 +0800
commitb685eaa860171f51649116baa2e1b8525f36b7b1 (patch)
treeb56fe511db8e8d4a1537fa5855aeec14c7d985ce /README.md
parente8b002772d91f59a5643550c12490d6d1e954ab1 (diff)
docs: update API documentation
Diffstat (limited to 'README.md')
-rw-r--r--README.md46
1 files changed, 42 insertions, 4 deletions
diff --git a/README.md b/README.md
index b84bc69..e345848 100644
--- a/README.md
+++ b/README.md
@@ -20,6 +20,7 @@ It *eats up* in-coming Webmention request, *dissolve* the target's HTML and *gro
- JSON API used for querying exisiting mentions
- RSS Feed
- Webhook
+- Image proxy for microformats photos
## Roadmap
@@ -35,14 +36,51 @@ It *eats up* in-coming Webmention request, *dissolve* the target's HTML and *gro
You can configure this endpoint path. There are not separate endpoints for different domains. All Webmentions are sent to one endpoint.
-### Query and filter Webmentions
+### Query Webmentions sent to a URL
-`GET /api/mentions`
-
-Respond with a JSON array containing all webmentions by default. Accepts query `filter`, either a target URL or a domain name, e.g. `/api/mentions?filter=example.com`.
+`GET /api/mentions?url=`
`mentions` is for generic Webmention. If a Webmention target has microformats markup, it may contain `u-like-of` `u-in-reply-to` and `u-repost-of` elements, Weepinbell see them as special mentions. Use `/api/likes` `/api/replies` and `/api/reposts` to get these special mentions.
+Response body:
+
+```JSON
+{
+ "webmention": {
+ "source": "...",
+ "target": "...",
+ "id": "...",
+ "modified": ...
+ },
+ // if target has no microformats markup
+ // this will be left empty
+ "microformats": {
+ "author": {
+ "name": "...",
+ "nickname": "...",
+ "photo": "...",
+ "url": "..."
+ },
+ // supported types: in-reply-to, like-of, repost-of
+ "type": "in-reply-to",
+ "published": "...",
+ "content": {
+ "html": "...",
+ "text": "..."
+ }
+ },
+ "extra": {
+ "proxied-photo": "..."
+ }
+ },
+```
+
+### Query Webmentions sent to a domain
+
+`GET /api/mentions/:domain`
+
+Special mentions `/api/{likes|replies|reposts}` works, too.
+
### Query one specific Webmention
`GET /api/mention/:id`