Skip to content
This repository has been archived by the owner on Sep 21, 2022. It is now read-only.

ModioResponse

Ahmed Castro edited this page Dec 3, 2017 · 15 revisions

Wrapped by: modio::Response class

struct ModioResponse
{
  int code;
  int cursor_id;
  int prev_id;
  int next_id;
  int result_count;
  ModioError error;
};

The ModioResponse object is a struct containing the response code, errors and cursor data form mod.io. This object is returned on every callback that interacts with mod.io and you can use it to check if your request was successful and to browse objects properly using the cursor filters.

Name Type Description
code u32 Http code returned by mod.io.
cursor_id u32 Cursor id supplied via the ModioFilterHandler. Defaults to -1 in case it was not supplied. See the API cursor documentation
prev_id u32 Previous cursor id supplied via the ModioFilterHandler. Defaults to -1 in case it was not supplied. See the API prev cursor documentation
next_id u32 Next cursor id to be supplied based on the current cursor supplied via the ModioFilterHandler. Defaults to -1 in case a cursor was not was not supplied. See the API cursor documentation
result_count u32 The number of results returned.
error ModioError error ModioError object containing the errors description in case

See also: API Errors, API Response Codes, Response formats, API cursors and objects

Contents

Clone this wiki locally