upload

suspend fun upload(file: File, oauthToken: String, hash: Hash? = null, selectAvatar: Boolean? = null): Avatar

Uploads an image to be used as Gravatar avatar.

Parameters

file

The image file to upload

oauthToken

The OAuth token to use for authentication

hash

The hash of the email to associate the avatar with. If null the primary email of the account will be used.

selectAvatar

Determines if the uploaded image should be set automatically as the avatar for the given hash. If null, the avatar will be selected only if no other avatar is set.