diff --git a/96.md b/96.md index 8f7b6cef..8ce25317 100644 --- a/96.md +++ b/96.md @@ -282,9 +282,10 @@ The successful response is a 200 OK one with just basic JSON fields: ## Listing files -`GET $api_url?page=x&count=y&sort=z&search=w` +`GET $api_url?page=x&count=y&sort=z&order=w&search=term` AUTH **required** for pubkey file listing. + AUTH **NOT** required for public file listing. Returns a list of files. If auth event is present, the server should return only files uploaded by the pubkey in the auth event. @@ -304,7 +305,7 @@ Example Response: ["size", "123456"], ["alt", "a meme that makes you laugh"], ["expiration", "1715691139"], - ["file_tags", "cat, meme, funny, laugh"], + ["file_tags", "cat, meme, funny, laugh"], // ...other metadata ] "content": "haha funny meme", // caption @@ -319,8 +320,13 @@ Example Response: ### Query args -- `page` page number (`offset=page*count`) -- `count` number of items per page +- `page` **REQUIRED** Page number (`offset=page*count`) +- `count` **REQUIRED** Number of items per page +- `sort` **OPTIONAL** Can be 'created_at' or 'size'. Default is 'created_at'. +- `order` **OPTIONAL** Page order 'ASC' or 'DESC'. Default is 'DESC'. +- `search` **OPTIONAL** Search term. The server should search in the `alt` and `file_tags` fields. + +The server can or not support optional query args. ## Selecting a Server