fabioberger / airtable-go Goto Github PK
View Code? Open in Web Editor NEWGolang client library for the Airtable API
License: MIT License
Golang client library for the Airtable API
License: MIT License
If you are experiencing issues where records have some fields with incorrect values it likely because of a bug in ListRecords when process requests with multiple pages. Basically the tmpRecords list is not fully cleared when making multiple requests.
There are several fixes. You can simply use this forked branch if you are looking for something quick:
First off, thanks for writing this API and open-sourcing it.
I was wondering if it makes sense to allow the transport of the HTTP client used by theimplementation to be parameterized.
This allows for:
RoundTrip()
correctly. IMO, this covers the testing use-case in a more idiomatic way than having to expose custom methods in the public interface used only for testing.Let me know if this makes sense and I'll be happy to send a PR.
Hello,
I'm reaching out to address a compatibility issue with the airtable-go library in relation to the latest changes in Airtable's API key format. Airtable has updated their API keys to a new format, which includes a longer length and the use of additional characters such as "." (dot). This change impacts the airtable-go library's ability to validate API keys using the current implementation found in client.go.
Issue Description:
The library currently validates API keys with a fixed length of 17 characters and expects them to start with a specific prefix ("key"). This validation is performed by the IsValidAPIKey function in the utils package. However, with Airtable's recent update to their API key format, this validation logic no longer accommodates the new key specifications, potentially leading to valid API keys being incorrectly flagged as invalid.
func isValidAirtableID(id, expectedPrefix string) bool {
regex := regexp.MustCompile("[a-zA-Z0-9]{17}")
return len(id) == 17 && strings.HasPrefix(id, expectedPrefix) && regex.Match([]byte(id))
}
Suggested Actions:
Impact of Issue:
Without these adjustments, users of the airtable-go library who had to migrate to or are using the new Airtable API keys may encounter errors or be unable to use the library to interact with Airtable, hindering the library's applicability and usefulness.
We greatly appreciate the work you've put into developing and maintaining the airtable-go library. Addressing this issue will not only enhance its functionality but also ensure its compatibility with Airtable's evolving platform.
Thank you for considering this request. I'm looking forward to your thoughts on this matter and am happy to contribute to testing or further discussions if helpful.
Best regards
Pascal Rossi
If I pass a []Row
, where Row is:
type Row struct {
AirtableID string `json:"id,omitempty"`
Fields map[string]interface{} `json:"fields"`
}
I end up having data cross the row boundary. If I switch it to an []interface{}
or remove the optimization of it only creating tempRecordsHolder
once, I get the correct behavior.
I've read the json.Unmarshal doc and agree it sounds like it shouldn't be re-using any values, but it looks like it is.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.