Skip to main content

get_available_games

Function get_available_games 

Source
pub async fn get_available_games(
    user_id: UserIdDTO,
    filter: Option<String>,
    since: Since,
) -> Result<AvailableGamesResponse>
Expand description

Retrieves a list of available games for a given user.

§Parameters

  • user_id: The ID of the user requesting available games.
  • filter: Optional string to filter games by name or criteria.
  • since: Optional timestamp; only games created after this time are returned.

§Returns

On success, returns an AvailableGamesResponse containing:

  • The list of available games (games) matching the filter and since parameters.
  • Whether there are more games (has_more) beyond this response.
  • The timestamp used for this query (since).

§Errors

Returns a [ServerError] if there is an issue fetching games from the server.

§Handler information

  • Method: get
  • Path: /api/{user_id}/available_games?filter&since