airtable2 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,506 @@
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::Client
8
+
9
+ &mdash; 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::Client";
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 (C)</a> &raquo;
40
+ <span class='title'><span class='object_link'><a href="../Airtable.html" title="Airtable (module)">Airtable</a></span></span>
41
+ &raquo;
42
+ <span class="title">Client</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::Client
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::Client</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/client.rb</dd>
100
+ </dl>
101
+
102
+ </div>
103
+
104
+ <h2>Overview</h2><div class="docstring">
105
+ <div class="discussion">
106
+
107
+ <p>Client carrying authorization token</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="public ">
136
+ <span class="summary_signature">
137
+
138
+ <a href="#base-instance_method" title="#base (instance method)">#<strong>base</strong>(base_id) &#x21d2; Airtable::Base </a>
139
+
140
+
141
+
142
+ </span>
143
+
144
+
145
+
146
+
147
+
148
+
149
+
150
+
151
+
152
+ <span class="summary_desc"><div class='inline'>
153
+ <p>Instantiate base.</p>
154
+ </div></span>
155
+
156
+ </li>
157
+
158
+
159
+ <li class="public ">
160
+ <span class="summary_signature">
161
+
162
+ <a href="#bases-instance_method" title="#bases (instance method)">#<strong>bases</strong> &#x21d2; Array </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>&lt;Airtable::Base&gt;.</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) &#x21d2; Client </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 Client.</p>
204
+ </div></span>
205
+
206
+ </li>
207
+
208
+
209
+ <li class="public ">
210
+ <span class="summary_signature">
211
+
212
+ <a href="#whoami-instance_method" title="#whoami (instance method)">#<strong>whoami</strong> &#x21d2; Hash </a>
213
+
214
+
215
+
216
+ </span>
217
+
218
+
219
+
220
+
221
+
222
+
223
+
224
+
225
+
226
+ <span class="summary_desc"><div class='inline'></div></span>
227
+
228
+ </li>
229
+
230
+
231
+ </ul>
232
+
233
+
234
+
235
+
236
+
237
+
238
+
239
+
240
+
241
+
242
+
243
+ <h3 class="inherited">Methods inherited from <span class='object_link'><a href="Resource.html" title="Airtable::Resource (class)">Resource</a></span></h3>
244
+ <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>
245
+
246
+ <div id="constructor_details" class="method_details_list">
247
+ <h2>Constructor Details</h2>
248
+
249
+ <div class="method_details first">
250
+ <h3 class="signature first" id="initialize-instance_method">
251
+
252
+ #<strong>initialize</strong>(token) &#x21d2; <tt><span class='object_link'><a href="" title="Airtable::Client (class)">Client</a></span></tt>
253
+
254
+
255
+
256
+
257
+
258
+ </h3><div class="docstring">
259
+ <div class="discussion">
260
+
261
+ <p>Returns a new instance of Client.</p>
262
+
263
+
264
+ </div>
265
+ </div>
266
+ <div class="tags">
267
+
268
+
269
+ </div><table class="source_code">
270
+ <tr>
271
+ <td>
272
+ <pre class="lines">
273
+
274
+
275
+ 5
276
+ 6
277
+ 7
278
+ 8</pre>
279
+ </td>
280
+ <td>
281
+ <pre class="code"><span class="info file"># File 'lib/airtable/client.rb', line 5</span>
282
+
283
+ <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='rparen'>)</span>
284
+ <span class='ivar'>@token</span> <span class='op'>=</span> <span class='id identifier rubyid_token'>token</span>
285
+ <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'>&#39;</span><span class='tstring_content'>Authorization</span><span class='label_end'>&#39;:</span> <span class='tstring'><span class='tstring_beg'>&quot;</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'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Content-Type</span><span class='label_end'>&#39;:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>application/json</span><span class='tstring_end'>&#39;</span></span> <span class='rbrace'>}</span><span class='rparen'>)</span>
286
+ <span class='kw'>end</span></pre>
287
+ </td>
288
+ </tr>
289
+ </table>
290
+ </div>
291
+
292
+ </div>
293
+
294
+
295
+ <div id="instance_method_details" class="method_details_list">
296
+ <h2>Instance Method Details</h2>
297
+
298
+
299
+ <div class="method_details first">
300
+ <h3 class="signature first" id="base-instance_method">
301
+
302
+ #<strong>base</strong>(base_id) &#x21d2; <tt><span class='object_link'><a href="Base.html" title="Airtable::Base (class)">Airtable::Base</a></span></tt>
303
+
304
+
305
+
306
+
307
+
308
+ </h3><div class="docstring">
309
+ <div class="discussion">
310
+
311
+ <p>Instantiate base</p>
312
+
313
+
314
+ </div>
315
+ </div>
316
+ <div class="tags">
317
+
318
+ <p class="tag_title">Returns:</p>
319
+ <ul class="return">
320
+
321
+ <li>
322
+
323
+
324
+ <span class='type'>(<tt><span class='object_link'><a href="Base.html" title="Airtable::Base (class)">Airtable::Base</a></span></tt>)</span>
325
+
326
+
327
+
328
+ </li>
329
+
330
+ </ul>
331
+
332
+ </div><table class="source_code">
333
+ <tr>
334
+ <td>
335
+ <pre class="lines">
336
+
337
+
338
+ 30
339
+ 31
340
+ 32</pre>
341
+ </td>
342
+ <td>
343
+ <pre class="code"><span class="info file"># File 'lib/airtable/client.rb', line 30</span>
344
+
345
+ <span class='kw'>def</span> <span class='id identifier rubyid_base'>base</span><span class='lparen'>(</span><span class='id identifier rubyid_base_id'>base_id</span><span class='rparen'>)</span>
346
+ <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="Base.html" title="Airtable::Base (class)">Base</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="Base.html#initialize-instance_method" title="Airtable::Base#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='ivar'>@token</span><span class='comma'>,</span> <span class='id identifier rubyid_base_id'>base_id</span><span class='rparen'>)</span>
347
+ <span class='kw'>end</span></pre>
348
+ </td>
349
+ </tr>
350
+ </table>
351
+ </div>
352
+
353
+ <div class="method_details ">
354
+ <h3 class="signature " id="bases-instance_method">
355
+
356
+ #<strong>bases</strong> &#x21d2; <tt>Array</tt>
357
+
358
+
359
+
360
+
361
+
362
+ </h3><div class="docstring">
363
+ <div class="discussion">
364
+
365
+ <p>Returns &lt;Airtable::Base&gt;.</p>
366
+
367
+
368
+ </div>
369
+ </div>
370
+ <div class="tags">
371
+
372
+ <p class="tag_title">Returns:</p>
373
+ <ul class="return">
374
+
375
+ <li>
376
+
377
+
378
+ <span class='type'>(<tt>Array</tt>)</span>
379
+
380
+
381
+
382
+ &mdash;
383
+ <div class='inline'>
384
+ <p>&lt;Airtable::Base&gt;</p>
385
+ </div>
386
+
387
+ </li>
388
+
389
+ </ul>
390
+
391
+ <p class="tag_title">See Also:</p>
392
+ <ul class="see">
393
+
394
+ <li><a href="https://airtable.com/developers/web/api/list-bases" target="_parent" title="https://airtable.com/developers/web/api/list-bases">https://airtable.com/developers/web/api/list-bases</a></li>
395
+
396
+ </ul>
397
+
398
+ </div><table class="source_code">
399
+ <tr>
400
+ <td>
401
+ <pre class="lines">
402
+
403
+
404
+ 12
405
+ 13
406
+ 14
407
+ 15
408
+ 16
409
+ 17
410
+ 18</pre>
411
+ </td>
412
+ <td>
413
+ <pre class="code"><span class="info file"># File 'lib/airtable/client.rb', line 12</span>
414
+
415
+ <span class='kw'>def</span> <span class='id identifier rubyid_bases'>bases</span>
416
+ <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'>&#39;</span><span class='tstring_content'>/v0/meta/bases</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_parsed_response'>parsed_response</span>
417
+
418
+ <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>
419
+
420
+ <span class='id identifier rubyid_response'>response</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>bases</span><span class='tstring_end'>&#39;</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="Base.html" title="Airtable::Base (class)">Base</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="Base.html#initialize-instance_method" title="Airtable::Base#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='ivar'>@token</span><span class='comma'>,</span> <span class='id identifier rubyid__1'>_1</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>id</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='rparen'>)</span> <span class='rbrace'>}</span>
421
+ <span class='kw'>end</span></pre>
422
+ </td>
423
+ </tr>
424
+ </table>
425
+ </div>
426
+
427
+ <div class="method_details ">
428
+ <h3 class="signature " id="whoami-instance_method">
429
+
430
+ #<strong>whoami</strong> &#x21d2; <tt>Hash</tt>
431
+
432
+
433
+
434
+
435
+
436
+ </h3><div class="docstring">
437
+ <div class="discussion">
438
+
439
+
440
+ </div>
441
+ </div>
442
+ <div class="tags">
443
+
444
+ <p class="tag_title">Returns:</p>
445
+ <ul class="return">
446
+
447
+ <li>
448
+
449
+
450
+ <span class='type'>(<tt>Hash</tt>)</span>
451
+
452
+
453
+
454
+ </li>
455
+
456
+ </ul>
457
+
458
+ <p class="tag_title">See Also:</p>
459
+ <ul class="see">
460
+
461
+ <li><a href="https://airtable.com/developers/web/api/get-user-id-scopes" target="_parent" title="https://airtable.com/developers/web/api/get-user-id-scopes">https://airtable.com/developers/web/api/get-user-id-scopes</a></li>
462
+
463
+ </ul>
464
+
465
+ </div><table class="source_code">
466
+ <tr>
467
+ <td>
468
+ <pre class="lines">
469
+
470
+
471
+ 36
472
+ 37
473
+ 38
474
+ 39
475
+ 40
476
+ 41
477
+ 42</pre>
478
+ </td>
479
+ <td>
480
+ <pre class="code"><span class="info file"># File 'lib/airtable/client.rb', line 36</span>
481
+
482
+ <span class='kw'>def</span> <span class='id identifier rubyid_whoami'>whoami</span>
483
+ <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'>&#39;</span><span class='tstring_content'>/v0/meta/whoami</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_parsed_response'>parsed_response</span>
484
+
485
+ <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>
486
+
487
+ <span class='id identifier rubyid_response'>response</span>
488
+ <span class='kw'>end</span></pre>
489
+ </td>
490
+ </tr>
491
+ </table>
492
+ </div>
493
+
494
+ </div>
495
+
496
+ </div>
497
+
498
+ <div id="footer">
499
+ Generated on Fri Oct 25 21:49:53 2024 by
500
+ <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
501
+ 0.9.37 (ruby-3.3.5).
502
+ </div>
503
+
504
+ </div>
505
+ </body>
506
+ </html>