Skip to content

rc_api_process_fetch_games_list_response

Jamiras edited this page Jul 23, 2026 · 8 revisions

Parses the response for fetching the games associated to a console.

Syntax

// 11.0+
int rc_api_process_fetch_games_list_server_response(
    rc_api_fetch_games_list_response_t* response,
    const rc_api_server_response_t* server_response
);

// [deprecated]
int rc_api_process_fetch_games_list_response(
    rc_api_fetch_games_list_response_t* response,
    const char* server_response
);

Parameters

response

The rc_api_fetch_games_list_response_t to construct.

server_response

The body of the HTTP response received from the server.


struct rc_api_fetch_games_list_response_t
{
  rc_api_game_list_entry_t* entries;
  unsigned num_entries;

  rc_api_response_t response;
};

entries

An array of rc_api_game_list_entry_t game list entries.

num_entries

The number of items in the entries array.

response

Common server-provided response information. Contains a succeeded flag, and an error_message field.


struct rc_api_game_list_entry_t
{
  uint32_t id;
  uint32_t num_achievements;
  uint32_t num_leaderboards;
  uint32_t points;
  const char* name;
  const char* image_name;
  const char* image_url;
  const char** supported_hashes;
  const char** unsupported_hashes;
  uint32_t num_supported_hashes;
  uint32_t num_unsupported_hashes;
};

id

The unique identifier of the game.

num_achievements (Minimum version: 12.4)

The number of promoted achievements for the game.

num_leaderboards (Minimum version: 12.4)

The number of promoted achievements for the game.

points (Minimum version: 12.4)

The number of points the player can earn for completing all of the achievements for the game.

name

The title of the game.

image_name (Minimum version: 12.4)

The image name to pass to rc_api_init_fetch_image_request for the game.

image_url (Minimum version: 12.4)

The URL to download the game image from.

supported_hashes (Minimum version: 12.4)

An array of RetroAchievement hashes that can be used to load and earn the achievements for the game.

unsupported_hashes (Minimum version: 12.4)

An array of RetroAchievement hashes that are associated to the game, but cannot be used to load and earn the achievements for the game.

num_supported_hashes (Minimum version: 12.4)

The number of items in the supported_hashes array.

num_unsupported_hashes (Minimum version: 12.4)

The number of items in the unsupported_hashes array.

Return value

If the function succeeds, the return value is RC_OK. Otherwise, the error code can be converted to a string using rc_error_str.

  • RC_INVALID_JSON - the response was not valid JSON.
  • RC_MISSING_VALUE - one or more required fields was not found in the response.

Remarks

The rc_api_fetch_games_list_response_t must be destroyed by rc_api_destroy_fetch_games_list_response when the caller is done with it.

Minimum version: 10.2.0

See also

rc_api_init_fetch_games_list_request

rc_api_destroy_fetch_games_list_response

rcheevos
rc_client

Integration guide

client

user

game

processing

additional data

rc_client_raintegration

Integration guide

rc_runtime
rhash
rapi

common

user

runtime

info

Clone this wiki locally