pub trait BaserowClient {
// Required methods
fn token_auth<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn BaserowClient>, TokenAuthError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn table_fields<'life0, 'async_trait>(
&'life0 self,
table_id: u64,
) -> Pin<Box<dyn Future<Output = Result<Vec<TableField>, Box<dyn Error>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn table_by_id(&self, id: u64) -> BaserowTable;
fn upload_file<'life0, 'async_trait>(
&'life0 self,
file: File,
filename: String,
) -> Pin<Box<dyn Future<Output = Result<BaserowFile, FileUploadError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn upload_file_via_url<'life0, 'life1, 'async_trait>(
&'life0 self,
url: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<BaserowFile, FileUploadError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_configuration(&self) -> Configuration;
fn get_client(&self) -> Client;
}
Expand description
Trait defining the public API interface for Baserow
Required Methods§
Sourcefn token_auth<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn BaserowClient>, TokenAuthError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn token_auth<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn BaserowClient>, TokenAuthError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Authenticates an existing user based on their email and their password. If successful, an access token and a refresh token will be returned.
Sourcefn table_fields<'life0, 'async_trait>(
&'life0 self,
table_id: u64,
) -> Pin<Box<dyn Future<Output = Result<Vec<TableField>, Box<dyn Error>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn table_fields<'life0, 'async_trait>(
&'life0 self,
table_id: u64,
) -> Pin<Box<dyn Future<Output = Result<Vec<TableField>, Box<dyn Error>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Retrieves all fields for a given table.
Sourcefn table_by_id(&self, id: u64) -> BaserowTable
fn table_by_id(&self, id: u64) -> BaserowTable
Returns a table by its ID.
Sourcefn upload_file<'life0, 'async_trait>(
&'life0 self,
file: File,
filename: String,
) -> Pin<Box<dyn Future<Output = Result<BaserowFile, FileUploadError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn upload_file<'life0, 'async_trait>(
&'life0 self,
file: File,
filename: String,
) -> Pin<Box<dyn Future<Output = Result<BaserowFile, FileUploadError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Upload a file to Baserow
Sourcefn upload_file_via_url<'life0, 'life1, 'async_trait>(
&'life0 self,
url: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<BaserowFile, FileUploadError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn upload_file_via_url<'life0, 'life1, 'async_trait>(
&'life0 self,
url: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<BaserowFile, FileUploadError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Upload a file to Baserow via URL
Sourcefn get_configuration(&self) -> Configuration
fn get_configuration(&self) -> Configuration
Get the underlying configuration
Sourcefn get_client(&self) -> Client
fn get_client(&self) -> Client
Get the underlying HTTP client