use super::*;
use crate::structures::misc::*;
impl Ferinth<Authenticated> {
pub async fn submit_report(&self, report: &ReportSubmission) -> Result<Report> {
check_id_slug(&[&report.item_id])?;
self.client
.post(API_BASE_URL.join_all(vec!["report"]))
.json(report)
.custom_send_json()
.await
}
}
impl<T> Ferinth<T> {
pub async fn instance_statistics(&self) -> Result<Statistics> {
self.client
.get(API_BASE_URL.join_all(vec!["statistics"]))
.custom_send_json()
.await
}
pub async fn welcome(&self) -> Result<Welcome> {
self.client
.get(crate::BASE_URL.as_ref())
.custom_send_json()
.await
}
}