Skip to content

Latest commit

 

History

History
60 lines (37 loc) · 675 Bytes

README.md

File metadata and controls

60 lines (37 loc) · 675 Bytes

nb-resources

Wrapper draft

/* Promises */
class Resource  {
	constructor: {}

	get: function(resource) {
		request('/api....')
	}

	set: function(resource) {
		request.post('')
	}

	update: function(resource) {
		
	}

	toggle: function(resource) {
		
	}

	remove: function(resource) {
		
	}

	delete: remove

	at: function(where) {

		if where === '*', 'all' => se aplica en todas las localizaciones

	}

subscribe: function(resource) {

}
}


Resource = require('resources')

Resource.register([{
	where: 'living room',
	method: 'get',
	hook: '/api/aksdgaud'
}, {
	where: 'living room',
	method: 'get',
	hook: '/api/aksdgaud'
}])

Events.register()