diff options
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 |