pub struct Client { /* private fields */ }requests only.Expand description
Entrypoint for interacting with the API client.
Implementations§
Source§impl Client
impl Client
Sourcepub fn new_from_reqwest<T>(
token: T,
builder_http: ClientBuilder,
builder_websocket: ClientBuilder,
) -> Self
pub fn new_from_reqwest<T>( token: T, builder_http: ClientBuilder, builder_websocket: ClientBuilder, ) -> Self
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.
Also takes reqwest client builders, for customizing the client’s behaviour.
Sourcepub fn new<T>(token: T) -> Self
pub fn new<T>(token: T) -> Self
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.
Sourcepub fn set_base_url<H>(&mut self, base_url: H)
pub fn set_base_url<H>(&mut self, base_url: H)
Set the base URL for the client to something other than the default: https://your-paperles.url/api.
Sourcepub fn new_from_env() -> Self
pub fn new_from_env() -> Self
Create a new Client struct from the environment variable: ENV_VARIABLE_PREFIX_API_TOKEN.
Sourcepub async fn request_raw(
&self,
method: Method,
uri: &str,
body: Option<Body>,
) -> Result<RequestBuilder>
pub async fn request_raw( &self, method: Method, uri: &str, body: Option<Body>, ) -> Result<RequestBuilder>
Create a raw request to our API.
Sourcepub fn bulk_edit_objects(&self) -> BulkEditObjects
pub fn bulk_edit_objects(&self) -> BulkEditObjects
Return a reference to an interface that provides access to bulk_edit_objects operations.
Sourcepub fn config(&self) -> Config
pub fn config(&self) -> Config
Return a reference to an interface that provides access to config operations.
Sourcepub fn correspondents(&self) -> Correspondents
pub fn correspondents(&self) -> Correspondents
Return a reference to an interface that provides access to correspondents operations.
Sourcepub fn custom_fields(&self) -> CustomFields
pub fn custom_fields(&self) -> CustomFields
Return a reference to an interface that provides access to custom_fields operations.
Sourcepub fn document_types(&self) -> DocumentTypes
pub fn document_types(&self) -> DocumentTypes
Return a reference to an interface that provides access to document_types operations.
Sourcepub fn documents(&self) -> Documents
pub fn documents(&self) -> Documents
Return a reference to an interface that provides access to documents operations.
Sourcepub fn groups(&self) -> Groups
pub fn groups(&self) -> Groups
Return a reference to an interface that provides access to groups operations.
Sourcepub fn logs(&self) -> Logs
pub fn logs(&self) -> Logs
Return a reference to an interface that provides access to logs operations.
Sourcepub fn mail_accounts(&self) -> MailAccounts
pub fn mail_accounts(&self) -> MailAccounts
Return a reference to an interface that provides access to mail_accounts operations.
Sourcepub fn mail_rules(&self) -> MailRules
pub fn mail_rules(&self) -> MailRules
Return a reference to an interface that provides access to mail_rules operations.
Sourcepub fn oauth(&self) -> Oauth
pub fn oauth(&self) -> Oauth
Return a reference to an interface that provides access to oauth operations.
Sourcepub fn profile(&self) -> Profile
pub fn profile(&self) -> Profile
Return a reference to an interface that provides access to profile operations.
Sourcepub fn remote_version(&self) -> RemoteVersion
pub fn remote_version(&self) -> RemoteVersion
Return a reference to an interface that provides access to remote_version operations.
Sourcepub fn saved_views(&self) -> SavedViews
pub fn saved_views(&self) -> SavedViews
Return a reference to an interface that provides access to saved_views operations.
Sourcepub fn search(&self) -> Search
pub fn search(&self) -> Search
Return a reference to an interface that provides access to search operations.
Return a reference to an interface that provides access to share_links operations.
Sourcepub fn statistics(&self) -> Statistics
pub fn statistics(&self) -> Statistics
Return a reference to an interface that provides access to statistics operations.
Sourcepub fn status(&self) -> Status
pub fn status(&self) -> Status
Return a reference to an interface that provides access to status operations.
Sourcepub fn storage_paths(&self) -> StoragePaths
pub fn storage_paths(&self) -> StoragePaths
Return a reference to an interface that provides access to storage_paths operations.
Return a reference to an interface that provides access to tags operations.
Sourcepub fn tasks(&self) -> Tasks
pub fn tasks(&self) -> Tasks
Return a reference to an interface that provides access to tasks operations.
Sourcepub fn token(&self) -> Token
pub fn token(&self) -> Token
Return a reference to an interface that provides access to token operations.
Sourcepub fn trash(&self) -> Trash
pub fn trash(&self) -> Trash
Return a reference to an interface that provides access to trash operations.
Sourcepub fn ui_settings(&self) -> UiSettings
pub fn ui_settings(&self) -> UiSettings
Return a reference to an interface that provides access to ui_settings operations.
Sourcepub fn users(&self) -> Users
pub fn users(&self) -> Users
Return a reference to an interface that provides access to users operations.
Sourcepub fn workflow_actions(&self) -> WorkflowActions
pub fn workflow_actions(&self) -> WorkflowActions
Return a reference to an interface that provides access to workflow_actions operations.
Sourcepub fn workflow_triggers(&self) -> WorkflowTriggers
pub fn workflow_triggers(&self) -> WorkflowTriggers
Return a reference to an interface that provides access to workflow_triggers operations.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Client
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more