summaryrefslogtreecommitdiff
path: root/protocols/Steam/src/api/friend_list.h
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Steam/src/api/friend_list.h')
-rw-r--r--protocols/Steam/src/api/friend_list.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/protocols/Steam/src/api/friend_list.h b/protocols/Steam/src/api/friend_list.h
index 604e797a2d..50c9a7b5bc 100644
--- a/protocols/Steam/src/api/friend_list.h
+++ b/protocols/Steam/src/api/friend_list.h
@@ -12,6 +12,17 @@ public:
<< CHAR_PARAM("steamid", steamId)
<< CHAR_PARAM("relationship", relationship);
}
+
+ //{
+ // "friends": [
+ // {
+ // "steamid": "XXXXXXXXXXXXXXXXX",
+ // "relationship" : "friend",
+ // "friend_since" : 1514314629
+ // }
+ // ]
+ //}
+
};
class AddFriendRequest : public HttpRequest
@@ -32,6 +43,12 @@ public:
<< CHAR_PARAM("sessionID", sessionId)
<< CHAR_PARAM("steamid", who);
}
+
+ // "true"
+
+ // {"invited":["XXXXXXXXXXXXXXXXX"], "success" : 1}
+
+ // {"failed_invites":["XXXXXXXXXXXXXXXXX"], "failed_invites_result" : [24], "success" : 1}
};
class BlockFriendRequest : public HttpRequest
@@ -55,6 +72,28 @@ public:
}
};
+class UnblockFriendRequest : public HttpRequest
+{
+public:
+ UnblockFriendRequest(const char *token, const char *sessionId, const char *steamId, const char *who) :
+ HttpRequest(HttpPost, STEAM_WEB_URL "/actions/BlockUserAjax")
+ {
+ char login[MAX_PATH];
+ mir_snprintf(login, "%s||oauth:%s", steamId, token);
+
+ char cookie[MAX_PATH];
+ mir_snprintf(cookie, "steamLogin=%s;sessionid=%s;mobileClientVersion=1291812;forceMobile=1;mobileClient=ios", login, sessionId);
+
+ Headers << CHAR_PARAM("Cookie", cookie);
+
+ Content = new FormUrlEncodedContent(this)
+ << CHAR_PARAM("sessionID", sessionId)
+ << CHAR_PARAM("steamid", who)
+ << CHAR_PARAM("action", "unignore")
+ << INT_PARAM("block", 0);
+ }
+};
+
class RemoveFriendRequest : public HttpRequest
{
public: