diff options
author | MikalaiR <nikolay.romanovich@narod.ru> | 2015-04-26 12:51:25 +0000 |
---|---|---|
committer | MikalaiR <nikolay.romanovich@narod.ru> | 2015-04-26 12:51:25 +0000 |
commit | aed7583d1b058a421d95d34719ec398bd40bd760 (patch) | |
tree | 3f99cc9cb915283febcf772e0b73b5967e3a4e57 /protocols/SkypeWeb/src/requests/contacts.h | |
parent | 8ff5ba190f6d71a4ecabbdd953dbaec8631649ea (diff) |
SkypeWeb:
Contacts removing.
git-svn-id: http://svn.miranda-ng.org/main/trunk@13167 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/SkypeWeb/src/requests/contacts.h')
-rw-r--r-- | protocols/SkypeWeb/src/requests/contacts.h | 34 |
1 files changed, 13 insertions, 21 deletions
diff --git a/protocols/SkypeWeb/src/requests/contacts.h b/protocols/SkypeWeb/src/requests/contacts.h index af39438ffd..751bf79a6c 100644 --- a/protocols/SkypeWeb/src/requests/contacts.h +++ b/protocols/SkypeWeb/src/requests/contacts.h @@ -59,27 +59,6 @@ public: }
};
-class CreateContactsRequest : public HttpRequest
-{
-public:
- CreateContactsRequest(const char *regToken, const LIST<char> &skypenames, const char *server = SKYPE_ENDPOINTS_HOST) :
- HttpRequest(REQUEST_POST, FORMAT, "%s/v1/users/ME/contacts", server)
- {
- Headers
- << CHAR_VALUE("Accept", "application/json, text/javascript")
- << CHAR_VALUE("Content-Type", "application/json; charset=UTF-8")
- << FORMAT_VALUE("RegistrationToken", "registrationToken=%s", regToken);
-
- CMStringA data = "{\"contacts\":[";
- for (int i = 0; i < skypenames.getCount(); i++)
- data.AppendFormat("{\"id\":\"8:%s\"},", skypenames[i]);
- data.Truncate(data.GetLength() - 1);
- data.Append("]}");
-
- Body << VALUE(data);
- }
-};
-
class GetContactsAuthRequest : public HttpRequest
{
public:
@@ -108,6 +87,19 @@ public: }
};
+class DeleteContactRequest : public HttpRequest
+{
+public:
+ DeleteContactRequest(const char *token, const char *who, const char *skypename = "self") :
+ HttpRequest(REQUEST_DELETE, FORMAT, "api.skype.com/users/%s/contacts/%s", skypename, who)
+ {
+ Headers
+ << CHAR_VALUE("X-Skypetoken", token)
+ << CHAR_VALUE("Accept", "application/json")
+ << CHAR_VALUE("Content-type", "application/x-www-form-urlencoded");
+ }
+};
+
class AuthAcceptRequest : public HttpRequest
{
public:
|