Skip to content

Latest commit

 

History

History
39 lines (25 loc) · 1.2 KB

File metadata and controls

39 lines (25 loc) · 1.2 KB

Awata

A Simple, Gravatar-compatible API server.

Note

This project was made without proper planning or anything, so expect it to be bad.

API

The only endpoint is /avatar

Creating avatar

Create a POST request to the endpoint with multipart/form-data body containing:

Field Content
email User's email
avatar The avatar image file

Note

Only image/png, image/jpeg, and image/webp (if compiled with -tags vips) are supported.

And with Authorization: <secret> header. Secret is the AWATA_SECRET environment.

Getting avatar

Create a GET request to the endpoint with /avatar/<hash, sha256 or md5>

Query Params

Key
d, default Default response when avatar is not found.
s, size Size of the image, mix 1, and max 2048.
f, force Force the use of default, regardless if avatar exist or not.

Note

Only 404, mp/mm, and identicon are supported defaults.