diff options
| author | George Hazan <ghazan@miranda.im> | 2020-08-09 13:19:04 +0300 |
|---|---|---|
| committer | George Hazan <ghazan@miranda.im> | 2020-08-09 13:19:04 +0300 |
| commit | 1b410d8cefa448ee1809bab7c52a3d34383e5df7 (patch) | |
| tree | dcaf5524946a6417374d498df1631f8f7929efa3 /protocols/Steam/src/api | |
| parent | 651a3529398a341739f71ea0c7f3212555c13949 (diff) | |
Steam: minor code cleaning
Diffstat (limited to 'protocols/Steam/src/api')
| -rw-r--r-- | protocols/Steam/src/api/friend.h | 4 | ||||
| -rw-r--r-- | protocols/Steam/src/api/history.h | 4 | ||||
| -rw-r--r-- | protocols/Steam/src/api/poll.h | 12 |
3 files changed, 10 insertions, 10 deletions
diff --git a/protocols/Steam/src/api/friend.h b/protocols/Steam/src/api/friend.h index 0997d42b0f..2f088a7e40 100644 --- a/protocols/Steam/src/api/friend.h +++ b/protocols/Steam/src/api/friend.h @@ -4,11 +4,11 @@ class GetUserSummariesRequest : public HttpRequest
{
public:
- GetUserSummariesRequest(const char *token, const char *steamIds) :
+ GetUserSummariesRequest(CSteamProto *ppro, const char *steamIds) :
HttpRequest(HttpGet, STEAM_API_URL "/ISteamUserOAuth/GetUserSummaries/v0002")
{
Uri
- << CHAR_PARAM("access_token", token)
+ << CHAR_PARAM("access_token", ppro->getMStringA("TokenSecret"))
<< CHAR_PARAM("steamids", steamIds);
}
diff --git a/protocols/Steam/src/api/history.h b/protocols/Steam/src/api/history.h index 0eaea38fb1..decbea87f0 100644 --- a/protocols/Steam/src/api/history.h +++ b/protocols/Steam/src/api/history.h @@ -4,10 +4,10 @@ class GetConversationsRequest : public HttpRequest { public: - GetConversationsRequest(const char *token) : + GetConversationsRequest(CSteamProto *ppro) : HttpRequest(HttpGet, STEAM_API_URL "/IFriendMessagesService/GetActiveMessageSessions/v0001") { - Uri << CHAR_PARAM("access_token", token); + Uri << CHAR_PARAM("access_token", ppro->getMStringA("TokenSecret")); } //{ diff --git a/protocols/Steam/src/api/poll.h b/protocols/Steam/src/api/poll.h index 6336b212e9..0487411c6c 100644 --- a/protocols/Steam/src/api/poll.h +++ b/protocols/Steam/src/api/poll.h @@ -4,8 +4,8 @@ class PollRequest : public HttpRequest { public: - PollRequest(const char *token, const char *umqId, UINT32 messageId, int idleSeconds) : - HttpRequest(HttpPost, STEAM_API_URL "/ISteamWebUserPresenceOAuth/Poll/v0001") + PollRequest(CSteamProto *ppro) : + HttpRequest(HttpPost, STEAM_API_URL "/ISteamWebUserPresenceOAuth/Poll/v1") { timeout = (STEAM_API_TIMEOUT + 5) * 1000; // flags |= NLHRF_PERSISTENT; @@ -13,10 +13,10 @@ public: Headers << CHAR_PARAM("Connection", "keep-alive"); Content = new FormUrlEncodedContent(this) - << CHAR_PARAM("access_token", token) - << CHAR_PARAM("umqid", umqId) - << INT64_PARAM("message", messageId) - << INT_PARAM("secidletime", idleSeconds) + << CHAR_PARAM("access_token", ppro->getMStringA("TokenSecret")) + << CHAR_PARAM("umqid", ppro->getMStringA("UMQID")) + << INT64_PARAM("message", ppro->getDword("MessageID")) + << INT_PARAM("secidletime", ppro->IdleSeconds()) << INT_PARAM("sectimeout", STEAM_API_TIMEOUT); } |
