{"openapi":"3.1.0","info":{"title":"meet2play API","version":"0.1.0"},"servers":[{"url":"/"}],"paths":{"/api/health":{"get":{"summary":"Liveness of app and database","operationId":"getHealth","responses":{"200":{"description":"App and database reachable","content":{"application/json":{"schema":{"type":"object","required":["status","db"],"properties":{"status":{"type":"string","enum":["ok","error"]},"db":{"type":"string","enum":["ok","error"]},"version":{"type":"string","description":"git commit of the running image (INF-04), \"dev\" for local builds"}}}}}},"503":{"description":"Database unreachable","content":{"application/json":{"schema":{"type":"object","required":["status","db"],"properties":{"status":{"type":"string","enum":["ok","error"]},"db":{"type":"string","enum":["ok","error"]},"version":{"type":"string","description":"git commit of the running image (INF-04), \"dev\" for local builds"}}}}}}}}},"/api/stats":{"get":{"summary":"Row counts of the core tables, total and synthetic M2P-TEST rows (INF-05, BT-05)","operationId":"getStats","responses":{"200":{"description":"Counts per entity","content":{"application/json":{"schema":{"type":"object","required":["env","totals","testData"],"properties":{"env":{"type":"string"},"totals":{"$ref":"#/components/schemas/Counts"},"testData":{"$ref":"#/components/schemas/Counts"}}}}}}}}},"/api/providers":{"get":{"summary":"Mode of each external integration: real, labelled mock (dev), mailpit or unconfigured (INF-07). Never contains credential values","operationId":"getProviders","responses":{"200":{"description":"Provider status","content":{"application/json":{"schema":{"type":"object","required":["env","providers"],"properties":{"env":{"type":"string"},"providers":{"type":"array","items":{"type":"object","required":["id","name","mode","label","missing"],"properties":{"id":{"type":"string","enum":["google-oauth","facebook","google-maps","bgg","smtp"]},"name":{"type":"string"},"mode":{"type":"string","enum":["real","mock","mailpit","unconfigured"]},"label":{"type":"string"},"missing":{"type":"array","items":{"type":"string"},"description":"missing pass paths (empty in production)"}}}}}}}}}}}},"/api/openapi.json":{"get":{"summary":"This OpenAPI document","operationId":"getOpenApi","responses":{"200":{"description":"OpenAPI 3.1 document","content":{"application/json":{}}}}}},"/e/{id}/comments":{"get":{"summary":"Posts of one comment channel of a meetup (E-11)","operationId":"listMeetupComments","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"meetup id"},{"name":"channel","in":"query","required":true,"schema":{"type":"string","enum":["public","internal"]}},{"name":"after","in":"query","required":false,"schema":{"type":"integer","minimum":0},"description":"only posts with a larger id (polling cursor)"}],"responses":{"200":{"description":"Posts, oldest first","content":{"application/json":{"schema":{"type":"object","properties":{"comments":{"type":"array","items":{"$ref":"#/components/schemas/MeetupComment"}}}}}}},"400":{"description":"Unknown channel"},"401":{"description":"Not signed in"},"403":{"description":"Internal chat: viewer is neither host nor attending player"},"404":{"description":"Unknown meetup"}}},"post":{"summary":"Post a question (public) or a chat message (internal) (E-11)","operationId":"postMeetupComment","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"meetup id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["channel","body"],"properties":{"channel":{"type":"string","enum":["public","internal"]},"body":{"type":"string","minLength":1,"maxLength":2000}}}}}},"responses":{"201":{"description":"Stored post","content":{"application/json":{"schema":{"type":"object","properties":{"comment":{"$ref":"#/components/schemas/MeetupComment"}}}}}},"400":{"description":"Unknown channel, or error \"empty\" / \"tooLong\""},"401":{"description":"Not signed in"},"403":{"description":"Internal chat: viewer is neither host nor attending player"},"404":{"description":"Unknown meetup"},"415":{"description":"Body is not JSON"}}}},"/e/{id}/games":{"get":{"summary":"Game lists of a meetup: \"Someone is bringing\" and \"We'd like to play\", sorted by votes, ties by game name (E-07, V-19)","operationId":"listMeetupGames","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"meetup id"}],"responses":{"200":{"description":"bring and wish lists (names of bringers/seated players only for signed-in users) and the viewer's rights","content":{"application/json":{"schema":{"type":"object","properties":{"bring":{"type":"array","items":{"$ref":"#/components/schemas/MeetupGame"}},"wish":{"type":"array","items":{"$ref":"#/components/schemas/MeetupGame"}},"rights":{"type":"object","properties":{"act":{"type":"boolean"},"remove":{"type":"boolean"}}}}}}}},"404":{"description":"Unknown meetup"}}}},"/e/{id}/games/{entryId}/vote":{"post":{"summary":"Vote a game up (1) or down (-1); the same value again withdraws the vote (E-07, V-08)","operationId":"voteMeetupGame","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"meetup id"},{"name":"entryId","in":"path","required":true,"schema":{"type":"string"},"description":"game entry id (from GET /e/{id}/games)"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["value"],"properties":{"value":{"type":"integer","enum":[1,-1]}}}}}},"responses":{"200":{"description":"The viewer's vote now (1, -1 or 0 = withdrawn) and the game's score","content":{"application/json":{"schema":{"type":"object","properties":{"vote":{"type":"integer"},"score":{"type":"integer"}}}}}},"400":{"description":"value is not 1 or -1"},"401":{"description":"Not signed in"},"403":{"description":"Not a participant: only the host and attending players may vote (V-11)"},"404":{"description":"Unknown meetup or game entry"},"415":{"description":"Body is not JSON"}}}},"/e/{id}/calendar.ics":{"get":{"summary":"ICS file of one meetup — \"Add to calendar\" (B-05, IF-04)","operationId":"getMeetupIcs","description":"One VEVENT: title, start/end in UTC, page URL, SEQUENCE. LOCATION is the exact place for the host and attending players (session cookie), otherwise the neighbourhood; online meetups: \"Online\".","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"meetup id"}],"responses":{"200":{"description":"iCalendar file (Content-Disposition: attachment)","content":{"text/calendar":{"schema":{"type":"string"}}}},"404":{"description":"Unknown or cancelled meetup"}}}},"/cal/{token}.ics":{"get":{"summary":"Personal calendar subscription feed (B-06, IF-04)","operationId":"getCalendarFeed","description":"Every open/full meetup the key owner hosts or attends, from 30 days back; never cached. The secret key is the only credential (calendar apps send no cookies).","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{32,64}$"},"description":"secret calendar key"}],"responses":{"200":{"description":"iCalendar feed","content":{"text/calendar":{"schema":{"type":"string"}}}},"404":{"description":"Unknown key"}}}}},"components":{"schemas":{"Counts":{"type":"object","required":["users","games","groups","meetups"],"properties":{"users":{"type":"integer"},"games":{"type":"integer"},"groups":{"type":"integer"},"meetups":{"type":"integer"}}},"MeetupGame":{"type":"object","required":["id","list","game","score","myVote","voters","iOwn","seats","free","full","mySeat"],"properties":{"id":{"type":"string","description":"game entry id"},"list":{"type":"string","enum":["bring","wish"]},"addedAt":{"type":"string","format":"date-time"},"game":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"minPlayers":{"type":["integer","null"]},"maxPlayers":{"type":["integer","null"]},"bestMin":{"type":["integer","null"]},"bestMax":{"type":["integer","null"]},"playtime":{"type":["integer","null"]},"image":{"type":["string","null"]}}},"bringer":{"type":["object","null"],"properties":{"name":{"type":"string"},"handle":{"type":["string","null"]}}},"score":{"type":"integer","description":"up votes minus down votes of the host and attending players"},"myVote":{"type":"integer","enum":[1,0,-1]},"voters":{"type":"object","description":"V-19: names of up and down voters in voting order; empty for visitors","properties":{"up":{"type":"array","items":{"type":"string"}},"down":{"type":"array","items":{"type":"string"}}}},"iOwn":{"type":"boolean","description":"V-19: the game is on the viewer's shelf (status own)"},"seats":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"handle":{"type":["string","null"]}}}},"free":{"type":["integer","null"],"description":"free seats at the table (brought games with a maximum player count)"},"full":{"type":"boolean"},"mySeat":{"type":"boolean"}}},"MeetupComment":{"type":"object","required":["id","channel","body","createdAt","author","host"],"properties":{"id":{"type":"integer","description":"ascending; use as polling cursor `after`"},"channel":{"type":"string","enum":["public","internal"]},"body":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"author":{"type":"object","properties":{"name":{"type":"string"},"handle":{"type":["string","null"]}}},"host":{"type":"boolean","description":"written by the host"}}}}}}