pub struct Client { /* private fields */ }
Expand description

Entrypoint for interacting with the API client.

Implementations

Create a new Client struct. It takes a type that can convert into an &str (String or Vec<u8> for example). As long as the function is given a valid API key your requests will work.

Enables or disables the automatic refreshing of access tokens upon expiration

Sets a specific Instant at which the access token should be considered expired. The expiration value will only be used when automatic access token refreshing is also enabled. None may be passed in if the expiration is unknown. In this case automatic refreshes will be attempted when encountering an UNAUTHENTICATED status code on a response.

Gets the Instant at which the access token used by this client is set to expire if one is known

Sets the number of seconds in which the current access token should be considered expired

Gets the number of seconds from now in which the current access token will be considered expired if one is known

Determines if the access token currently stored in the client is expired. If the expiration can not be determined, None is returned

Override the default host for the client.

Create a new Client struct from environment variables. It takes a type that can convert into an &str (String or Vec<u8> for example). As long as the function is given a valid API key and your requests will work. We pass in the token and refresh token to the client so if you are storing it in a database, you can get it first.

Return a user consent url with an optional set of scopes. If no scopes are provided, they will not be passed in the url.

Refresh an access token from a refresh token. Client must have a refresh token for this to work.

Get an access token from the code returned by the URL paramter sent to the redirect URL.

Return a reference to an interface that provides access to about operations.

Return a reference to an interface that provides access to changes operations.

Return a reference to an interface that provides access to channels operations.

Return a reference to an interface that provides access to comments operations.

Return a reference to an interface that provides access to drives operations.

Return a reference to an interface that provides access to files operations.

Return a reference to an interface that provides access to permissions operations.

Return a reference to an interface that provides access to replies operations.

Return a reference to an interface that provides access to revisions operations.

Return a reference to an interface that provides access to teamdrives operations.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Attaches the provided Context to this type, returning a WithContext wrapper. Read more

Attaches the current Context to this type, returning a WithContext wrapper. Read more

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more