attio 0.1.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 +7 -0
- data/.codecov.yml +52 -0
- data/.github/CODEOWNERS +28 -0
- data/.github/ISSUE_TEMPLATE/bug_report.md +40 -0
- data/.github/ISSUE_TEMPLATE/feature_request.md +28 -0
- data/.github/dependabot.yml +54 -0
- data/.github/pull_request_template.md +40 -0
- data/.github/workflows/ci.yml +112 -0
- data/.github/workflows/dependabot-auto-merge.yml +45 -0
- data/.github/workflows/pr_checks.yml +145 -0
- data/.github/workflows/release.yml +147 -0
- data/.gitignore +10 -0
- data/.rspec +4 -0
- data/.rubocop.yml +133 -0
- data/.yardopts +18 -0
- data/CHANGELOG.md +34 -0
- data/CODE_OF_CONDUCT.md +37 -0
- data/CONTRIBUTING.md +280 -0
- data/Gemfile +17 -0
- data/Gemfile.lock +127 -0
- data/LICENSE.txt +21 -0
- data/README.md +292 -0
- data/Rakefile +57 -0
- data/SECURITY.md +59 -0
- data/attio.gemspec +34 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/danger/Dangerfile +121 -0
- data/docs/.nojekyll +0 -0
- data/docs/Attio/AuthenticationError.html +152 -0
- data/docs/Attio/Client.html +1373 -0
- data/docs/Attio/ConnectionPool/TimeoutError.html +148 -0
- data/docs/Attio/ConnectionPool.html +944 -0
- data/docs/Attio/Error.html +152 -0
- data/docs/Attio/HttpClient/ConnectionError.html +152 -0
- data/docs/Attio/HttpClient/TimeoutError.html +152 -0
- data/docs/Attio/HttpClient.html +1329 -0
- data/docs/Attio/Logger.html +747 -0
- data/docs/Attio/NotFoundError.html +152 -0
- data/docs/Attio/RateLimitError.html +152 -0
- data/docs/Attio/RequestLogger.html +780 -0
- data/docs/Attio/Resources/Attributes.html +508 -0
- data/docs/Attio/Resources/Base.html +624 -0
- data/docs/Attio/Resources/Lists.html +1002 -0
- data/docs/Attio/Resources/Objects.html +415 -0
- data/docs/Attio/Resources/Records.html +1465 -0
- data/docs/Attio/Resources/Users.html +415 -0
- data/docs/Attio/Resources/Workspaces.html +324 -0
- data/docs/Attio/Resources.html +141 -0
- data/docs/Attio/RetryHandler.html +1023 -0
- data/docs/Attio/ServerError.html +152 -0
- data/docs/Attio/ValidationError.html +152 -0
- data/docs/Attio.html +397 -0
- data/docs/SETUP.md +117 -0
- data/docs/_index.html +378 -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/example.rb +119 -0
- data/docs/file.CHANGELOG.html +124 -0
- data/docs/file.README.html +371 -0
- data/docs/file_list.html +64 -0
- data/docs/frames.html +22 -0
- data/docs/index.html +371 -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 +750 -0
- data/docs/top-level-namespace.html +110 -0
- data/lib/attio/client.rb +118 -0
- data/lib/attio/connection_pool.rb +69 -0
- data/lib/attio/errors.rb +9 -0
- data/lib/attio/http_client.rb +100 -0
- data/lib/attio/logger.rb +110 -0
- data/lib/attio/resources/attributes.rb +26 -0
- data/lib/attio/resources/base.rb +55 -0
- data/lib/attio/resources/lists.rb +56 -0
- data/lib/attio/resources/objects.rb +20 -0
- data/lib/attio/resources/records.rb +158 -0
- data/lib/attio/resources/users.rb +20 -0
- data/lib/attio/resources/workspaces.rb +13 -0
- data/lib/attio/retry_handler.rb +70 -0
- data/lib/attio/version.rb +3 -0
- data/lib/attio.rb +60 -0
- data/run_tests.rb +52 -0
- data/test_basic.rb +51 -0
- data/test_typhoeus.rb +31 -0
- metadata +160 -0
@@ -0,0 +1,624 @@
|
|
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: Attio::Resources::Base
|
8
|
+
|
9
|
+
— Attio Ruby Client Documentation
|
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 = "Attio::Resources::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="../../Attio.html" title="Attio (module)">Attio</a></span></span> » <span class='title'><span class='object_link'><a href="../Resources.html" title="Attio::Resources (module)">Resources</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: Attio::Resources::Base
|
63
|
+
|
64
|
+
|
65
|
+
<span class="private note title">Private</span>
|
66
|
+
</h1>
|
67
|
+
<div class="box_info">
|
68
|
+
|
69
|
+
<dl>
|
70
|
+
<dt>Inherits:</dt>
|
71
|
+
<dd>
|
72
|
+
<span class="inheritName">Object</span>
|
73
|
+
|
74
|
+
<ul class="fullTree">
|
75
|
+
<li>Object</li>
|
76
|
+
|
77
|
+
<li class="next">Attio::Resources::Base</li>
|
78
|
+
|
79
|
+
</ul>
|
80
|
+
<a href="#" class="inheritanceTree">show all</a>
|
81
|
+
|
82
|
+
</dd>
|
83
|
+
</dl>
|
84
|
+
|
85
|
+
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
<dl>
|
96
|
+
<dt>Defined in:</dt>
|
97
|
+
<dd>lib/attio/resources/base.rb</dd>
|
98
|
+
</dl>
|
99
|
+
|
100
|
+
</div>
|
101
|
+
|
102
|
+
<h2>Overview</h2><div class="docstring">
|
103
|
+
<div class="discussion">
|
104
|
+
<p class="note private">
|
105
|
+
<strong>This class is part of a private API.</strong>
|
106
|
+
You should avoid using this class if possible, as it may be removed or be changed in the future.
|
107
|
+
</p>
|
108
|
+
<p>Base class for all API resource classes.</p>
|
109
|
+
|
110
|
+
<p>This class provides common functionality and request handling
|
111
|
+
for all Attio API resource implementations.</p>
|
112
|
+
|
113
|
+
|
114
|
+
</div>
|
115
|
+
</div>
|
116
|
+
<div class="tags">
|
117
|
+
|
118
|
+
<p class="tag_title">Author:</p>
|
119
|
+
<ul class="author">
|
120
|
+
|
121
|
+
<li>
|
122
|
+
|
123
|
+
|
124
|
+
|
125
|
+
|
126
|
+
|
127
|
+
<div class='inline'><p>Ernest Sim</p>
|
128
|
+
</div>
|
129
|
+
|
130
|
+
</li>
|
131
|
+
|
132
|
+
</ul>
|
133
|
+
<p class="tag_title">Since:</p>
|
134
|
+
<ul class="since">
|
135
|
+
|
136
|
+
<li>
|
137
|
+
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
|
142
|
+
<div class='inline'><p>1.0.0</p>
|
143
|
+
</div>
|
144
|
+
|
145
|
+
</li>
|
146
|
+
|
147
|
+
</ul>
|
148
|
+
|
149
|
+
</div><div id="subclasses">
|
150
|
+
<h2>Direct Known Subclasses</h2>
|
151
|
+
<p class="children"><span class='object_link'><a href="Attributes.html" title="Attio::Resources::Attributes (class)">Attributes</a></span>, <span class='object_link'><a href="Lists.html" title="Attio::Resources::Lists (class)">Lists</a></span>, <span class='object_link'><a href="Objects.html" title="Attio::Resources::Objects (class)">Objects</a></span>, <span class='object_link'><a href="Records.html" title="Attio::Resources::Records (class)">Records</a></span>, <span class='object_link'><a href="Users.html" title="Attio::Resources::Users (class)">Users</a></span>, <span class='object_link'><a href="Workspaces.html" title="Attio::Resources::Workspaces (class)">Workspaces</a></span></p>
|
152
|
+
</div>
|
153
|
+
|
154
|
+
|
155
|
+
|
156
|
+
|
157
|
+
<h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
|
158
|
+
<ul class="summary">
|
159
|
+
|
160
|
+
<li class="public ">
|
161
|
+
<span class="summary_signature">
|
162
|
+
|
163
|
+
<a href="#client-instance_method" title="#client (instance method)">#<strong>client</strong> ⇒ Client </a>
|
164
|
+
|
165
|
+
|
166
|
+
|
167
|
+
</span>
|
168
|
+
|
169
|
+
|
170
|
+
|
171
|
+
|
172
|
+
<span class="note title readonly">readonly</span>
|
173
|
+
|
174
|
+
|
175
|
+
|
176
|
+
|
177
|
+
|
178
|
+
|
179
|
+
<span class="private note title">private</span>
|
180
|
+
|
181
|
+
|
182
|
+
<span class="summary_desc"><div class='inline'><p>The API client instance.</p>
|
183
|
+
</div></span>
|
184
|
+
|
185
|
+
</li>
|
186
|
+
|
187
|
+
|
188
|
+
</ul>
|
189
|
+
|
190
|
+
|
191
|
+
|
192
|
+
|
193
|
+
|
194
|
+
<h2>
|
195
|
+
Instance Method Summary
|
196
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
197
|
+
</h2>
|
198
|
+
|
199
|
+
<ul class="summary">
|
200
|
+
|
201
|
+
<li class="public ">
|
202
|
+
<span class="summary_signature">
|
203
|
+
|
204
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(client) ⇒ Base </a>
|
205
|
+
|
206
|
+
|
207
|
+
|
208
|
+
</span>
|
209
|
+
|
210
|
+
|
211
|
+
<span class="note title constructor">constructor</span>
|
212
|
+
|
213
|
+
|
214
|
+
|
215
|
+
|
216
|
+
|
217
|
+
<span class="private note title">private</span>
|
218
|
+
|
219
|
+
|
220
|
+
<span class="summary_desc"><div class='inline'><p>Initialize a new resource instance.</p>
|
221
|
+
</div></span>
|
222
|
+
|
223
|
+
</li>
|
224
|
+
|
225
|
+
|
226
|
+
<li class="private ">
|
227
|
+
<span class="summary_signature">
|
228
|
+
|
229
|
+
<a href="#request-instance_method" title="#request (instance method)">#<strong>request</strong>(method, path, params = {}) ⇒ Hash </a>
|
230
|
+
|
231
|
+
|
232
|
+
|
233
|
+
</span>
|
234
|
+
|
235
|
+
|
236
|
+
|
237
|
+
<span class="note title private">private</span>
|
238
|
+
|
239
|
+
|
240
|
+
<span class="private note title">private</span>
|
241
|
+
|
242
|
+
|
243
|
+
<span class="summary_desc"><div class='inline'><p>Make an HTTP request to the API.</p>
|
244
|
+
</div></span>
|
245
|
+
|
246
|
+
</li>
|
247
|
+
|
248
|
+
|
249
|
+
</ul>
|
250
|
+
|
251
|
+
|
252
|
+
<div id="constructor_details" class="method_details_list">
|
253
|
+
<h2>Constructor Details</h2>
|
254
|
+
|
255
|
+
<div class="method_details first">
|
256
|
+
<h3 class="signature first" id="initialize-instance_method">
|
257
|
+
|
258
|
+
#<strong>initialize</strong>(client) ⇒ <tt><span class='object_link'><a href="" title="Attio::Resources::Base (class)">Base</a></span></tt>
|
259
|
+
|
260
|
+
|
261
|
+
|
262
|
+
|
263
|
+
|
264
|
+
</h3><div class="docstring">
|
265
|
+
<div class="discussion">
|
266
|
+
<p class="note private">
|
267
|
+
<strong>This method is part of a private API.</strong>
|
268
|
+
You should avoid using this method if possible, as it may be removed or be changed in the future.
|
269
|
+
</p>
|
270
|
+
<p>Initialize a new resource instance.</p>
|
271
|
+
|
272
|
+
|
273
|
+
</div>
|
274
|
+
</div>
|
275
|
+
<div class="tags">
|
276
|
+
<p class="tag_title">Parameters:</p>
|
277
|
+
<ul class="param">
|
278
|
+
|
279
|
+
<li>
|
280
|
+
|
281
|
+
<span class='name'>client</span>
|
282
|
+
|
283
|
+
|
284
|
+
<span class='type'>(<tt><span class='object_link'><a href="../Client.html" title="Attio::Client (class)">Client</a></span></tt>)</span>
|
285
|
+
|
286
|
+
|
287
|
+
|
288
|
+
—
|
289
|
+
<div class='inline'><p>The API client instance</p>
|
290
|
+
</div>
|
291
|
+
|
292
|
+
</li>
|
293
|
+
|
294
|
+
</ul>
|
295
|
+
|
296
|
+
<p class="tag_title">Raises:</p>
|
297
|
+
<ul class="raise">
|
298
|
+
|
299
|
+
<li>
|
300
|
+
|
301
|
+
|
302
|
+
<span class='type'>(<tt>ArgumentError</tt>)</span>
|
303
|
+
|
304
|
+
|
305
|
+
|
306
|
+
—
|
307
|
+
<div class='inline'><p>if client is nil</p>
|
308
|
+
</div>
|
309
|
+
|
310
|
+
</li>
|
311
|
+
|
312
|
+
</ul>
|
313
|
+
<p class="tag_title">Since:</p>
|
314
|
+
<ul class="since">
|
315
|
+
|
316
|
+
<li>
|
317
|
+
|
318
|
+
|
319
|
+
|
320
|
+
|
321
|
+
|
322
|
+
<div class='inline'><p>1.0.0</p>
|
323
|
+
</div>
|
324
|
+
|
325
|
+
</li>
|
326
|
+
|
327
|
+
</ul>
|
328
|
+
|
329
|
+
</div><table class="source_code">
|
330
|
+
<tr>
|
331
|
+
<td>
|
332
|
+
<pre class="lines">
|
333
|
+
|
334
|
+
|
335
|
+
19
|
336
|
+
20
|
337
|
+
21
|
338
|
+
22</pre>
|
339
|
+
</td>
|
340
|
+
<td>
|
341
|
+
<pre class="code"><span class="info file"># File 'lib/attio/resources/base.rb', line 19</span>
|
342
|
+
|
343
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_client'>client</span><span class='rparen'>)</span>
|
344
|
+
<span class='id identifier rubyid_raise'>raise</span> <span class='const'>ArgumentError</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Client is required</span><span class='tstring_end'>"</span></span> <span class='kw'>unless</span> <span class='id identifier rubyid_client'>client</span>
|
345
|
+
<span class='ivar'>@client</span> <span class='op'>=</span> <span class='id identifier rubyid_client'>client</span>
|
346
|
+
<span class='kw'>end</span></pre>
|
347
|
+
</td>
|
348
|
+
</tr>
|
349
|
+
</table>
|
350
|
+
</div>
|
351
|
+
|
352
|
+
</div>
|
353
|
+
|
354
|
+
<div id="instance_attr_details" class="attr_details">
|
355
|
+
<h2>Instance Attribute Details</h2>
|
356
|
+
|
357
|
+
|
358
|
+
<span id=""></span>
|
359
|
+
<div class="method_details first">
|
360
|
+
<h3 class="signature first" id="client-instance_method">
|
361
|
+
|
362
|
+
#<strong>client</strong> ⇒ <tt><span class='object_link'><a href="../Client.html" title="Attio::Client (class)">Client</a></span></tt> <span class="extras">(readonly)</span>
|
363
|
+
|
364
|
+
|
365
|
+
|
366
|
+
|
367
|
+
|
368
|
+
</h3><div class="docstring">
|
369
|
+
<div class="discussion">
|
370
|
+
<p class="note private">
|
371
|
+
<strong>This method is part of a private API.</strong>
|
372
|
+
You should avoid using this method if possible, as it may be removed or be changed in the future.
|
373
|
+
</p>
|
374
|
+
<p>Returns The API client instance.</p>
|
375
|
+
|
376
|
+
|
377
|
+
</div>
|
378
|
+
</div>
|
379
|
+
<div class="tags">
|
380
|
+
|
381
|
+
<p class="tag_title">Returns:</p>
|
382
|
+
<ul class="return">
|
383
|
+
|
384
|
+
<li>
|
385
|
+
|
386
|
+
|
387
|
+
<span class='type'>(<tt><span class='object_link'><a href="../Client.html" title="Attio::Client (class)">Client</a></span></tt>)</span>
|
388
|
+
|
389
|
+
|
390
|
+
|
391
|
+
—
|
392
|
+
<div class='inline'><p>The API client instance</p>
|
393
|
+
</div>
|
394
|
+
|
395
|
+
</li>
|
396
|
+
|
397
|
+
</ul>
|
398
|
+
<p class="tag_title">Since:</p>
|
399
|
+
<ul class="since">
|
400
|
+
|
401
|
+
<li>
|
402
|
+
|
403
|
+
|
404
|
+
|
405
|
+
|
406
|
+
|
407
|
+
<div class='inline'><p>1.0.0</p>
|
408
|
+
</div>
|
409
|
+
|
410
|
+
</li>
|
411
|
+
|
412
|
+
</ul>
|
413
|
+
|
414
|
+
</div><table class="source_code">
|
415
|
+
<tr>
|
416
|
+
<td>
|
417
|
+
<pre class="lines">
|
418
|
+
|
419
|
+
|
420
|
+
13
|
421
|
+
14
|
422
|
+
15</pre>
|
423
|
+
</td>
|
424
|
+
<td>
|
425
|
+
<pre class="code"><span class="info file"># File 'lib/attio/resources/base.rb', line 13</span>
|
426
|
+
|
427
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_client'>client</span>
|
428
|
+
<span class='ivar'>@client</span>
|
429
|
+
<span class='kw'>end</span></pre>
|
430
|
+
</td>
|
431
|
+
</tr>
|
432
|
+
</table>
|
433
|
+
</div>
|
434
|
+
|
435
|
+
</div>
|
436
|
+
|
437
|
+
|
438
|
+
<div id="instance_method_details" class="method_details_list">
|
439
|
+
<h2>Instance Method Details</h2>
|
440
|
+
|
441
|
+
|
442
|
+
<div class="method_details first">
|
443
|
+
<h3 class="signature first" id="request-instance_method">
|
444
|
+
|
445
|
+
#<strong>request</strong>(method, path, params = {}) ⇒ <tt>Hash</tt> <span class="extras">(private)</span>
|
446
|
+
|
447
|
+
|
448
|
+
|
449
|
+
|
450
|
+
|
451
|
+
</h3><div class="docstring">
|
452
|
+
<div class="discussion">
|
453
|
+
<p class="note private">
|
454
|
+
<strong>This method is part of a private API.</strong>
|
455
|
+
You should avoid using this method if possible, as it may be removed or be changed in the future.
|
456
|
+
</p>
|
457
|
+
<p>Make an HTTP request to the API.</p>
|
458
|
+
|
459
|
+
|
460
|
+
</div>
|
461
|
+
</div>
|
462
|
+
<div class="tags">
|
463
|
+
<p class="tag_title">Parameters:</p>
|
464
|
+
<ul class="param">
|
465
|
+
|
466
|
+
<li>
|
467
|
+
|
468
|
+
<span class='name'>method</span>
|
469
|
+
|
470
|
+
|
471
|
+
<span class='type'>(<tt>Symbol</tt>)</span>
|
472
|
+
|
473
|
+
|
474
|
+
|
475
|
+
—
|
476
|
+
<div class='inline'><p>The HTTP method (:get, :post, :patch, :put, :delete)</p>
|
477
|
+
</div>
|
478
|
+
|
479
|
+
</li>
|
480
|
+
|
481
|
+
<li>
|
482
|
+
|
483
|
+
<span class='name'>path</span>
|
484
|
+
|
485
|
+
|
486
|
+
<span class='type'>(<tt>String</tt>)</span>
|
487
|
+
|
488
|
+
|
489
|
+
|
490
|
+
—
|
491
|
+
<div class='inline'><p>The API endpoint path</p>
|
492
|
+
</div>
|
493
|
+
|
494
|
+
</li>
|
495
|
+
|
496
|
+
<li>
|
497
|
+
|
498
|
+
<span class='name'>params</span>
|
499
|
+
|
500
|
+
|
501
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
502
|
+
|
503
|
+
|
504
|
+
<em class="default">(defaults to: <tt>{}</tt>)</em>
|
505
|
+
|
506
|
+
|
507
|
+
—
|
508
|
+
<div class='inline'><p>Request parameters (default: {})</p>
|
509
|
+
</div>
|
510
|
+
|
511
|
+
</li>
|
512
|
+
|
513
|
+
</ul>
|
514
|
+
|
515
|
+
<p class="tag_title">Returns:</p>
|
516
|
+
<ul class="return">
|
517
|
+
|
518
|
+
<li>
|
519
|
+
|
520
|
+
|
521
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
522
|
+
|
523
|
+
|
524
|
+
|
525
|
+
—
|
526
|
+
<div class='inline'><p>The API response</p>
|
527
|
+
</div>
|
528
|
+
|
529
|
+
</li>
|
530
|
+
|
531
|
+
</ul>
|
532
|
+
<p class="tag_title">Raises:</p>
|
533
|
+
<ul class="raise">
|
534
|
+
|
535
|
+
<li>
|
536
|
+
|
537
|
+
|
538
|
+
<span class='type'>(<tt>ArgumentError</tt>)</span>
|
539
|
+
|
540
|
+
|
541
|
+
|
542
|
+
—
|
543
|
+
<div class='inline'><p>if method is unsupported</p>
|
544
|
+
</div>
|
545
|
+
|
546
|
+
</li>
|
547
|
+
|
548
|
+
</ul>
|
549
|
+
<p class="tag_title">Since:</p>
|
550
|
+
<ul class="since">
|
551
|
+
|
552
|
+
<li>
|
553
|
+
|
554
|
+
|
555
|
+
|
556
|
+
|
557
|
+
|
558
|
+
<div class='inline'><p>1.0.0</p>
|
559
|
+
</div>
|
560
|
+
|
561
|
+
</li>
|
562
|
+
|
563
|
+
</ul>
|
564
|
+
|
565
|
+
</div><table class="source_code">
|
566
|
+
<tr>
|
567
|
+
<td>
|
568
|
+
<pre class="lines">
|
569
|
+
|
570
|
+
|
571
|
+
36
|
572
|
+
37
|
573
|
+
38
|
574
|
+
39
|
575
|
+
40
|
576
|
+
41
|
577
|
+
42
|
578
|
+
43
|
579
|
+
44
|
580
|
+
45
|
581
|
+
46
|
582
|
+
47
|
583
|
+
48
|
584
|
+
49
|
585
|
+
50
|
586
|
+
51</pre>
|
587
|
+
</td>
|
588
|
+
<td>
|
589
|
+
<pre class="code"><span class="info file"># File 'lib/attio/resources/base.rb', line 36</span>
|
590
|
+
|
591
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_request'>request</span><span class='lparen'>(</span><span class='id identifier rubyid_method'>method</span><span class='comma'>,</span> <span class='id identifier rubyid_path'>path</span><span class='comma'>,</span> <span class='id identifier rubyid_params'>params</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
592
|
+
<span class='kw'>case</span> <span class='id identifier rubyid_method'>method</span>
|
593
|
+
<span class='kw'>when</span> <span class='symbol'>:get</span>
|
594
|
+
<span class='id identifier rubyid_client'>client</span><span class='period'>.</span><span class='id identifier rubyid_connection'>connection</span><span class='period'>.</span><span class='id identifier rubyid_get'>get</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='comma'>,</span> <span class='id identifier rubyid_params'>params</span><span class='rparen'>)</span>
|
595
|
+
<span class='kw'>when</span> <span class='symbol'>:post</span>
|
596
|
+
<span class='id identifier rubyid_client'>client</span><span class='period'>.</span><span class='id identifier rubyid_connection'>connection</span><span class='period'>.</span><span class='id identifier rubyid_post'>post</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='comma'>,</span> <span class='id identifier rubyid_params'>params</span><span class='rparen'>)</span>
|
597
|
+
<span class='kw'>when</span> <span class='symbol'>:patch</span>
|
598
|
+
<span class='id identifier rubyid_client'>client</span><span class='period'>.</span><span class='id identifier rubyid_connection'>connection</span><span class='period'>.</span><span class='id identifier rubyid_patch'>patch</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='comma'>,</span> <span class='id identifier rubyid_params'>params</span><span class='rparen'>)</span>
|
599
|
+
<span class='kw'>when</span> <span class='symbol'>:put</span>
|
600
|
+
<span class='id identifier rubyid_client'>client</span><span class='period'>.</span><span class='id identifier rubyid_connection'>connection</span><span class='period'>.</span><span class='id identifier rubyid_put'>put</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='comma'>,</span> <span class='id identifier rubyid_params'>params</span><span class='rparen'>)</span>
|
601
|
+
<span class='kw'>when</span> <span class='symbol'>:delete</span>
|
602
|
+
<span class='id identifier rubyid_client'>client</span><span class='period'>.</span><span class='id identifier rubyid_connection'>connection</span><span class='period'>.</span><span class='id identifier rubyid_delete'>delete</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='rparen'>)</span>
|
603
|
+
<span class='kw'>else</span>
|
604
|
+
<span class='id identifier rubyid_raise'>raise</span> <span class='const'>ArgumentError</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Unsupported HTTP method: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_method'>method</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span>
|
605
|
+
<span class='kw'>end</span>
|
606
|
+
<span class='kw'>end</span></pre>
|
607
|
+
</td>
|
608
|
+
</tr>
|
609
|
+
</table>
|
610
|
+
</div>
|
611
|
+
|
612
|
+
</div>
|
613
|
+
|
614
|
+
</div>
|
615
|
+
|
616
|
+
<div id="footer">
|
617
|
+
Generated on Mon Aug 11 11:26:43 2025 by
|
618
|
+
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
619
|
+
0.9.37 (ruby-3.4.5).
|
620
|
+
</div>
|
621
|
+
|
622
|
+
</div>
|
623
|
+
</body>
|
624
|
+
</html>
|