summaryrefslogtreecommitdiff
path: root/protocols/SkypeWeb/src/requests
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2024-06-10 16:10:19 +0300
committerGeorge Hazan <george.hazan@gmail.com>2024-06-10 16:10:19 +0300
commitff17d13ff535d20c1a1cf6226fefd29e07f40cdd (patch)
tree6f391f13820f5aa8f0e48414c69e6556b31005b1 /protocols/SkypeWeb/src/requests
parenta464482917c94761738949c2b5f6b16e7ab34798 (diff)
SkypeWeb: contacts' URL unification
Diffstat (limited to 'protocols/SkypeWeb/src/requests')
-rw-r--r--protocols/SkypeWeb/src/requests/contacts.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/protocols/SkypeWeb/src/requests/contacts.h b/protocols/SkypeWeb/src/requests/contacts.h
index f5ba5eec08..43371d15e9 100644
--- a/protocols/SkypeWeb/src/requests/contacts.h
+++ b/protocols/SkypeWeb/src/requests/contacts.h
@@ -23,7 +23,7 @@ struct GetContactListRequest : public AsyncHttpRequest
GetContactListRequest(CSkypeProto *ppro, const char *filter) :
AsyncHttpRequest(REQUEST_GET, HOST_CONTACTS, 0, &CSkypeProto::LoadContactList)
{
- m_szUrl.AppendFormat("/contacts/v1/users/%s/contacts", ppro->m_szSkypename.MakeLower().GetBuffer());
+ m_szUrl.AppendFormat("/users/%s/contacts", ppro->m_szSkypename.MakeLower().GetBuffer());
// ?filter=contacts[?(@.type="skype" or @.type="msn")]
if (filter != NULL)
@@ -34,7 +34,7 @@ struct GetContactListRequest : public AsyncHttpRequest
struct GetContactsAuthRequest : public AsyncHttpRequest
{
GetContactsAuthRequest() :
- AsyncHttpRequest(REQUEST_GET, HOST_CONTACTS, "/contacts/v2/users/SELF/invites", &CSkypeProto::LoadContactsAuth)
+ AsyncHttpRequest(REQUEST_GET, HOST_CONTACTS, "/users/SELF/invites", &CSkypeProto::LoadContactsAuth)
{
AddHeader("Accept", "application/json");
}
@@ -43,7 +43,7 @@ struct GetContactsAuthRequest : public AsyncHttpRequest
struct AddContactRequest : public AsyncHttpRequest
{
AddContactRequest(const char *who, const char *greeting = "") :
- AsyncHttpRequest(REQUEST_PUT, HOST_CONTACTS, "/contacts/v2/users/SELF/contacts")
+ AsyncHttpRequest(REQUEST_PUT, HOST_CONTACTS, "/users/SELF/contacts")
{
AddHeader("Accept", "application/json");
@@ -56,7 +56,7 @@ struct AddContactRequest : public AsyncHttpRequest
struct DeleteContactRequest : public AsyncHttpRequest
{
DeleteContactRequest(const char *who) :
- AsyncHttpRequest(REQUEST_DELETE, HOST_CONTACTS, "/contacts/v2/users/SELF/contacts/" + mir_urlEncode(who))
+ AsyncHttpRequest(REQUEST_DELETE, HOST_CONTACTS, "/users/SELF/contacts/" + mir_urlEncode(who))
{
AddHeader("Accept", "application/json");
}
@@ -64,10 +64,10 @@ struct DeleteContactRequest : public AsyncHttpRequest
struct AuthAcceptRequest : public AsyncHttpRequest
{
- AuthAcceptRequest(const char *who) :
+ AuthAcceptRequest(CSkypeProto *ppro, const char *who) :
AsyncHttpRequest(REQUEST_PUT, HOST_CONTACTS)
{
- m_szUrl.AppendFormat("/contacts/v2/users/SELF/invites/%s/accept", who);
+ m_szUrl.AppendFormat("/users/%s/invites/%s/accept", ppro->m_szOwnSkypeId.get(), who);
AddHeader("Accept", "application/json");
}
@@ -75,10 +75,10 @@ struct AuthAcceptRequest : public AsyncHttpRequest
struct AuthDeclineRequest : public AsyncHttpRequest
{
- AuthDeclineRequest(const char *who) :
+ AuthDeclineRequest(CSkypeProto *ppro, const char *who) :
AsyncHttpRequest(REQUEST_PUT, HOST_CONTACTS)
{
- m_szUrl.AppendFormat("/contacts/v2/users/SELF/invites/%s/decline", who);
+ m_szUrl.AppendFormat("/users/%s/invites/%s/decline", ppro->m_szOwnSkypeId.get(), who);
AddHeader("Accept", "application/json");
}
@@ -89,7 +89,7 @@ struct BlockContactRequest : public AsyncHttpRequest
BlockContactRequest(CSkypeProto *ppro, MCONTACT hContact) :
AsyncHttpRequest(REQUEST_PUT, HOST_CONTACTS, 0, &CSkypeProto::OnBlockContact)
{
- m_szUrl.AppendFormat("/contacts/v2/users/SELF/contacts/blocklist/%s", ppro->getId(hContact).c_str());
+ m_szUrl.AppendFormat("/users/SELF/contacts/blocklist/%s", ppro->getId(hContact).c_str());
m_szParam = "{\"report_abuse\":\"false\",\"ui_version\":\"skype.com\"}";
pUserInfo = (void *)hContact;
@@ -102,7 +102,7 @@ struct UnblockContactRequest : public AsyncHttpRequest
UnblockContactRequest(CSkypeProto *ppro, MCONTACT hContact) :
AsyncHttpRequest(REQUEST_DELETE, HOST_CONTACTS, 0, &CSkypeProto::OnUnblockContact)
{
- m_szUrl.AppendFormat("/contacts/v2/users/SELF/contacts/blocklist/%s", ppro->getId(hContact).c_str());
+ m_szUrl.AppendFormat("/users/SELF/contacts/blocklist/%s", ppro->getId(hContact).c_str());
pUserInfo = (void *)hContact;
AddHeader("Accept", "application/json");