diff options
author | MikalaiR <nikolay.romanovich@narod.ru> | 2015-06-19 19:20:22 +0000 |
---|---|---|
committer | MikalaiR <nikolay.romanovich@narod.ru> | 2015-06-19 19:20:22 +0000 |
commit | f0f0cd088f1ec3a85abee825ddbc214f3f6b92c3 (patch) | |
tree | a14e3df46ea49e781a98e5ef3438aa25bc52e5b5 /protocols/SkypeWeb/src/requests | |
parent | a0827f61f16f691962b378ab64ea27e5132dc506 (diff) |
SkypeWeb: support change chat topic
git-svn-id: http://svn.miranda-ng.org/main/trunk@14269 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/SkypeWeb/src/requests')
-rw-r--r-- | protocols/SkypeWeb/src/requests/chatrooms.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/protocols/SkypeWeb/src/requests/chatrooms.h b/protocols/SkypeWeb/src/requests/chatrooms.h index b78053f7f1..1062b9f4b7 100644 --- a/protocols/SkypeWeb/src/requests/chatrooms.h +++ b/protocols/SkypeWeb/src/requests/chatrooms.h @@ -158,4 +158,22 @@ public: }
};
+class SetChatPropertiesRequest : public HttpRequest
+{
+public:
+ SetChatPropertiesRequest(const char *regToken, const char *chatId, const char *propname, const char *value, const char *server = SKYPE_ENDPOINTS_HOST) :
+ HttpRequest(REQUEST_PUT, FORMAT, "%s/v1/threads/19:%s/properties?name=%s", server, chatId, propname)
+ {
+ Headers
+ << CHAR_VALUE("Accept", "application/json, text/javascript")
+ << CHAR_VALUE("Content-Type", "application/json; charset=UTF-8")
+ << FORMAT_VALUE("RegistrationToken", "registrationToken=%s", regToken);
+
+ JSONNode node(JSON_NODE);
+ node.push_back(JSONNode(propname, value));
+
+ Body << VALUE(node.write().c_str());
+ }
+};
+
#endif //_SKYPE_REQUEST_CHATS_H_
\ No newline at end of file |