Add support for getProfile to TextSecureServer

// FREEBIE
This commit is contained in:
lilia 2017-05-24 13:17:20 -07:00 committed by Scott Nonnenberg
parent 9f4a657e8a
commit 0c5a69cce4
2 changed files with 18 additions and 2 deletions

View file

@ -37628,7 +37628,8 @@ var TextSecureServer = (function() {
keys : "v2/keys",
signed : "v2/keys/signed",
messages : "v1/messages",
attachment : "v1/attachments"
attachment : "v1/attachments",
profile : "v1/profile"
};
function TextSecureServer(url, ports, username, password) {
@ -37696,6 +37697,13 @@ var TextSecureServer = (function() {
throw e;
});
},
getProfile: function(number) {
return this.ajax({
call : 'profile',
httpType : 'GET',
urlParameters : '/' + number,
});
},
requestVerificationSMS: function(number) {
return this.ajax({
call : 'accounts',

View file

@ -136,7 +136,8 @@ var TextSecureServer = (function() {
keys : "v2/keys",
signed : "v2/keys/signed",
messages : "v1/messages",
attachment : "v1/attachments"
attachment : "v1/attachments",
profile : "v1/profile"
};
function TextSecureServer(url, ports, username, password) {
@ -204,6 +205,13 @@ var TextSecureServer = (function() {
throw e;
});
},
getProfile: function(number) {
return this.ajax({
call : 'profile',
httpType : 'GET',
urlParameters : '/' + number,
});
},
requestVerificationSMS: function(number) {
return this.ajax({
call : 'accounts',