ManagerUsers

Access this instance at HomeyAPIV3Cloud.users.

Extends

Classes

Methods

acceptSharingInvite

(async) acceptSharingInvite(opts): Promise.<any>

Scopes

-

HTTP

post /api/manager/users/accept

Parameters

Name Type Description
opts
object
secret
string
athomId
string
inviteToken
string
name
string
}

Returns

Promise.<any>

connect

(async) connect(): Promise.<void>

Connect to the realtime namespace.

Returns

Promise.<void>

createUser

(async) createUser(opts): Promise.<HomeyAPIV3Cloud.ManagerUsers.User>

Scopes

homey.user

HTTP

post /api/manager/users/user

Parameters

Name Type Description
opts
object
user
*
}

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

Promise.<any>

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

Promise.<any>

disconnect

(async) disconnect(): Promise.<void>

Disconnect from the realtime namespace.

Returns

Promise.<void>

getState

(async) getState(): Promise.<any>

Scopes

homey.system.readonly

HTTP

get /api/manager/users/state

Returns

Promise.<any>

getUser

(async) getUser(opts): Promise.<HomeyAPIV3Cloud.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

Promise.<any>

getUsers

(async) getUsers(): Promise.<HomeyAPIV3Cloud.ManagerUsers.User>

Scopes

homey.user.readonly

HTTP

get /api/manager/users/user

Returns

isConnected

isConnected(): Boolean

If this manager's namespace is connected to Socket.io.

Returns

Boolean

login

(async) login(opts): Promise.<any>

Scopes

-

HTTP

post /api/manager/users/login

Parameters

Name Type Description
opts
object
token
string
}

Returns

Promise.<any>

swapOwner

(async) swapOwner(opts): Promise.<any>

Scopes

homey.user

HTTP

post /api/manager/users/swap-owner

Parameters

Name Type Description
opts
object
newOwnerUserId
string
}

Returns

Promise.<any>

updateUser

(async) updateUser(opts): Promise.<HomeyAPIV3Cloud.ManagerUsers.User>

Scopes

homey.user

HTTP

put /api/manager/users/user/:id

Parameters

Name Type Description
opts
object
id
string
user
*
}

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

Promise.<any>

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

Promise.<any>

Events

user.create

.on('user.create')

Parameters

Name Type Description
user
HomeyAPIV3Cloud.ManagerUsers.User

user.delete

.on('user.delete')

Parameters

Name Type Description
user
HomeyAPIV3Cloud.ManagerUsers.User

user.update

.on('user.update')

Parameters

Name Type Description
user
HomeyAPIV3Cloud.ManagerUsers.User