Skip to content

rc_api_init_fetch_image_request

Jamiras edited this page Apr 16, 2021 · 1 revision

Constructs an rc_api_request_t for requesting an image.

Syntax

int rc_api_init_fetch_image_request(
    rc_api_request_t* request,
    const rc_api_fetch_image_request_t* api_params
);

Parameters

request

The rc_api_request_t to construct.

api_params

Pointer to a rc_api_fetch_image_request_t object containing the parameters for the new leaderboard entry.


struct rc_api_fetch_image_request_t
{
  const char* image_name;
  int image_type;
};

image_name

The name of the image being requested. Depends on the image_type parameter.

image_type

The type of image being requested.

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 response from the server is the raw image file. There are no response processing functions to call for this API.

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

Minimum version: 10.0.0

See also

rc_api_destroy_request

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