Add Domain Purchase API Call

This commit is contained in:
Drew Warren 2017-04-12 17:47:01 -06:00
parent 7741621c16
commit 4fd5aa05de
1 changed files with 14 additions and 0 deletions

View File

@ -18,6 +18,20 @@ OAUTH3.api['domains.checkAvailability'] = function (providerUri, opts) {
});
};
OAUTH3.api['domains.purchase'] = 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'
, session: session
, data: opts.data
}).then(function (res) {
return res;
});
};
OAUTH3.api['domains.list'] = function (providerUri, opts) {
var session = opts.session;