baserow_rs::api::client

Trait BaserowClient

Source
pub trait BaserowClient: RequestTracing {
    // 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

This trait includes tracing for all operations, providing detailed logs about HTTP requests, responses, and any errors that occur.

All HTTP operations are automatically traced through the RequestTracing trait, which provides detailed logging of request/response cycles.

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.

This operation is traced with detailed logging of the authentication process, excluding sensitive information like credentials.

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.

This operation is traced with detailed logging of the request/response cycle and field retrieval results.

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

This operation is traced with detailed logging of the upload process, including file metadata and upload status.

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

This operation is traced with detailed logging of the URL validation and upload process.

Source

fn get_configuration(&self) -> Configuration

Get the underlying configuration

Source

fn get_client(&self) -> Client

Get the underlying HTTP client

Implementors§