summaryrefslogtreecommitdiff
path: root/protocols/SkypeWeb/src/requests/contacts.h
diff options
context:
space:
mode:
authorMikalaiR <nikolay.romanovich@narod.ru>2015-04-27 18:45:52 +0000
committerMikalaiR <nikolay.romanovich@narod.ru>2015-04-27 18:45:52 +0000
commit822984e1ca88ec5afaa905b59e8be811dfec4e1d (patch)
tree02b70ef46605d256bb581e32b1e066729c391c75 /protocols/SkypeWeb/src/requests/contacts.h
parent965897721ef32f0b6150f467b8ea34c53473d749 (diff)
SkypeWeb: Contacts blocking support.
git-svn-id: http://svn.miranda-ng.org/main/trunk@13200 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/SkypeWeb/src/requests/contacts.h')
-rw-r--r--protocols/SkypeWeb/src/requests/contacts.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/protocols/SkypeWeb/src/requests/contacts.h b/protocols/SkypeWeb/src/requests/contacts.h
index 751bf79a6c..796df60308 100644
--- a/protocols/SkypeWeb/src/requests/contacts.h
+++ b/protocols/SkypeWeb/src/requests/contacts.h
@@ -124,4 +124,38 @@ public:
}
};
+class BlockContactRequest : public HttpRequest
+{
+public:
+ BlockContactRequest(const char *token, const char *who, const char *skypename = "self") :
+ HttpRequest(REQUEST_PUT, FORMAT, "api.skype.com/users/%s/contacts/%s/block", skypename, who)
+ {
+ Headers
+ << CHAR_VALUE("X-Skypetoken", token)
+ << CHAR_VALUE("Accept", "application/json")
+ << CHAR_VALUE("Content-type", "application/x-www-form-urlencoded");
+
+ Body
+ << CHAR_VALUE("reporterIp", "123.123.123.123") //TODO: user ip address
+ << CHAR_VALUE("uiVersion", MIRANDA_VERSION_STRING);
+ }
+};
+
+class UnblockContactRequest : public HttpRequest
+{
+public:
+ UnblockContactRequest(const char *token, const char *who, const char *skypename = "self") :
+ HttpRequest(REQUEST_PUT, FORMAT, "api.skype.com/users/%s/contacts/%s/unblock", skypename, who)
+ {
+ Headers
+ << CHAR_VALUE("X-Skypetoken", token)
+ << CHAR_VALUE("Accept", "application/json")
+ << CHAR_VALUE("Content-type", "application/x-www-form-urlencoded");
+
+ Body
+ << CHAR_VALUE("reporterIp", "123.123.123.123") //TODO: user ip address
+ << CHAR_VALUE("uiVersion", MIRANDA_VERSION_STRING);
+ }
+};
+
#endif //_SKYPE_REQUEST_CONTACTS_H_ \ No newline at end of file