HttpService class to interact with the Airtable API using Node.js native https module.

Constructors

Methods

Constructors

  • Creates an instance of HttpService.

    Parameters

    • token: string

      The API token for authentication.

    • baseId: string

      The Airtable base ID.

    Returns HttpService

Methods

  • Creates a new record in a specified base and table.

    Parameters

    • tableName: string

      The name of the table.

    • body: Record<string, unknown>

      The data to be inserted as a new record.

    Returns Promise<AirtableResult>

    A promise that resolves to an AirTableCreateMapping object.

  • Deletes a record from a specified base and table.

    Parameters

    • tableName: string

      The name of the table.

    • recordId: string

      The ID of the record to be deleted.

    Returns Promise<AirtableDeletion>

    A promise that resolves to an AirTableDeleteMapping object.

  • Updates an existing record in a specified base and table.

    Parameters

    • tableName: string

      The name of the table.

    • recordId: string

      The ID of the record to be updated.

    • body: Record<string, unknown>

      The data to update the record with.

    Returns Promise<AirtableUpdateResult>

    A promise that resolves to an AirTableCreateMapping object.