App

App as returned by HomeyAPIV3Local.ManagerApps.

Extends

Instance Properties

author

author: object

Type

  • object

autoupdate

autoupdate: boolean

Type

  • boolean

channel

channel: string

Type

  • string

color

color: string

Type

  • string

compatibility

compatibility: string

Type

  • string

crashed

crashed: boolean

Type

  • boolean

crashedCount

crashedCount: number

Type

  • number

crashedMessage

crashedMessage: string|null

Type

  • string | null

enabled

enabled: boolean

Type

  • boolean

homey

homey: HomeyAPIV3

The Homey of the Item.

Type

iconObj

iconObj: object

Type

  • object

id

id: string

Type

  • string

images

images: object

Type

  • object

manager

manager: HomeyAPIV3.Manager

The Manager of the Item.

Type

name

name: string

Type

  • string

origin

origin: string

Type

  • string

permissions

permissions: array

Type

  • array

settings

settings: boolean|null

Type

  • boolean | null

state

state: string

Type

  • string

updateAvailable

updateAvailable: boolean

Type

  • boolean

uri

uri: string

The URI of the Item, e.g. homey:foo:bar.

Type

  • string

usage

usage: object

Type

  • object

version

version: string

Type

  • string

Instance Methods

call

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

Call the app's API endpoint.

Parameters

Name Type Description
opts
Object
method
'GET' | 'POST' | 'PUT' | 'DELETE'

HTTP Method of the API endpoint.

path
String

Path to the API endpoint.

body
mixed
}

Returns

Promise.<any>

connect

(async) connect()

Connect to this item's Socket.io namespace.

delete

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

Make a DELETE request to the App's Web API.

Parameters

Name Type Description
opts
object
path
string
}

Returns

Promise.<any>

disconnect

(async) disconnect()

Discconnect from this item's Socket.io namespace.

get

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

Make a GET request to the App's Web API.

Parameters

Name Type Description
opts
object
path
string
}

Returns

Promise.<any>

post

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

Make a POST request to the App's Web API.

Parameters

Name Type Description
opts
object
path
string
body
object
}

Returns

Promise.<any>

put

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

Make a PUT request to the App's Web API.

Parameters

Name Type Description
opts
object
path
string
body
object
}

Returns

Promise.<any>

Events

delete

.on('delete')

update

.on('update')

Parameters

Name Type Description
app
object
info
object
newValues
object

An object with only the new values of the app

oldValues
object

An object with only the old values of the app

changedKeys
Array.<string>

An array of keys of the properties that have changed

}