uploadCatching
suspend fun uploadCatching(file: File, oauthToken: String, hash: Hash? = null, selectAvatar: Boolean? = null): GravatarResult<Avatar, ErrorType>
Uploads an image to be used as Gravatar avatar. This method will catch any exception that occurs during the execution and return it as a GravatarResult.Failure.
Return
The result of the operation
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.