com.innovaphone.avatar (App API)

This API is used for managing profile images. If not profile image has been set, a SVG with the name initials will be displayed. For this, the com.innovaphone.avatar library is used.

To access the API
var avatar = new innovaphone.Avatar(start, user, domain);
start
The start object
domain
The user doing the request, to check the privacy settings
domain
The default domain, to be used if no domain is given in user
To get an URL
avatar.url(sip, size, dn);
sip
The sip from the user which profile picture is requested. If it does not contain a domain (which means that just the username is provided), the domain provided in the constructor is used.
size
The size of the picture in pixels (for example, 64).
dn
The display name of the user (optional). If set, it will be used to obtain the initals for the default picture. Otherwise the common name will be used. If the user has not been found, "..." will be displayed.

API model

Service info

filename
The filename part of the profile picture URI.
token
An arbitrary string used for authentication.
domain
The domain of the avatar provider.
    "info":{
        "filename":"picture",
        "token":"fa37JncCHryDsbzayy4cBWDxS22JjzhMaiRrV41mtzxlYvKWrO72tK0LK0e1zLOZ",
        "domain":"example.com"
    }

Provider model

The API doesn't define a provider model.

API messages

All messages are JSON objects that have a mandatory attribute "mt" that specifies the message type.

Requests

The API doesn't define any request messages.

Responses

The API doesn't define any response messages.