Add devices.destroy API call

This commit is contained in:
Drew Warren 2017-07-12 16:11:01 -06:00
parent 35405f8612
commit e930881e0f
1 changed files with 15 additions and 0 deletions

View File

@ -71,6 +71,21 @@ OAUTH3.api['devices.detach'] = function (providerUri, opts) {
});
};
OAUTH3.api['devices.destroy'] = function (providerUri, opts) {
var session = opts.session;
var device = opts.device;
return OAUTH3.request({
url: OAUTH3.url.normalize(providerUri)
+ '/api/com.daplie.domains/accounts/' + session.token.sub
+ '/devices/' + device
, method: 'DELETE'
, session: session
}, {}).then(function (res) {
return res.data.device || res.data;
});
};
OAUTH3.api['dns.set'] = function (providerUri, opts) {
var session = opts.session;
var tld = opts.tld;