Skip to content

rc_api_init_fetch_leaderboard_info_request

Jamiras edited this page Aug 27, 2021 · 1 revision

Constructs an rc_api_request_t for fetching leaderboard entries.

Syntax

int rc_api_init_fetch_leaderboard_info_request(
    rc_api_request_t* request,
    const rc_api_fetch_leaderboard_info_request_t* api_params
);

Parameters

request

The rc_api_request_t to construct.

api_params

Pointer to a rc_api_fetch_leaderboard_info_request_t object containing the parameters for the fetch leaderboard info request.


struct rc_api_fetch_leaderboard_info_request_t
{
  unsigned leaderboard_id;
  unsigned count;
  unsigned first_entry;
  const char* username;
};

leaderboard_id

The unique identifier of the leaderboard to query for entries.

count

The number of entries to retrieve.

first_entry

The index of the first entry to retrieve (1-based).

username

If specified, first_entry is ignored, and count entries around the user are returned.

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_STATE - one or more required parameters was not provided.
  • RC_OUT_OF_MEMORY - enough memory could not be allocated to complete the operation.

Remarks

The rc_api_request_t must be destroyed by rc_api_destroy_request after the HTTP request has been made.

Minimum version: 10.2.0

See also

rc_api_destroy_request

rc_api_process_fetch_leaderboard_info_response

rc_api_destroy_fetch_leaderboard_info_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