Skip to content

rc_api_process_fetch_followed_users_server_response

Jamiras edited this page Jun 17, 2025 · 1 revision

Parses the response for the current user's followed users.

Syntax

int rc_api_process_fetch_followed_users_server_response(
    rc_api_fetch_followed_users_response_t* response,
    const rc_api_server_response_t* server_response
);

Parameters

response

The rc_api_fetch_followed_users_response_t to construct.

server_response

The body of the HTTP response received from the server.


struct rc_api_fetch_followed_users_response_t
{
  rc_api_followed_user_t* users;
  uint32_t num_users;
  rc_api_response_t response;
};

users

An array of followed users.

num_users

The number of items in the users array.

response

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


struct rc_api_followed_user_t
{
  const char* display_name;
  const char* avatar_url;
  rc_api_followed_user_activity_t recent_activity;
  uint32_t score;
};

display_name

The followed user's display name.

avatar_url

A URL to the followed user's avatar image.

recent_activity

Information about where the followed user was last seen.

score

The followed user's current hardcore points.


struct rc_api_followed_user_activity_t
{
  const char* context;
  const char* context_image_url;
  const char* description;
  time_t when;
  uint32_t context_id;
};

context

A short blurb about where the followed user was last seen (typically a game name).

context_image_url

URL to an image associated to the context.

description

Additional information about what the followed user was doing (typically the rich presence for the game).

when

A unix timestamp of when the activity was recorded.

context_id

A unique identifier associated to the context (typically the game id).

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

Minimum version: 12.0.0

See also

rc_api_init_fetch_followed_users_request

rc_api_destroy_fetch_followed_users_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