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.
Files changed (89) hide show
  1. checksums.yaml +7 -0
  2. data/.codecov.yml +52 -0
  3. data/.github/CODEOWNERS +28 -0
  4. data/.github/ISSUE_TEMPLATE/bug_report.md +40 -0
  5. data/.github/ISSUE_TEMPLATE/feature_request.md +28 -0
  6. data/.github/dependabot.yml +54 -0
  7. data/.github/pull_request_template.md +40 -0
  8. data/.github/workflows/ci.yml +112 -0
  9. data/.github/workflows/dependabot-auto-merge.yml +45 -0
  10. data/.github/workflows/pr_checks.yml +145 -0
  11. data/.github/workflows/release.yml +147 -0
  12. data/.gitignore +10 -0
  13. data/.rspec +4 -0
  14. data/.rubocop.yml +133 -0
  15. data/.yardopts +18 -0
  16. data/CHANGELOG.md +34 -0
  17. data/CODE_OF_CONDUCT.md +37 -0
  18. data/CONTRIBUTING.md +280 -0
  19. data/Gemfile +17 -0
  20. data/Gemfile.lock +127 -0
  21. data/LICENSE.txt +21 -0
  22. data/README.md +292 -0
  23. data/Rakefile +57 -0
  24. data/SECURITY.md +59 -0
  25. data/attio.gemspec +34 -0
  26. data/bin/console +14 -0
  27. data/bin/setup +8 -0
  28. data/danger/Dangerfile +121 -0
  29. data/docs/.nojekyll +0 -0
  30. data/docs/Attio/AuthenticationError.html +152 -0
  31. data/docs/Attio/Client.html +1373 -0
  32. data/docs/Attio/ConnectionPool/TimeoutError.html +148 -0
  33. data/docs/Attio/ConnectionPool.html +944 -0
  34. data/docs/Attio/Error.html +152 -0
  35. data/docs/Attio/HttpClient/ConnectionError.html +152 -0
  36. data/docs/Attio/HttpClient/TimeoutError.html +152 -0
  37. data/docs/Attio/HttpClient.html +1329 -0
  38. data/docs/Attio/Logger.html +747 -0
  39. data/docs/Attio/NotFoundError.html +152 -0
  40. data/docs/Attio/RateLimitError.html +152 -0
  41. data/docs/Attio/RequestLogger.html +780 -0
  42. data/docs/Attio/Resources/Attributes.html +508 -0
  43. data/docs/Attio/Resources/Base.html +624 -0
  44. data/docs/Attio/Resources/Lists.html +1002 -0
  45. data/docs/Attio/Resources/Objects.html +415 -0
  46. data/docs/Attio/Resources/Records.html +1465 -0
  47. data/docs/Attio/Resources/Users.html +415 -0
  48. data/docs/Attio/Resources/Workspaces.html +324 -0
  49. data/docs/Attio/Resources.html +141 -0
  50. data/docs/Attio/RetryHandler.html +1023 -0
  51. data/docs/Attio/ServerError.html +152 -0
  52. data/docs/Attio/ValidationError.html +152 -0
  53. data/docs/Attio.html +397 -0
  54. data/docs/SETUP.md +117 -0
  55. data/docs/_index.html +378 -0
  56. data/docs/class_list.html +54 -0
  57. data/docs/css/common.css +1 -0
  58. data/docs/css/full_list.css +58 -0
  59. data/docs/css/style.css +503 -0
  60. data/docs/example.rb +119 -0
  61. data/docs/file.CHANGELOG.html +124 -0
  62. data/docs/file.README.html +371 -0
  63. data/docs/file_list.html +64 -0
  64. data/docs/frames.html +22 -0
  65. data/docs/index.html +371 -0
  66. data/docs/js/app.js +344 -0
  67. data/docs/js/full_list.js +242 -0
  68. data/docs/js/jquery.js +4 -0
  69. data/docs/method_list.html +750 -0
  70. data/docs/top-level-namespace.html +110 -0
  71. data/lib/attio/client.rb +118 -0
  72. data/lib/attio/connection_pool.rb +69 -0
  73. data/lib/attio/errors.rb +9 -0
  74. data/lib/attio/http_client.rb +100 -0
  75. data/lib/attio/logger.rb +110 -0
  76. data/lib/attio/resources/attributes.rb +26 -0
  77. data/lib/attio/resources/base.rb +55 -0
  78. data/lib/attio/resources/lists.rb +56 -0
  79. data/lib/attio/resources/objects.rb +20 -0
  80. data/lib/attio/resources/records.rb +158 -0
  81. data/lib/attio/resources/users.rb +20 -0
  82. data/lib/attio/resources/workspaces.rb +13 -0
  83. data/lib/attio/retry_handler.rb +70 -0
  84. data/lib/attio/version.rb +3 -0
  85. data/lib/attio.rb +60 -0
  86. data/run_tests.rb +52 -0
  87. data/test_basic.rb +51 -0
  88. data/test_typhoeus.rb +31 -0
  89. metadata +160 -0
@@ -0,0 +1,503 @@
1
+ html {
2
+ width: 100%;
3
+ height: 100%;
4
+ }
5
+ body {
6
+ font-family: "Lucida Sans", "Lucida Grande", Verdana, Arial, sans-serif;
7
+ font-size: 13px;
8
+ width: 100%;
9
+ margin: 0;
10
+ padding: 0;
11
+ display: flex;
12
+ display: -webkit-flex;
13
+ display: -ms-flexbox;
14
+ }
15
+
16
+ #nav {
17
+ position: relative;
18
+ width: 100%;
19
+ height: 100%;
20
+ border: 0;
21
+ border-right: 1px dotted #eee;
22
+ overflow: auto;
23
+ }
24
+ .nav_wrap {
25
+ margin: 0;
26
+ padding: 0;
27
+ width: 20%;
28
+ height: 100%;
29
+ position: relative;
30
+ display: flex;
31
+ display: -webkit-flex;
32
+ display: -ms-flexbox;
33
+ flex-shrink: 0;
34
+ -webkit-flex-shrink: 0;
35
+ -ms-flex: 1 0;
36
+ }
37
+ #resizer {
38
+ position: absolute;
39
+ right: -5px;
40
+ top: 0;
41
+ width: 10px;
42
+ height: 100%;
43
+ cursor: col-resize;
44
+ z-index: 9999;
45
+ }
46
+ #main {
47
+ flex: 5 1;
48
+ -webkit-flex: 5 1;
49
+ -ms-flex: 5 1;
50
+ outline: none;
51
+ position: relative;
52
+ background: #fff;
53
+ padding: 1.2em;
54
+ padding-top: 0.2em;
55
+ box-sizing: border-box;
56
+ }
57
+
58
+ @media (max-width: 920px) {
59
+ .nav_wrap { width: 100%; top: 0; right: 0; overflow: visible; position: absolute; }
60
+ #resizer { display: none; }
61
+ #nav {
62
+ z-index: 9999;
63
+ background: #fff;
64
+ display: none;
65
+ position: absolute;
66
+ top: 40px;
67
+ right: 12px;
68
+ width: 500px;
69
+ max-width: 80%;
70
+ height: 80%;
71
+ overflow-y: scroll;
72
+ border: 1px solid #999;
73
+ border-collapse: collapse;
74
+ box-shadow: -7px 5px 25px #aaa;
75
+ border-radius: 2px;
76
+ }
77
+ }
78
+
79
+ @media (min-width: 920px) {
80
+ body { height: 100%; overflow: hidden; }
81
+ #main { height: 100%; overflow: auto; }
82
+ #search { display: none; }
83
+ }
84
+
85
+ @media (max-width: 320px) {
86
+ body { height: 100%; overflow: hidden; overflow-wrap: break-word; }
87
+ #main { height: 100%; overflow: auto; }
88
+ }
89
+
90
+ #main img { max-width: 100%; }
91
+ h1 { font-size: 25px; margin: 1em 0 0.5em; padding-top: 4px; border-top: 1px dotted #d5d5d5; }
92
+ h1.noborder { border-top: 0px; margin-top: 0; padding-top: 4px; }
93
+ h1.title { margin-bottom: 10px; }
94
+ h1.alphaindex { margin-top: 0; font-size: 22px; }
95
+ h2 {
96
+ padding: 0;
97
+ padding-bottom: 3px;
98
+ border-bottom: 1px #aaa solid;
99
+ font-size: 1.4em;
100
+ margin: 1.8em 0 0.5em;
101
+ position: relative;
102
+ }
103
+ h2 small { font-weight: normal; font-size: 0.7em; display: inline; position: absolute; right: 0; }
104
+ h2 small a {
105
+ display: block;
106
+ height: 20px;
107
+ border: 1px solid #aaa;
108
+ border-bottom: 0;
109
+ border-top-left-radius: 5px;
110
+ background: #f8f8f8;
111
+ position: relative;
112
+ padding: 2px 7px;
113
+ }
114
+ a { font-weight: 550; }
115
+ .clear { clear: both; }
116
+ .inline { display: inline; }
117
+ .inline p:first-child { display: inline; }
118
+ .docstring, .tags, #filecontents { font-size: 15px; line-height: 1.5145em; }
119
+ .docstring p > code, .docstring p > tt, .tags p > code, .tags p > tt {
120
+ color: #c7254e; background: #f9f2f4; padding: 2px 4px; font-size: 1em;
121
+ border-radius: 4px;
122
+ }
123
+ .docstring h1, .docstring h2, .docstring h3, .docstring h4 { padding: 0; border: 0; border-bottom: 1px dotted #bbb; }
124
+ .docstring h1 { font-size: 1.2em; }
125
+ .docstring h2 { font-size: 1.1em; }
126
+ .docstring h3, .docstring h4 { font-size: 1em; border-bottom: 0; padding-top: 10px; }
127
+ .summary_desc .object_link a, .docstring .object_link a {
128
+ font-family: monospace; font-size: 1.05em;
129
+ color: #05a; background: #EDF4FA; padding: 2px 4px; font-size: 1em;
130
+ border-radius: 4px;
131
+ }
132
+ .rdoc-term { padding-right: 25px; font-weight: bold; }
133
+ .rdoc-list p { margin: 0; padding: 0; margin-bottom: 4px; }
134
+ .summary_desc pre.code .object_link a, .docstring pre.code .object_link a {
135
+ padding: 0px; background: inherit; color: inherit; border-radius: inherit;
136
+ }
137
+
138
+ /* style for <table> */
139
+ #filecontents table, .docstring table { border-collapse: collapse; }
140
+ #filecontents table th, #filecontents table td,
141
+ .docstring table th, .docstring table td { border: 1px solid #ccc; padding: 8px; padding-right: 17px; }
142
+ #filecontents table tr:nth-child(odd),
143
+ .docstring table tr:nth-child(odd) { background: #eee; }
144
+ #filecontents table tr:nth-child(even),
145
+ .docstring table tr:nth-child(even) { background: #fff; }
146
+ #filecontents table th, .docstring table th { background: #fff; }
147
+
148
+ /* style for <ul> */
149
+ #filecontents li > p, .docstring li > p { margin: 0px; }
150
+ #filecontents ul, .docstring ul { padding-left: 20px; }
151
+ /* style for <dl> */
152
+ #filecontents dl, .docstring dl { border: 1px solid #ccc; }
153
+ #filecontents dt, .docstring dt { background: #ddd; font-weight: bold; padding: 3px 5px; }
154
+ #filecontents dd, .docstring dd { padding: 5px 0px; margin-left: 18px; }
155
+ #filecontents dd > p, .docstring dd > p { margin: 0px; }
156
+
157
+ .note {
158
+ color: #222;
159
+ margin: 20px 0;
160
+ padding: 10px;
161
+ border: 1px solid #eee;
162
+ border-radius: 3px;
163
+ display: block;
164
+ }
165
+ .docstring .note {
166
+ border-left-color: #ccc;
167
+ border-left-width: 5px;
168
+ }
169
+ .note.todo { background: #ffffc5; border-color: #ececaa; }
170
+ .note.returns_void { background: #efefef; }
171
+ .note.deprecated { background: #ffe5e5; border-color: #e9dada; }
172
+ .note.title.deprecated { background: #ffe5e5; border-color: #e9dada; }
173
+ .note.private { background: #ffffc5; border-color: #ececaa; }
174
+ .note.title { padding: 3px 6px; font-size: 0.9em; font-family: "Lucida Sans", "Lucida Grande", Verdana, Arial, sans-serif; display: inline; }
175
+ .summary_signature + .note.title { margin-left: 7px; }
176
+ h1 .note.title { font-size: 0.5em; font-weight: normal; padding: 3px 5px; position: relative; top: -3px; text-transform: capitalize; }
177
+ .note.title { background: #efefef; }
178
+ .note.title.constructor { color: #fff; background: #6a98d6; border-color: #6689d6; }
179
+ .note.title.writeonly { color: #fff; background: #45a638; border-color: #2da31d; }
180
+ .note.title.readonly { color: #fff; background: #6a98d6; border-color: #6689d6; }
181
+ .note.title.private { background: #d5d5d5; border-color: #c5c5c5; }
182
+ .note.title.not_defined_here { background: transparent; border: none; font-style: italic; }
183
+ .discussion .note { margin-top: 6px; }
184
+ .discussion .note:first-child { margin-top: 0; }
185
+
186
+ h3.inherited {
187
+ font-style: italic;
188
+ font-family: "Lucida Sans", "Lucida Grande", Verdana, Arial, sans-serif;
189
+ font-weight: normal;
190
+ padding: 0;
191
+ margin: 0;
192
+ margin-top: 12px;
193
+ margin-bottom: 3px;
194
+ font-size: 13px;
195
+ }
196
+ p.inherited {
197
+ padding: 0;
198
+ margin: 0;
199
+ margin-left: 25px;
200
+ }
201
+
202
+ .box_info dl {
203
+ margin: 0;
204
+ border: 0;
205
+ width: 100%;
206
+ font-size: 1em;
207
+ display: flex;
208
+ display: -webkit-flex;
209
+ display: -ms-flexbox;
210
+ }
211
+ .box_info dl dt {
212
+ flex-shrink: 0;
213
+ -webkit-flex-shrink: 1;
214
+ -ms-flex-shrink: 1;
215
+ width: 100px;
216
+ text-align: right;
217
+ font-weight: bold;
218
+ border: 1px solid #aaa;
219
+ border-width: 1px 0px 0px 1px;
220
+ padding: 6px 0;
221
+ padding-right: 10px;
222
+ }
223
+ .box_info dl dd {
224
+ flex-grow: 1;
225
+ -webkit-flex-grow: 1;
226
+ -ms-flex: 1;
227
+ max-width: 420px;
228
+ padding: 6px 0;
229
+ padding-right: 20px;
230
+ border: 1px solid #aaa;
231
+ border-width: 1px 1px 0 0;
232
+ overflow: hidden;
233
+ position: relative;
234
+ }
235
+ .box_info dl:last-child > * {
236
+ border-bottom: 1px solid #aaa;
237
+ }
238
+ .box_info dl:nth-child(odd) > * { background: #eee; }
239
+ .box_info dl:nth-child(even) > * { background: #fff; }
240
+ .box_info dl > * { margin: 0; }
241
+
242
+ ul.toplevel { list-style: none; padding-left: 0; font-size: 1.1em; }
243
+ .index_inline_list { padding-left: 0; font-size: 1.1em; }
244
+
245
+ .index_inline_list li {
246
+ list-style: none;
247
+ display: inline-block;
248
+ padding: 0 12px;
249
+ line-height: 30px;
250
+ margin-bottom: 5px;
251
+ }
252
+
253
+ dl.constants { margin-left: 10px; }
254
+ dl.constants dt { font-weight: bold; font-size: 1.1em; margin-bottom: 5px; }
255
+ dl.constants.compact dt { display: inline-block; font-weight: normal }
256
+ dl.constants dd { width: 75%; white-space: pre; font-family: monospace; margin-bottom: 18px; }
257
+ dl.constants .docstring .note:first-child { margin-top: 5px; }
258
+
259
+ .summary_desc {
260
+ margin-left: 32px;
261
+ display: block;
262
+ font-family: sans-serif;
263
+ font-size: 1.1em;
264
+ margin-top: 8px;
265
+ line-height: 1.5145em;
266
+ margin-bottom: 0.8em;
267
+ }
268
+ .summary_desc tt { font-size: 0.9em; }
269
+ dl.constants .note { padding: 2px 6px; padding-right: 12px; margin-top: 6px; }
270
+ dl.constants .docstring { margin-left: 32px; font-size: 0.9em; font-weight: normal; }
271
+ dl.constants .tags { padding-left: 32px; font-size: 0.9em; line-height: 0.8em; }
272
+ dl.constants .discussion *:first-child { margin-top: 0; }
273
+ dl.constants .discussion *:last-child { margin-bottom: 0; }
274
+
275
+ .method_details { border-top: 1px dotted #ccc; margin-top: 25px; padding-top: 0; }
276
+ .method_details.first { border: 0; margin-top: 5px; }
277
+ .method_details.first h3.signature { margin-top: 1em; }
278
+ p.signature, h3.signature {
279
+ font-size: 1.1em; font-weight: normal; font-family: Monaco, Consolas, Courier, monospace;
280
+ padding: 6px 10px; margin-top: 1em;
281
+ background: #E8F4FF; border: 1px solid #d8d8e5; border-radius: 5px;
282
+ }
283
+ p.signature tt,
284
+ h3.signature tt { font-family: Monaco, Consolas, Courier, monospace; }
285
+ p.signature .overload,
286
+ h3.signature .overload { display: block; }
287
+ p.signature .extras,
288
+ h3.signature .extras { font-weight: normal; font-family: sans-serif; color: #444; font-size: 1em; }
289
+ p.signature .not_defined_here,
290
+ h3.signature .not_defined_here,
291
+ p.signature .aliases,
292
+ h3.signature .aliases { display: block; font-weight: normal; font-size: 0.9em; font-family: sans-serif; margin-top: 0px; color: #555; }
293
+ p.signature .aliases .names,
294
+ h3.signature .aliases .names { font-family: Monaco, Consolas, Courier, monospace; font-weight: bold; color: #000; font-size: 1.2em; }
295
+
296
+ .tags .tag_title { font-size: 1.05em; margin-bottom: 0; font-weight: bold; }
297
+ .tags .tag_title tt { color: initial; padding: initial; background: initial; }
298
+ .tags ul { margin-top: 5px; padding-left: 30px; list-style: square; }
299
+ .tags ul li { margin-bottom: 3px; }
300
+ .tags ul .name { font-family: monospace; font-weight: bold; }
301
+ .tags ul .note { padding: 3px 6px; }
302
+ .tags { margin-bottom: 12px; }
303
+
304
+ .tags .examples .tag_title { margin-bottom: 10px; font-weight: bold; }
305
+ .tags .examples .inline p { padding: 0; margin: 0; font-weight: bold; font-size: 1em; }
306
+ .tags .examples .inline p:before { content: "▸"; font-size: 1em; margin-right: 5px; }
307
+
308
+ .tags .overload .overload_item { list-style: none; margin-bottom: 25px; }
309
+ .tags .overload .overload_item .signature {
310
+ padding: 2px 8px;
311
+ background: #F1F8FF; border: 1px solid #d8d8e5; border-radius: 3px;
312
+ }
313
+ .tags .overload .signature { margin-left: -15px; font-family: monospace; display: block; font-size: 1.1em; }
314
+ .tags .overload .docstring { margin-top: 15px; }
315
+
316
+ .defines { display: none; }
317
+
318
+ #method_missing_details .notice.this { position: relative; top: -8px; color: #888; padding: 0; margin: 0; }
319
+
320
+ .showSource { font-size: 0.9em; }
321
+ .showSource a, .showSource a:visited { text-decoration: none; color: #666; }
322
+
323
+ #content a, #content a:visited { text-decoration: none; color: #05a; }
324
+ #content a:hover { background: #ffffa5; }
325
+
326
+ ul.summary {
327
+ list-style: none;
328
+ font-family: monospace;
329
+ font-size: 1em;
330
+ line-height: 1.5em;
331
+ padding-left: 0px;
332
+ }
333
+ ul.summary a, ul.summary a:visited {
334
+ text-decoration: none; font-size: 1.1em;
335
+ }
336
+ ul.summary li { margin-bottom: 5px; }
337
+ .summary_signature { padding: 4px 8px; background: #f8f8f8; border: 1px solid #f0f0f0; border-radius: 5px; }
338
+ .summary_signature:hover { background: #CFEBFF; border-color: #A4CCDA; cursor: pointer; }
339
+ .summary_signature.deprecated { background: #ffe5e5; border-color: #e9dada; }
340
+ ul.summary.compact li { display: inline-block; margin: 0px 5px 0px 0px; line-height: 2.6em;}
341
+ ul.summary.compact .summary_signature { padding: 5px 7px; padding-right: 4px; }
342
+ #content .summary_signature:hover a,
343
+ #content .summary_signature:hover a:visited {
344
+ background: transparent;
345
+ color: #049;
346
+ }
347
+
348
+ p.inherited a { font-family: monospace; font-size: 0.9em; }
349
+ p.inherited { word-spacing: 5px; font-size: 1.2em; }
350
+
351
+ p.children { font-size: 1.2em; }
352
+ p.children a { font-size: 0.9em; }
353
+ p.children strong { font-size: 0.8em; }
354
+ p.children strong.modules { padding-left: 5px; }
355
+
356
+ ul.fullTree { display: none; padding-left: 0; list-style: none; margin-left: 0; margin-bottom: 10px; }
357
+ ul.fullTree ul { margin-left: 0; padding-left: 0; list-style: none; }
358
+ ul.fullTree li { text-align: center; padding-top: 18px; padding-bottom: 12px; background: url(data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEe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3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAgY0hSTQAAeiUAAICDAAD5/wAAgOkAAHUwAADqYAAAOpgAABdvkl/FRgAAAHtJREFUeNqMzrEJAkEURdGzuhgZbSoYWcAWoBVsB4JgZAGmphsZCZYzTQgWNCYrDN9RvMmHx+X916SUBFbo8CzD1idXrLErw1mQttgXtyrOcQ/Ny5p4Qh+2XqLYYazsPWNTiuMkRxa4vcV+evuNAUOLIx5+c2hyzv7hNQC67Q+/HHmlEwAAAABJRU5ErkJggg==) no-repeat top center; }
359
+ ul.fullTree li:first-child { padding-top: 0; background: transparent; }
360
+ ul.fullTree li:last-child { padding-bottom: 0; }
361
+ .showAll ul.fullTree { display: block; }
362
+ .showAll .inheritName { display: none; }
363
+
364
+ #search { position: absolute; right: 12px; top: 0px; z-index: 9000; }
365
+ #search a {
366
+ display: block; float: left;
367
+ padding: 4px 8px; text-decoration: none; color: #05a; fill: #05a;
368
+ border: 1px solid #d8d8e5;
369
+ border-bottom-left-radius: 3px; border-bottom-right-radius: 3px;
370
+ background: #F1F8FF;
371
+ box-shadow: -1px 1px 3px #ddd;
372
+ }
373
+ #search a:hover { background: #f5faff; color: #06b; fill: #06b; }
374
+ #search a.active {
375
+ background: #568; padding-bottom: 20px; color: #fff; fill: #fff;
376
+ border: 1px solid #457;
377
+ border-top-left-radius: 5px; border-top-right-radius: 5px;
378
+ }
379
+ #search a.inactive { color: #999; fill: #999; }
380
+ .inheritanceTree, .toggleDefines {
381
+ float: right;
382
+ border-left: 1px solid #aaa;
383
+ position: absolute; top: 0; right: 0;
384
+ height: 100%;
385
+ background: #f6f6f6;
386
+ padding: 5px;
387
+ min-width: 55px;
388
+ text-align: center;
389
+ }
390
+
391
+ #menu { font-size: 1.3em; color: #bbb; }
392
+ #menu .title, #menu a { font-size: 0.7em; }
393
+ #menu .title a { font-size: 1em; }
394
+ #menu .title { color: #555; }
395
+ #menu a, #menu a:visited { color: #333; text-decoration: none; border-bottom: 1px dotted #bbd; }
396
+ #menu a:hover { color: #05a; }
397
+
398
+ #footer { margin-top: 15px; border-top: 1px solid #ccc; text-align: center; padding: 7px 0; color: #999; }
399
+ #footer a, #footer a:visited { color: #444; text-decoration: none; border-bottom: 1px dotted #bbd; }
400
+ #footer a:hover { color: #05a; }
401
+
402
+ #listing ul.alpha { font-size: 1.1em; }
403
+ #listing ul.alpha { margin: 0; padding: 0; padding-bottom: 10px; list-style: none; }
404
+ #listing ul.alpha li.letter { font-size: 1.4em; padding-bottom: 10px; }
405
+ #listing ul.alpha ul { margin: 0; padding-left: 15px; }
406
+ #listing ul small { color: #666; font-size: 0.7em; }
407
+
408
+ li.r1 { background: #f0f0f0; }
409
+ li.r2 { background: #fafafa; }
410
+
411
+ #content ul.summary li.deprecated .summary_signature a,
412
+ #content ul.summary li.deprecated .summary_signature a:visited { text-decoration: line-through; font-style: italic; }
413
+
414
+ #toc {
415
+ position: relative;
416
+ float: right;
417
+ overflow-x: auto;
418
+ right: -3px;
419
+ margin-left: 20px;
420
+ margin-bottom: 20px;
421
+ padding: 20px; padding-right: 30px;
422
+ max-width: 300px;
423
+ z-index: 5000;
424
+ background: #fefefe;
425
+ border: 1px solid #ddd;
426
+ box-shadow: -2px 2px 6px #bbb;
427
+ }
428
+ #toc .title { margin: 0; }
429
+ #toc ol { padding-left: 1.8em; }
430
+ #toc li { font-size: 1.1em; line-height: 1.7em; }
431
+ #toc > ol > li { font-size: 1.1em; font-weight: bold; }
432
+ #toc ol > li > ol { font-size: 0.9em; }
433
+ #toc ol ol > li > ol { padding-left: 2.3em; }
434
+ #toc ol + li { margin-top: 0.3em; }
435
+ #toc.hidden { padding: 10px; background: #fefefe; box-shadow: none; }
436
+ #toc.hidden:hover { background: #fafafa; }
437
+ #filecontents h1 + #toc.nofloat { margin-top: 0; }
438
+ @media (max-width: 560px) {
439
+ #toc {
440
+ margin-left: 0;
441
+ margin-top: 16px;
442
+ float: none;
443
+ max-width: none;
444
+ }
445
+ }
446
+
447
+ /* syntax highlighting */
448
+ .source_code { display: none; padding: 3px 8px; border-left: 8px solid #ddd; margin-top: 5px; }
449
+ #filecontents pre.code, .docstring pre.code, .source_code pre { font-family: monospace; }
450
+ #filecontents pre.code, .docstring pre.code { display: block; }
451
+ .source_code .lines { padding-right: 12px; color: #555; text-align: right; }
452
+ #filecontents pre.code, .docstring pre.code,
453
+ .tags pre.example {
454
+ padding: 9px 14px;
455
+ margin-top: 4px;
456
+ border: 1px solid #e1e1e8;
457
+ background: #f7f7f9;
458
+ border-radius: 4px;
459
+ font-size: 1em;
460
+ overflow-x: auto;
461
+ line-height: 1.2em;
462
+ }
463
+ pre.code { color: #000; tab-size: 2; }
464
+ pre.code .info.file { color: #555; }
465
+ pre.code .val { color: #036A07; }
466
+ pre.code .tstring_content,
467
+ pre.code .heredoc_beg, pre.code .heredoc_end,
468
+ pre.code .qwords_beg, pre.code .qwords_end, pre.code .qwords_sep,
469
+ pre.code .words_beg, pre.code .words_end, pre.code .words_sep,
470
+ pre.code .qsymbols_beg, pre.code .qsymbols_end, pre.code .qsymbols_sep,
471
+ pre.code .symbols_beg, pre.code .symbols_end, pre.code .symbols_sep,
472
+ pre.code .tstring, pre.code .dstring { color: #036A07; }
473
+ pre.code .fid, pre.code .rubyid_new, pre.code .rubyid_to_s,
474
+ pre.code .rubyid_to_sym, pre.code .rubyid_to_f,
475
+ pre.code .dot + pre.code .id,
476
+ pre.code .rubyid_to_i pre.code .rubyid_each { color: #0085FF; }
477
+ pre.code .comment { color: #0066FF; }
478
+ pre.code .const, pre.code .constant { color: #585CF6; }
479
+ pre.code .label,
480
+ pre.code .symbol { color: #C5060B; }
481
+ pre.code .kw,
482
+ pre.code .rubyid_require,
483
+ pre.code .rubyid_extend,
484
+ pre.code .rubyid_include { color: #0000FF; }
485
+ pre.code .ivar { color: #318495; }
486
+ pre.code .gvar,
487
+ pre.code .rubyid_backref,
488
+ pre.code .rubyid_nth_ref { color: #6D79DE; }
489
+ pre.code .regexp, .dregexp { color: #036A07; }
490
+ pre.code a { border-bottom: 1px dotted #bbf; }
491
+ /* inline code */
492
+ *:not(pre) > code {
493
+ padding: 1px 3px 1px 3px;
494
+ border: 1px solid #E1E1E8;
495
+ background: #F7F7F9;
496
+ border-radius: 4px;
497
+ }
498
+
499
+ /* Color fix for links */
500
+ #content .summary_desc pre.code .id > .object_link a, /* identifier */
501
+ #content .docstring pre.code .id > .object_link a { color: #0085FF; }
502
+ #content .summary_desc pre.code .const > .object_link a, /* constant */
503
+ #content .docstring pre.code .const > .object_link a { color: #585CF6; }
data/docs/example.rb ADDED
@@ -0,0 +1,119 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ # Example usage of the Attio Ruby client
4
+ #
5
+ # This file demonstrates common use cases and serves as
6
+ # additional documentation for YARD.
7
+
8
+ require_relative '../lib/attio'
9
+
10
+ # Initialize client with API key
11
+ # In production, use environment variables or secure config
12
+ client = Attio.client(api_key: ENV['ATTIO_API_KEY'] || 'your-api-key-here')
13
+
14
+ # Example 1: Working with People Records
15
+ puts "=== Working with People Records ==="
16
+
17
+ # List people with filters
18
+ people = client.records.list(
19
+ object: 'people',
20
+ filters: {
21
+ name: { contains: 'John' }
22
+ },
23
+ limit: 10
24
+ )
25
+ puts "Found #{people['data'].length} people matching filter"
26
+
27
+ # Create a new person
28
+ new_person = client.records.create(
29
+ object: 'people',
30
+ data: {
31
+ name: 'Jane Doe',
32
+ email: 'jane.doe@example.com',
33
+ phone: '+1-555-0123',
34
+ notes: 'Created via Ruby client example'
35
+ }
36
+ )
37
+ puts "Created person: #{new_person['data']['name']} (ID: #{new_person['data']['id']})"
38
+
39
+ # Get the person we just created
40
+ person = client.records.get(
41
+ object: 'people',
42
+ id: new_person['data']['id']
43
+ )
44
+ puts "Retrieved person: #{person['data']['name']}"
45
+
46
+ # Update the person
47
+ updated_person = client.records.update(
48
+ object: 'people',
49
+ id: person['data']['id'],
50
+ data: {
51
+ name: 'Jane Smith',
52
+ notes: 'Updated name after marriage'
53
+ }
54
+ )
55
+ puts "Updated person name to: #{updated_person['data']['name']}"
56
+
57
+ # Example 2: Working with Companies
58
+ puts "\n=== Working with Company Records ==="
59
+
60
+ # Create a company
61
+ company = client.records.create(
62
+ object: 'companies',
63
+ data: {
64
+ name: 'Acme Corporation',
65
+ domain: 'acme.com',
66
+ industry: 'Technology'
67
+ }
68
+ )
69
+ puts "Created company: #{company['data']['name']}"
70
+
71
+ # Link the person to the company
72
+ client.records.update(
73
+ object: 'people',
74
+ id: person['data']['id'],
75
+ data: {
76
+ company: {
77
+ target_object: 'companies',
78
+ target_record_id: company['data']['id']
79
+ }
80
+ }
81
+ )
82
+ puts "Linked #{person['data']['name']} to #{company['data']['name']}"
83
+
84
+ # Example 3: Working with Other Resources
85
+ puts "\n=== Working with Other Resources ==="
86
+
87
+ # List all object types
88
+ objects = client.objects.list
89
+ puts "Available object types: #{objects['data'].map { |obj| obj['api_slug'] }.join(', ')}"
90
+
91
+ # List workspaces
92
+ workspaces = client.workspaces.list
93
+ puts "Available workspaces: #{workspaces['data'].length}"
94
+
95
+ # Get current user
96
+ current_user = client.users.me
97
+ puts "Current user: #{current_user['data']['name']} (#{current_user['data']['email']})"
98
+
99
+ # Example 4: Error Handling
100
+ puts "\n=== Error Handling Example ==="
101
+
102
+ begin
103
+ # Try to get a non-existent record
104
+ client.records.get(object: 'people', id: 'non-existent-id')
105
+ rescue Attio::NotFoundError => e
106
+ puts "Caught expected error: #{e.message}"
107
+ rescue Attio::APIError => e
108
+ puts "API error: #{e.message}"
109
+ end
110
+
111
+ # Clean up - delete the records we created
112
+ puts "\n=== Cleanup ==="
113
+ client.records.delete(object: 'people', id: person['data']['id'])
114
+ puts "Deleted person record"
115
+
116
+ client.records.delete(object: 'companies', id: company['data']['id'])
117
+ puts "Deleted company record"
118
+
119
+ puts "\nExample completed successfully!"