feat(search): search feature via modrinth api for current project
This commit is contained in:
parent
1092071968
commit
10e3ca2efb
8 changed files with 226 additions and 32 deletions
17
src/models/search.rs
Normal file
17
src/models/search.rs
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
use serde::Deserialize;
|
||||
|
||||
#[derive(Deserialize)]
|
||||
pub struct SearchResult {
|
||||
pub hits: Vec<SearchHit>,
|
||||
pub offset: u32,
|
||||
pub limit: u32,
|
||||
pub total_hits: u32,
|
||||
}
|
||||
|
||||
#[derive(Deserialize)]
|
||||
pub struct SearchHit {
|
||||
pub slug: String,
|
||||
pub author: String,
|
||||
pub title: String,
|
||||
pub description: String,
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue