From e9a3b54db4aa8ffb6f97baabc2b676e3d9570bb1 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 12 Dec 2024 21:56:51 +0300 Subject: more code cleaning --- protocols/Steam/src/api/history.h | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'protocols/Steam/src/api/history.h') diff --git a/protocols/Steam/src/api/history.h b/protocols/Steam/src/api/history.h index fbc09abed6..29086b6f46 100644 --- a/protocols/Steam/src/api/history.h +++ b/protocols/Steam/src/api/history.h @@ -1,13 +1,12 @@ #ifndef _STEAM_REQUEST_HISTORY_H_ #define _STEAM_REQUEST_HISTORY_H_ -class GetConversationsRequest : public HttpRequest +struct GetConversationsRequest : public HttpRequest { -public: - GetConversationsRequest(CSteamProto *ppro) : + GetConversationsRequest(const char *token) : HttpRequest(REQUEST_GET, "/IFriendMessagesService/GetActiveMessageSessions/v0001") { - this << CHAR_PARAM("access_token", ppro->getMStringA("TokenSecret")); + this << CHAR_PARAM("access_token", token); } //{ @@ -26,15 +25,14 @@ public: //} }; -class GetHistoryMessagesRequest : public HttpRequest +struct GetHistoryMessagesRequest : public HttpRequest { -public: - GetHistoryMessagesRequest(const char *token, const char *steamId, const char *who, time_t since) : + GetHistoryMessagesRequest(const char *token, int64_t steamId, const char *who, time_t since) : HttpRequest(REQUEST_GET, "/IFriendMessagesService/GetRecentMessages/v0001") { this << CHAR_PARAM("access_token", token) - << CHAR_PARAM("steamid1", steamId) + << INT64_PARAM("steamid1", steamId) << CHAR_PARAM("steamid2", who) // Steam somehow doesn't respect too precise start time parameter, so we better request older time and then do own filtering again << INT64_PARAM("rtime32_start_time", since - 1500); -- cgit v1.2.3