steamguard-cli/steamguard/src/api_responses/mod.rs

24 lines
539 B
Rust
Raw Normal View History

2022-12-06 10:07:25 -05:00
mod i_two_factor_service;
2022-12-06 10:02:07 -05:00
mod login;
mod phone_ajax;
2022-12-06 10:07:25 -05:00
pub use i_two_factor_service::*;
2022-12-06 10:02:07 -05:00
pub use login::*;
pub use phone_ajax::*;
use serde::{Deserialize, Deserializer};
pub(crate) fn parse_json_string_as_number<'de, D>(deserializer: D) -> Result<u64, D::Error>
where
D: Deserializer<'de>,
{
// for some reason, deserializing to &str doesn't work but this does.
let s: String = Deserialize::deserialize(deserializer)?;
Ok(s.parse().unwrap())
}
#[derive(Debug, Clone, Deserialize)]
pub struct SteamApiResponse<T> {
pub response: T,
}