App

Extends

Instance Properties

homey

homey: HomeyAPIV3

The Homey of the Item.

Type

id

id: string

The ID of the Item.

Type

  • string

manager

manager: HomeyAPIV3.Manager

The Manager of the Item.

Type

uri

uri: string

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

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>