Struct airtable_api::Airtable[][src]

pub struct Airtable { /* fields omitted */ }

Entrypoint for interacting with the Airtable API.

Implementations

impl Airtable[src]

pub fn new<K, B, E>(key: K, base_id: B, enterprise_account_id: E) -> Self where
    K: ToString,
    B: ToString,
    E: ToString
[src]

Create a new Airtable 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 and Base ID your requests will work. You can leave the Enterprise Account ID empty if you are not using the Enterprise API features.

pub fn new_from_env() -> Self[src]

Create a new Airtable 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 Base ID your requests will work.

pub fn get_key(&self) -> &str[src]

Get the currently set API key.

pub async fn list_records<T: DeserializeOwned>(
    &self,
    table: &str,
    view: &str,
    fields: Vec<&str>
) -> Result<Vec<Record<T>>, APIError>
[src]

List records in a table for a particular view.

pub async fn get_record<T: DeserializeOwned>(
    &self,
    table: &str,
    record_id: &str
) -> Result<Record<T>, APIError>
[src]

Get record from a table.

pub async fn delete_record(
    &self,
    table: &str,
    record_id: &str
) -> Result<(), APIError>
[src]

Delete record from a table.

pub async fn create_records<T: Serialize + DeserializeOwned>(
    &self,
    table: &str,
    records: Vec<Record<T>>
) -> Result<Vec<Record<T>>, APIError>
[src]

Bulk create records in a table.

Due to limitations on the Airtable API, you can only bulk create 10 records at a time.

pub async fn update_records<T: Serialize + DeserializeOwned>(
    &self,
    table: &str,
    records: Vec<Record<T>>
) -> Result<Vec<Record<T>>, APIError>
[src]

Bulk update records in a table.

Due to limitations on the Airtable API, you can only bulk update 10 records at a time.

pub async fn delete_internal_user_by_email(
    &self,
    email: &str
) -> Result<(), APIError>
[src]

Delete internal user by email. This is for an enterprise admin to do only. The user must be an internal user, meaning they have an email with the company domain. FROM: https://airtable.com/api/enterprise#enterpriseAccountUserDeleteUserByEmail

Auto Trait Implementations

impl !RefUnwindSafe for Airtable

impl Send for Airtable

impl Sync for Airtable

impl Unpin for Airtable

impl !UnwindSafe for Airtable

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.