Struct shaco::rest::RESTClient
source · pub struct RESTClient { /* private fields */ }
Expand description
A client for the League-Client(LCU) REST API
Implementations§
source§impl RESTClient
impl RESTClient
sourcepub async fn get(&self, endpoint: String) -> Result<Value, Error>
pub async fn get(&self, endpoint: String) -> Result<Value, Error>
Make a get request to the specified endpoint
sourcepub async fn post<T: Serialize>(
&self,
endpoint: String,
body: T
) -> Result<Value, Error>
pub async fn post<T: Serialize>( &self, endpoint: String, body: T ) -> Result<Value, Error>
Make a post request to the specified endpoint