Open chrisfrank opened 5 years ago
The ad-hoc API already lets you do this:
Tea = Airrecord.table("api_key", "app_key", "Teas")
Should we change it, you think?
No, you're right. It should follow the existing format, which more closely mimics the node syntax anyway.
@base = Airrecord.base("api_key", "app_key") #=> <Airrecord::Base>
@base.table("Tea") #=> <Anonymous Airrecord::Table @api_key="api_key" @app_key="app_key">
Coffee = Airrecord.table("api_key", "some_other_app_key", "Coffee")
Airrecord.base
would make it a bit more convenient to instantiate many tables from the same base with the same credentials. And Airrecord.table
should remain available as a convenient way of accessing tables from different bases, etc.
Sounds good to me. This wouldn't be a breaking change, so we can do this in 1.1.
Airtable's node client lets you quickly instantiate a
base
and interact with its tables. We can do likewise.Node reference:
Proposed ruby style: