summaryrefslogtreecommitdiff
path: root/protocols/SkypeWeb/src/requests/messages.h
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/SkypeWeb/src/requests/messages.h')
-rw-r--r--protocols/SkypeWeb/src/requests/messages.h22
1 files changed, 20 insertions, 2 deletions
diff --git a/protocols/SkypeWeb/src/requests/messages.h b/protocols/SkypeWeb/src/requests/messages.h
index 389d9fa7bb..d2c000d8be 100644
--- a/protocols/SkypeWeb/src/requests/messages.h
+++ b/protocols/SkypeWeb/src/requests/messages.h
@@ -8,7 +8,7 @@ public:
HttpRequest(REQUEST_POST, FORMAT, "%s/v1/users/ME/conversations/8:%s/messages", server, username)
{
Headers
- << CHAR_VALUE("Accept", "application / json, text / javascript")
+ << CHAR_VALUE("Accept", "application/json, text/javascript")
<< CHAR_VALUE("Expires", "0")
<< FORMAT_VALUE("RegistrationToken", "registrationToken=%s", regToken)
<< CHAR_VALUE("Content-Type", "application/json; charset = UTF-8")
@@ -31,7 +31,7 @@ public:
HttpRequest(REQUEST_POST, FORMAT, "%s/v1/users/ME/conversations/8:%s/messages", server, mir_urlEncode(username))
{
Headers
- << CHAR_VALUE("Accept", "application / json, text / javascript")
+ << CHAR_VALUE("Accept", "application/json, text/javascript")
<< CHAR_VALUE("Expires", "0")
<< FORMAT_VALUE("RegistrationToken", "registrationToken=%s", regToken)
<< CHAR_VALUE("Content-Type", "application/json; charset = UTF-8")
@@ -49,4 +49,22 @@ public:
}
};
+class GetHistoryRequest : public HttpRequest
+{
+public:
+ GetHistoryRequest(const char *regToken, int time, const char *server = "client-s.gateway.messenger.live.com") :
+ HttpRequest(REQUEST_GET, FORMAT, "%s/v1/users/ME/conversations?startTime=%d&pageSize=100&view=msnp24Equivalent&targetType=Passport|Skype|Lync|Thread", server, time)
+ {
+ Headers
+ << CHAR_VALUE("Accept", "application/json, text/javascript")
+ << CHAR_VALUE("Expires", "0")
+ << FORMAT_VALUE("RegistrationToken", "registrationToken=%s", regToken)
+ << CHAR_VALUE("Content-Type", "application/json; charset = UTF-8")
+ << CHAR_VALUE("BehaviorOverride", "redirectAs404")
+ << CHAR_VALUE("Referer", "https://web.skype.com/main")
+ << CHAR_VALUE("Origin", "https://web.skype.com")
+ << CHAR_VALUE("Connection", "keep-alive");
+ }
+};
+
#endif //_SKYPE_REQUEST_MESSAGES_H_