Closed MoralCode closed 3 years ago
If usage examples would help, this feature is currently part of a custom version of async-airtable that merges this branch and https://github.com/VacFind/VacFind-site/pull/2/commits/f56cd7118bdf75119ef7cababec9435ef0509812.
This looks good. I'll get this into the next release.
hmmm, despite updating the @types.ts
file for this change, it seems like im getting an error when trying to specify the baseURL in a Config
object.
Did I do something wrong? i'm using the latest version (2.1.0
) from npm
Hey there, I haven't pushed a full release yet, only the develop one on the @next tag. I'll be pushing a regular release later this week, but there are a few more features I want to get added first.
I didn't see any documentation for this behavior and it seemed easy enough to add.
The Airtable API docs say that API calls are limited to 5 requests per base per second with a 30 second cooldown if you violate it. The docs suggest setting up a caching proxy to get around this, which would require changing the baseURL that API calls are made against.
This PR adds a
baseURL
option to theConfig
object passed into the AsyncAirtable constructor to override the default baseURL value.