use std::fmt::Debug;
use async_trait::async_trait;
#[async_trait]
pub trait Route<T>
where
T: Debug,
{
fn path(&self) -> String;
#[deprecated(
since = "0.0.2",
note = "please use an explicit sub route method instead."
)]
fn route(self, route: String) -> Self;
fn body<B: Into<reqwest::Body>>(self, body: B) -> Self;
fn with_header(self, key: &str, value: &str) -> Self;
fn headers(self, headers: Vec<(&str, &str)>) -> Self;
fn with_api_key(self, key: &str) -> Self;
fn with_application_key(self, key: &str) -> Self;
async fn execute(self) -> (reqwest::StatusCode, Result<T, Option<reqwest::Error>>);
}