From f0f0cd088f1ec3a85abee825ddbc214f3f6b92c3 Mon Sep 17 00:00:00 2001 From: MikalaiR Date: Fri, 19 Jun 2015 19:20:22 +0000 Subject: SkypeWeb: support change chat topic git-svn-id: http://svn.miranda-ng.org/main/trunk@14269 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/SkypeWeb/src/requests/chatrooms.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'protocols/SkypeWeb/src/requests') 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 -- cgit v1.2.3