Access this instance at HomeyAPIV3Local.users
.
Extends
Classes
Methods
connect
(async) connect(): Promise.<void>Connect to the realtime namespace.
Returns
createPersonalAccessToken
(async) createPersonalAccessToken(opts): Promise.<any>Scopes
-
HTTP
POST /api/manager/users/pat
Parameters
Name | Type | Description |
---|---|---|
opts
|
object | |
name
|
string | |
scopes
|
array | |
|
Returns
createUser
(async) createUser(opts): Promise.<HomeyAPIV3Local.ManagerUsers.User>Scopes
homey.user
HTTP
POST /api/manager/users/user
Parameters
Name | Type | Description |
---|---|---|
opts
|
object | |
user
|
object | |
role
|
string | |
|
||
|
Returns
deletePersonalAccessToken
(async) deletePersonalAccessToken(opts): Promise.<any>Scopes
-
HTTP
DELETE /api/manager/users/pat/:id
Parameters
Name | Type | Description |
---|---|---|
opts
|
object | |
id
|
string | |
|
Returns
deleteUser
(async) deleteUser(opts)Scopes
homey.user
HTTP
DELETE /api/manager/users/user/:id
Parameters
Name | Type | Description |
---|---|---|
opts
|
object | |
id
|
string | |
|
deleteUserMe
(async) deleteUserMe(): Promise.<any>Scopes
homey.user.self
HTTP
DELETE /api/manager/users/user/me
Returns
deleteUserMeProperties
(async) deleteUserMeProperties(opts): Promise.<any>Scopes
homey.user.self
HTTP
DELETE /api/manager/users/user/me/properties/:id
Parameters
Name | Type | Description |
---|---|---|
opts
|
object | |
id
|
string | |
|
Returns
disconnect
(async) disconnect(): Promise.<void>Disconnect from the realtime namespace.
Returns
getPersonalAccessTokens
(async) getPersonalAccessTokens(): Promise.<any>Scopes
-
HTTP
GET /api/manager/users/pat
Returns
getState
(async) getState(): Promise.<any>Scopes
homey.system.readonly
HTTP
GET /api/manager/users/state
Returns
getUser
(async) getUser(opts): Promise.<HomeyAPIV3Local.ManagerUsers.User>Scopes
homey.user.readonly
HTTP
GET /api/manager/users/user/:id
Parameters
Name | Type | Description |
---|---|---|
opts
|
object | |
id
|
string | |
|
Returns
getUserMe
(async) getUserMe(): Promise.<any>Scopes
homey.user.self
HTTP
GET /api/manager/users/user/me
Returns
getUsers
(async) getUsers(): Promise.<HomeyAPIV3Local.ManagerUsers.User>Scopes
homey.user.readonly
HTTP
GET /api/manager/users/user
Returns
isConnected
isConnected(): BooleanIf this manager's namespace is connected to Socket.io.
Returns
login
(async) login(opts): Promise.<any>Scopes
-
HTTP
POST /api/manager/users/login
Parameters
Name | Type | Description |
---|---|---|
opts
|
object | |
token
|
string | |
|
Returns
swapOwner
(async) swapOwner(opts): Promise.<any>Scopes
-
HTTP
POST /api/manager/users/swap-owner
Parameters
Name | Type | Description |
---|---|---|
opts
|
object | |
newOwnerUserId
|
string | |
|
Returns
updateUser
(async) updateUser(opts): Promise.<HomeyAPIV3Local.ManagerUsers.User>Scopes
homey.user
HTTP
PUT /api/manager/users/user/:id
Parameters
Name | Type | Description |
---|---|---|
opts
|
object | |
id
|
string | |
user
|
object | |
role
|
string
<optional> |
|
enabled
|
boolean
<optional> |
|
|
||
|
Returns
updateUserMe
(async) updateUserMe(opts): Promise.<any>Scopes
homey.user.self
HTTP
PUT /api/manager/users/user/me
Parameters
Name | Type | Description |
---|---|---|
opts
|
object | |
name
|
string
<optional> |
|
|
Returns
updateUserMeProperties
(async) updateUserMeProperties(opts): Promise.<any>Scopes
homey.user.self
HTTP
PUT /api/manager/users/user/me/properties/:id
Parameters
Name | Type | Description |
---|---|---|
opts
|
object | |
id
|
string | |
value
|
object | |
|
Returns
Events
user.create
.on('user.create')Parameters
Name | Type | Description |
---|---|---|
user
|
HomeyAPIV3Local.ManagerUsers.User |
user.delete
.on('user.delete')Parameters
Name | Type | Description |
---|---|---|
user
|
HomeyAPIV3Local.ManagerUsers.User |
user.update
.on('user.update')Parameters
Name | Type | Description |
---|---|---|
user
|
HomeyAPIV3Local.ManagerUsers.User |