nyaa_si/
client.rs

1use crate::category::Category;
2use crate::error::Result;
3use crate::model::Torrent;
4use crate::query::Query;
5
6pub trait Client<C: Category> {
7    const BASE_URL: &'static str;
8
9    /// Send a query to the api
10    ///
11    ///```
12    #[doc = include_str!("../examples/custom_query.rs")]
13    ///```
14    fn get(
15        &self,
16        query: &Query<C>,
17    ) -> impl std::future::Future<Output = Result<Vec<Torrent>>> + Send;
18}