diff options
Diffstat (limited to 'protocols/SkypeWeb/src/requests')
-rw-r--r-- | protocols/SkypeWeb/src/requests/contacts.h | 17 | ||||
-rw-r--r-- | protocols/SkypeWeb/src/requests/login.h | 4 |
2 files changed, 19 insertions, 2 deletions
diff --git a/protocols/SkypeWeb/src/requests/contacts.h b/protocols/SkypeWeb/src/requests/contacts.h new file mode 100644 index 0000000000..3ba86d9b2e --- /dev/null +++ b/protocols/SkypeWeb/src/requests/contacts.h @@ -0,0 +1,17 @@ +#ifndef _SKYPE_REQUEST_CONTACTS_H_
+#define _SKYPE_REQUEST_CONTACTS_H_
+
+class GetContactsRequest : public HttpRequest
+{
+public:
+ GetContactsRequest(const char *token) :
+ HttpRequest(REQUEST_GET, "api.skype.com/users/self/contacts")
+ {
+ flags |= NLHRF_SSL;
+
+ AddHeader("X-Skypetoken", token);
+ AddHeader("Accept", "application/json");
+ }
+};
+
+#endif //_SKYPE_REQUEST_CONTACTS_H_
diff --git a/protocols/SkypeWeb/src/requests/login.h b/protocols/SkypeWeb/src/requests/login.h index e1d94806b7..73003b5046 100644 --- a/protocols/SkypeWeb/src/requests/login.h +++ b/protocols/SkypeWeb/src/requests/login.h @@ -12,7 +12,7 @@ public: url.Append("?client_id=578134&redirect_uri=https%3A%2F%2Fweb.skype.com");
}
- LoginRequest(const char *username, const char *password, const char *pie, const char *etm) :
+ LoginRequest(const char *skypename, const char *password, const char *pie, const char *etm) :
HttpRequest(REQUEST_POST, "login.skype.com/login")
{
flags |= NLHRF_SSL;
@@ -26,7 +26,7 @@ public: int minutes = tzi->Bias % -60;
CMStringA data = "";
- data.AppendFormat("username=%s&", username);
+ data.AppendFormat("username=%s&", skypename);
data.AppendFormat("password=%s&", password);
data.AppendFormat("pie=%s&", ptrA(mir_urlEncode(pie)));
data.AppendFormat("etm=%s&", ptrA(mir_urlEncode(etm)));
|