diff options
author | Alexander Lantsev <aunsane@gmail.com> | 2015-03-22 21:07:19 +0000 |
---|---|---|
committer | Alexander Lantsev <aunsane@gmail.com> | 2015-03-22 21:07:19 +0000 |
commit | d2a83c7d22df33abd1678756fd4caba432700860 (patch) | |
tree | e1e2dc51a300c3af8fb9877f97a34db094ea2653 /protocols/SkypeWeb/src/requests/contacts.h | |
parent | a9edb12c2cc13a74f16c0a61deaeaa8780f13f4e (diff) |
SkypeWeb:
- refactored HttpRequest 2
- status changing support (patch from MikalaiR)
git-svn-id: http://svn.miranda-ng.org/main/trunk@12478 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/SkypeWeb/src/requests/contacts.h')
-rw-r--r-- | protocols/SkypeWeb/src/requests/contacts.h | 30 |
1 files changed, 10 insertions, 20 deletions
diff --git a/protocols/SkypeWeb/src/requests/contacts.h b/protocols/SkypeWeb/src/requests/contacts.h index aff095df65..96c0b1c203 100644 --- a/protocols/SkypeWeb/src/requests/contacts.h +++ b/protocols/SkypeWeb/src/requests/contacts.h @@ -1,14 +1,12 @@ #ifndef _SKYPE_REQUEST_CONTACTS_H_
#define _SKYPE_REQUEST_CONTACTS_H_
-class GetContactListRequest : public HttpRequest
+class GetContactListRequest : public HttpsGetRequest
{
public:
GetContactListRequest(const char *token, const char *skypename = "self") :
- HttpRequest(REQUEST_GET, "api.skype.com/users/%s/contacts?hideDetails=true", skypename)
+ HttpsGetRequest("api.skype.com/users/%s/contacts", skypename)
{
- flags |= NLHRF_SSL;
-
Url << CHAR_VALUE("hideDetails", "true");
Headers
@@ -18,14 +16,12 @@ public: }
};
-class GetContactsInfoRequest : public HttpRequest
+class GetContactsInfoRequest : public HttpsPostRequest
{
public:
GetContactsInfoRequest(const char *token, const LIST<char> &skypenames, const char *skypename = "self") :
- HttpRequest(REQUEST_POST, "api.skype.com/users/%s/contacts/profiles", skypename)
+ HttpsPostRequest("api.skype.com/users/%s/contacts/profiles", skypename)
{
- flags |= NLHRF_SSL;
-
Headers
<< CHAR_VALUE("X-Skypetoken", "Accept")
<< CHAR_VALUE("X-Skypetoken", token)
@@ -38,42 +34,36 @@ public: }
};
-class GetContactsAuthRequest : public HttpRequest
+class GetContactsAuthRequest : public HttpsGetRequest
{
public:
GetContactsAuthRequest(const char *token, const char *skypename = "self") :
- HttpRequest(REQUEST_GET, "api.skype.com/users/%s/contacts/auth-request", skypename)
+ HttpsGetRequest("api.skype.com/users/%s/contacts/auth-request", skypename)
{
- flags |= NLHRF_SSL;
-
Headers
<< CHAR_VALUE("X-Skypetoken", token)
<< CHAR_VALUE("Accept", "application/json");
}
};
-class AuthAcceptRequest : public HttpRequest
+class AuthAcceptRequest : public HttpsGetRequest
{
public:
AuthAcceptRequest(const char *token, const char *who, const char *skypename = "self") :
- HttpRequest(REQUEST_GET, "api.skype.com/users/%s/contacts/auth-request/%s/accept", skypename, who)
+ HttpsGetRequest("api.skype.com/users/%s/contacts/auth-request/%s/accept", skypename, who)
{
- flags |= NLHRF_SSL;
-
Headers
<< CHAR_VALUE("X-Skypetoken", token)
<< CHAR_VALUE("Accept", "application/json");
}
};
-class AuthDeclineRequest : public HttpRequest
+class AuthDeclineRequest : public HttpsGetRequest
{
public:
AuthDeclineRequest(const char *token, const char *who, const char *skypename = "self") :
- HttpRequest(REQUEST_GET, "api.skype.com/users/%s/contacts/auth-request/%s/decline", skypename)
+ HttpsGetRequest("api.skype.com/users/%s/contacts/auth-request/%s/decline", skypename)
{
- flags |= NLHRF_SSL;
-
Headers
<< CHAR_VALUE("X-Skypetoken", token)
<< CHAR_VALUE("Accept", "application/json");
|