Struct airtable_api::Airtable [−][src]
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]
K: ToString,
B: ToString,
E: ToString,
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]
&self,
table: &str,
view: &str,
fields: Vec<&str>
) -> Result<Vec<Record<T>>, APIError>
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]
&self,
table: &str,
record_id: &str
) -> Result<Record<T>, APIError>
Get record from a table.
pub async fn delete_record(
&self,
table: &str,
record_id: &str
) -> Result<(), APIError>
[src]
&self,
table: &str,
record_id: &str
) -> Result<(), APIError>
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]
&self,
table: &str,
records: Vec<Record<T>>
) -> Result<Vec<Record<T>>, APIError>
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]
&self,
table: &str,
records: Vec<Record<T>>
) -> Result<Vec<Record<T>>, APIError>
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]
&self,
email: &str
) -> Result<(), APIError>
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,