yoanbernabeu / Airtable-Client-Bundle

Simple Client for Airtable API
MIT License
33 stars 12 forks source link

Adding the possibility to hold fields data in a custom class #1

Closed liorchamla closed 3 years ago

liorchamla commented 3 years ago

This PR holds 2 main changes :

1) The rows returned by AirTable are now represented as AirtableRecord objects, to improve autocompletion and DX. When there are many rows (findAll, findBy), we will now receive an array of AirtableRecord objects. If the methods returns only one row (findOneBy, findTheLatest, findById), the result is an AirtableRecord instance.

2) All the methods have now the capacity to receive a DataClass name : if a data class is given, the fields inside the AirtableRecord are denormalized and represented as an instance of the data class !

liorchamla commented 3 years ago

Some of the problems have been fixed :)