diff options
author | MikalaiR <nikolay.romanovich@narod.ru> | 2015-05-08 15:31:07 +0000 |
---|---|---|
committer | MikalaiR <nikolay.romanovich@narod.ru> | 2015-05-08 15:31:07 +0000 |
commit | beb1f6c074d7790bd015229afc0daea22e6fedb2 (patch) | |
tree | 9a8ef717be6f78f96dd99845fafdc6084574c5d5 /protocols/SkypeWeb/src/requests | |
parent | 033e0683934e31341a9a28ae1a7fac17fba9215f (diff) |
SkypeWeb: DB utils moved to skype_db.cpp. Messages synchronization refactoring.
git-svn-id: http://svn.miranda-ng.org/main/trunk@13484 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/SkypeWeb/src/requests')
-rw-r--r-- | protocols/SkypeWeb/src/requests/chatrooms.h | 19 | ||||
-rw-r--r-- | protocols/SkypeWeb/src/requests/history.h | 2 | ||||
-rw-r--r-- | protocols/SkypeWeb/src/requests/search.h | 6 |
3 files changed, 24 insertions, 3 deletions
diff --git a/protocols/SkypeWeb/src/requests/chatrooms.h b/protocols/SkypeWeb/src/requests/chatrooms.h index 588c0de37b..39f2f5eddb 100644 --- a/protocols/SkypeWeb/src/requests/chatrooms.h +++ b/protocols/SkypeWeb/src/requests/chatrooms.h @@ -18,6 +18,25 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #ifndef _SKYPE_REQUEST_CHATS_H_
#define _SKYPE_REQUEST_CHATS_H_
+class LoadChatsRequest : public HttpRequest
+{
+public:
+ LoadChatsRequest(const char *regToken, const char *server = SKYPE_ENDPOINTS_HOST) :
+ HttpRequest(REQUEST_GET, FORMAT, "%s/v1/users/ME/conversations", server)
+ {
+ Url
+ << INT_VALUE("startTime", 0)
+ << INT_VALUE("pageSize", 100)
+ << CHAR_VALUE("view", "msnp24Equivalent")
+ << CHAR_VALUE("targetType", "Thread");
+
+ Headers
+ << CHAR_VALUE("Accept", "application/json, text/javascript")
+ << FORMAT_VALUE("RegistrationToken", "registrationToken=%s", regToken)
+ << CHAR_VALUE("Content-Type", "application/json; charset = UTF-8");
+ }
+};
+
class SendChatMessageRequest : public HttpRequest
{
public:
diff --git a/protocols/SkypeWeb/src/requests/history.h b/protocols/SkypeWeb/src/requests/history.h index 1a1d121686..812df6e927 100644 --- a/protocols/SkypeWeb/src/requests/history.h +++ b/protocols/SkypeWeb/src/requests/history.h @@ -27,7 +27,7 @@ public: << INT_VALUE("startTime", 0)
<< INT_VALUE("pageSize", pageSize)
<< CHAR_VALUE("view", "msnp24Equivalent")
- << CHAR_VALUE("targetType", "Passport|Skype|Lync|Thread");
+ << CHAR_VALUE("targetType", "Passport|Skype|Lync");
Headers
<< CHAR_VALUE("Accept", "application/json, text/javascript")
diff --git a/protocols/SkypeWeb/src/requests/search.h b/protocols/SkypeWeb/src/requests/search.h index 4628dfdd56..64283c1964 100644 --- a/protocols/SkypeWeb/src/requests/search.h +++ b/protocols/SkypeWeb/src/requests/search.h @@ -22,11 +22,13 @@ class GetSearchRequest : public HttpRequest {
public:
GetSearchRequest(const char *token, const char *string) :
- HttpRequest(REQUEST_GET, FORMAT, "api.skype.com/search/users/any?keyWord=%s&contactTypes[]=skype", string)
+ HttpRequest(REQUEST_GET, "api.skype.com/search/users/any")
{
+ Url
+ << CHAR_VALUE("keyWord", string)
+ << CHAR_VALUE("contactTypes[]", "skype");
Headers
<< CHAR_VALUE("Accept", "application/json")
- << CHAR_VALUE("Content-Type", "application/json; charset=UTF-8")
<< CHAR_VALUE("Connection", "keep-alive")
<< CHAR_VALUE("X-Skypetoken", token);
}
|