platform/multiplatform: add multiplatform client with cross-ref
Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: Ie2cf48136e5a9017265a3b0ef26619356a6a6964
This commit is contained in:
parent
a8bf8f9f3f
commit
5772200da9
6 changed files with 276 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue