Add removeAddress and extend functionality
This commit is contained in:
parent
1a43a58af1
commit
9cb2ad036b
|
@ -70,4 +70,17 @@ OAUTH3.api['account.addAddress'] = function (providerUri, opts) {
|
|||
});
|
||||
};
|
||||
|
||||
OAUTH3.api['account.removeAddress'] = function (providerUri, opts) {
|
||||
var session = opts.session;
|
||||
|
||||
return OAUTH3.request({
|
||||
method: 'DELETE'
|
||||
, url: OAUTH3.url.normalize(providerUri)
|
||||
+ '/api/com.daplie.me/accounts/' + session.token.sub + '/addresses/' + opts.addressId
|
||||
, session: session
|
||||
}).then(function (res) {
|
||||
return res;
|
||||
});
|
||||
};
|
||||
|
||||
}('undefined' !== typeof exports ? exports : window));
|
||||
|
|
|
@ -45,21 +45,21 @@ OAUTH3.api['domains.list'] = function (providerUri, opts) {
|
|||
});
|
||||
};
|
||||
|
||||
/* TODO: Manual Renew Function
|
||||
// TODO: Manual Renew Function
|
||||
OAUTH3.api['domains.extend'] = function (providerUri, opts) {
|
||||
var session = opts.session;
|
||||
|
||||
return OAUTH3.request({
|
||||
method: 'POST'
|
||||
, url: OAUTH3.url.normalize(providerUri)
|
||||
+ '/api/com.daplie.domains/accounts/' + session.token.sub + '/registrations/' + opts.tld + '/' + opts.sld + '/extend'
|
||||
+ '/api/com.daplie.domains/accounts/' + session.token.sub + '/registrations/' + opts.data.tld + '/' + opts.data.sld + '/extend'
|
||||
, session: session
|
||||
, data: opts.data
|
||||
}).then(function (res) {
|
||||
return res;
|
||||
});
|
||||
};
|
||||
*/
|
||||
|
||||
|
||||
OAUTH3.api['ns.list'] = function (providerUri, opts) {
|
||||
var session = opts.session;
|
||||
|
|
Loading…
Reference in New Issue