diff --git a/openapi.yaml b/openapi.yaml index c853187..424f2bc 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -1147,7 +1147,8 @@ paths: and which section it is in: `new_since_joined` (it started on or after the day the user's account was made) or `before_joined`. - Listing them records nothing; the user still sees an unseen one in the popup. + Listing them records nothing; the user still sees an unseen one in the popup. Use `filter` + to list only the Unread or only the Read ones, as the page's Unread and Read filters do. operationId: listWhatsNew security: [{tokenAuth: []}] parameters: @@ -1158,6 +1159,15 @@ paths: schema: type: string enum: [new_since_joined, before_joined] + - name: filter + in: query + required: false + description: | + `unread`: only the ones the user hasn't opened yet, in the popup or in What's new (the page's + Unread filter). `read`: only the ones they have opened (Read). Without it, both. + schema: + type: string + enum: [unread, read] - $ref: '#/components/parameters/Page' - $ref: '#/components/parameters/PerPage' - $ref: '#/components/parameters/LastSyncDatetime' diff --git a/server.js b/server.js index 5111d26..bde9b62 100644 --- a/server.js +++ b/server.js @@ -4696,12 +4696,13 @@ function buildDocsPage() {
new_since_joined or before_joined; leave out for both" },
+ { name: "filter", type: "string", required: false, desc: "unread: only the ones you haven't opened yet (What's new › Unread); read: only those you have; leave out for both" },
{ name: "page", type: "integer", required: false, desc: "Page number" },
{ name: "per_page", type: "integer", required: false, desc: "Records per page (default 10, max 200)" },
{ name: "last_synced_datetime", type: "string", required: false, desc: "ISO 8601 incremental sync" }
], [
{ code: "200", cls: "response-2xx", desc: "Paginated What's new announcements for you, newest first: Makerble's own that have gone live for an audience you're in, and scheduled ones still to start that you can read early. Each has its section, includes_tour, asked_for (it answered one of your requests), seen and seen_at" },
- { code: "422", cls: "response-4xx", desc: "An unknown section" }
+ { code: "422", cls: "response-4xx", desc: "An unknown section or filter" }
], "Listing them doesn't mark them seen: you still get an unseen one in the popup. Opening one in Wishlist › What's new marks it seen there.")}
${endpointCard("GET", "/wishes", "List your Wishlist", true, [
{ name: "page", type: "integer", required: false, desc: "Page number" },