diff options
Diffstat (limited to 'protocols/SkypeWeb/src/requests')
-rw-r--r-- | protocols/SkypeWeb/src/requests/contacts.h | 47 | ||||
-rw-r--r-- | protocols/SkypeWeb/src/requests/profile.h | 4 |
2 files changed, 45 insertions, 6 deletions
diff --git a/protocols/SkypeWeb/src/requests/contacts.h b/protocols/SkypeWeb/src/requests/contacts.h index 2aec30499f..5e4ce2cffe 100644 --- a/protocols/SkypeWeb/src/requests/contacts.h +++ b/protocols/SkypeWeb/src/requests/contacts.h @@ -4,8 +4,8 @@ class GetContactListRequest : public HttpRequest
{
public:
- GetContactListRequest(const char *token) :
- HttpRequest(REQUEST_GET, "api.skype.com/users/self/contacts?hideDetails=true")
+ GetContactListRequest(const char *token, const char *skypename = "self") :
+ HttpRequest(REQUEST_GET, "api.skype.com/users/%s/contacts?hideDetails=true", skypename)
{
flags |= NLHRF_SSL;
@@ -17,8 +17,8 @@ public: class GetContactsInfoRequest : public HttpRequest
{
public:
- GetContactsInfoRequest(const char *token, const LIST<char> &skypenames) :
- HttpRequest(REQUEST_POST, "api.skype.com/users/self/contacts/profiles")
+ GetContactsInfoRequest(const char *token, const LIST<char> &skypenames, const char *skypename = "self") :
+ HttpRequest(REQUEST_POST, "api.skype.com/users/%s/contacts/profiles", skypename)
{
flags |= NLHRF_SSL;
@@ -37,4 +37,43 @@ public: }
};
+class GetContactsAuthRequest : public HttpRequest
+{
+public:
+ GetContactsAuthRequest(const char *token, const char *skypename = "self") :
+ HttpRequest(REQUEST_GET, "api.skype.com/users/%s/contacts/auth-request", skypename)
+ {
+ flags |= NLHRF_SSL;
+
+ AddHeader("X-Skypetoken", token);
+ AddHeader("Accept", "application/json");
+ }
+};
+
+class AuthAcceptRequest : public HttpRequest
+{
+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)
+ {
+ flags |= NLHRF_SSL;
+
+ AddHeader("X-Skypetoken", token);
+ AddHeader("Accept", "application/json");
+ }
+};
+
+class AuthDeclineRequest : public HttpRequest
+{
+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)
+ {
+ flags |= NLHRF_SSL;
+
+ AddHeader("X-Skypetoken", token);
+ AddHeader("Accept", "application/json");
+ }
+};
+
#endif //_SKYPE_REQUEST_CONTACTS_H_
diff --git a/protocols/SkypeWeb/src/requests/profile.h b/protocols/SkypeWeb/src/requests/profile.h index 4d6fd94789..8473d19875 100644 --- a/protocols/SkypeWeb/src/requests/profile.h +++ b/protocols/SkypeWeb/src/requests/profile.h @@ -4,8 +4,8 @@ class GetProfileRequest : public HttpRequest
{
public:
- GetProfileRequest(const char *token) :
- HttpRequest(REQUEST_GET, "api.skype.com/users/self/profile")
+ GetProfileRequest(const char *token, const char *skypename = "self") :
+ HttpRequest(REQUEST_GET, "api.skype.com/users/%s/profile", skypename)
{
flags |= NLHRF_SSL;
|