From e9d9b610245e86b255b3a6b7a921fa71d6bdaab6 Mon Sep 17 00:00:00 2001 From: Carson McManus Date: Sat, 27 Mar 2021 08:17:56 -0400 Subject: [PATCH] add session serialization --- src/steamapi.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/steamapi.rs b/src/steamapi.rs index 88f45ac..09f474a 100644 --- a/src/steamapi.rs +++ b/src/steamapi.rs @@ -231,13 +231,19 @@ struct OAuthData { webcookie: String, } -#[derive(Debug, Clone, Deserialize)] +#[derive(Debug, Clone, Serialize, Deserialize)] pub struct Session { + #[serde(rename = "SessionID")] pub session_id: String, + #[serde(rename = "SteamLogin")] pub steam_login: String, + #[serde(rename = "SteamLoginSecure")] pub steam_login_secure: String, + #[serde(rename = "WebCookie")] pub web_cookie: String, + #[serde(rename = "OAuthToken")] pub token: String, + #[serde(rename = "SteamID")] pub steam_id: u64, }