-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathwire-up.js
More file actions
29 lines (22 loc) · 756 Bytes
/
Copy pathwire-up.js
File metadata and controls
29 lines (22 loc) · 756 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
const EventEmitter = require( 'events' )
module.exports = options => {
const bottle = require( 'bottlejs' )()
bottle.service( 'options', function() {
return options
})
require( './api-urls' )( bottle )
require( './rest-client' )( bottle )
require( './get-history-list' )( bottle )
require( './get-live-stream' )( bottle )
require( './get-devices-list' )( bottle )
require( './poll-for-dings' )( bottle )
require( './get-active-dings' )( bottle )
bottle.service( 'events', function() {
return new EventEmitter()
})
bottle.service( 'logger', function() {
return require( 'debug' )( 'ring-api' )
})
require( './top-level-api' )( bottle )
return bottle.container
}