Class: Airtable::Workspace
- Defined in:
- lib/airtable/workspace.rb
Overview
Object corresponding to an Airtable Workspace
Instance Attribute Summary
Attributes inherited from Resource
Instance Method Summary collapse
- #create_base(base_data) ⇒ Object
-
#initialize(token, id) ⇒ Workspace
constructor
A new instance of Workspace.
Methods inherited from Resource
Constructor Details
#initialize(token, id) ⇒ Workspace
Returns a new instance of Workspace.
5 6 7 8 |
# File 'lib/airtable/workspace.rb', line 5 def initialize(token, id) super(token) @id = id end |
Instance Method Details
#create_base(base_data) ⇒ Object
12 13 14 15 16 17 18 19 |
# File 'lib/airtable/workspace.rb', line 12 def create_base(base_data) response = self.class.post('/v0/meta/bases', body: base_data.merge({ workspaceId: @id }).to_json).parsed_response check_and_raise_error(response) Airtable::Base.new @token, response end |