feat: scrape user regions
This commit is contained in:
30
sdgb-api/src/title/model/get_user_region_api/mod.rs
Normal file
30
sdgb-api/src/title/model/get_user_region_api/mod.rs
Normal file
@@ -0,0 +1,30 @@
|
||||
use bincode::{Decode, Encode};
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct GetUserRegionApi {
|
||||
pub user_id: u32,
|
||||
}
|
||||
|
||||
impl From<u32> for GetUserRegionApi {
|
||||
fn from(user_id: u32) -> Self {
|
||||
Self { user_id }
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize, Encode, Decode)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct GetUserRegionApiResp {
|
||||
pub user_id: i64,
|
||||
pub length: i64,
|
||||
pub user_region_list: Vec<UserRegion>,
|
||||
}
|
||||
|
||||
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize, Encode, Decode)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct UserRegion {
|
||||
pub region_id: i64,
|
||||
pub play_count: i64,
|
||||
pub created: String,
|
||||
}
|
||||
Reference in New Issue
Block a user