pub struct ProvidersApi { /* private fields */ }Expand description
Providers API client.
Implementations§
Source§impl ProvidersApi
impl ProvidersApi
Sourcepub fn new(http: HttpClient) -> Self
pub fn new(http: HttpClient) -> Self
Create a new Providers API client.
Sourcepub async fn list(&self) -> Result<ProviderListResponse>
pub async fn list(&self) -> Result<ProviderListResponse>
List available providers.
Returns a response containing all providers, their default models, and which providers are connected/authenticated.
§Errors
Returns an error if the request fails.
Sourcepub async fn auth(&self) -> Result<Vec<ProviderAuth>>
pub async fn auth(&self) -> Result<Vec<ProviderAuth>>
Sourcepub async fn oauth_callback(
&self,
provider_id: &str,
req: &OAuthCallbackRequest,
) -> Result<OAuthCallbackResponse>
pub async fn oauth_callback( &self, provider_id: &str, req: &OAuthCallbackRequest, ) -> Result<OAuthCallbackResponse>
Sourcepub async fn set_auth(
&self,
provider_id: &str,
req: &SetAuthRequest,
) -> Result<SetAuthResponse>
pub async fn set_auth( &self, provider_id: &str, req: &SetAuthRequest, ) -> Result<SetAuthResponse>
Trait Implementations§
Source§impl Clone for ProvidersApi
impl Clone for ProvidersApi
Source§fn clone(&self) -> ProvidersApi
fn clone(&self) -> ProvidersApi
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ProvidersApi
impl !RefUnwindSafe for ProvidersApi
impl Send for ProvidersApi
impl Sync for ProvidersApi
impl Unpin for ProvidersApi
impl !UnwindSafe for ProvidersApi
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more