AthomCloudAPI.User

Properties:
Name Type Description
_id string
firstname string First name
lastname string Last name
email string Email address
language string Language
roles Array.<AthomCloudAPI.Role> Assumed roles (Only present on single-fetch responses)
roleIds Array.<string> Assumed role IDs
avatar AthomCloudAPI.Avatar
homeys Array.<AthomCloudAPI.Homey> Homeys the user has access to
devices Array.<AthomCloudAPI.UserDevice> Linked devices

Methods

getHomeys(filteropt) → {Array.<AthomCloudAPI.Homey>}

Returns a list of Homeys the current user has access to
Parameters:
Name Type Attributes Description
filter object <optional>
A filter object
Returns:
Array.<AthomCloudAPI.Homey> - List of Homey objects.

getHomeyById(id) → {AthomCloudAPI.Homey}

Returns a Homey by ID (if the user has access) or throws an error
Parameters:
Name Type Description
id string The Homey ID to retrieve
Returns:
AthomCloudAPI.Homey - The Homey

getFirstHomey() → {AthomCloudAPI.Homey}

Returns the first Homey we can access or throws an error
Returns:
AthomCloudAPI.Homey - The Homey

getDevice(id)

Gets a device by id
Parameters:
Name Type Description
id