Orca Common Reference#
Primitives#
- group OrcaTypes
Commonly used datatypes across various APIs.
Note
these datatypes are typedefs of C primitives, its purpose is to facilitate identification and “intent of use”.
Typedefs
-
typedef uint64_t u64_unix_ms_t#
Unix time in milliseconds.
-
typedef uint64_t u64_snowflake_t#
Snowflake datatype.
Used in APIs such as Twitter and Discord for their unique IDs
-
typedef uint64_t u64_bitmask_t#
Bitmask primitive.
Used for fields that may store values of, or perform bitwise operations
-
typedef char json_char_t#
Raw JSON string.
Used for fields that have dynamic or unreliable types. A string made out of
json_char_t
should be used to keep a raw JSON, which can then be parsed with the assistance of a JSON library.
-
typedef uint64_t u64_unix_ms_t#
Global Resources#
-
ORCAcode orca_global_init()#
Initialize global shared-resources not API-specific.
- Returns:
ORCA_OK on success, ORCA_GLOBAL_INIT on error
-
void orca_global_cleanup()#
Cleanup global shared-resources.
Error Codes#
- group OrcaCodes
Orca error values.
Defines
-
ORCA_OK 0#
request was a success
-
ORCA_HTTP_CODE -1#
request wasn’t succesful
-
ORCA_CURL_NO_RESPONSE -2#
no response came through from curl
-
ORCA_UNUSUAL_HTTP_CODE -3#
received a non-standard http code
-
ORCA_BAD_PARAMETER -4#
bad value for parameter
-
ORCA_BAD_JSON -5#
internal failure when encoding or decoding JSON
-
ORCA_CURLE_INTERNAL -6#
curl’s easy handle internal error
-
ORCA_CURLM_INTERNAL -7#
curl’s multi handle internal error
-
ORCA_GLOBAL_INIT -8#
attempt to initialize globals more than once
Typedefs
-
typedef int ORCAcode#
the error code datatype
-
ORCA_OK 0#
Limits#
- group OrcaLimits
Limits discovered across the web.