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

How to retrieve values from list method? #31

Open
pradeepb28 opened this issue Aug 9, 2021 · 2 comments
Open

How to retrieve values from list method? #31

pradeepb28 opened this issue Aug 9, 2021 · 2 comments

Comments

@pradeepb28
Copy link

I kind of struck on how to retrieve values from list method

let publisher = airtable.list(tableName: "Test table")

Any help is appreciated. Thank u!

@clearlynow
Copy link

I am also confused on how to retrieve a list of records.

In the example project, there is only one record retrieved.

/// Updates local state using the provided Record
/// - Parameter record: The record from which to get the data
   private func update(with record: AirtableKit.Record) {
       self.record = record
       self.state.name = record.name ?? ""
       self.state.age = record.age ?? 0
       self.state.isCool = record.isCool ?? false
       self.state.createdTime = record.createdTime ?? Date()
       self.state.updatedTime = record.updatedTime ?? Date()
       self.state.imageUrl = record.attachments["image"]?.first?.url ?? URL(string: AppState.placeholderStringUrl)!

If the example table contained multiple records, how would you retrieve the entire table and update the local state as an array of records so you could list all of the data?

@Wheels00
Copy link

This is also my question

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

No branches or pull requests

3 participants