diff options
author | Alexander Lantsev <aunsane@gmail.com> | 2015-04-04 20:10:50 +0000 |
---|---|---|
committer | Alexander Lantsev <aunsane@gmail.com> | 2015-04-04 20:10:50 +0000 |
commit | c89e8a054ac888b27065916ffde96af73404228c (patch) | |
tree | 5538dfdd531108fb653e107bc6ff54d1aea5a96d /protocols/SkypeWeb/src/requests/messages.h | |
parent | 817c5f883a658c4abca078df852ad81f6ec7f861 (diff) |
SkypeWeb:
- history sync (patch from MikalaiR)
- refactored message sending
git-svn-id: http://svn.miranda-ng.org/main/trunk@12599 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/SkypeWeb/src/requests/messages.h')
-rw-r--r-- | protocols/SkypeWeb/src/requests/messages.h | 22 |
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_
|