summaryrefslogtreecommitdiff
path: root/protocols/SkypeWeb/src/requests/contacts.h
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/SkypeWeb/src/requests/contacts.h')
-rw-r--r--protocols/SkypeWeb/src/requests/contacts.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/protocols/SkypeWeb/src/requests/contacts.h b/protocols/SkypeWeb/src/requests/contacts.h
index 8debeba6ed..45758c441f 100644
--- a/protocols/SkypeWeb/src/requests/contacts.h
+++ b/protocols/SkypeWeb/src/requests/contacts.h
@@ -75,6 +75,21 @@ public:
}
};
+class AddContactRequest : public HttpRequest
+{
+public:
+ AddContactRequest(const char *token, const char *who, const char *greeting = "", const char *skypename = "self") :
+ HttpRequest(REQUEST_PUT, FORMAT, "api.skype.com/users/%s/contacts/auth-request/%s", skypename, who)
+ {
+ Headers
+ << CHAR_VALUE("X-Skypetoken", token)
+ << CHAR_VALUE("Accept", "application/json");
+ CMStringA data;
+ data.AppendFormat("greeting=%s", mir_urlEncode(greeting));
+ Body << VALUE(data);
+ }
+};
+
class AuthAcceptRequest : public HttpRequest
{
public: