platform/multiplatform: add multiplatform client with cross-ref

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: Ie2cf48136e5a9017265a3b0ef26619356a6a6964
This commit is contained in:
raf 2026-04-18 22:18:27 +03:00
commit 5772200da9
Signed by: NotAShelf
GPG key ID: 29D95B64378DB4BF
6 changed files with 276 additions and 0 deletions

View file

@ -391,6 +391,18 @@ impl PlatformClient for CurseForgePlatform {
Ok(None)
}
async fn request_project_from_slug(
&self,
slug: &str,
) -> Result<Option<Project>> {
// Try to fetch project by slug using search API
match self.search_project_by_slug(slug).await {
Ok(cf_project) => Ok(Some(self.convert_project(cf_project))),
Err(PakkerError::ProjectNotFound(_)) => Ok(None),
Err(e) => Err(e),
}
}
}
// CurseForge API models