kuon
kuon copied to clipboard
Thinking about naming, it might be better to use TwitterAPIClient
pub struct TwitterClient {}
↓
pub struct TwitterAPIClient {}
example
before
let client = TwitterClient::new()
after
let api = TwitterAPIClient::new()
Now
let api = kuon::TwitterAPI::new(...).await?;
kuon::TwitterAPI::new() is an async function because the API for obtaining the bearer token is called when the instance is created.