Airtable / airtable.js

Airtable javascript client
MIT License
1.98k stars 404 forks source link

find, update and create methods doesn't support returnFieldsByFieldId API parameter #360

Open lcarbonn opened 1 year ago

lcarbonn commented 1 year ago

The web API presents query parameters like returnFieldsByFieldId . But the airtable.js methods find, update, create don't allow to pass this parameters. Only select method can use it. Am I wrong ?

joshuabrokaw commented 1 year ago

+1 it makes the API very fragile that we have to use the names vs IDs

could this be exposed to additional table methods?

JozefCmiel commented 8 months ago

+1

I would expect something like .find(recordId, { returnFieldsByFieldId: true })

Where params are from https://airtable.com/developers/web/api/get-record .

JozefCmiel commented 8 months ago

For those that will find this issue, you can get around this by using makeRequest method from base like this:

const makeRequest = Airtable.base('baseId').makeRequest
const response = await makeRequest({
  method: 'get',
  path: `/${tableId}/${recordId}`,
  qs: {
    returnFieldsByFieldId: true,
  },
 })
console.log(response)

This method has rate limiting logic to retry, and contains configured authentication.

dopry commented 6 months ago

+1