baserow_rs::api::client

Trait BaserowClient

Source
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§

Source

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.

Source

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.

Source

fn table_by_id(&self, id: u64) -> BaserowTable

Returns a table by its ID.

Source

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

Source

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

Source

fn get_configuration(&self) -> Configuration

Get the underlying configuration

Source

fn get_client(&self) -> Client

Get the underlying HTTP client

Implementors§