Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Offsets/more than 100 rows #26

Open
davidwillmore opened this issue Dec 18, 2020 · 3 comments
Open

Offsets/more than 100 rows #26

davidwillmore opened this issue Dec 18, 2020 · 3 comments
Labels
enhancement New feature or request

Comments

@davidwillmore
Copy link

Is there any way for AirtableKit to handle Airtable data sources with more than 100 rows? Airtable returns on "offset" to fetch the next page of records if the data source has more than 100 rows, but this seems to be ignored and only the first 100 rows are ever fetched.

@rafaelruwer
Copy link
Collaborator

Hi David!

AirtableKit still has no support for pagination. I'll add it to the roadmap, but feel free to submit a pull request implementing this 😄

@rafaelruwer rafaelruwer added the enhancement New feature or request label Dec 23, 2020
@joshbotts
Copy link

joshbotts commented Feb 1, 2021

i have made an initial effort to add capability to receive paginated results from Airtable using a offset storage delegate, but I cannot submit a pull request (i don't have permission). here is a forked repo: https://github.com/joshbotts/AirtableKit

  • added OffsetDelegate class to store string value of offset received from Airtable. Shared instance allows offset property to be set by ResponseDecoder objects and read by the AirtableKit object.
  • modified ResponseDecoder class to use the OffsetDelegate and to modify its stored offset value whenever the decodeRecords method detects an offset in paginated responses from the Airtable API
  • modified AirtableKit class to use the OffsetDelegate and
  • created a new listAllRecords method that calls an initial performRequest to determine if an offset value is present (and, if so, captures it in the delegate), creates an array of URLRequests for paginated API calls until the offset is no longer present, and then aggregates the results of those requests into a single return value

i am new to swift and have never tried to do unit tests, so there is no testing coverage - sorry!

@mron
Copy link

mron commented Jul 16, 2021

I have a version working. It also lets you specify a view to use.
https://github.com/mron/AirtableKit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants