airtable2 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.yardopts +5 -0
- data/README.md +8 -2
- data/airtable.gemspec +1 -0
- data/docs/Airtable/Base.html +575 -0
- data/docs/Airtable/Client.html +506 -0
- data/docs/Airtable/Error.html +375 -0
- data/docs/Airtable/Record.html +327 -0
- data/docs/Airtable/Resource.html +451 -0
- data/docs/Airtable/Table.html +907 -0
- data/docs/Airtable.html +142 -0
- data/docs/_index.html +189 -0
- data/docs/class_list.html +54 -0
- data/docs/css/common.css +1 -0
- data/docs/css/full_list.css +58 -0
- data/docs/css/style.css +503 -0
- data/docs/file.README.html +169 -0
- data/docs/file_list.html +59 -0
- data/docs/frames.html +22 -0
- data/docs/index.html +169 -0
- data/docs/js/app.js +344 -0
- data/docs/js/full_list.js +242 -0
- data/docs/js/jquery.js +4 -0
- data/docs/method_list.html +270 -0
- data/docs/top-level-namespace.html +110 -0
- data/lib/airtable/base.rb +11 -0
- data/lib/airtable/client.rb +32 -1
- data/lib/airtable/resource.rb +1 -0
- data/lib/airtable/table.rb +16 -1
- data/lib/airtable/version.rb +1 -1
- metadata +37 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0fb935ffab4d6e71ec8d1d5b2dc3d333e8e594694efa066cdfb5b9cc2bc127c6
|
4
|
+
data.tar.gz: 5df0a4d75e41a62e7e37083ebe86a8a907424bdc07b85415fd3322ee97c31564
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c685dbee77e83356da763e04a4d21cd9045f590790fa1a07a3311fffa5e57f35a46c6ccad9a48763dcf42a6b056ab71421ff8303853f8e50f12e08ea6b03ed50
|
7
|
+
data.tar.gz: 2a4ca8fc25b2dd248c36f5256ce3c7d57d087ada7048aa41276b20e7deb058e79e60800bcd30b71fe421dfe149fa28038b6240f3f078163c0a0367ef2ca4a0d7
|
data/.yardopts
ADDED
data/README.md
CHANGED
@@ -41,14 +41,20 @@ and its tables
|
|
41
41
|
@tables = @base.tables
|
42
42
|
```
|
43
43
|
|
44
|
-
and
|
44
|
+
and a table's records, so you can navigate the has_many chain the way God intended:
|
45
45
|
|
46
46
|
```ruby
|
47
|
-
@
|
47
|
+
@client.bases.first.tables.first.records.first
|
48
48
|
```
|
49
49
|
|
50
50
|
### Manipulating Tables
|
51
51
|
|
52
|
+
Create a new table with:
|
53
|
+
|
54
|
+
```ruby
|
55
|
+
@table = @base.create_table({ name: 'Names', description: 'A list of names', fields: [{ name: 'name', type: 'singleLineText' }] })
|
56
|
+
```
|
57
|
+
|
52
58
|
You can update at a table's metadata with the `update` method:
|
53
59
|
|
54
60
|
```ruby
|
data/airtable.gemspec
CHANGED
@@ -31,5 +31,6 @@ Gem::Specification.new do |spec|
|
|
31
31
|
spec.add_development_dependency 'rubocop-minitest'
|
32
32
|
spec.add_development_dependency 'rubocop-performance'
|
33
33
|
spec.add_development_dependency 'webmock'
|
34
|
+
spec.add_development_dependency 'yard'
|
34
35
|
spec.metadata['rubygems_mfa_required'] = 'true'
|
35
36
|
end
|
@@ -0,0 +1,575 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6
|
+
<title>
|
7
|
+
Class: Airtable::Base
|
8
|
+
|
9
|
+
— Documentation by YARD 0.9.37
|
10
|
+
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="../css/style.css" type="text/css" />
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="../css/common.css" type="text/css" />
|
16
|
+
|
17
|
+
<script type="text/javascript">
|
18
|
+
pathId = "Airtable::Base";
|
19
|
+
relpath = '../';
|
20
|
+
</script>
|
21
|
+
|
22
|
+
|
23
|
+
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
24
|
+
|
25
|
+
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
|
26
|
+
|
27
|
+
|
28
|
+
</head>
|
29
|
+
<body>
|
30
|
+
<div class="nav_wrap">
|
31
|
+
<iframe id="nav" src="../class_list.html?1"></iframe>
|
32
|
+
<div id="resizer"></div>
|
33
|
+
</div>
|
34
|
+
|
35
|
+
<div id="main" tabindex="-1">
|
36
|
+
<div id="header">
|
37
|
+
<div id="menu">
|
38
|
+
|
39
|
+
<a href="../_index.html">Index (B)</a> »
|
40
|
+
<span class='title'><span class='object_link'><a href="../Airtable.html" title="Airtable (module)">Airtable</a></span></span>
|
41
|
+
»
|
42
|
+
<span class="title">Base</span>
|
43
|
+
|
44
|
+
</div>
|
45
|
+
|
46
|
+
<div id="search">
|
47
|
+
|
48
|
+
<a class="full_list_link" id="class_list_link"
|
49
|
+
href="../class_list.html">
|
50
|
+
|
51
|
+
<svg width="24" height="24">
|
52
|
+
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
53
|
+
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
54
|
+
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
55
|
+
</svg>
|
56
|
+
</a>
|
57
|
+
|
58
|
+
</div>
|
59
|
+
<div class="clear"></div>
|
60
|
+
</div>
|
61
|
+
|
62
|
+
<div id="content"><h1>Class: Airtable::Base
|
63
|
+
|
64
|
+
|
65
|
+
|
66
|
+
</h1>
|
67
|
+
<div class="box_info">
|
68
|
+
|
69
|
+
<dl>
|
70
|
+
<dt>Inherits:</dt>
|
71
|
+
<dd>
|
72
|
+
<span class="inheritName"><span class='object_link'><a href="Resource.html" title="Airtable::Resource (class)">Resource</a></span></span>
|
73
|
+
|
74
|
+
<ul class="fullTree">
|
75
|
+
<li>Object</li>
|
76
|
+
|
77
|
+
<li class="next"><span class='object_link'><a href="Resource.html" title="Airtable::Resource (class)">Resource</a></span></li>
|
78
|
+
|
79
|
+
<li class="next">Airtable::Base</li>
|
80
|
+
|
81
|
+
</ul>
|
82
|
+
<a href="#" class="inheritanceTree">show all</a>
|
83
|
+
|
84
|
+
</dd>
|
85
|
+
</dl>
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
<dl>
|
98
|
+
<dt>Defined in:</dt>
|
99
|
+
<dd>lib/airtable/base.rb</dd>
|
100
|
+
</dl>
|
101
|
+
|
102
|
+
</div>
|
103
|
+
|
104
|
+
<h2>Overview</h2><div class="docstring">
|
105
|
+
<div class="discussion">
|
106
|
+
|
107
|
+
<p>Object corresponding to an Airtable Base</p>
|
108
|
+
|
109
|
+
|
110
|
+
</div>
|
111
|
+
</div>
|
112
|
+
<div class="tags">
|
113
|
+
|
114
|
+
|
115
|
+
</div>
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
<h2>Instance Attribute Summary</h2>
|
122
|
+
|
123
|
+
<h3 class="inherited">Attributes inherited from <span class='object_link'><a href="Resource.html" title="Airtable::Resource (class)">Resource</a></span></h3>
|
124
|
+
<p class="inherited"><span class='object_link'><a href="Resource.html#id-instance_method" title="Airtable::Resource#id (method)">#id</a></span>, <span class='object_link'><a href="Resource.html#token-instance_method" title="Airtable::Resource#token (method)">#token</a></span></p>
|
125
|
+
|
126
|
+
|
127
|
+
|
128
|
+
<h2>
|
129
|
+
Instance Method Summary
|
130
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
131
|
+
</h2>
|
132
|
+
|
133
|
+
<ul class="summary">
|
134
|
+
|
135
|
+
<li class="protected ">
|
136
|
+
<span class="summary_signature">
|
137
|
+
|
138
|
+
<a href="#base_url-instance_method" title="#base_url (instance method)">#<strong>base_url</strong> ⇒ Object </a>
|
139
|
+
|
140
|
+
|
141
|
+
|
142
|
+
</span>
|
143
|
+
|
144
|
+
|
145
|
+
|
146
|
+
<span class="note title protected">protected</span>
|
147
|
+
|
148
|
+
|
149
|
+
|
150
|
+
|
151
|
+
|
152
|
+
<span class="summary_desc"><div class='inline'>
|
153
|
+
<p>Instantiate table in base.</p>
|
154
|
+
</div></span>
|
155
|
+
|
156
|
+
</li>
|
157
|
+
|
158
|
+
|
159
|
+
<li class="public ">
|
160
|
+
<span class="summary_signature">
|
161
|
+
|
162
|
+
<a href="#create_table-instance_method" title="#create_table (instance method)">#<strong>create_table</strong>(table_data) ⇒ Airtable::Table </a>
|
163
|
+
|
164
|
+
|
165
|
+
|
166
|
+
</span>
|
167
|
+
|
168
|
+
|
169
|
+
|
170
|
+
|
171
|
+
|
172
|
+
|
173
|
+
|
174
|
+
|
175
|
+
|
176
|
+
<span class="summary_desc"><div class='inline'>
|
177
|
+
<p>Expects name:,description:,fields:[].</p>
|
178
|
+
</div></span>
|
179
|
+
|
180
|
+
</li>
|
181
|
+
|
182
|
+
|
183
|
+
<li class="public ">
|
184
|
+
<span class="summary_signature">
|
185
|
+
|
186
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(token, id) ⇒ Base </a>
|
187
|
+
|
188
|
+
|
189
|
+
|
190
|
+
</span>
|
191
|
+
|
192
|
+
|
193
|
+
<span class="note title constructor">constructor</span>
|
194
|
+
|
195
|
+
|
196
|
+
|
197
|
+
|
198
|
+
|
199
|
+
|
200
|
+
|
201
|
+
|
202
|
+
<span class="summary_desc"><div class='inline'>
|
203
|
+
<p>A new instance of Base.</p>
|
204
|
+
</div></span>
|
205
|
+
|
206
|
+
</li>
|
207
|
+
|
208
|
+
|
209
|
+
<li class="public ">
|
210
|
+
<span class="summary_signature">
|
211
|
+
|
212
|
+
<a href="#table-instance_method" title="#table (instance method)">#<strong>table</strong>(table_id) ⇒ Airtable::Table </a>
|
213
|
+
|
214
|
+
|
215
|
+
|
216
|
+
</span>
|
217
|
+
|
218
|
+
|
219
|
+
|
220
|
+
|
221
|
+
|
222
|
+
|
223
|
+
|
224
|
+
|
225
|
+
|
226
|
+
<span class="summary_desc"><div class='inline'>
|
227
|
+
<p>Instantiate table in base.</p>
|
228
|
+
</div></span>
|
229
|
+
|
230
|
+
</li>
|
231
|
+
|
232
|
+
|
233
|
+
<li class="public ">
|
234
|
+
<span class="summary_signature">
|
235
|
+
|
236
|
+
<a href="#tables-instance_method" title="#tables (instance method)">#<strong>tables</strong> ⇒ Array </a>
|
237
|
+
|
238
|
+
|
239
|
+
|
240
|
+
</span>
|
241
|
+
|
242
|
+
|
243
|
+
|
244
|
+
|
245
|
+
|
246
|
+
|
247
|
+
|
248
|
+
|
249
|
+
|
250
|
+
<span class="summary_desc"><div class='inline'>
|
251
|
+
<p><Airtable::Table>.</p>
|
252
|
+
</div></span>
|
253
|
+
|
254
|
+
</li>
|
255
|
+
|
256
|
+
|
257
|
+
</ul>
|
258
|
+
|
259
|
+
|
260
|
+
|
261
|
+
|
262
|
+
|
263
|
+
|
264
|
+
|
265
|
+
|
266
|
+
|
267
|
+
|
268
|
+
|
269
|
+
<h3 class="inherited">Methods inherited from <span class='object_link'><a href="Resource.html" title="Airtable::Resource (class)">Resource</a></span></h3>
|
270
|
+
<p class="inherited"><span class='object_link'><a href="Resource.html#check_and_raise_error-instance_method" title="Airtable::Resource#check_and_raise_error (method)">#check_and_raise_error</a></span></p>
|
271
|
+
|
272
|
+
<div id="constructor_details" class="method_details_list">
|
273
|
+
<h2>Constructor Details</h2>
|
274
|
+
|
275
|
+
<div class="method_details first">
|
276
|
+
<h3 class="signature first" id="initialize-instance_method">
|
277
|
+
|
278
|
+
#<strong>initialize</strong>(token, id) ⇒ <tt><span class='object_link'><a href="" title="Airtable::Base (class)">Base</a></span></tt>
|
279
|
+
|
280
|
+
|
281
|
+
|
282
|
+
|
283
|
+
|
284
|
+
</h3><div class="docstring">
|
285
|
+
<div class="discussion">
|
286
|
+
|
287
|
+
<p>Returns a new instance of Base.</p>
|
288
|
+
|
289
|
+
|
290
|
+
</div>
|
291
|
+
</div>
|
292
|
+
<div class="tags">
|
293
|
+
|
294
|
+
|
295
|
+
</div><table class="source_code">
|
296
|
+
<tr>
|
297
|
+
<td>
|
298
|
+
<pre class="lines">
|
299
|
+
|
300
|
+
|
301
|
+
5
|
302
|
+
6
|
303
|
+
7
|
304
|
+
8
|
305
|
+
9</pre>
|
306
|
+
</td>
|
307
|
+
<td>
|
308
|
+
<pre class="code"><span class="info file"># File 'lib/airtable/base.rb', line 5</span>
|
309
|
+
|
310
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_token'>token</span><span class='comma'>,</span> <span class='id identifier rubyid_id'>id</span><span class='rparen'>)</span>
|
311
|
+
<span class='ivar'>@token</span> <span class='op'>=</span> <span class='id identifier rubyid_token'>token</span>
|
312
|
+
<span class='ivar'>@id</span> <span class='op'>=</span> <span class='id identifier rubyid_id'>id</span>
|
313
|
+
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_headers'>headers</span><span class='lparen'>(</span><span class='lbrace'>{</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Authorization</span><span class='label_end'>':</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Bearer </span><span class='embexpr_beg'>#{</span><span class='ivar'>@token</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Content-Type</span><span class='label_end'>':</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>application/json</span><span class='tstring_end'>'</span></span> <span class='rbrace'>}</span><span class='rparen'>)</span>
|
314
|
+
<span class='kw'>end</span></pre>
|
315
|
+
</td>
|
316
|
+
</tr>
|
317
|
+
</table>
|
318
|
+
</div>
|
319
|
+
|
320
|
+
</div>
|
321
|
+
|
322
|
+
|
323
|
+
<div id="instance_method_details" class="method_details_list">
|
324
|
+
<h2>Instance Method Details</h2>
|
325
|
+
|
326
|
+
|
327
|
+
<div class="method_details first">
|
328
|
+
<h3 class="signature first" id="base_url-instance_method">
|
329
|
+
|
330
|
+
#<strong>base_url</strong> ⇒ <tt>Object</tt> <span class="extras">(protected)</span>
|
331
|
+
|
332
|
+
|
333
|
+
|
334
|
+
|
335
|
+
|
336
|
+
</h3><div class="docstring">
|
337
|
+
<div class="discussion">
|
338
|
+
|
339
|
+
<p>Instantiate table in base</p>
|
340
|
+
|
341
|
+
|
342
|
+
</div>
|
343
|
+
</div>
|
344
|
+
<div class="tags">
|
345
|
+
|
346
|
+
|
347
|
+
</div><table class="source_code">
|
348
|
+
<tr>
|
349
|
+
<td>
|
350
|
+
<pre class="lines">
|
351
|
+
|
352
|
+
|
353
|
+
42</pre>
|
354
|
+
</td>
|
355
|
+
<td>
|
356
|
+
<pre class="code"><span class="info file"># File 'lib/airtable/base.rb', line 42</span>
|
357
|
+
|
358
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_base_url'>base_url</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>/v0/meta/bases/</span><span class='embexpr_beg'>#{</span><span class='ivar'>@id</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span></pre>
|
359
|
+
</td>
|
360
|
+
</tr>
|
361
|
+
</table>
|
362
|
+
</div>
|
363
|
+
|
364
|
+
<div class="method_details ">
|
365
|
+
<h3 class="signature " id="create_table-instance_method">
|
366
|
+
|
367
|
+
#<strong>create_table</strong>(table_data) ⇒ <tt><span class='object_link'><a href="Table.html" title="Airtable::Table (class)">Airtable::Table</a></span></tt>
|
368
|
+
|
369
|
+
|
370
|
+
|
371
|
+
|
372
|
+
|
373
|
+
</h3><div class="docstring">
|
374
|
+
<div class="discussion">
|
375
|
+
|
376
|
+
<p>Expects name:,description:,fields:[]</p>
|
377
|
+
|
378
|
+
|
379
|
+
</div>
|
380
|
+
</div>
|
381
|
+
<div class="tags">
|
382
|
+
|
383
|
+
<p class="tag_title">Returns:</p>
|
384
|
+
<ul class="return">
|
385
|
+
|
386
|
+
<li>
|
387
|
+
|
388
|
+
|
389
|
+
<span class='type'>(<tt><span class='object_link'><a href="Table.html" title="Airtable::Table (class)">Airtable::Table</a></span></tt>)</span>
|
390
|
+
|
391
|
+
|
392
|
+
|
393
|
+
</li>
|
394
|
+
|
395
|
+
</ul>
|
396
|
+
|
397
|
+
<p class="tag_title">See Also:</p>
|
398
|
+
<ul class="see">
|
399
|
+
|
400
|
+
<li><a href="https://airtable.com/developers/web/api/create-table" target="_parent" title="https://airtable.com/developers/web/api/create-table">https://airtable.com/developers/web/api/create-table</a></li>
|
401
|
+
|
402
|
+
</ul>
|
403
|
+
|
404
|
+
</div><table class="source_code">
|
405
|
+
<tr>
|
406
|
+
<td>
|
407
|
+
<pre class="lines">
|
408
|
+
|
409
|
+
|
410
|
+
14
|
411
|
+
15
|
412
|
+
16
|
413
|
+
17
|
414
|
+
18
|
415
|
+
19
|
416
|
+
20
|
417
|
+
21</pre>
|
418
|
+
</td>
|
419
|
+
<td>
|
420
|
+
<pre class="code"><span class="info file"># File 'lib/airtable/base.rb', line 14</span>
|
421
|
+
|
422
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_create_table'>create_table</span><span class='lparen'>(</span><span class='id identifier rubyid_table_data'>table_data</span><span class='rparen'>)</span>
|
423
|
+
<span class='id identifier rubyid_response'>response</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_post'>post</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_base_url'>base_url</span><span class='embexpr_end'>}</span><span class='tstring_content'>/tables</span><span class='tstring_end'>"</span></span><span class='comma'>,</span>
|
424
|
+
<span class='label'>body:</span> <span class='id identifier rubyid_table_data'>table_data</span><span class='period'>.</span><span class='id identifier rubyid_to_json'>to_json</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_parsed_response'>parsed_response</span>
|
425
|
+
|
426
|
+
<span class='id identifier rubyid_check_and_raise_error'>check_and_raise_error</span><span class='lparen'>(</span><span class='id identifier rubyid_response'>response</span><span class='rparen'>)</span>
|
427
|
+
|
428
|
+
<span class='const'><span class='object_link'><a href="../Airtable.html" title="Airtable (module)">Airtable</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Table.html" title="Airtable::Table (class)">Table</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="Table.html#initialize-instance_method" title="Airtable::Table#initialize (method)">new</a></span></span> <span class='ivar'>@token</span><span class='comma'>,</span> <span class='ivar'>@id</span><span class='comma'>,</span> <span class='id identifier rubyid_response'>response</span>
|
429
|
+
<span class='kw'>end</span></pre>
|
430
|
+
</td>
|
431
|
+
</tr>
|
432
|
+
</table>
|
433
|
+
</div>
|
434
|
+
|
435
|
+
<div class="method_details ">
|
436
|
+
<h3 class="signature " id="table-instance_method">
|
437
|
+
|
438
|
+
#<strong>table</strong>(table_id) ⇒ <tt><span class='object_link'><a href="Table.html" title="Airtable::Table (class)">Airtable::Table</a></span></tt>
|
439
|
+
|
440
|
+
|
441
|
+
|
442
|
+
|
443
|
+
|
444
|
+
</h3><div class="docstring">
|
445
|
+
<div class="discussion">
|
446
|
+
|
447
|
+
<p>Instantiate table in base</p>
|
448
|
+
|
449
|
+
|
450
|
+
</div>
|
451
|
+
</div>
|
452
|
+
<div class="tags">
|
453
|
+
|
454
|
+
<p class="tag_title">Returns:</p>
|
455
|
+
<ul class="return">
|
456
|
+
|
457
|
+
<li>
|
458
|
+
|
459
|
+
|
460
|
+
<span class='type'>(<tt><span class='object_link'><a href="Table.html" title="Airtable::Table (class)">Airtable::Table</a></span></tt>)</span>
|
461
|
+
|
462
|
+
|
463
|
+
|
464
|
+
</li>
|
465
|
+
|
466
|
+
</ul>
|
467
|
+
|
468
|
+
</div><table class="source_code">
|
469
|
+
<tr>
|
470
|
+
<td>
|
471
|
+
<pre class="lines">
|
472
|
+
|
473
|
+
|
474
|
+
35
|
475
|
+
36
|
476
|
+
37</pre>
|
477
|
+
</td>
|
478
|
+
<td>
|
479
|
+
<pre class="code"><span class="info file"># File 'lib/airtable/base.rb', line 35</span>
|
480
|
+
|
481
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_table'>table</span><span class='lparen'>(</span><span class='id identifier rubyid_table_id'>table_id</span><span class='rparen'>)</span>
|
482
|
+
<span class='const'><span class='object_link'><a href="../Airtable.html" title="Airtable (module)">Airtable</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Table.html" title="Airtable::Table (class)">Table</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="Table.html#initialize-instance_method" title="Airtable::Table#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='ivar'>@token</span><span class='comma'>,</span> <span class='ivar'>@id</span><span class='comma'>,</span> <span class='id identifier rubyid_table_id'>table_id</span><span class='rparen'>)</span>
|
483
|
+
<span class='kw'>end</span></pre>
|
484
|
+
</td>
|
485
|
+
</tr>
|
486
|
+
</table>
|
487
|
+
</div>
|
488
|
+
|
489
|
+
<div class="method_details ">
|
490
|
+
<h3 class="signature " id="tables-instance_method">
|
491
|
+
|
492
|
+
#<strong>tables</strong> ⇒ <tt>Array</tt>
|
493
|
+
|
494
|
+
|
495
|
+
|
496
|
+
|
497
|
+
|
498
|
+
</h3><div class="docstring">
|
499
|
+
<div class="discussion">
|
500
|
+
|
501
|
+
<p>Returns <Airtable::Table>.</p>
|
502
|
+
|
503
|
+
|
504
|
+
</div>
|
505
|
+
</div>
|
506
|
+
<div class="tags">
|
507
|
+
|
508
|
+
<p class="tag_title">Returns:</p>
|
509
|
+
<ul class="return">
|
510
|
+
|
511
|
+
<li>
|
512
|
+
|
513
|
+
|
514
|
+
<span class='type'>(<tt>Array</tt>)</span>
|
515
|
+
|
516
|
+
|
517
|
+
|
518
|
+
—
|
519
|
+
<div class='inline'>
|
520
|
+
<p><Airtable::Table></p>
|
521
|
+
</div>
|
522
|
+
|
523
|
+
</li>
|
524
|
+
|
525
|
+
</ul>
|
526
|
+
|
527
|
+
<p class="tag_title">See Also:</p>
|
528
|
+
<ul class="see">
|
529
|
+
|
530
|
+
<li><a href="https://airtable.com/developers/web/api/get-base-schema" target="_parent" title="https://airtable.com/developers/web/api/get-base-schema">https://airtable.com/developers/web/api/get-base-schema</a></li>
|
531
|
+
|
532
|
+
</ul>
|
533
|
+
|
534
|
+
</div><table class="source_code">
|
535
|
+
<tr>
|
536
|
+
<td>
|
537
|
+
<pre class="lines">
|
538
|
+
|
539
|
+
|
540
|
+
25
|
541
|
+
26
|
542
|
+
27
|
543
|
+
28
|
544
|
+
29
|
545
|
+
30
|
546
|
+
31</pre>
|
547
|
+
</td>
|
548
|
+
<td>
|
549
|
+
<pre class="code"><span class="info file"># File 'lib/airtable/base.rb', line 25</span>
|
550
|
+
|
551
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_tables'>tables</span>
|
552
|
+
<span class='id identifier rubyid_response'>response</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_get'>get</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_base_url'>base_url</span><span class='embexpr_end'>}</span><span class='tstring_content'>/tables</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
553
|
+
|
554
|
+
<span class='id identifier rubyid_check_and_raise_error'>check_and_raise_error</span><span class='lparen'>(</span><span class='id identifier rubyid_response'>response</span><span class='rparen'>)</span>
|
555
|
+
|
556
|
+
<span class='id identifier rubyid_response'>response</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>tables</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='lbrace'>{</span> <span class='const'><span class='object_link'><a href="../Airtable.html" title="Airtable (module)">Airtable</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Table.html" title="Airtable::Table (class)">Table</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="Table.html#initialize-instance_method" title="Airtable::Table#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='ivar'>@token</span><span class='comma'>,</span> <span class='ivar'>@id</span><span class='comma'>,</span> <span class='id identifier rubyid__1'>_1</span><span class='rparen'>)</span> <span class='rbrace'>}</span>
|
557
|
+
<span class='kw'>end</span></pre>
|
558
|
+
</td>
|
559
|
+
</tr>
|
560
|
+
</table>
|
561
|
+
</div>
|
562
|
+
|
563
|
+
</div>
|
564
|
+
|
565
|
+
</div>
|
566
|
+
|
567
|
+
<div id="footer">
|
568
|
+
Generated on Fri Oct 25 21:49:52 2024 by
|
569
|
+
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
570
|
+
0.9.37 (ruby-3.3.5).
|
571
|
+
</div>
|
572
|
+
|
573
|
+
</div>
|
574
|
+
</body>
|
575
|
+
</html>
|