Skip to main content

Module response

Module response 

Source
Expand description

API response parsing, URL-encoded body truncation, and timestamp generation.

Functionsยง

deserialize_flexible_name
Deserializes fields that the API returns as either a plain string or {"display":"Name"}.
deserialize_flexible_string_id
Deserializes fields that the API returns as either a string, number, or other value.
deserialize_picture
Deserializes picture/image fields the API returns as either a string URL, null, or an Image object.
parse_response
Parses an API response, handling error status codes and JSON deserialization.
timestamp
Generates a Unix timestamp string for request signing.
truncate
Truncates a string to max_len characters with ellipsis.