Skip to content
This repository has been archived by the owner on Nov 8, 2024. It is now read-only.

Migrate AirTable API to use PAT instead of API Key #373

Open
LimesKey opened this issue Aug 30, 2024 · 0 comments
Open

Migrate AirTable API to use PAT instead of API Key #373

LimesKey opened this issue Aug 30, 2024 · 0 comments

Comments

@LimesKey
Copy link

I get INVALID_API_VERSION when trying to fetch records from Airtable using a personal access token, I assume this is because the program was never migrated to support PAT.

async fn get_airtable_records() -> Vec<Record<OnBoardRecord>> {
    let airtable = Airtable::new_from_env();
    // Get the current records from a table.
    let mut records: Vec<Record<OnBoardRecord>> = airtable
        .list_records(
            "Submissions",
            "Pending",
            vec!["OTP"],
        )
        .await
        .unwrap();

    // Iterate over the records.
    for (i, record) in records.clone().iter().enumerate() {
        println!("{} - {:?}", i, record);
    }
    return records;
}
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant