game_manager_lib/commands/platforms/
steam.rs1use crate::commands::platforms::core::spawn_import;
2use crate::errors::AppError;
3use crate::sources::steam;
4use tauri::AppHandle;
5
6#[tauri::command]
7pub async fn import_steam_library(
8 app: AppHandle,
9 api_key: String,
10 steam_id: String,
11 steam_root: String,
12) -> Result<(), AppError> {
13 use crate::sources::providers::GameSource;
14
15 spawn_import(app, "Steam", |_app| async move {
16 let source = steam::SteamSource {
17 steam_root,
18 api_key,
19 steam_id,
20 };
21 source.fetch_games().await
22 });
23 Ok(())
24}