Skip to content

rc_api_process_resolve_hash_response

Jamiras edited this page Mar 1, 2024 · 3 revisions

Parses the response for identifying the game associated to a hash.

Syntax

// 11.0+
int rc_api_process_resolve_hash_server_response(
    rc_api_resolve_hash_response_t* response,
    const rc_api_server_response_t* server_response
);

// [deprecated]
int rc_api_process_resolve_hash_response(
    rc_api_resolve_hash_response_t* response,
    const char* server_response
);

Parameters

response

The rc_api_resolve_hash_response_t to construct.

server_response

The body of the HTTP response received from the server.


struct rc_api_resolve_hash_response_t
{
  unsigned game_id;
  rc_api_response_t response;
};

game_id

The unique identifier of the game associated to the queried hash. 0 if no match was found.

response

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

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_resolve_hash_response_t must be destroyed by rc_api_destroy_resolve_hash_response when the caller is done with it.

Minimum version: 10.0.0

See also

rc_api_init_resolve_hash_request

rc_api_destroy_resolve_hash_response

rcheevos

rc_client

Integration guide

client

user

game

processing

rc_client_raintegration

Integration guide

rc_runtime

rhash

rapi

common

user

runtime

info

Clone this wiki locally