Skip to content

Community routes

Star ratings and comments on games (ADR 0012). Generated from openapi.yaml of games-api 0.7.0: 7 routes.

Also tagged community, documented with their first tag:

GET /v1/sdk/games/{gameId}/review

GET /v1/sdk/games/{gameId}/review

Terminal window
curl 'https://api.filudi.com/v1/sdk/games/gloop/review' \
-H "authorization: Bearer $FILUDI_PLAYER_TOKEN"

The player’s own rating and comments on a game

gameId is the game slug, as in /v1/sdk/saves/{gameId}. Hidden comments are left out. Comments are newest first, all of them (a player posts 5 per hour at most).

Credential: a player token (fp1), sent as Authorization: Bearer <token>. A game token (fg1) answers 401 here.

NameInTypeRequiredDescription
gameIdpathstringyesGame slug
StatusBodyDescription
200PlayerReviewRating and comments.
401ErrorMissing or invalid token.
404ErrorUnknown resource.

PUT /v1/sdk/games/{gameId}/rating

PUT /v1/sdk/games/{gameId}/rating

Terminal window
curl -X PUT 'https://api.filudi.com/v1/sdk/games/gloop/rating' \
-H "authorization: Bearer $FILUDI_PLAYER_TOKEN" \
-H 'content-type: application/json' \
-d '{
"stars": 1
}'

Rate a game from 1 to 5 stars, or change the rating

Guests and accounts. One rating per player and game on the token’s site (ADR 0012). The game must be in the site catalog and visible. 60 ratings per player per hour. The catalog shows the new average within its 60-second cache.

Credential: a player token (fp1), sent as Authorization: Bearer <token>. A game token (fg1) answers 401 here.

NameInTypeRequiredDescription
gameIdpathstringyesGame slug

application/json, required.

PropertyTypeRequiredDescription
starsintegeryes1 to 5
StatusBodyDescription
200RatingSummaryThe game’s rating after this one.
400ErrorValidation failed.
401ErrorMissing or invalid token.
404noneGame not in this site’s catalog.
429ErrorToo many requests. Headers: Retry-After.
503noneRedis is down; the rate limit cannot be checked.

DELETE /v1/sdk/games/{gameId}/rating

DELETE /v1/sdk/games/{gameId}/rating

Terminal window
curl -X DELETE 'https://api.filudi.com/v1/sdk/games/gloop/rating' \
-H "authorization: Bearer $FILUDI_PLAYER_TOKEN"

Remove the player’s rating

Credential: a player token (fp1), sent as Authorization: Bearer <token>. A game token (fg1) answers 401 here.

NameInTypeRequiredDescription
gameIdpathstringyesGame slug
StatusBodyDescription
204noneRemoved.
401ErrorMissing or invalid token.

POST /v1/sdk/games/{gameId}/comments

POST /v1/sdk/games/{gameId}/comments

Terminal window
curl -X POST 'https://api.filudi.com/v1/sdk/games/gloop/comments' \
-H "authorization: Bearer $FILUDI_PLAYER_TOKEN" \
-H 'content-type: application/json' \
-d '{
"body": "string"
}'

Post a comment on a game

Account players only (ADR 0012). The comment shows at once. The API converts CRLF to LF, removes control characters other than newline and tab and the Unicode format characters (category Cf: bidi controls, zero-width characters) except U+200D, the zero-width joiner combined emoji need, trims, and turns three or more consecutive newlines into two; the result must have 2 to 1000 characters. The comment’s locale is the player’s locale. 5 comments per player per hour.

Credential: a player token (fp1), sent as Authorization: Bearer <token>. A game token (fg1) answers 401 here.

NameInTypeRequiredDescription
gameIdpathstringyesGame slug

application/json, required.

PropertyTypeRequiredDescription
bodystringyesPlain text; 2 to 1000 characters
StatusBodyDescription
201CommentThe comment.
400ErrorValidation failed.
401ErrorMissing or invalid token.
403noneA guest: “Sign in to comment.”.
404noneGame not in this site’s catalog.
429ErrorToo many requests. Headers: Retry-After.
503noneRedis is down; the rate limit cannot be checked.

PATCH /v1/sdk/comments/{commentId}

PATCH /v1/sdk/comments/{commentId}

Terminal window
curl -X PATCH 'https://api.filudi.com/v1/sdk/comments/00000000-0000-0000-0000-000000000000' \
-H "authorization: Bearer $FILUDI_PLAYER_TOKEN" \
-H 'content-type: application/json' \
-d '{
"body": "string"
}'

Change the body of one of the player’s comments

Same body rules as a new comment. Sets editedAt. 30 edits per player per hour.

Credential: a player token (fp1), sent as Authorization: Bearer <token>. A game token (fg1) answers 401 here.

NameInTypeRequiredDescription
commentIdpathstring (uuid)yes

application/json, required.

PropertyTypeRequiredDescription
bodystringyesPlain text; 2 to 1000 characters
StatusBodyDescription
200CommentThe comment.
400ErrorValidation failed.
401ErrorMissing or invalid token.
404noneUnknown, hidden, or written by another player.
429ErrorToo many requests. Headers: Retry-After.
503noneRedis is down; the rate limit cannot be checked.

DELETE /v1/sdk/comments/{commentId}

DELETE /v1/sdk/comments/{commentId}

Terminal window
curl -X DELETE 'https://api.filudi.com/v1/sdk/comments/00000000-0000-0000-0000-000000000000' \
-H "authorization: Bearer $FILUDI_PLAYER_TOKEN"

Delete one of the player’s comments

Works on a hidden comment too.

Credential: a player token (fp1), sent as Authorization: Bearer <token>. A game token (fg1) answers 401 here.

NameInTypeRequiredDescription
commentIdpathstring (uuid)yes
StatusBodyDescription
204noneDeleted.
401ErrorMissing or invalid token.
404noneUnknown.

GET /v1/catalog/{site}/games/{slug}/reviews

GET /v1/catalog/{site}/games/{slug}/reviews

Terminal window
curl 'https://api.filudi.com/v1/catalog/filudi/games/gloop/reviews'

Rating and visible comments of a game, newest first

Public (ADR 0012). Leaves out hidden comments and the comments of players scheduled for deletion. The nickname is the author’s at read time. Every page repeats rating.

Credential: none. The route is public.

NameInTypeRequiredDescription
sitepathstringyesSite slug
slugpathstringyes
cursorquerystringnoOpaque; the nextCursor of the previous page, with the same filters and sort; at most 200 characters
limitqueryintegerno1 to 50; default 20
StatusBodyDescription
200GameReviewsReviews. Headers: Cache-Control, ETag.
304noneNot modified: If-None-Match matches the current ETag.
400noneCursor not issued by this route.
404noneUnknown site.