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

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

@LimesKey

Description

@LimesKey

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;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions