Skip to content

Profile Pic

profile_pic::clear

Clears the current url/key, if set. This is just a shortcut for calling .clear() on each of them.

Declaration

void clear() {

Parameters

This endpoint takes no inputs.

Returns

profile_pic::empty

Returns true if either url or key are empty (or invalid)

Declaration

bool empty() const { return url.empty() || key.size() != 32; }

Parameters

This endpoint takes no inputs.

Returns

  • bool — Returns true if either url or key are empty

profile_pic::set_key

Sets and validates the key. The key can be empty, or 32 bytes. This is almost the same as just setting .key directly, except that it will throw if the provided key is invalid (i.e. neither empty nor 32 bytes).

Declaration

void set_key(ustring new_key) {

Parameters

  • new_key — binary data of a new key to be set. Must be 32 bytes

Returns