echochamber 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (122) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +4 -0
  3. data/.rspec +2 -0
  4. data/Gemfile +3 -0
  5. data/Gemfile.lock +79 -0
  6. data/LICENSE +21 -0
  7. data/LICENSE.txt +22 -0
  8. data/README.md +87 -0
  9. data/Rakefile +12 -0
  10. data/doc/Echochamber.html +131 -0
  11. data/doc/Echochamber/Agreement.html +529 -0
  12. data/doc/Echochamber/Agreement/UrlFileInfo.html +263 -0
  13. data/doc/Echochamber/Client.html +4161 -0
  14. data/doc/Echochamber/CounterSignerInfo.html +265 -0
  15. data/doc/Echochamber/Credentials.html +330 -0
  16. data/doc/Echochamber/Credentials/CredentialsError.html +123 -0
  17. data/doc/Echochamber/Fileinfo.html +303 -0
  18. data/doc/Echochamber/InvalidParameterError.html +123 -0
  19. data/doc/Echochamber/ParameterError.html +123 -0
  20. data/doc/Echochamber/PhoneInfo.html +279 -0
  21. data/doc/Echochamber/Recipient.html +309 -0
  22. data/doc/Echochamber/RecipientSecurityOption.html +294 -0
  23. data/doc/Echochamber/Reminder.html +277 -0
  24. data/doc/Echochamber/Request.html +4167 -0
  25. data/doc/Echochamber/Request/Failure.html +123 -0
  26. data/doc/Echochamber/RequiredParameterError.html +123 -0
  27. data/doc/Echochamber/UrlFileInfo.html +295 -0
  28. data/doc/Echochamber/User.html +420 -0
  29. data/doc/Echochamber/Validatable.html +355 -0
  30. data/doc/Echochamber/Validator.html +180 -0
  31. data/doc/Echochamber/Widget.html +654 -0
  32. data/doc/Echochamber/WidgetCompletionInfo.html +309 -0
  33. data/doc/Echochamber/WidgetPersonalization.html +326 -0
  34. data/doc/Echochamber/WidgetSecurityOption.html +359 -0
  35. data/doc/Echochamber/WidgetSignerSecurityOption.html +296 -0
  36. data/doc/Echochamber/WidgetStatus.html +314 -0
  37. data/doc/Echochamber/WidgetVaultingInfo.html +265 -0
  38. data/doc/_index.html +338 -0
  39. data/doc/class_list.html +54 -0
  40. data/doc/css/common.css +1 -0
  41. data/doc/css/full_list.css +57 -0
  42. data/doc/css/style.css +339 -0
  43. data/doc/file.README.html +157 -0
  44. data/doc/file_list.html +56 -0
  45. data/doc/frames.html +26 -0
  46. data/doc/index.html +157 -0
  47. data/doc/js/app.js +219 -0
  48. data/doc/js/full_list.js +178 -0
  49. data/doc/js/jquery.js +4 -0
  50. data/doc/method_list.html +581 -0
  51. data/doc/top-level-namespace.html +112 -0
  52. data/echochamber.gemspec +35 -0
  53. data/features/support/env.rb +8 -0
  54. data/fixtures/agreement.pdf +0 -0
  55. data/fixtures/vcr_cassettes/agreement_combined_pdf.yml +1465 -0
  56. data/fixtures/vcr_cassettes/agreement_document_file.yml +1465 -0
  57. data/fixtures/vcr_cassettes/agreement_documents.yml +42 -0
  58. data/fixtures/vcr_cassettes/agreement_form_data.yml +44 -0
  59. data/fixtures/vcr_cassettes/agreement_info.yml +50 -0
  60. data/fixtures/vcr_cassettes/agreement_signing_urls.yml +42 -0
  61. data/fixtures/vcr_cassettes/audit_trail_pdf.yml +1643 -0
  62. data/fixtures/vcr_cassettes/cancel_agreement.yml +46 -0
  63. data/fixtures/vcr_cassettes/create_agreement.yml +50 -0
  64. data/fixtures/vcr_cassettes/create_reminder.yml +47 -0
  65. data/fixtures/vcr_cassettes/create_transient_document.yml +716 -0
  66. data/fixtures/vcr_cassettes/create_user.yml +50 -0
  67. data/fixtures/vcr_cassettes/create_widget.yml +48 -0
  68. data/fixtures/vcr_cassettes/get_agreements.yml +46 -0
  69. data/fixtures/vcr_cassettes/get_library_document.yml +45 -0
  70. data/fixtures/vcr_cassettes/get_library_document_data.yml +1191 -0
  71. data/fixtures/vcr_cassettes/get_library_document_file.yml +42 -0
  72. data/fixtures/vcr_cassettes/get_library_documents.yml +47 -0
  73. data/fixtures/vcr_cassettes/get_token.yml +44 -0
  74. data/fixtures/vcr_cassettes/get_user.yml +46 -0
  75. data/fixtures/vcr_cassettes/get_users.yml +43 -0
  76. data/fixtures/vcr_cassettes/get_widget.yml +49 -0
  77. data/fixtures/vcr_cassettes/get_widget_document_file.yml +2682 -0
  78. data/fixtures/vcr_cassettes/get_widget_documents.yml +44 -0
  79. data/fixtures/vcr_cassettes/get_widgets.yml +50 -0
  80. data/fixtures/vcr_cassettes/library_combined_document.yml +2197 -0
  81. data/fixtures/vcr_cassettes/library_document_audit_trail.yml +1570 -0
  82. data/fixtures/vcr_cassettes/personalize_widget.yml +47 -0
  83. data/fixtures/vcr_cassettes/update_widget_status.yml +46 -0
  84. data/lib/echochamber.rb +10 -0
  85. data/lib/echochamber/agreement.rb +32 -0
  86. data/lib/echochamber/agreement/client.rb +118 -0
  87. data/lib/echochamber/agreement/fileinfo.rb +20 -0
  88. data/lib/echochamber/agreement/phone_info.rb +19 -0
  89. data/lib/echochamber/agreement/recipient.rb +23 -0
  90. data/lib/echochamber/agreement/recipient_security_option.rb +20 -0
  91. data/lib/echochamber/agreement/request.rb +142 -0
  92. data/lib/echochamber/agreement/url_file_info.rb +18 -0
  93. data/lib/echochamber/client.rb +82 -0
  94. data/lib/echochamber/credentials.rb +33 -0
  95. data/lib/echochamber/library_documents/client.rb +83 -0
  96. data/lib/echochamber/library_documents/request.rb +78 -0
  97. data/lib/echochamber/reminder.rb +17 -0
  98. data/lib/echochamber/request.rb +141 -0
  99. data/lib/echochamber/user.rb +29 -0
  100. data/lib/echochamber/validatable.rb +54 -0
  101. data/lib/echochamber/version.rb +3 -0
  102. data/lib/echochamber/widget.rb +42 -0
  103. data/lib/echochamber/widget/client.rb +127 -0
  104. data/lib/echochamber/widget/counter_signer_info.rb +19 -0
  105. data/lib/echochamber/widget/request.rb +135 -0
  106. data/lib/echochamber/widget/widget_completion_info.rb +19 -0
  107. data/lib/echochamber/widget/widget_personalization.rb +21 -0
  108. data/lib/echochamber/widget/widget_security_option.rb +22 -0
  109. data/lib/echochamber/widget/widget_signer_security_option.rb +18 -0
  110. data/lib/echochamber/widget/widget_status.rb +20 -0
  111. data/lib/echochamber/widget/widget_vaulting_info.rb +16 -0
  112. data/spec/lib/agreement/client_spec.rb +157 -0
  113. data/spec/lib/client_spec.rb +78 -0
  114. data/spec/lib/library_documents/client_spec.rb +71 -0
  115. data/spec/lib/request_spec.rb +18 -0
  116. data/spec/lib/shared_client.rb +22 -0
  117. data/spec/lib/user_spec.rb +6 -0
  118. data/spec/lib/validatable_spec.rb +110 -0
  119. data/spec/lib/version_spec.rb +7 -0
  120. data/spec/lib/widget/client_spec.rb +154 -0
  121. data/spec/spec_helper.rb +21 -0
  122. metadata +344 -0
@@ -0,0 +1,4167 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
+ <title>
7
+ Module: Echochamber::Request
8
+
9
+ &mdash; Documentation by YARD 0.8.7.4
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ hasFrames = window.top.frames.main ? true : false;
19
+ relpath = '../';
20
+ framesUrl = "../frames.html#!Echochamber/Request.html";
21
+ </script>
22
+
23
+
24
+ <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
25
+
26
+ <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
27
+
28
+
29
+ </head>
30
+ <body>
31
+ <div id="header">
32
+ <div id="menu">
33
+
34
+ <a href="../_index.html">Index (R)</a> &raquo;
35
+ <span class='title'><span class='object_link'><a href="../Echochamber.html" title="Echochamber (module)">Echochamber</a></span></span>
36
+ &raquo;
37
+ <span class="title">Request</span>
38
+
39
+
40
+ <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
41
+ </div>
42
+
43
+ <div id="search">
44
+
45
+ <a class="full_list_link" id="class_list_link"
46
+ href="../class_list.html">
47
+ Class List
48
+ </a>
49
+
50
+ <a class="full_list_link" id="method_list_link"
51
+ href="../method_list.html">
52
+ Method List
53
+ </a>
54
+
55
+ <a class="full_list_link" id="file_list_link"
56
+ href="../file_list.html">
57
+ File List
58
+ </a>
59
+
60
+ </div>
61
+ <div class="clear"></div>
62
+ </div>
63
+
64
+ <iframe id="search_frame"></iframe>
65
+
66
+ <div id="content"><h1>Module: Echochamber::Request
67
+
68
+
69
+
70
+ </h1>
71
+
72
+ <dl class="box">
73
+
74
+
75
+
76
+
77
+
78
+
79
+
80
+
81
+ <dt class="r1 last">Defined in:</dt>
82
+ <dd class="r1 last">lib/echochamber/request.rb<span class="defines">,<br />
83
+ lib/echochamber/widget/request.rb,<br /> lib/echochamber/agreement/request.rb,<br /> lib/echochamber/library_documents/request.rb</span>
84
+ </dd>
85
+
86
+ </dl>
87
+ <div class="clear"></div>
88
+
89
+ <h2>Defined Under Namespace</h2>
90
+ <p class="children">
91
+
92
+
93
+
94
+
95
+ <strong class="classes">Classes:</strong> <span class='object_link'><a href="Request/Failure.html" title="Echochamber::Request::Failure (class)">Failure</a></span>
96
+
97
+
98
+ </p>
99
+
100
+ <h2>Constant Summary</h2>
101
+
102
+ <dl class="constants">
103
+
104
+ <dt id="BASE_URL-constant" class="">BASE_URL =
105
+
106
+ </dt>
107
+ <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>https://secure.echosign.com/api/rest/v2</span><span class='tstring_end'>&#39;</span></span></pre></dd>
108
+
109
+ <dt id="ENDPOINT-constant" class="">ENDPOINT =
110
+
111
+ </dt>
112
+ <dd><pre class="code"><span class='lbrace'>{</span>
113
+ <span class='label'>token:</span> <span class='const'>BASE_URL</span> <span class='op'>+</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>/auth/tokens</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span>
114
+ <span class='label'>user:</span> <span class='const'>BASE_URL</span> <span class='op'>+</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>/users</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span>
115
+ <span class='label'>agreement:</span> <span class='const'>BASE_URL</span> <span class='op'>+</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>/agreements</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span>
116
+ <span class='label'>reminder:</span> <span class='const'>BASE_URL</span> <span class='op'>+</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>/reminders</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span>
117
+ <span class='label'>transientDocument:</span> <span class='const'>BASE_URL</span> <span class='op'>+</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>/transientDocuments</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span>
118
+ <span class='label'>libraryDocument:</span> <span class='const'>BASE_URL</span> <span class='op'>+</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>/libraryDocuments</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span>
119
+ <span class='label'>widget:</span> <span class='const'>BASE_URL</span> <span class='op'>+</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>/widgets</span><span class='tstring_end'>&#39;</span></span>
120
+ <span class='rbrace'>}</span></pre></dd>
121
+
122
+ </dl>
123
+
124
+
125
+
126
+
127
+
128
+
129
+
130
+
131
+
132
+ <h2>
133
+ Class Method Summary
134
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
135
+ </h2>
136
+
137
+ <ul class="summary">
138
+
139
+ <li class="public ">
140
+ <span class="summary_signature">
141
+
142
+ <a href="#agreement_combined_pdf-class_method" title="agreement_combined_pdf (class method)">+ (String) <strong>agreement_combined_pdf</strong>(token, agreement_id, versionId, participantEmail, attachSupportingDocuments, auditReport) </a>
143
+
144
+
145
+
146
+ </span>
147
+
148
+
149
+
150
+
151
+
152
+
153
+
154
+
155
+
156
+ <span class="summary_desc"><div class='inline'>
157
+ <p>Gets a single combined PDF document for the documents associated with an
158
+ agreement.</p>
159
+ </div></span>
160
+
161
+ </li>
162
+
163
+
164
+ <li class="public ">
165
+ <span class="summary_signature">
166
+
167
+ <a href="#agreement_document_file-class_method" title="agreement_document_file (class method)">+ (String) <strong>agreement_document_file</strong>(token, agreement_id, document_id) </a>
168
+
169
+
170
+
171
+ </span>
172
+
173
+
174
+
175
+
176
+
177
+
178
+
179
+
180
+
181
+ <span class="summary_desc"><div class='inline'>
182
+ <p>Retrieve agreement document PDF.</p>
183
+ </div></span>
184
+
185
+ </li>
186
+
187
+
188
+ <li class="public ">
189
+ <span class="summary_signature">
190
+
191
+ <a href="#agreement_documents-class_method" title="agreement_documents (class method)">+ (Hash) <strong>agreement_documents</strong>(token, agreement_id, recipient_email = nil, format = nil, version_id = nil) </a>
192
+
193
+
194
+
195
+ </span>
196
+
197
+
198
+
199
+
200
+
201
+
202
+
203
+
204
+
205
+ <span class="summary_desc"><div class='inline'>
206
+ <p>Performs REST GET /agreement/:id/documents.</p>
207
+ </div></span>
208
+
209
+ </li>
210
+
211
+
212
+ <li class="public ">
213
+ <span class="summary_signature">
214
+
215
+ <a href="#agreement_form_data-class_method" title="agreement_form_data (class method)">+ (String) <strong>agreement_form_data</strong>(token, agreement_id) </a>
216
+
217
+
218
+
219
+ </span>
220
+
221
+
222
+
223
+
224
+
225
+
226
+
227
+
228
+
229
+ <span class="summary_desc"><div class='inline'>
230
+ <p>Retrieves data entered by the user into interactive form fields at the time
231
+ they signed the agreement.</p>
232
+ </div></span>
233
+
234
+ </li>
235
+
236
+
237
+ <li class="public ">
238
+ <span class="summary_signature">
239
+
240
+ <a href="#agreement_info-class_method" title="agreement_info (class method)">+ (Hash) <strong>agreement_info</strong>(token, agreement_id) </a>
241
+
242
+
243
+
244
+ </span>
245
+
246
+
247
+
248
+
249
+
250
+
251
+
252
+
253
+
254
+ <span class="summary_desc"><div class='inline'>
255
+ <p>Performs REST GET /agreement/:id operation.</p>
256
+ </div></span>
257
+
258
+ </li>
259
+
260
+
261
+ <li class="public ">
262
+ <span class="summary_signature">
263
+
264
+ <a href="#agreement_signing_urls-class_method" title="agreement_signing_urls (class method)">+ (Hash) <strong>agreement_signing_urls</strong>(token, agreement_id) </a>
265
+
266
+
267
+
268
+ </span>
269
+
270
+
271
+
272
+
273
+
274
+
275
+
276
+
277
+
278
+ <span class="summary_desc"><div class='inline'>
279
+ <p>Performs REST GET /agreement/:id/signingUrls operation.</p>
280
+ </div></span>
281
+
282
+ </li>
283
+
284
+
285
+ <li class="public ">
286
+ <span class="summary_signature">
287
+
288
+ <a href="#audit_trail_pdf-class_method" title="audit_trail_pdf (class method)">+ (String) <strong>audit_trail_pdf</strong>(token, agreement_id) </a>
289
+
290
+
291
+
292
+ </span>
293
+
294
+
295
+
296
+
297
+
298
+
299
+
300
+
301
+
302
+ <span class="summary_desc"><div class='inline'>
303
+ <p>Performs REST GET /agreement/:id/auditTrail operation.</p>
304
+ </div></span>
305
+
306
+ </li>
307
+
308
+
309
+ <li class="public ">
310
+ <span class="summary_signature">
311
+
312
+ <a href="#create_agreement-class_method" title="create_agreement (class method)">+ (Hash) <strong>create_agreement</strong>(body, token, user_id = nil, user_email = nil) </a>
313
+
314
+
315
+
316
+ </span>
317
+
318
+
319
+
320
+
321
+
322
+
323
+
324
+
325
+
326
+ <span class="summary_desc"><div class='inline'>
327
+ <p>Performs REST create_agreement operation.</p>
328
+ </div></span>
329
+
330
+ </li>
331
+
332
+
333
+ <li class="public ">
334
+ <span class="summary_signature">
335
+
336
+ <a href="#create_reminder-class_method" title="create_reminder (class method)">+ (Hash) <strong>create_reminder</strong>(token, body) </a>
337
+
338
+
339
+
340
+ </span>
341
+
342
+
343
+
344
+
345
+
346
+
347
+
348
+
349
+
350
+ <span class="summary_desc"><div class='inline'>
351
+ <p>Sends a reminder for an agreement.</p>
352
+ </div></span>
353
+
354
+ </li>
355
+
356
+
357
+ <li class="public ">
358
+ <span class="summary_signature">
359
+
360
+ <a href="#create_transient_document-class_method" title="create_transient_document (class method)">+ (Hash) <strong>create_transient_document</strong>(token, file_name, file_handle, mime_type = nil) </a>
361
+
362
+
363
+
364
+ </span>
365
+
366
+
367
+
368
+
369
+
370
+
371
+
372
+
373
+
374
+ <span class="summary_desc"><div class='inline'>
375
+ <p>Performs REST create_transient_document operation.</p>
376
+ </div></span>
377
+
378
+ </li>
379
+
380
+
381
+ <li class="public ">
382
+ <span class="summary_signature">
383
+
384
+ <a href="#create_user-class_method" title="create_user (class method)">+ (Hash) <strong>create_user</strong>(body, token) </a>
385
+
386
+
387
+
388
+ </span>
389
+
390
+
391
+
392
+
393
+
394
+
395
+
396
+
397
+
398
+ <span class="summary_desc"><div class='inline'>
399
+ <p>Performs REST create_user operation.</p>
400
+ </div></span>
401
+
402
+ </li>
403
+
404
+
405
+ <li class="public ">
406
+ <span class="summary_signature">
407
+
408
+ <a href="#create_widget-class_method" title="create_widget (class method)">+ (Hash) <strong>create_widget</strong>(token, widget) </a>
409
+
410
+
411
+
412
+ </span>
413
+
414
+
415
+
416
+
417
+
418
+
419
+
420
+
421
+
422
+ <span class="summary_desc"><div class='inline'>
423
+ <p>Creates a widget and returns the Javascript snippet and URL to access the
424
+ widget and widgetID in response to the client.</p>
425
+ </div></span>
426
+
427
+ </li>
428
+
429
+
430
+ <li class="public ">
431
+ <span class="summary_signature">
432
+
433
+ <a href="#get_agreements-class_method" title="get_agreements (class method)">+ (Hash) <strong>get_agreements</strong>(token) </a>
434
+
435
+
436
+
437
+ </span>
438
+
439
+
440
+
441
+
442
+
443
+
444
+
445
+
446
+
447
+ <span class="summary_desc"><div class='inline'>
448
+ <p>Performs REST GET /agreements operation.</p>
449
+ </div></span>
450
+
451
+ </li>
452
+
453
+
454
+ <li class="public ">
455
+ <span class="summary_signature">
456
+
457
+ <a href="#get_library_document-class_method" title="get_library_document (class method)">+ (Hash) <strong>get_library_document</strong>(token, library_document_id) </a>
458
+
459
+
460
+
461
+ </span>
462
+
463
+
464
+
465
+
466
+
467
+
468
+
469
+
470
+
471
+ <span class="summary_desc"><div class='inline'>
472
+ <p>Retrieves library document metadata for a user.</p>
473
+ </div></span>
474
+
475
+ </li>
476
+
477
+
478
+ <li class="public ">
479
+ <span class="summary_signature">
480
+
481
+ <a href="#get_library_document_file-class_method" title="get_library_document_file (class method)">+ (String) <strong>get_library_document_file</strong>(token, library_document_id, file_id) </a>
482
+
483
+
484
+
485
+ </span>
486
+
487
+
488
+
489
+
490
+
491
+
492
+
493
+
494
+
495
+ <span class="summary_desc"><div class='inline'>
496
+ <p>Retrieves library document file data.</p>
497
+ </div></span>
498
+
499
+ </li>
500
+
501
+
502
+ <li class="public ">
503
+ <span class="summary_signature">
504
+
505
+ <a href="#get_library_document_files-class_method" title="get_library_document_files (class method)">+ (Hash) <strong>get_library_document_files</strong>(token, library_document_id) </a>
506
+
507
+
508
+
509
+ </span>
510
+
511
+
512
+
513
+
514
+
515
+
516
+
517
+
518
+
519
+ <span class="summary_desc"><div class='inline'>
520
+ <p>Retrieves library document file.</p>
521
+ </div></span>
522
+
523
+ </li>
524
+
525
+
526
+ <li class="public ">
527
+ <span class="summary_signature">
528
+
529
+ <a href="#get_library_documents-class_method" title="get_library_documents (class method)">+ (Hash) <strong>get_library_documents</strong>(token, user_id = nil, user_email = nil) </a>
530
+
531
+
532
+
533
+ </span>
534
+
535
+
536
+
537
+
538
+
539
+
540
+
541
+
542
+
543
+ <span class="summary_desc"><div class='inline'>
544
+ <p>Retrieves library documents for a user.</p>
545
+ </div></span>
546
+
547
+ </li>
548
+
549
+
550
+ <li class="public ">
551
+ <span class="summary_signature">
552
+
553
+ <a href="#get_token-class_method" title="get_token (class method)">+ (String) <strong>get_token</strong>(credentials) </a>
554
+
555
+
556
+
557
+ </span>
558
+
559
+
560
+
561
+
562
+
563
+
564
+
565
+
566
+
567
+ <span class="summary_desc"><div class='inline'>
568
+ <p>Retrieves the authentication token.</p>
569
+ </div></span>
570
+
571
+ </li>
572
+
573
+
574
+ <li class="public ">
575
+ <span class="summary_signature">
576
+
577
+ <a href="#get_user-class_method" title="get_user (class method)">+ (Hash) <strong>get_user</strong>(token, user_id) </a>
578
+
579
+
580
+
581
+ </span>
582
+
583
+
584
+
585
+
586
+
587
+
588
+
589
+
590
+
591
+ <span class="summary_desc"><div class='inline'>
592
+ <p>Gets all the users in an account that the caller has permissions to access.</p>
593
+ </div></span>
594
+
595
+ </li>
596
+
597
+
598
+ <li class="public ">
599
+ <span class="summary_signature">
600
+
601
+ <a href="#get_users-class_method" title="get_users (class method)">+ (Hash) <strong>get_users</strong>(token, user_email) </a>
602
+
603
+
604
+
605
+ </span>
606
+
607
+
608
+
609
+
610
+
611
+
612
+
613
+
614
+
615
+ <span class="summary_desc"><div class='inline'>
616
+ <p>Gets all the users in an account that the caller has permissions to access.</p>
617
+ </div></span>
618
+
619
+ </li>
620
+
621
+
622
+ <li class="public ">
623
+ <span class="summary_signature">
624
+
625
+ <a href="#get_widget-class_method" title="get_widget (class method)">+ (Hash) <strong>get_widget</strong>(token, widget_id) </a>
626
+
627
+
628
+
629
+ </span>
630
+
631
+
632
+
633
+
634
+
635
+
636
+
637
+
638
+
639
+ <span class="summary_desc"><div class='inline'>
640
+ <p>Performs GET /widget operation.</p>
641
+ </div></span>
642
+
643
+ </li>
644
+
645
+
646
+ <li class="public ">
647
+ <span class="summary_signature">
648
+
649
+ <a href="#get_widget_audit_trail-class_method" title="get_widget_audit_trail (class method)">+ (Hash) <strong>get_widget_audit_trail</strong>(token, widget_id) </a>
650
+
651
+
652
+
653
+ </span>
654
+
655
+
656
+
657
+
658
+
659
+
660
+
661
+
662
+
663
+ <span class="summary_desc"><div class='inline'>
664
+ <p>Performs GET /widget/:id/auditTrail.</p>
665
+ </div></span>
666
+
667
+ </li>
668
+
669
+
670
+ <li class="public ">
671
+ <span class="summary_signature">
672
+
673
+ <a href="#get_widget_document_file-class_method" title="get_widget_document_file (class method)">+ (Hash) <strong>get_widget_document_file</strong>(token, widget_id, document_id) </a>
674
+
675
+
676
+
677
+ </span>
678
+
679
+
680
+
681
+
682
+
683
+
684
+
685
+
686
+
687
+ <span class="summary_desc"><div class='inline'>
688
+ <p>Performs GET /widget/:id/documents/:id operation.</p>
689
+ </div></span>
690
+
691
+ </li>
692
+
693
+
694
+ <li class="public ">
695
+ <span class="summary_signature">
696
+
697
+ <a href="#get_widget_documents-class_method" title="get_widget_documents (class method)">+ (Hash) <strong>get_widget_documents</strong>(token, widget_id, version_id = nil, participant_email = nil) </a>
698
+
699
+
700
+
701
+ </span>
702
+
703
+
704
+
705
+
706
+
707
+
708
+
709
+
710
+
711
+ <span class="summary_desc"><div class='inline'>
712
+ <p>Performs GET /widget/:id/documents operation.</p>
713
+ </div></span>
714
+
715
+ </li>
716
+
717
+
718
+ <li class="public ">
719
+ <span class="summary_signature">
720
+
721
+ <a href="#get_widget_form_data-class_method" title="get_widget_form_data (class method)">+ (Hash) <strong>get_widget_form_data</strong>(token, widget_id) </a>
722
+
723
+
724
+
725
+ </span>
726
+
727
+
728
+
729
+
730
+
731
+
732
+
733
+
734
+
735
+ <span class="summary_desc"><div class='inline'>
736
+ <p>Performs GET /widget/:id/formData.</p>
737
+ </div></span>
738
+
739
+ </li>
740
+
741
+
742
+ <li class="public ">
743
+ <span class="summary_signature">
744
+
745
+ <a href="#get_widgets-class_method" title="get_widgets (class method)">+ (Hash) <strong>get_widgets</strong>(token, user_id = nil, user_email = nil) </a>
746
+
747
+
748
+
749
+ </span>
750
+
751
+
752
+
753
+
754
+
755
+
756
+
757
+
758
+
759
+ <span class="summary_desc"><div class='inline'>
760
+ <p>Performs GET /widgets operation.</p>
761
+ </div></span>
762
+
763
+ </li>
764
+
765
+
766
+ <li class="public ">
767
+ <span class="summary_signature">
768
+
769
+ <a href="#library_combined_document-class_method" title="library_combined_document (class method)">+ (String) <strong>library_combined_document</strong>(token, library_document_id, auditReport) </a>
770
+
771
+
772
+
773
+ </span>
774
+
775
+
776
+
777
+
778
+
779
+
780
+
781
+
782
+
783
+ <span class="summary_desc"><div class='inline'>
784
+ <p>Retrieves library combined document file.</p>
785
+ </div></span>
786
+
787
+ </li>
788
+
789
+
790
+ <li class="public ">
791
+ <span class="summary_signature">
792
+
793
+ <a href="#library_document_audit_trail-class_method" title="library_document_audit_trail (class method)">+ (String) <strong>library_document_audit_trail</strong>(token, library_document_id) </a>
794
+
795
+
796
+
797
+ </span>
798
+
799
+
800
+
801
+
802
+
803
+
804
+
805
+
806
+
807
+ <span class="summary_desc"><div class='inline'>
808
+ <p>Retrieves library document file data.</p>
809
+ </div></span>
810
+
811
+ </li>
812
+
813
+
814
+ <li class="public ">
815
+ <span class="summary_signature">
816
+
817
+ <a href="#personalize_widget-class_method" title="personalize_widget (class method)">+ (Hash) <strong>personalize_widget</strong>(token, widget_id, personalization) </a>
818
+
819
+
820
+
821
+ </span>
822
+
823
+
824
+
825
+
826
+
827
+
828
+
829
+
830
+
831
+ <span class="summary_desc"><div class='inline'>
832
+ <p>Performs REST PUT /agreement/:id operation.</p>
833
+ </div></span>
834
+
835
+ </li>
836
+
837
+
838
+ <li class="public ">
839
+ <span class="summary_signature">
840
+
841
+ <a href="#update_agreement_status-class_method" title="update_agreement_status (class method)">+ (Hash) <strong>update_agreement_status</strong>(token, agreement_id, request_body) </a>
842
+
843
+
844
+
845
+ </span>
846
+
847
+
848
+
849
+
850
+
851
+
852
+
853
+
854
+
855
+ <span class="summary_desc"><div class='inline'>
856
+ <p>Performs REST PUT /agreement/:id operation.</p>
857
+ </div></span>
858
+
859
+ </li>
860
+
861
+
862
+ <li class="public ">
863
+ <span class="summary_signature">
864
+
865
+ <a href="#update_widget_status-class_method" title="update_widget_status (class method)">+ (Hash) <strong>update_widget_status</strong>(token, widget_id, status) </a>
866
+
867
+
868
+
869
+ </span>
870
+
871
+
872
+
873
+
874
+
875
+
876
+
877
+
878
+
879
+ <span class="summary_desc"><div class='inline'>
880
+ <p>Performs REST PUT /agreement/:id operation.</p>
881
+ </div></span>
882
+
883
+ </li>
884
+
885
+
886
+ </ul>
887
+
888
+
889
+
890
+
891
+ <div id="class_method_details" class="method_details_list">
892
+ <h2>Class Method Details</h2>
893
+
894
+
895
+ <div class="method_details first">
896
+ <h3 class="signature first" id="agreement_combined_pdf-class_method">
897
+
898
+ + (<tt>String</tt>) <strong>agreement_combined_pdf</strong>(token, agreement_id, versionId, participantEmail, attachSupportingDocuments, auditReport)
899
+
900
+
901
+
902
+
903
+
904
+ </h3><div class="docstring">
905
+ <div class="discussion">
906
+
907
+ <p>Gets a single combined PDF document for the documents associated with an
908
+ agreement.</p>
909
+
910
+
911
+ </div>
912
+ </div>
913
+ <div class="tags">
914
+ <p class="tag_title">Parameters:</p>
915
+ <ul class="param">
916
+
917
+ <li>
918
+
919
+ <span class='name'>token</span>
920
+
921
+
922
+ <span class='type'>(<tt>String</tt>)</span>
923
+
924
+
925
+
926
+ &mdash;
927
+ <div class='inline'>
928
+ <p>Auth Token</p>
929
+ </div>
930
+
931
+ </li>
932
+
933
+ <li>
934
+
935
+ <span class='name'>agreement_id</span>
936
+
937
+
938
+ <span class='type'>(<tt>String</tt>)</span>
939
+
940
+
941
+
942
+ &mdash;
943
+ <div class='inline'>
944
+ <p>ID of agreement to retrieve info on.</p>
945
+ </div>
946
+
947
+ </li>
948
+
949
+ </ul>
950
+
951
+ <p class="tag_title">Returns:</p>
952
+ <ul class="return">
953
+
954
+ <li>
955
+
956
+
957
+ <span class='type'>(<tt>String</tt>)</span>
958
+
959
+
960
+
961
+ &mdash;
962
+ <div class='inline'>
963
+ <p>Raw bytes from document file</p>
964
+ </div>
965
+
966
+ </li>
967
+
968
+ </ul>
969
+
970
+ </div><table class="source_code">
971
+ <tr>
972
+ <td>
973
+ <pre class="lines">
974
+
975
+
976
+ 57
977
+ 58
978
+ 59
979
+ 60
980
+ 61
981
+ 62
982
+ 63
983
+ 64
984
+ 65</pre>
985
+ </td>
986
+ <td>
987
+ <pre class="code"><span class="info file"># File 'lib/echochamber/agreement/request.rb', line 57</span>
988
+
989
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_agreement_combined_pdf'>agreement_combined_pdf</span><span class='lparen'>(</span><span class='id identifier rubyid_token'>token</span><span class='comma'>,</span> <span class='id identifier rubyid_agreement_id'>agreement_id</span><span class='comma'>,</span> <span class='id identifier rubyid_versionId'>versionId</span><span class='comma'>,</span> <span class='id identifier rubyid_participantEmail'>participantEmail</span><span class='comma'>,</span> <span class='id identifier rubyid_attachSupportingDocuments'>attachSupportingDocuments</span><span class='comma'>,</span> <span class='id identifier rubyid_auditReport'>auditReport</span><span class='rparen'>)</span>
990
+ <span class='id identifier rubyid_headers'>headers</span> <span class='op'>=</span> <span class='lbrace'>{</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Access-Token</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_token'>token</span> <span class='rbrace'>}</span>
991
+ <span class='id identifier rubyid_endpoint'>endpoint</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='const'>ENDPOINT</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:agreement</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'>/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_agreement_id'>agreement_id</span><span class='embexpr_end'>}</span><span class='tstring_content'>/combinedDocument</span><span class='tstring_end'>&quot;</span></span>
992
+ <span class='id identifier rubyid_endpoint'>endpoint</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_add_query'>add_query</span><span class='lparen'>(</span><span class='id identifier rubyid_endpoint'>endpoint</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>versionId=</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_versionId'>versionId</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='kw'>unless</span> <span class='id identifier rubyid_versionId'>versionId</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
993
+ <span class='id identifier rubyid_endpoint'>endpoint</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_add_query'>add_query</span><span class='lparen'>(</span><span class='id identifier rubyid_endpoint'>endpoint</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>participantEmail=</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_participantEmail'>participantEmail</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='kw'>unless</span> <span class='id identifier rubyid_participantEmail'>participantEmail</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
994
+ <span class='id identifier rubyid_endpoint'>endpoint</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_add_query'>add_query</span><span class='lparen'>(</span><span class='id identifier rubyid_endpoint'>endpoint</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>attachSupportingDocuments=</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_attachSupportingDocuments'>attachSupportingDocuments</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
995
+ <span class='id identifier rubyid_endpoint'>endpoint</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_add_query'>add_query</span><span class='lparen'>(</span><span class='id identifier rubyid_endpoint'>endpoint</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>auditReport=</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_auditReport'>auditReport</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
996
+ <span class='id identifier rubyid_response'>response</span> <span class='op'>=</span> <span class='id identifier rubyid_get'>get</span><span class='lparen'>(</span><span class='id identifier rubyid_endpoint'>endpoint</span><span class='comma'>,</span> <span class='id identifier rubyid_headers'>headers</span><span class='rparen'>)</span>
997
+ <span class='kw'>end</span></pre>
998
+ </td>
999
+ </tr>
1000
+ </table>
1001
+ </div>
1002
+
1003
+ <div class="method_details ">
1004
+ <h3 class="signature " id="agreement_document_file-class_method">
1005
+
1006
+ + (<tt>String</tt>) <strong>agreement_document_file</strong>(token, agreement_id, document_id)
1007
+
1008
+
1009
+
1010
+
1011
+
1012
+ </h3><div class="docstring">
1013
+ <div class="discussion">
1014
+
1015
+ <p>Retrieve agreement document PDF</p>
1016
+
1017
+
1018
+ </div>
1019
+ </div>
1020
+ <div class="tags">
1021
+ <p class="tag_title">Parameters:</p>
1022
+ <ul class="param">
1023
+
1024
+ <li>
1025
+
1026
+ <span class='name'>token</span>
1027
+
1028
+
1029
+ <span class='type'>(<tt>String</tt>)</span>
1030
+
1031
+
1032
+
1033
+ &mdash;
1034
+ <div class='inline'>
1035
+ <p>Auth Token</p>
1036
+ </div>
1037
+
1038
+ </li>
1039
+
1040
+ <li>
1041
+
1042
+ <span class='name'>agreement_id</span>
1043
+
1044
+
1045
+ <span class='type'>(<tt>String</tt>)</span>
1046
+
1047
+
1048
+
1049
+ &mdash;
1050
+ <div class='inline'>
1051
+ <p>ID of agreement to retrieve info on.</p>
1052
+ </div>
1053
+
1054
+ </li>
1055
+
1056
+ </ul>
1057
+
1058
+ <p class="tag_title">Returns:</p>
1059
+ <ul class="return">
1060
+
1061
+ <li>
1062
+
1063
+
1064
+ <span class='type'>(<tt>String</tt>)</span>
1065
+
1066
+
1067
+
1068
+ &mdash;
1069
+ <div class='inline'>
1070
+ <p>Raw bytes from document file</p>
1071
+ </div>
1072
+
1073
+ </li>
1074
+
1075
+ </ul>
1076
+
1077
+ </div><table class="source_code">
1078
+ <tr>
1079
+ <td>
1080
+ <pre class="lines">
1081
+
1082
+
1083
+ 83
1084
+ 84
1085
+ 85
1086
+ 86
1087
+ 87</pre>
1088
+ </td>
1089
+ <td>
1090
+ <pre class="code"><span class="info file"># File 'lib/echochamber/agreement/request.rb', line 83</span>
1091
+
1092
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_agreement_document_file'>agreement_document_file</span><span class='lparen'>(</span><span class='id identifier rubyid_token'>token</span><span class='comma'>,</span> <span class='id identifier rubyid_agreement_id'>agreement_id</span><span class='comma'>,</span> <span class='id identifier rubyid_document_id'>document_id</span><span class='rparen'>)</span>
1093
+ <span class='id identifier rubyid_headers'>headers</span> <span class='op'>=</span> <span class='lbrace'>{</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Access-Token</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_token'>token</span> <span class='rbrace'>}</span>
1094
+ <span class='id identifier rubyid_endpoint'>endpoint</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='const'>ENDPOINT</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:agreement</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'>/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_agreement_id'>agreement_id</span><span class='embexpr_end'>}</span><span class='tstring_content'>/documents/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_document_id'>document_id</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span>
1095
+ <span class='id identifier rubyid_response'>response</span> <span class='op'>=</span> <span class='id identifier rubyid_get'>get</span><span class='lparen'>(</span><span class='id identifier rubyid_endpoint'>endpoint</span><span class='comma'>,</span> <span class='id identifier rubyid_headers'>headers</span><span class='rparen'>)</span>
1096
+ <span class='kw'>end</span></pre>
1097
+ </td>
1098
+ </tr>
1099
+ </table>
1100
+ </div>
1101
+
1102
+ <div class="method_details ">
1103
+ <h3 class="signature " id="agreement_documents-class_method">
1104
+
1105
+ + (<tt>Hash</tt>) <strong>agreement_documents</strong>(token, agreement_id, recipient_email = nil, format = nil, version_id = nil)
1106
+
1107
+
1108
+
1109
+
1110
+
1111
+ </h3><div class="docstring">
1112
+ <div class="discussion">
1113
+
1114
+ <p>Performs REST GET /agreement/:id/documents</p>
1115
+
1116
+
1117
+ </div>
1118
+ </div>
1119
+ <div class="tags">
1120
+ <p class="tag_title">Parameters:</p>
1121
+ <ul class="param">
1122
+
1123
+ <li>
1124
+
1125
+ <span class='name'>agreement_id</span>
1126
+
1127
+
1128
+ <span class='type'>(<tt>String</tt>)</span>
1129
+
1130
+
1131
+
1132
+ &mdash;
1133
+ <div class='inline'>
1134
+ <p>(REQUIRED)</p>
1135
+ </div>
1136
+
1137
+ </li>
1138
+
1139
+ <li>
1140
+
1141
+ <span class='name'>recipient_email</span>
1142
+
1143
+
1144
+ <span class='type'>(<tt>String</tt>)</span>
1145
+
1146
+
1147
+ <em class="default">(defaults to: <tt>nil</tt>)</em>
1148
+
1149
+
1150
+ &mdash;
1151
+ <div class='inline'>
1152
+ <p>The email address of the participant to be used to retrieve documents.
1153
+ (REQUIRED)</p>
1154
+ </div>
1155
+
1156
+ </li>
1157
+
1158
+ <li>
1159
+
1160
+ <span class='name'>format</span>
1161
+
1162
+
1163
+ <span class='type'>(<tt>String</tt>)</span>
1164
+
1165
+
1166
+ <em class="default">(defaults to: <tt>nil</tt>)</em>
1167
+
1168
+
1169
+ &mdash;
1170
+ <div class='inline'>
1171
+ <p>Content format of the supported documents. It can have two possible values
1172
+ ORIGINAL or CONVERTED_PDF. (REQUIRED)</p>
1173
+ </div>
1174
+
1175
+ </li>
1176
+
1177
+ <li>
1178
+
1179
+ <span class='name'>version_id</span>
1180
+
1181
+
1182
+ <span class='type'>(<tt>String</tt>)</span>
1183
+
1184
+
1185
+ <em class="default">(defaults to: <tt>nil</tt>)</em>
1186
+
1187
+
1188
+ &mdash;
1189
+ <div class='inline'>
1190
+ <p>Version of the agreement as provided by <span class='object_link'><a href="#agreement_info-class_method" title="Echochamber::Request.agreement_info (method)">agreement_info</a></span>.
1191
+ If not provided, the latest version of the agreement is used.</p>
1192
+ </div>
1193
+
1194
+ </li>
1195
+
1196
+ </ul>
1197
+
1198
+ <p class="tag_title">Returns:</p>
1199
+ <ul class="return">
1200
+
1201
+ <li>
1202
+
1203
+
1204
+ <span class='type'>(<tt>Hash</tt>)</span>
1205
+
1206
+
1207
+
1208
+ &mdash;
1209
+ <div class='inline'>
1210
+ <p>Agreement documents response body</p>
1211
+ </div>
1212
+
1213
+ </li>
1214
+
1215
+ </ul>
1216
+
1217
+ </div><table class="source_code">
1218
+ <tr>
1219
+ <td>
1220
+ <pre class="lines">
1221
+
1222
+
1223
+ 107
1224
+ 108
1225
+ 109
1226
+ 110
1227
+ 111
1228
+ 112
1229
+ 113
1230
+ 114
1231
+ 115</pre>
1232
+ </td>
1233
+ <td>
1234
+ <pre class="code"><span class="info file"># File 'lib/echochamber/agreement/request.rb', line 107</span>
1235
+
1236
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_agreement_documents'>agreement_documents</span><span class='lparen'>(</span><span class='id identifier rubyid_token'>token</span><span class='comma'>,</span> <span class='id identifier rubyid_agreement_id'>agreement_id</span><span class='comma'>,</span> <span class='id identifier rubyid_recipient_email'>recipient_email</span><span class='op'>=</span><span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_format'>format</span><span class='op'>=</span><span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_version_id'>version_id</span><span class='op'>=</span><span class='kw'>nil</span><span class='rparen'>)</span>
1237
+ <span class='id identifier rubyid_headers'>headers</span> <span class='op'>=</span> <span class='lbrace'>{</span> <span class='symbol'>:accept</span> <span class='op'>=&gt;</span> <span class='symbol'>:json</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Access-Token</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_token'>token</span> <span class='rbrace'>}</span>
1238
+ <span class='id identifier rubyid_endpoint'>endpoint</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='const'>ENDPOINT</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:agreement</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'>/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_agreement_id'>agreement_id</span><span class='embexpr_end'>}</span><span class='tstring_content'>/documents</span><span class='tstring_end'>&quot;</span></span>
1239
+ <span class='id identifier rubyid_endpoint'>endpoint</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_add_query'>add_query</span><span class='lparen'>(</span><span class='id identifier rubyid_endpoint'>endpoint</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>versionId=</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_version_id'>version_id</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='kw'>unless</span> <span class='id identifier rubyid_version_id'>version_id</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
1240
+ <span class='id identifier rubyid_endpoint'>endpoint</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_add_query'>add_query</span><span class='lparen'>(</span><span class='id identifier rubyid_endpoint'>endpoint</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>participantEmail=</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_recipient_email'>recipient_email</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='kw'>unless</span> <span class='id identifier rubyid_version_id'>version_id</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
1241
+ <span class='id identifier rubyid_endpoint'>endpoint</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_add_query'>add_query</span><span class='lparen'>(</span><span class='id identifier rubyid_endpoint'>endpoint</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>supportingDocumentContentFormat=</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_format'>format</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='kw'>unless</span> <span class='id identifier rubyid_format'>format</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
1242
+ <span class='id identifier rubyid_response'>response</span> <span class='op'>=</span> <span class='id identifier rubyid_get'>get</span><span class='lparen'>(</span><span class='id identifier rubyid_endpoint'>endpoint</span><span class='comma'>,</span> <span class='id identifier rubyid_headers'>headers</span><span class='rparen'>)</span>
1243
+ <span class='const'>JSON</span><span class='period'>.</span><span class='id identifier rubyid_parse'>parse</span><span class='lparen'>(</span><span class='id identifier rubyid_response'>response</span><span class='period'>.</span><span class='id identifier rubyid_body'>body</span><span class='rparen'>)</span>
1244
+ <span class='kw'>end</span></pre>
1245
+ </td>
1246
+ </tr>
1247
+ </table>
1248
+ </div>
1249
+
1250
+ <div class="method_details ">
1251
+ <h3 class="signature " id="agreement_form_data-class_method">
1252
+
1253
+ + (<tt>String</tt>) <strong>agreement_form_data</strong>(token, agreement_id)
1254
+
1255
+
1256
+
1257
+
1258
+
1259
+ </h3><div class="docstring">
1260
+ <div class="discussion">
1261
+
1262
+ <p>Retrieves data entered by the user into interactive form fields at the time
1263
+ they signed the agreement</p>
1264
+
1265
+
1266
+ </div>
1267
+ </div>
1268
+ <div class="tags">
1269
+ <p class="tag_title">Parameters:</p>
1270
+ <ul class="param">
1271
+
1272
+ <li>
1273
+
1274
+ <span class='name'>token</span>
1275
+
1276
+
1277
+ <span class='type'>(<tt>String</tt>)</span>
1278
+
1279
+
1280
+
1281
+ &mdash;
1282
+ <div class='inline'>
1283
+ <p>Auth Token</p>
1284
+ </div>
1285
+
1286
+ </li>
1287
+
1288
+ <li>
1289
+
1290
+ <span class='name'>agreement_id</span>
1291
+
1292
+
1293
+ <span class='type'>(<tt>String</tt>)</span>
1294
+
1295
+
1296
+
1297
+ &mdash;
1298
+ <div class='inline'>
1299
+ <p>(REQUIRED)</p>
1300
+ </div>
1301
+
1302
+ </li>
1303
+
1304
+ </ul>
1305
+
1306
+ <p class="tag_title">Returns:</p>
1307
+ <ul class="return">
1308
+
1309
+ <li>
1310
+
1311
+
1312
+ <span class='type'>(<tt>String</tt>)</span>
1313
+
1314
+
1315
+
1316
+ &mdash;
1317
+ <div class='inline'>
1318
+ <p>Raw bytes representing CSV file</p>
1319
+ </div>
1320
+
1321
+ </li>
1322
+
1323
+ </ul>
1324
+
1325
+ </div><table class="source_code">
1326
+ <tr>
1327
+ <td>
1328
+ <pre class="lines">
1329
+
1330
+
1331
+ 72
1332
+ 73
1333
+ 74
1334
+ 75
1335
+ 76</pre>
1336
+ </td>
1337
+ <td>
1338
+ <pre class="code"><span class="info file"># File 'lib/echochamber/agreement/request.rb', line 72</span>
1339
+
1340
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_agreement_form_data'>agreement_form_data</span><span class='lparen'>(</span><span class='id identifier rubyid_token'>token</span><span class='comma'>,</span> <span class='id identifier rubyid_agreement_id'>agreement_id</span><span class='rparen'>)</span>
1341
+ <span class='id identifier rubyid_headers'>headers</span> <span class='op'>=</span> <span class='lbrace'>{</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Access-Token</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_token'>token</span> <span class='rbrace'>}</span>
1342
+ <span class='id identifier rubyid_endpoint'>endpoint</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='const'>ENDPOINT</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:agreement</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'>/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_agreement_id'>agreement_id</span><span class='embexpr_end'>}</span><span class='tstring_content'>/formData</span><span class='tstring_end'>&quot;</span></span>
1343
+ <span class='id identifier rubyid_response'>response</span> <span class='op'>=</span> <span class='id identifier rubyid_get'>get</span><span class='lparen'>(</span><span class='id identifier rubyid_endpoint'>endpoint</span><span class='comma'>,</span> <span class='id identifier rubyid_headers'>headers</span><span class='rparen'>)</span>
1344
+ <span class='kw'>end</span></pre>
1345
+ </td>
1346
+ </tr>
1347
+ </table>
1348
+ </div>
1349
+
1350
+ <div class="method_details ">
1351
+ <h3 class="signature " id="agreement_info-class_method">
1352
+
1353
+ + (<tt>Hash</tt>) <strong>agreement_info</strong>(token, agreement_id)
1354
+
1355
+
1356
+
1357
+
1358
+
1359
+ </h3><div class="docstring">
1360
+ <div class="discussion">
1361
+
1362
+ <p>Performs REST GET /agreement/:id operation</p>
1363
+
1364
+
1365
+ </div>
1366
+ </div>
1367
+ <div class="tags">
1368
+ <p class="tag_title">Parameters:</p>
1369
+ <ul class="param">
1370
+
1371
+ <li>
1372
+
1373
+ <span class='name'>token</span>
1374
+
1375
+
1376
+ <span class='type'>(<tt>String</tt>)</span>
1377
+
1378
+
1379
+
1380
+ &mdash;
1381
+ <div class='inline'>
1382
+ <p>Auth Token</p>
1383
+ </div>
1384
+
1385
+ </li>
1386
+
1387
+ <li>
1388
+
1389
+ <span class='name'>agreement_id</span>
1390
+
1391
+
1392
+ <span class='type'>(<tt>String</tt>)</span>
1393
+
1394
+
1395
+
1396
+ &mdash;
1397
+ <div class='inline'>
1398
+ <p>ID of agreement to retrieve info on.</p>
1399
+ </div>
1400
+
1401
+ </li>
1402
+
1403
+ </ul>
1404
+
1405
+ <p class="tag_title">Returns:</p>
1406
+ <ul class="return">
1407
+
1408
+ <li>
1409
+
1410
+
1411
+ <span class='type'>(<tt>Hash</tt>)</span>
1412
+
1413
+
1414
+
1415
+ &mdash;
1416
+ <div class='inline'>
1417
+ <p>Agreement info response body</p>
1418
+ </div>
1419
+
1420
+ </li>
1421
+
1422
+ </ul>
1423
+
1424
+ </div><table class="source_code">
1425
+ <tr>
1426
+ <td>
1427
+ <pre class="lines">
1428
+
1429
+
1430
+ 33
1431
+ 34
1432
+ 35
1433
+ 36
1434
+ 37
1435
+ 38</pre>
1436
+ </td>
1437
+ <td>
1438
+ <pre class="code"><span class="info file"># File 'lib/echochamber/agreement/request.rb', line 33</span>
1439
+
1440
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_agreement_info'>agreement_info</span><span class='lparen'>(</span><span class='id identifier rubyid_token'>token</span><span class='comma'>,</span> <span class='id identifier rubyid_agreement_id'>agreement_id</span><span class='rparen'>)</span>
1441
+ <span class='id identifier rubyid_headers'>headers</span> <span class='op'>=</span> <span class='lbrace'>{</span> <span class='symbol'>:accept</span> <span class='op'>=&gt;</span> <span class='symbol'>:json</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Access-Token</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_token'>token</span> <span class='rbrace'>}</span>
1442
+ <span class='id identifier rubyid_endpoint'>endpoint</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='const'>ENDPOINT</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:agreement</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'>/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_agreement_id'>agreement_id</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span>
1443
+ <span class='id identifier rubyid_response'>response</span> <span class='op'>=</span> <span class='id identifier rubyid_get'>get</span><span class='lparen'>(</span><span class='id identifier rubyid_endpoint'>endpoint</span><span class='comma'>,</span> <span class='id identifier rubyid_headers'>headers</span><span class='rparen'>)</span>
1444
+ <span class='const'>JSON</span><span class='period'>.</span><span class='id identifier rubyid_parse'>parse</span><span class='lparen'>(</span><span class='id identifier rubyid_response'>response</span><span class='period'>.</span><span class='id identifier rubyid_body'>body</span><span class='rparen'>)</span>
1445
+ <span class='kw'>end</span></pre>
1446
+ </td>
1447
+ </tr>
1448
+ </table>
1449
+ </div>
1450
+
1451
+ <div class="method_details ">
1452
+ <h3 class="signature " id="agreement_signing_urls-class_method">
1453
+
1454
+ + (<tt>Hash</tt>) <strong>agreement_signing_urls</strong>(token, agreement_id)
1455
+
1456
+
1457
+
1458
+
1459
+
1460
+ </h3><div class="docstring">
1461
+ <div class="discussion">
1462
+
1463
+ <p>Performs REST GET /agreement/:id/signingUrls operation</p>
1464
+
1465
+
1466
+ </div>
1467
+ </div>
1468
+ <div class="tags">
1469
+ <p class="tag_title">Parameters:</p>
1470
+ <ul class="param">
1471
+
1472
+ <li>
1473
+
1474
+ <span class='name'>token</span>
1475
+
1476
+
1477
+ <span class='type'>(<tt>String</tt>)</span>
1478
+
1479
+
1480
+
1481
+ &mdash;
1482
+ <div class='inline'>
1483
+ <p>Auth Token</p>
1484
+ </div>
1485
+
1486
+ </li>
1487
+
1488
+ <li>
1489
+
1490
+ <span class='name'>agreement_id</span>
1491
+
1492
+
1493
+ <span class='type'>(<tt>String</tt>)</span>
1494
+
1495
+
1496
+
1497
+ &mdash;
1498
+ <div class='inline'>
1499
+ <p>ID of agreement to retrieve info on.</p>
1500
+ </div>
1501
+
1502
+ </li>
1503
+
1504
+ </ul>
1505
+
1506
+ <p class="tag_title">Returns:</p>
1507
+ <ul class="return">
1508
+
1509
+ <li>
1510
+
1511
+
1512
+ <span class='type'>(<tt>Hash</tt>)</span>
1513
+
1514
+
1515
+
1516
+ &mdash;
1517
+ <div class='inline'>
1518
+ <p>URL information for the eSign page of the agreement</p>
1519
+ </div>
1520
+
1521
+ </li>
1522
+
1523
+ </ul>
1524
+
1525
+ </div><table class="source_code">
1526
+ <tr>
1527
+ <td>
1528
+ <pre class="lines">
1529
+
1530
+
1531
+ 45
1532
+ 46
1533
+ 47
1534
+ 48
1535
+ 49
1536
+ 50</pre>
1537
+ </td>
1538
+ <td>
1539
+ <pre class="code"><span class="info file"># File 'lib/echochamber/agreement/request.rb', line 45</span>
1540
+
1541
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_agreement_signing_urls'>agreement_signing_urls</span><span class='lparen'>(</span><span class='id identifier rubyid_token'>token</span><span class='comma'>,</span> <span class='id identifier rubyid_agreement_id'>agreement_id</span><span class='rparen'>)</span>
1542
+ <span class='id identifier rubyid_headers'>headers</span> <span class='op'>=</span> <span class='lbrace'>{</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Access-Token</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_token'>token</span> <span class='rbrace'>}</span>
1543
+ <span class='id identifier rubyid_endpoint'>endpoint</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='const'>ENDPOINT</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:agreement</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'>/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_agreement_id'>agreement_id</span><span class='embexpr_end'>}</span><span class='tstring_content'>/signingUrls</span><span class='tstring_end'>&quot;</span></span>
1544
+ <span class='id identifier rubyid_response'>response</span> <span class='op'>=</span> <span class='id identifier rubyid_get'>get</span><span class='lparen'>(</span><span class='id identifier rubyid_endpoint'>endpoint</span><span class='comma'>,</span> <span class='id identifier rubyid_headers'>headers</span><span class='rparen'>)</span>
1545
+ <span class='const'>JSON</span><span class='period'>.</span><span class='id identifier rubyid_parse'>parse</span><span class='lparen'>(</span><span class='id identifier rubyid_response'>response</span><span class='period'>.</span><span class='id identifier rubyid_body'>body</span><span class='rparen'>)</span>
1546
+ <span class='kw'>end</span></pre>
1547
+ </td>
1548
+ </tr>
1549
+ </table>
1550
+ </div>
1551
+
1552
+ <div class="method_details ">
1553
+ <h3 class="signature " id="audit_trail_pdf-class_method">
1554
+
1555
+ + (<tt>String</tt>) <strong>audit_trail_pdf</strong>(token, agreement_id)
1556
+
1557
+
1558
+
1559
+
1560
+
1561
+ </h3><div class="docstring">
1562
+ <div class="discussion">
1563
+
1564
+ <p>Performs REST GET /agreement/:id/auditTrail operation</p>
1565
+
1566
+
1567
+ </div>
1568
+ </div>
1569
+ <div class="tags">
1570
+ <p class="tag_title">Parameters:</p>
1571
+ <ul class="param">
1572
+
1573
+ <li>
1574
+
1575
+ <span class='name'>token</span>
1576
+
1577
+
1578
+ <span class='type'>(<tt>String</tt>)</span>
1579
+
1580
+
1581
+
1582
+ &mdash;
1583
+ <div class='inline'>
1584
+ <p>Auth Token</p>
1585
+ </div>
1586
+
1587
+ </li>
1588
+
1589
+ <li>
1590
+
1591
+ <span class='name'>agreement_id</span>
1592
+
1593
+
1594
+ <span class='type'>(<tt>String</tt>)</span>
1595
+
1596
+
1597
+
1598
+ &mdash;
1599
+ <div class='inline'>
1600
+ <p>ID of agreement to retrieve info on.</p>
1601
+ </div>
1602
+
1603
+ </li>
1604
+
1605
+ </ul>
1606
+
1607
+ <p class="tag_title">Returns:</p>
1608
+ <ul class="return">
1609
+
1610
+ <li>
1611
+
1612
+
1613
+ <span class='type'>(<tt>String</tt>)</span>
1614
+
1615
+
1616
+
1617
+ &mdash;
1618
+ <div class='inline'>
1619
+ <p>Raw bytes from audit pdf file</p>
1620
+ </div>
1621
+
1622
+ </li>
1623
+
1624
+ </ul>
1625
+
1626
+ </div><table class="source_code">
1627
+ <tr>
1628
+ <td>
1629
+ <pre class="lines">
1630
+
1631
+
1632
+ 94
1633
+ 95
1634
+ 96
1635
+ 97
1636
+ 98</pre>
1637
+ </td>
1638
+ <td>
1639
+ <pre class="code"><span class="info file"># File 'lib/echochamber/agreement/request.rb', line 94</span>
1640
+
1641
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_audit_trail_pdf'>audit_trail_pdf</span><span class='lparen'>(</span><span class='id identifier rubyid_token'>token</span><span class='comma'>,</span> <span class='id identifier rubyid_agreement_id'>agreement_id</span><span class='rparen'>)</span>
1642
+ <span class='id identifier rubyid_headers'>headers</span> <span class='op'>=</span> <span class='lbrace'>{</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Access-Token</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_token'>token</span> <span class='rbrace'>}</span>
1643
+ <span class='id identifier rubyid_endpoint'>endpoint</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='const'>ENDPOINT</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:agreement</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'>/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_agreement_id'>agreement_id</span><span class='embexpr_end'>}</span><span class='tstring_content'>/auditTrail</span><span class='tstring_end'>&quot;</span></span>
1644
+ <span class='id identifier rubyid_response'>response</span> <span class='op'>=</span> <span class='id identifier rubyid_get'>get</span><span class='lparen'>(</span><span class='id identifier rubyid_endpoint'>endpoint</span><span class='comma'>,</span> <span class='id identifier rubyid_headers'>headers</span><span class='rparen'>)</span>
1645
+ <span class='kw'>end</span></pre>
1646
+ </td>
1647
+ </tr>
1648
+ </table>
1649
+ </div>
1650
+
1651
+ <div class="method_details ">
1652
+ <h3 class="signature " id="create_agreement-class_method">
1653
+
1654
+ + (<tt>Hash</tt>) <strong>create_agreement</strong>(body, token, user_id = nil, user_email = nil)
1655
+
1656
+
1657
+
1658
+
1659
+
1660
+ </h3><div class="docstring">
1661
+ <div class="discussion">
1662
+
1663
+ <p>Performs REST create_agreement operation</p>
1664
+
1665
+
1666
+ </div>
1667
+ </div>
1668
+ <div class="tags">
1669
+ <p class="tag_title">Parameters:</p>
1670
+ <ul class="param">
1671
+
1672
+ <li>
1673
+
1674
+ <span class='name'>body</span>
1675
+
1676
+
1677
+ <span class='type'>(<tt>Hash</tt>)</span>
1678
+
1679
+
1680
+
1681
+ &mdash;
1682
+ <div class='inline'>
1683
+ <p>Request body (REQUIRED)</p>
1684
+ </div>
1685
+
1686
+ </li>
1687
+
1688
+ <li>
1689
+
1690
+ <span class='name'>token</span>
1691
+
1692
+
1693
+ <span class='type'>(<tt>String</tt>)</span>
1694
+
1695
+
1696
+
1697
+ &mdash;
1698
+ <div class='inline'>
1699
+ <p>Auth token (REQUIRED)</p>
1700
+ </div>
1701
+
1702
+ </li>
1703
+
1704
+ <li>
1705
+
1706
+ <span class='name'>user_id</span>
1707
+
1708
+
1709
+ <span class='type'>(<tt>String</tt>)</span>
1710
+
1711
+
1712
+ <em class="default">(defaults to: <tt>nil</tt>)</em>
1713
+
1714
+
1715
+ &mdash;
1716
+ <div class='inline'>
1717
+ <p>Echosign user ID (REQUIRED)</p>
1718
+ </div>
1719
+
1720
+ </li>
1721
+
1722
+ <li>
1723
+
1724
+ <span class='name'>user_email</span>
1725
+
1726
+
1727
+ <span class='type'>(<tt>String</tt>)</span>
1728
+
1729
+
1730
+ <em class="default">(defaults to: <tt>nil</tt>)</em>
1731
+
1732
+
1733
+ &mdash;
1734
+ <div class='inline'>
1735
+ <p>Echosign user email</p>
1736
+ </div>
1737
+
1738
+ </li>
1739
+
1740
+ </ul>
1741
+
1742
+ <p class="tag_title">Returns:</p>
1743
+ <ul class="return">
1744
+
1745
+ <li>
1746
+
1747
+
1748
+ <span class='type'>(<tt>Hash</tt>)</span>
1749
+
1750
+
1751
+
1752
+ &mdash;
1753
+ <div class='inline'>
1754
+ <p>Agreement response body</p>
1755
+ </div>
1756
+
1757
+ </li>
1758
+
1759
+ </ul>
1760
+
1761
+ </div><table class="source_code">
1762
+ <tr>
1763
+ <td>
1764
+ <pre class="lines">
1765
+
1766
+
1767
+ 10
1768
+ 11
1769
+ 12
1770
+ 13
1771
+ 14
1772
+ 15
1773
+ 16</pre>
1774
+ </td>
1775
+ <td>
1776
+ <pre class="code"><span class="info file"># File 'lib/echochamber/agreement/request.rb', line 10</span>
1777
+
1778
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_create_agreement'>create_agreement</span><span class='lparen'>(</span><span class='id identifier rubyid_body'>body</span><span class='comma'>,</span> <span class='id identifier rubyid_token'>token</span><span class='comma'>,</span> <span class='id identifier rubyid_user_id'>user_id</span><span class='op'>=</span><span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_user_email'>user_email</span><span class='op'>=</span><span class='kw'>nil</span><span class='rparen'>)</span>
1779
+ <span class='id identifier rubyid_headers'>headers</span> <span class='op'>=</span> <span class='lbrace'>{</span> <span class='symbol'>:content_type</span> <span class='op'>=&gt;</span> <span class='symbol'>:json</span><span class='comma'>,</span> <span class='symbol'>:accept</span> <span class='op'>=&gt;</span> <span class='symbol'>:json</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Access-Token</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_token'>token</span> <span class='rbrace'>}</span>
1780
+ <span class='id identifier rubyid_headers'>headers</span><span class='period'>.</span><span class='id identifier rubyid_merge!'>merge!</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>X-User-Id</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_user_id'>user_id</span><span class='rparen'>)</span> <span class='kw'>unless</span> <span class='id identifier rubyid_user_id'>user_id</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
1781
+ <span class='id identifier rubyid_headers'>headers</span><span class='period'>.</span><span class='id identifier rubyid_merge!'>merge!</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>X-User-Email</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_user_email'>user_email</span><span class='rparen'>)</span> <span class='kw'>unless</span> <span class='id identifier rubyid_user_email'>user_email</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
1782
+ <span class='id identifier rubyid_response'>response</span> <span class='op'>=</span> <span class='id identifier rubyid_post'>post</span><span class='lparen'>(</span><span class='const'>ENDPOINT</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:agreement</span><span class='rparen'>)</span><span class='comma'>,</span> <span class='id identifier rubyid_body'>body</span><span class='comma'>,</span> <span class='id identifier rubyid_headers'>headers</span><span class='rparen'>)</span>
1783
+ <span class='const'>JSON</span><span class='period'>.</span><span class='id identifier rubyid_parse'>parse</span><span class='lparen'>(</span><span class='id identifier rubyid_response'>response</span><span class='period'>.</span><span class='id identifier rubyid_body'>body</span><span class='rparen'>)</span>
1784
+ <span class='kw'>end</span></pre>
1785
+ </td>
1786
+ </tr>
1787
+ </table>
1788
+ </div>
1789
+
1790
+ <div class="method_details ">
1791
+ <h3 class="signature " id="create_reminder-class_method">
1792
+
1793
+ + (<tt>Hash</tt>) <strong>create_reminder</strong>(token, body)
1794
+
1795
+
1796
+
1797
+
1798
+
1799
+ </h3><div class="docstring">
1800
+ <div class="discussion">
1801
+
1802
+ <p>Sends a reminder for an agreement.</p>
1803
+
1804
+
1805
+ </div>
1806
+ </div>
1807
+ <div class="tags">
1808
+ <p class="tag_title">Parameters:</p>
1809
+ <ul class="param">
1810
+
1811
+ <li>
1812
+
1813
+ <span class='name'>body</span>
1814
+
1815
+
1816
+ <span class='type'>(<tt>Hash</tt>)</span>
1817
+
1818
+
1819
+
1820
+ &mdash;
1821
+ <div class='inline'>
1822
+ <p>Valid request body</p>
1823
+ </div>
1824
+
1825
+ </li>
1826
+
1827
+ <li>
1828
+
1829
+ <span class='name'>token</span>
1830
+
1831
+
1832
+ <span class='type'>(<tt>String</tt>)</span>
1833
+
1834
+
1835
+
1836
+ &mdash;
1837
+ <div class='inline'>
1838
+ <p>Auth Token</p>
1839
+ </div>
1840
+
1841
+ </li>
1842
+
1843
+ </ul>
1844
+
1845
+ <p class="tag_title">Returns:</p>
1846
+ <ul class="return">
1847
+
1848
+ <li>
1849
+
1850
+
1851
+ <span class='type'>(<tt>Hash</tt>)</span>
1852
+
1853
+
1854
+
1855
+ &mdash;
1856
+ <div class='inline'>
1857
+ <p>Response body</p>
1858
+ </div>
1859
+
1860
+ </li>
1861
+
1862
+ </ul>
1863
+
1864
+ </div><table class="source_code">
1865
+ <tr>
1866
+ <td>
1867
+ <pre class="lines">
1868
+
1869
+
1870
+ 49
1871
+ 50
1872
+ 51
1873
+ 52
1874
+ 53
1875
+ 54</pre>
1876
+ </td>
1877
+ <td>
1878
+ <pre class="code"><span class="info file"># File 'lib/echochamber/request.rb', line 49</span>
1879
+
1880
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_create_reminder'>create_reminder</span><span class='lparen'>(</span><span class='id identifier rubyid_token'>token</span><span class='comma'>,</span> <span class='id identifier rubyid_body'>body</span><span class='rparen'>)</span>
1881
+ <span class='id identifier rubyid_endpoint'>endpoint</span> <span class='op'>=</span> <span class='const'>ENDPOINT</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:reminder</span><span class='rparen'>)</span>
1882
+ <span class='id identifier rubyid_headers'>headers</span> <span class='op'>=</span> <span class='lbrace'>{</span> <span class='symbol'>:content_type</span> <span class='op'>=&gt;</span> <span class='symbol'>:json</span><span class='comma'>,</span> <span class='symbol'>:accept</span> <span class='op'>=&gt;</span> <span class='symbol'>:json</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Access-Token</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_token'>token</span><span class='rbrace'>}</span>
1883
+ <span class='id identifier rubyid_response'>response</span> <span class='op'>=</span> <span class='id identifier rubyid_post'>post</span><span class='lparen'>(</span><span class='id identifier rubyid_endpoint'>endpoint</span><span class='comma'>,</span> <span class='id identifier rubyid_body'>body</span><span class='comma'>,</span> <span class='id identifier rubyid_headers'>headers</span><span class='rparen'>)</span>
1884
+ <span class='const'>JSON</span><span class='period'>.</span><span class='id identifier rubyid_parse'>parse</span><span class='lparen'>(</span><span class='id identifier rubyid_response'>response</span><span class='period'>.</span><span class='id identifier rubyid_body'>body</span><span class='rparen'>)</span>
1885
+ <span class='kw'>end</span></pre>
1886
+ </td>
1887
+ </tr>
1888
+ </table>
1889
+ </div>
1890
+
1891
+ <div class="method_details ">
1892
+ <h3 class="signature " id="create_transient_document-class_method">
1893
+
1894
+ + (<tt>Hash</tt>) <strong>create_transient_document</strong>(token, file_name, file_handle, mime_type = nil)
1895
+
1896
+
1897
+
1898
+
1899
+
1900
+ </h3><div class="docstring">
1901
+ <div class="discussion">
1902
+
1903
+ <p>Performs REST create_transient_document operation</p>
1904
+
1905
+
1906
+ </div>
1907
+ </div>
1908
+ <div class="tags">
1909
+ <p class="tag_title">Parameters:</p>
1910
+ <ul class="param">
1911
+
1912
+ <li>
1913
+
1914
+ <span class='name'>token</span>
1915
+
1916
+
1917
+ <span class='type'>(<tt>String</tt>)</span>
1918
+
1919
+
1920
+
1921
+ &mdash;
1922
+ <div class='inline'>
1923
+ <p>Auth token (REQUIRED)</p>
1924
+ </div>
1925
+
1926
+ </li>
1927
+
1928
+ <li>
1929
+
1930
+ <span class='name'>file_name</span>
1931
+
1932
+
1933
+ <span class='type'>(<tt>String</tt>)</span>
1934
+
1935
+
1936
+
1937
+ &mdash;
1938
+ <div class='inline'>
1939
+ <p>File name (REQUIRED)</p>
1940
+ </div>
1941
+
1942
+ </li>
1943
+
1944
+ <li>
1945
+
1946
+ <span class='name'>file_handle</span>
1947
+
1948
+
1949
+ <span class='type'>(<tt>File</tt>)</span>
1950
+
1951
+
1952
+
1953
+ &mdash;
1954
+ <div class='inline'>
1955
+ <p>File handle (REQUIRED)</p>
1956
+ </div>
1957
+
1958
+ </li>
1959
+
1960
+ <li>
1961
+
1962
+ <span class='name'>mime_type</span>
1963
+
1964
+
1965
+ <span class='type'>(<tt>String</tt>)</span>
1966
+
1967
+
1968
+ <em class="default">(defaults to: <tt>nil</tt>)</em>
1969
+
1970
+
1971
+ &mdash;
1972
+ <div class='inline'>
1973
+ <p>Mime type</p>
1974
+ </div>
1975
+
1976
+ </li>
1977
+
1978
+ </ul>
1979
+
1980
+ <p class="tag_title">Returns:</p>
1981
+ <ul class="return">
1982
+
1983
+ <li>
1984
+
1985
+
1986
+ <span class='type'>(<tt>Hash</tt>)</span>
1987
+
1988
+
1989
+
1990
+ &mdash;
1991
+ <div class='inline'>
1992
+ <p>Transient Document Response Body</p>
1993
+ </div>
1994
+
1995
+ </li>
1996
+
1997
+ </ul>
1998
+
1999
+ </div><table class="source_code">
2000
+ <tr>
2001
+ <td>
2002
+ <pre class="lines">
2003
+
2004
+
2005
+ 63
2006
+ 64
2007
+ 65
2008
+ 66
2009
+ 67
2010
+ 68
2011
+ 69
2012
+ 70
2013
+ 71
2014
+ 72
2015
+ 73
2016
+ 74
2017
+ 75
2018
+ 76
2019
+ 77
2020
+ 78
2021
+ 79
2022
+ 80</pre>
2023
+ </td>
2024
+ <td>
2025
+ <pre class="code"><span class="info file"># File 'lib/echochamber/request.rb', line 63</span>
2026
+
2027
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_create_transient_document'>create_transient_document</span><span class='lparen'>(</span><span class='id identifier rubyid_token'>token</span><span class='comma'>,</span> <span class='id identifier rubyid_file_name'>file_name</span><span class='comma'>,</span> <span class='id identifier rubyid_file_handle'>file_handle</span><span class='comma'>,</span> <span class='id identifier rubyid_mime_type'>mime_type</span><span class='op'>=</span><span class='kw'>nil</span><span class='rparen'>)</span>
2028
+ <span class='id identifier rubyid_headers'>headers</span> <span class='op'>=</span> <span class='lbrace'>{</span> <span class='symbol'>:content_type</span> <span class='op'>=&gt;</span> <span class='symbol'>:json</span><span class='comma'>,</span> <span class='symbol'>:accept</span> <span class='op'>=&gt;</span> <span class='symbol'>:json</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Access-Token</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_token'>token</span> <span class='rbrace'>}</span>
2029
+
2030
+ <span class='kw'>begin</span>
2031
+ <span class='id identifier rubyid_response'>response</span> <span class='op'>=</span> <span class='const'>RestClient</span><span class='period'>.</span><span class='id identifier rubyid_post'>post</span><span class='lparen'>(</span>
2032
+ <span class='const'>ENDPOINT</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:transientDocument</span><span class='rparen'>)</span><span class='comma'>,</span>
2033
+ <span class='lbrace'>{</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>File-Name</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_file_name'>file_name</span><span class='comma'>,</span>
2034
+ <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Mime-Type</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_mime_type'>mime_type</span><span class='comma'>,</span>
2035
+ <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>File</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_file_handle'>file_handle</span><span class='comma'>,</span>
2036
+ <span class='symbol'>:multipart</span> <span class='op'>=&gt;</span> <span class='kw'>true</span><span class='rbrace'>}</span><span class='comma'>,</span>
2037
+ <span class='id identifier rubyid_headers'>headers</span>
2038
+ <span class='rparen'>)</span>
2039
+ <span class='kw'>rescue</span> <span class='const'>Exception</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_error'>error</span>
2040
+ <span class='id identifier rubyid_raise_error'>raise_error</span><span class='lparen'>(</span><span class='id identifier rubyid_error'>error</span><span class='rparen'>)</span>
2041
+ <span class='kw'>end</span>
2042
+
2043
+ <span class='const'>JSON</span><span class='period'>.</span><span class='id identifier rubyid_parse'>parse</span><span class='lparen'>(</span><span class='id identifier rubyid_response'>response</span><span class='period'>.</span><span class='id identifier rubyid_body'>body</span><span class='rparen'>)</span>
2044
+ <span class='kw'>end</span></pre>
2045
+ </td>
2046
+ </tr>
2047
+ </table>
2048
+ </div>
2049
+
2050
+ <div class="method_details ">
2051
+ <h3 class="signature " id="create_user-class_method">
2052
+
2053
+ + (<tt>Hash</tt>) <strong>create_user</strong>(body, token)
2054
+
2055
+
2056
+
2057
+
2058
+
2059
+ </h3><div class="docstring">
2060
+ <div class="discussion">
2061
+
2062
+ <p>Performs REST create_user operation</p>
2063
+
2064
+
2065
+ </div>
2066
+ </div>
2067
+ <div class="tags">
2068
+ <p class="tag_title">Parameters:</p>
2069
+ <ul class="param">
2070
+
2071
+ <li>
2072
+
2073
+ <span class='name'>body</span>
2074
+
2075
+
2076
+ <span class='type'>(<tt>Hash</tt>)</span>
2077
+
2078
+
2079
+
2080
+ &mdash;
2081
+ <div class='inline'>
2082
+ <p>Valid request body</p>
2083
+ </div>
2084
+
2085
+ </li>
2086
+
2087
+ <li>
2088
+
2089
+ <span class='name'>token</span>
2090
+
2091
+
2092
+ <span class='type'>(<tt>String</tt>)</span>
2093
+
2094
+
2095
+
2096
+ &mdash;
2097
+ <div class='inline'>
2098
+ <p>Auth Token</p>
2099
+ </div>
2100
+
2101
+ </li>
2102
+
2103
+ </ul>
2104
+
2105
+ <p class="tag_title">Returns:</p>
2106
+ <ul class="return">
2107
+
2108
+ <li>
2109
+
2110
+
2111
+ <span class='type'>(<tt>Hash</tt>)</span>
2112
+
2113
+
2114
+
2115
+ &mdash;
2116
+ <div class='inline'>
2117
+ <p>New user response body</p>
2118
+ </div>
2119
+
2120
+ </li>
2121
+
2122
+ </ul>
2123
+
2124
+ </div><table class="source_code">
2125
+ <tr>
2126
+ <td>
2127
+ <pre class="lines">
2128
+
2129
+
2130
+ 37
2131
+ 38
2132
+ 39
2133
+ 40
2134
+ 41
2135
+ 42</pre>
2136
+ </td>
2137
+ <td>
2138
+ <pre class="code"><span class="info file"># File 'lib/echochamber/request.rb', line 37</span>
2139
+
2140
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_create_user'>create_user</span><span class='lparen'>(</span><span class='id identifier rubyid_body'>body</span><span class='comma'>,</span> <span class='id identifier rubyid_token'>token</span><span class='rparen'>)</span>
2141
+ <span class='id identifier rubyid_endpoint'>endpoint</span> <span class='op'>=</span> <span class='const'>ENDPOINT</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:user</span><span class='rparen'>)</span>
2142
+ <span class='id identifier rubyid_headers'>headers</span> <span class='op'>=</span> <span class='lbrace'>{</span> <span class='symbol'>:content_type</span> <span class='op'>=&gt;</span> <span class='symbol'>:json</span><span class='comma'>,</span> <span class='symbol'>:accept</span> <span class='op'>=&gt;</span> <span class='symbol'>:json</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Access-Token</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_token'>token</span><span class='rbrace'>}</span>
2143
+ <span class='id identifier rubyid_response'>response</span> <span class='op'>=</span> <span class='id identifier rubyid_post'>post</span><span class='lparen'>(</span><span class='id identifier rubyid_endpoint'>endpoint</span><span class='comma'>,</span> <span class='id identifier rubyid_body'>body</span><span class='comma'>,</span> <span class='id identifier rubyid_headers'>headers</span><span class='rparen'>)</span>
2144
+ <span class='const'>JSON</span><span class='period'>.</span><span class='id identifier rubyid_parse'>parse</span><span class='lparen'>(</span><span class='id identifier rubyid_response'>response</span><span class='period'>.</span><span class='id identifier rubyid_body'>body</span><span class='rparen'>)</span>
2145
+ <span class='kw'>end</span></pre>
2146
+ </td>
2147
+ </tr>
2148
+ </table>
2149
+ </div>
2150
+
2151
+ <div class="method_details ">
2152
+ <h3 class="signature " id="create_widget-class_method">
2153
+
2154
+ + (<tt>Hash</tt>) <strong>create_widget</strong>(token, widget)
2155
+
2156
+
2157
+
2158
+
2159
+
2160
+ </h3><div class="docstring">
2161
+ <div class="discussion">
2162
+
2163
+ <p>Creates a widget and returns the Javascript snippet and URL to access the
2164
+ widget and widgetID in response to the client</p>
2165
+
2166
+
2167
+ </div>
2168
+ </div>
2169
+ <div class="tags">
2170
+ <p class="tag_title">Parameters:</p>
2171
+ <ul class="param">
2172
+
2173
+ <li>
2174
+
2175
+ <span class='name'>token</span>
2176
+
2177
+
2178
+ <span class='type'>(<tt>String</tt>)</span>
2179
+
2180
+
2181
+
2182
+ &mdash;
2183
+ <div class='inline'>
2184
+ <p>Auth token</p>
2185
+ </div>
2186
+
2187
+ </li>
2188
+
2189
+ <li>
2190
+
2191
+ <span class='name'>widget</span>
2192
+
2193
+
2194
+ <span class='type'>(<tt><span class='object_link'><a href="Widget.html" title="Echochamber::Widget (class)">Echochamber::Widget</a></span></tt>)</span>
2195
+
2196
+
2197
+
2198
+ </li>
2199
+
2200
+ </ul>
2201
+
2202
+ <p class="tag_title">Returns:</p>
2203
+ <ul class="return">
2204
+
2205
+ <li>
2206
+
2207
+
2208
+ <span class='type'>(<tt>Hash</tt>)</span>
2209
+
2210
+
2211
+
2212
+ </li>
2213
+
2214
+ </ul>
2215
+
2216
+ </div><table class="source_code">
2217
+ <tr>
2218
+ <td>
2219
+ <pre class="lines">
2220
+
2221
+
2222
+ 8
2223
+ 9
2224
+ 10
2225
+ 11
2226
+ 12
2227
+ 13
2228
+ 14
2229
+ 15</pre>
2230
+ </td>
2231
+ <td>
2232
+ <pre class="code"><span class="info file"># File 'lib/echochamber/widget/request.rb', line 8</span>
2233
+
2234
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_create_widget'>create_widget</span><span class='lparen'>(</span><span class='id identifier rubyid_token'>token</span><span class='comma'>,</span> <span class='id identifier rubyid_widget'>widget</span><span class='rparen'>)</span>
2235
+ <span class='id identifier rubyid_endpoint'>endpoint</span> <span class='op'>=</span> <span class='const'>ENDPOINT</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:widget</span><span class='rparen'>)</span>
2236
+ <span class='id identifier rubyid_headers'>headers</span> <span class='op'>=</span> <span class='lbrace'>{</span> <span class='symbol'>:content_type</span> <span class='op'>=&gt;</span> <span class='symbol'>:json</span><span class='comma'>,</span> <span class='symbol'>:accept</span> <span class='op'>=&gt;</span> <span class='symbol'>:json</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Access-Token</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_token'>token</span><span class='rbrace'>}</span>
2237
+ <span class='id identifier rubyid_headers'>headers</span><span class='period'>.</span><span class='id identifier rubyid_merge!'>merge!</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>X-User-Id</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_widget'>widget</span><span class='period'>.</span><span class='id identifier rubyid_user_id'>user_id</span><span class='rparen'>)</span> <span class='kw'>unless</span> <span class='id identifier rubyid_widget'>widget</span><span class='period'>.</span><span class='id identifier rubyid_user_id'>user_id</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
2238
+ <span class='id identifier rubyid_headers'>headers</span><span class='period'>.</span><span class='id identifier rubyid_merge!'>merge!</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>X-User-Email</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_widget'>widget</span><span class='period'>.</span><span class='id identifier rubyid_user_email'>user_email</span><span class='rparen'>)</span> <span class='kw'>unless</span> <span class='id identifier rubyid_widget'>widget</span><span class='period'>.</span><span class='id identifier rubyid_user_email'>user_email</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
2239
+ <span class='id identifier rubyid_response'>response</span> <span class='op'>=</span> <span class='id identifier rubyid_post'>post</span><span class='lparen'>(</span><span class='id identifier rubyid_endpoint'>endpoint</span><span class='comma'>,</span> <span class='id identifier rubyid_widget'>widget</span><span class='comma'>,</span> <span class='id identifier rubyid_headers'>headers</span><span class='rparen'>)</span>
2240
+ <span class='const'>JSON</span><span class='period'>.</span><span class='id identifier rubyid_parse'>parse</span><span class='lparen'>(</span><span class='id identifier rubyid_response'>response</span><span class='period'>.</span><span class='id identifier rubyid_body'>body</span><span class='rparen'>)</span>
2241
+ <span class='kw'>end</span></pre>
2242
+ </td>
2243
+ </tr>
2244
+ </table>
2245
+ </div>
2246
+
2247
+ <div class="method_details ">
2248
+ <h3 class="signature " id="get_agreements-class_method">
2249
+
2250
+ + (<tt>Hash</tt>) <strong>get_agreements</strong>(token)
2251
+
2252
+
2253
+
2254
+
2255
+
2256
+ </h3><div class="docstring">
2257
+ <div class="discussion">
2258
+
2259
+ <p>Performs REST GET /agreements operation</p>
2260
+
2261
+
2262
+ </div>
2263
+ </div>
2264
+ <div class="tags">
2265
+ <p class="tag_title">Parameters:</p>
2266
+ <ul class="param">
2267
+
2268
+ <li>
2269
+
2270
+ <span class='name'>token</span>
2271
+
2272
+
2273
+ <span class='type'>(<tt>String</tt>)</span>
2274
+
2275
+
2276
+
2277
+ &mdash;
2278
+ <div class='inline'>
2279
+ <p>Auth Token</p>
2280
+ </div>
2281
+
2282
+ </li>
2283
+
2284
+ </ul>
2285
+
2286
+ <p class="tag_title">Returns:</p>
2287
+ <ul class="return">
2288
+
2289
+ <li>
2290
+
2291
+
2292
+ <span class='type'>(<tt>Hash</tt>)</span>
2293
+
2294
+
2295
+
2296
+ &mdash;
2297
+ <div class='inline'>
2298
+ <p>Agreements response body</p>
2299
+ </div>
2300
+
2301
+ </li>
2302
+
2303
+ </ul>
2304
+
2305
+ </div><table class="source_code">
2306
+ <tr>
2307
+ <td>
2308
+ <pre class="lines">
2309
+
2310
+
2311
+ 22
2312
+ 23
2313
+ 24
2314
+ 25
2315
+ 26</pre>
2316
+ </td>
2317
+ <td>
2318
+ <pre class="code"><span class="info file"># File 'lib/echochamber/agreement/request.rb', line 22</span>
2319
+
2320
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_get_agreements'>get_agreements</span><span class='lparen'>(</span><span class='id identifier rubyid_token'>token</span><span class='rparen'>)</span>
2321
+ <span class='id identifier rubyid_headers'>headers</span> <span class='op'>=</span> <span class='lbrace'>{</span> <span class='symbol'>:accept</span> <span class='op'>=&gt;</span> <span class='symbol'>:json</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Access-Token</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_token'>token</span> <span class='rbrace'>}</span>
2322
+ <span class='id identifier rubyid_response'>response</span> <span class='op'>=</span> <span class='id identifier rubyid_get'>get</span><span class='lparen'>(</span><span class='const'>ENDPOINT</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:agreement</span><span class='rparen'>)</span><span class='comma'>,</span> <span class='id identifier rubyid_headers'>headers</span><span class='rparen'>)</span>
2323
+ <span class='const'>JSON</span><span class='period'>.</span><span class='id identifier rubyid_parse'>parse</span><span class='lparen'>(</span><span class='id identifier rubyid_response'>response</span><span class='period'>.</span><span class='id identifier rubyid_body'>body</span><span class='rparen'>)</span>
2324
+ <span class='kw'>end</span></pre>
2325
+ </td>
2326
+ </tr>
2327
+ </table>
2328
+ </div>
2329
+
2330
+ <div class="method_details ">
2331
+ <h3 class="signature " id="get_library_document-class_method">
2332
+
2333
+ + (<tt>Hash</tt>) <strong>get_library_document</strong>(token, library_document_id)
2334
+
2335
+
2336
+
2337
+
2338
+
2339
+ </h3><div class="docstring">
2340
+ <div class="discussion">
2341
+
2342
+ <p>Retrieves library document metadata for a user.</p>
2343
+
2344
+
2345
+ </div>
2346
+ </div>
2347
+ <div class="tags">
2348
+ <p class="tag_title">Parameters:</p>
2349
+ <ul class="param">
2350
+
2351
+ <li>
2352
+
2353
+ <span class='name'>token</span>
2354
+
2355
+
2356
+ <span class='type'>(<tt>String</tt>)</span>
2357
+
2358
+
2359
+
2360
+ &mdash;
2361
+ <div class='inline'>
2362
+ <p>Auth Token</p>
2363
+ </div>
2364
+
2365
+ </li>
2366
+
2367
+ <li>
2368
+
2369
+ <span class='name'>library_document_id</span>
2370
+
2371
+
2372
+ <span class='type'>(<tt>String</tt>)</span>
2373
+
2374
+
2375
+
2376
+ </li>
2377
+
2378
+ </ul>
2379
+
2380
+ <p class="tag_title">Returns:</p>
2381
+ <ul class="return">
2382
+
2383
+ <li>
2384
+
2385
+
2386
+ <span class='type'>(<tt>Hash</tt>)</span>
2387
+
2388
+
2389
+
2390
+ &mdash;
2391
+ <div class='inline'>
2392
+ <p>Library document metadata</p>
2393
+ </div>
2394
+
2395
+ </li>
2396
+
2397
+ </ul>
2398
+
2399
+ </div><table class="source_code">
2400
+ <tr>
2401
+ <td>
2402
+ <pre class="lines">
2403
+
2404
+
2405
+ 23
2406
+ 24
2407
+ 25
2408
+ 26
2409
+ 27
2410
+ 28</pre>
2411
+ </td>
2412
+ <td>
2413
+ <pre class="code"><span class="info file"># File 'lib/echochamber/library_documents/request.rb', line 23</span>
2414
+
2415
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_get_library_document'>get_library_document</span><span class='lparen'>(</span><span class='id identifier rubyid_token'>token</span><span class='comma'>,</span> <span class='id identifier rubyid_library_document_id'>library_document_id</span><span class='rparen'>)</span>
2416
+ <span class='id identifier rubyid_headers'>headers</span> <span class='op'>=</span> <span class='lbrace'>{</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Access-Token</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_token'>token</span> <span class='rbrace'>}</span>
2417
+ <span class='id identifier rubyid_endpoint'>endpoint</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='const'>ENDPOINT</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:libraryDocument</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'>/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_library_document_id'>library_document_id</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span>
2418
+ <span class='id identifier rubyid_response'>response</span> <span class='op'>=</span> <span class='id identifier rubyid_get'>get</span><span class='lparen'>(</span><span class='id identifier rubyid_endpoint'>endpoint</span><span class='comma'>,</span> <span class='id identifier rubyid_headers'>headers</span><span class='rparen'>)</span>
2419
+ <span class='const'>JSON</span><span class='period'>.</span><span class='id identifier rubyid_parse'>parse</span><span class='lparen'>(</span><span class='id identifier rubyid_response'>response</span><span class='rparen'>)</span>
2420
+ <span class='kw'>end</span></pre>
2421
+ </td>
2422
+ </tr>
2423
+ </table>
2424
+ </div>
2425
+
2426
+ <div class="method_details ">
2427
+ <h3 class="signature " id="get_library_document_file-class_method">
2428
+
2429
+ + (<tt>String</tt>) <strong>get_library_document_file</strong>(token, library_document_id, file_id)
2430
+
2431
+
2432
+
2433
+
2434
+
2435
+ </h3><div class="docstring">
2436
+ <div class="discussion">
2437
+
2438
+ <p>Retrieves library document file data</p>
2439
+
2440
+
2441
+ </div>
2442
+ </div>
2443
+ <div class="tags">
2444
+ <p class="tag_title">Parameters:</p>
2445
+ <ul class="param">
2446
+
2447
+ <li>
2448
+
2449
+ <span class='name'>token</span>
2450
+
2451
+
2452
+ <span class='type'>(<tt>String</tt>)</span>
2453
+
2454
+
2455
+
2456
+ &mdash;
2457
+ <div class='inline'>
2458
+ <p>Auth Token</p>
2459
+ </div>
2460
+
2461
+ </li>
2462
+
2463
+ <li>
2464
+
2465
+ <span class='name'>library_document_id</span>
2466
+
2467
+
2468
+ <span class='type'>(<tt>String</tt>)</span>
2469
+
2470
+
2471
+
2472
+ &mdash;
2473
+ <div class='inline'>
2474
+ <p>(REQUIRED)</p>
2475
+ </div>
2476
+
2477
+ </li>
2478
+
2479
+ <li>
2480
+
2481
+ <span class='name'>file_id</span>
2482
+
2483
+
2484
+ <span class='type'>(<tt>String</tt>)</span>
2485
+
2486
+
2487
+
2488
+ &mdash;
2489
+ <div class='inline'>
2490
+ <p>(REQUIRED)</p>
2491
+ </div>
2492
+
2493
+ </li>
2494
+
2495
+ </ul>
2496
+
2497
+ <p class="tag_title">Returns:</p>
2498
+ <ul class="return">
2499
+
2500
+ <li>
2501
+
2502
+
2503
+ <span class='type'>(<tt>String</tt>)</span>
2504
+
2505
+
2506
+
2507
+ &mdash;
2508
+ <div class='inline'>
2509
+ <p>Library document file data</p>
2510
+ </div>
2511
+
2512
+ </li>
2513
+
2514
+ </ul>
2515
+
2516
+ </div><table class="source_code">
2517
+ <tr>
2518
+ <td>
2519
+ <pre class="lines">
2520
+
2521
+
2522
+ 48
2523
+ 49
2524
+ 50
2525
+ 51
2526
+ 52</pre>
2527
+ </td>
2528
+ <td>
2529
+ <pre class="code"><span class="info file"># File 'lib/echochamber/library_documents/request.rb', line 48</span>
2530
+
2531
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_get_library_document_file'>get_library_document_file</span><span class='lparen'>(</span><span class='id identifier rubyid_token'>token</span><span class='comma'>,</span> <span class='id identifier rubyid_library_document_id'>library_document_id</span><span class='comma'>,</span> <span class='id identifier rubyid_file_id'>file_id</span><span class='rparen'>)</span>
2532
+ <span class='id identifier rubyid_headers'>headers</span> <span class='op'>=</span> <span class='lbrace'>{</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Access-Token</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_token'>token</span> <span class='rbrace'>}</span>
2533
+ <span class='id identifier rubyid_endpoint'>endpoint</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='const'>ENDPOINT</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:libraryDocument</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'>/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_library_document_id'>library_document_id</span><span class='embexpr_end'>}</span><span class='tstring_content'>/documents/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_file_id'>file_id</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span>
2534
+ <span class='id identifier rubyid_response'>response</span> <span class='op'>=</span> <span class='id identifier rubyid_get'>get</span><span class='lparen'>(</span><span class='id identifier rubyid_endpoint'>endpoint</span><span class='comma'>,</span> <span class='id identifier rubyid_headers'>headers</span><span class='rparen'>)</span>
2535
+ <span class='kw'>end</span></pre>
2536
+ </td>
2537
+ </tr>
2538
+ </table>
2539
+ </div>
2540
+
2541
+ <div class="method_details ">
2542
+ <h3 class="signature " id="get_library_document_files-class_method">
2543
+
2544
+ + (<tt>Hash</tt>) <strong>get_library_document_files</strong>(token, library_document_id)
2545
+
2546
+
2547
+
2548
+
2549
+
2550
+ </h3><div class="docstring">
2551
+ <div class="discussion">
2552
+
2553
+ <p>Retrieves library document file</p>
2554
+
2555
+
2556
+ </div>
2557
+ </div>
2558
+ <div class="tags">
2559
+ <p class="tag_title">Parameters:</p>
2560
+ <ul class="param">
2561
+
2562
+ <li>
2563
+
2564
+ <span class='name'>token</span>
2565
+
2566
+
2567
+ <span class='type'>(<tt>String</tt>)</span>
2568
+
2569
+
2570
+
2571
+ &mdash;
2572
+ <div class='inline'>
2573
+ <p>Auth Token</p>
2574
+ </div>
2575
+
2576
+ </li>
2577
+
2578
+ <li>
2579
+
2580
+ <span class='name'>library_document_id</span>
2581
+
2582
+
2583
+ <span class='type'>(<tt>String</tt>)</span>
2584
+
2585
+
2586
+
2587
+ &mdash;
2588
+ <div class='inline'>
2589
+ <p>(REQUIRED)</p>
2590
+ </div>
2591
+
2592
+ </li>
2593
+
2594
+ </ul>
2595
+
2596
+ <p class="tag_title">Returns:</p>
2597
+ <ul class="return">
2598
+
2599
+ <li>
2600
+
2601
+
2602
+ <span class='type'>(<tt>Hash</tt>)</span>
2603
+
2604
+
2605
+
2606
+ &mdash;
2607
+ <div class='inline'>
2608
+ <p>Library document files metadata</p>
2609
+ </div>
2610
+
2611
+ </li>
2612
+
2613
+ </ul>
2614
+
2615
+ </div><table class="source_code">
2616
+ <tr>
2617
+ <td>
2618
+ <pre class="lines">
2619
+
2620
+
2621
+ 35
2622
+ 36
2623
+ 37
2624
+ 38
2625
+ 39
2626
+ 40</pre>
2627
+ </td>
2628
+ <td>
2629
+ <pre class="code"><span class="info file"># File 'lib/echochamber/library_documents/request.rb', line 35</span>
2630
+
2631
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_get_library_document_files'>get_library_document_files</span><span class='lparen'>(</span><span class='id identifier rubyid_token'>token</span><span class='comma'>,</span> <span class='id identifier rubyid_library_document_id'>library_document_id</span><span class='rparen'>)</span>
2632
+ <span class='id identifier rubyid_headers'>headers</span> <span class='op'>=</span> <span class='lbrace'>{</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Access-Token</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_token'>token</span> <span class='rbrace'>}</span>
2633
+ <span class='id identifier rubyid_endpoint'>endpoint</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='const'>ENDPOINT</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:libraryDocument</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'>/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_library_document_id'>library_document_id</span><span class='embexpr_end'>}</span><span class='tstring_content'>/documents</span><span class='tstring_end'>&quot;</span></span>
2634
+ <span class='id identifier rubyid_response'>response</span> <span class='op'>=</span> <span class='id identifier rubyid_get'>get</span><span class='lparen'>(</span><span class='id identifier rubyid_endpoint'>endpoint</span><span class='comma'>,</span> <span class='id identifier rubyid_headers'>headers</span><span class='rparen'>)</span>
2635
+ <span class='const'>JSON</span><span class='period'>.</span><span class='id identifier rubyid_parse'>parse</span><span class='lparen'>(</span><span class='id identifier rubyid_response'>response</span><span class='rparen'>)</span>
2636
+ <span class='kw'>end</span></pre>
2637
+ </td>
2638
+ </tr>
2639
+ </table>
2640
+ </div>
2641
+
2642
+ <div class="method_details ">
2643
+ <h3 class="signature " id="get_library_documents-class_method">
2644
+
2645
+ + (<tt>Hash</tt>) <strong>get_library_documents</strong>(token, user_id = nil, user_email = nil)
2646
+
2647
+
2648
+
2649
+
2650
+
2651
+ </h3><div class="docstring">
2652
+ <div class="discussion">
2653
+
2654
+ <p>Retrieves library documents for a user.</p>
2655
+
2656
+
2657
+ </div>
2658
+ </div>
2659
+ <div class="tags">
2660
+ <p class="tag_title">Parameters:</p>
2661
+ <ul class="param">
2662
+
2663
+ <li>
2664
+
2665
+ <span class='name'>token</span>
2666
+
2667
+
2668
+ <span class='type'>(<tt>String</tt>)</span>
2669
+
2670
+
2671
+
2672
+ &mdash;
2673
+ <div class='inline'>
2674
+ <p>Auth Token</p>
2675
+ </div>
2676
+
2677
+ </li>
2678
+
2679
+ <li>
2680
+
2681
+ <span class='name'>user_id</span>
2682
+
2683
+
2684
+ <span class='type'>(<tt>String</tt>)</span>
2685
+
2686
+
2687
+ <em class="default">(defaults to: <tt>nil</tt>)</em>
2688
+
2689
+
2690
+ &mdash;
2691
+ <div class='inline'>
2692
+ <p>The ID of the user whose library documents are being requested.</p>
2693
+ </div>
2694
+
2695
+ </li>
2696
+
2697
+ <li>
2698
+
2699
+ <span class='name'>user_email</span>
2700
+
2701
+
2702
+ <span class='type'>(<tt>String</tt>)</span>
2703
+
2704
+
2705
+ <em class="default">(defaults to: <tt>nil</tt>)</em>
2706
+
2707
+
2708
+ &mdash;
2709
+ <div class='inline'>
2710
+ <p>The email address of the user whose library documents are being requested.
2711
+ If both user_id and user_email are provided then user_id is given
2712
+ preference. If neither is specified then the user is inferred from the
2713
+ access token.</p>
2714
+ </div>
2715
+
2716
+ </li>
2717
+
2718
+ </ul>
2719
+
2720
+ <p class="tag_title">Returns:</p>
2721
+ <ul class="return">
2722
+
2723
+ <li>
2724
+
2725
+
2726
+ <span class='type'>(<tt>Hash</tt>)</span>
2727
+
2728
+
2729
+
2730
+ &mdash;
2731
+ <div class='inline'>
2732
+ <p>Library documents metadata</p>
2733
+ </div>
2734
+
2735
+ </li>
2736
+
2737
+ </ul>
2738
+
2739
+ </div><table class="source_code">
2740
+ <tr>
2741
+ <td>
2742
+ <pre class="lines">
2743
+
2744
+
2745
+ 9
2746
+ 10
2747
+ 11
2748
+ 12
2749
+ 13
2750
+ 14
2751
+ 15
2752
+ 16</pre>
2753
+ </td>
2754
+ <td>
2755
+ <pre class="code"><span class="info file"># File 'lib/echochamber/library_documents/request.rb', line 9</span>
2756
+
2757
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_get_library_documents'>get_library_documents</span><span class='lparen'>(</span><span class='id identifier rubyid_token'>token</span><span class='comma'>,</span> <span class='id identifier rubyid_user_id'>user_id</span><span class='op'>=</span><span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_user_email'>user_email</span><span class='op'>=</span><span class='kw'>nil</span><span class='rparen'>)</span>
2758
+ <span class='id identifier rubyid_headers'>headers</span> <span class='op'>=</span> <span class='lbrace'>{</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Access-Token</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_token'>token</span> <span class='rbrace'>}</span>
2759
+ <span class='id identifier rubyid_headers'>headers</span><span class='period'>.</span><span class='id identifier rubyid_merge!'>merge!</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>X-User-Id</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_user_id'>user_id</span><span class='rparen'>)</span> <span class='kw'>unless</span> <span class='id identifier rubyid_user_id'>user_id</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
2760
+ <span class='id identifier rubyid_headers'>headers</span><span class='period'>.</span><span class='id identifier rubyid_merge!'>merge!</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>X-User-Email</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_user_email'>user_email</span><span class='rparen'>)</span> <span class='kw'>unless</span> <span class='id identifier rubyid_user_email'>user_email</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
2761
+ <span class='id identifier rubyid_endpoint'>endpoint</span> <span class='op'>=</span> <span class='const'>ENDPOINT</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:libraryDocument</span><span class='rparen'>)</span>
2762
+ <span class='id identifier rubyid_response'>response</span> <span class='op'>=</span> <span class='id identifier rubyid_get'>get</span><span class='lparen'>(</span><span class='id identifier rubyid_endpoint'>endpoint</span><span class='comma'>,</span> <span class='id identifier rubyid_headers'>headers</span><span class='rparen'>)</span>
2763
+ <span class='const'>JSON</span><span class='period'>.</span><span class='id identifier rubyid_parse'>parse</span><span class='lparen'>(</span><span class='id identifier rubyid_response'>response</span><span class='rparen'>)</span>
2764
+ <span class='kw'>end</span></pre>
2765
+ </td>
2766
+ </tr>
2767
+ </table>
2768
+ </div>
2769
+
2770
+ <div class="method_details ">
2771
+ <h3 class="signature " id="get_token-class_method">
2772
+
2773
+ + (<tt>String</tt>) <strong>get_token</strong>(credentials)
2774
+
2775
+
2776
+
2777
+
2778
+
2779
+ </h3><div class="docstring">
2780
+ <div class="discussion">
2781
+
2782
+ <p>Retrieves the authentication token</p>
2783
+
2784
+
2785
+ </div>
2786
+ </div>
2787
+ <div class="tags">
2788
+ <p class="tag_title">Parameters:</p>
2789
+ <ul class="param">
2790
+
2791
+ <li>
2792
+
2793
+ <span class='name'>credentials</span>
2794
+
2795
+
2796
+ <span class='type'>(<tt><span class='object_link'><a href="Credentials.html" title="Echochamber::Credentials (class)">Echochamber::Credentials</a></span></tt>)</span>
2797
+
2798
+
2799
+
2800
+ &mdash;
2801
+ <div class='inline'>
2802
+ <p>Initialized Echochamber::Credentials</p>
2803
+ </div>
2804
+
2805
+ </li>
2806
+
2807
+ </ul>
2808
+
2809
+ <p class="tag_title">Returns:</p>
2810
+ <ul class="return">
2811
+
2812
+ <li>
2813
+
2814
+
2815
+ <span class='type'>(<tt>String</tt>)</span>
2816
+
2817
+
2818
+
2819
+ &mdash;
2820
+ <div class='inline'>
2821
+ <p>Valid authentication token</p>
2822
+ </div>
2823
+
2824
+ </li>
2825
+
2826
+ </ul>
2827
+
2828
+ </div><table class="source_code">
2829
+ <tr>
2830
+ <td>
2831
+ <pre class="lines">
2832
+
2833
+
2834
+ 25
2835
+ 26
2836
+ 27
2837
+ 28
2838
+ 29
2839
+ 30</pre>
2840
+ </td>
2841
+ <td>
2842
+ <pre class="code"><span class="info file"># File 'lib/echochamber/request.rb', line 25</span>
2843
+
2844
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_get_token'>get_token</span><span class='lparen'>(</span><span class='id identifier rubyid_credentials'>credentials</span><span class='rparen'>)</span>
2845
+ <span class='id identifier rubyid_headers'>headers</span> <span class='op'>=</span> <span class='lbrace'>{</span> <span class='symbol'>:content_type</span> <span class='op'>=&gt;</span> <span class='symbol'>:json</span><span class='comma'>,</span> <span class='symbol'>:accept</span> <span class='op'>=&gt;</span> <span class='symbol'>:json</span> <span class='rbrace'>}</span>
2846
+ <span class='id identifier rubyid_response'>response</span> <span class='op'>=</span> <span class='id identifier rubyid_post'>post</span><span class='lparen'>(</span><span class='const'>ENDPOINT</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:token</span><span class='rparen'>)</span><span class='comma'>,</span> <span class='id identifier rubyid_credentials'>credentials</span><span class='comma'>,</span> <span class='id identifier rubyid_headers'>headers</span><span class='rparen'>)</span>
2847
+ <span class='id identifier rubyid_response_body'>response_body</span> <span class='op'>=</span> <span class='const'>JSON</span><span class='period'>.</span><span class='id identifier rubyid_parse'>parse</span><span class='lparen'>(</span><span class='id identifier rubyid_response'>response</span><span class='period'>.</span><span class='id identifier rubyid_body'>body</span><span class='rparen'>)</span>
2848
+ <span class='id identifier rubyid_response_body'>response_body</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>accessToken</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
2849
+ <span class='kw'>end</span></pre>
2850
+ </td>
2851
+ </tr>
2852
+ </table>
2853
+ </div>
2854
+
2855
+ <div class="method_details ">
2856
+ <h3 class="signature " id="get_user-class_method">
2857
+
2858
+ + (<tt>Hash</tt>) <strong>get_user</strong>(token, user_id)
2859
+
2860
+
2861
+
2862
+
2863
+
2864
+ </h3><div class="docstring">
2865
+ <div class="discussion">
2866
+
2867
+ <p>Gets all the users in an account that the caller has permissions to access.</p>
2868
+
2869
+
2870
+ </div>
2871
+ </div>
2872
+ <div class="tags">
2873
+ <p class="tag_title">Parameters:</p>
2874
+ <ul class="param">
2875
+
2876
+ <li>
2877
+
2878
+ <span class='name'>token</span>
2879
+
2880
+
2881
+ <span class='type'>(<tt>String</tt>)</span>
2882
+
2883
+
2884
+
2885
+ &mdash;
2886
+ <div class='inline'>
2887
+ <p>Auth Token</p>
2888
+ </div>
2889
+
2890
+ </li>
2891
+
2892
+ <li>
2893
+
2894
+ <span class='name'>user_id</span>
2895
+
2896
+
2897
+ <span class='type'>(<tt>String</tt>)</span>
2898
+
2899
+
2900
+
2901
+ </li>
2902
+
2903
+ </ul>
2904
+
2905
+ <p class="tag_title">Returns:</p>
2906
+ <ul class="return">
2907
+
2908
+ <li>
2909
+
2910
+
2911
+ <span class='type'>(<tt>Hash</tt>)</span>
2912
+
2913
+
2914
+
2915
+ &mdash;
2916
+ <div class='inline'>
2917
+ <p>User info hash</p>
2918
+ </div>
2919
+
2920
+ </li>
2921
+
2922
+ </ul>
2923
+
2924
+ </div><table class="source_code">
2925
+ <tr>
2926
+ <td>
2927
+ <pre class="lines">
2928
+
2929
+
2930
+ 99
2931
+ 100
2932
+ 101
2933
+ 102
2934
+ 103
2935
+ 104</pre>
2936
+ </td>
2937
+ <td>
2938
+ <pre class="code"><span class="info file"># File 'lib/echochamber/request.rb', line 99</span>
2939
+
2940
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_get_user'>get_user</span><span class='lparen'>(</span><span class='id identifier rubyid_token'>token</span><span class='comma'>,</span> <span class='id identifier rubyid_user_id'>user_id</span><span class='rparen'>)</span>
2941
+ <span class='id identifier rubyid_headers'>headers</span> <span class='op'>=</span> <span class='lbrace'>{</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Access-Token</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_token'>token</span> <span class='rbrace'>}</span>
2942
+ <span class='id identifier rubyid_endpoint'>endpoint</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='const'>ENDPOINT</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:user</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'>/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_user_id'>user_id</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span>
2943
+ <span class='id identifier rubyid_response'>response</span> <span class='op'>=</span> <span class='id identifier rubyid_get'>get</span><span class='lparen'>(</span><span class='id identifier rubyid_endpoint'>endpoint</span><span class='comma'>,</span> <span class='id identifier rubyid_headers'>headers</span><span class='rparen'>)</span>
2944
+ <span class='const'>JSON</span><span class='period'>.</span><span class='id identifier rubyid_parse'>parse</span><span class='lparen'>(</span><span class='id identifier rubyid_response'>response</span><span class='rparen'>)</span>
2945
+ <span class='kw'>end</span></pre>
2946
+ </td>
2947
+ </tr>
2948
+ </table>
2949
+ </div>
2950
+
2951
+ <div class="method_details ">
2952
+ <h3 class="signature " id="get_users-class_method">
2953
+
2954
+ + (<tt>Hash</tt>) <strong>get_users</strong>(token, user_email)
2955
+
2956
+
2957
+
2958
+
2959
+
2960
+ </h3><div class="docstring">
2961
+ <div class="discussion">
2962
+
2963
+ <p>Gets all the users in an account that the caller has permissions to access.</p>
2964
+
2965
+
2966
+ </div>
2967
+ </div>
2968
+ <div class="tags">
2969
+ <p class="tag_title">Parameters:</p>
2970
+ <ul class="param">
2971
+
2972
+ <li>
2973
+
2974
+ <span class='name'>token</span>
2975
+
2976
+
2977
+ <span class='type'>(<tt>String</tt>)</span>
2978
+
2979
+
2980
+
2981
+ &mdash;
2982
+ <div class='inline'>
2983
+ <p>Auth Token</p>
2984
+ </div>
2985
+
2986
+ </li>
2987
+
2988
+ <li>
2989
+
2990
+ <span class='name'>user_email</span>
2991
+
2992
+
2993
+ <span class='type'>(<tt>String</tt>)</span>
2994
+
2995
+
2996
+
2997
+ &mdash;
2998
+ <div class='inline'>
2999
+ <p>The email address of the user whose details are being requested.</p>
3000
+ </div>
3001
+
3002
+ </li>
3003
+
3004
+ </ul>
3005
+
3006
+ <p class="tag_title">Returns:</p>
3007
+ <ul class="return">
3008
+
3009
+ <li>
3010
+
3011
+
3012
+ <span class='type'>(<tt>Hash</tt>)</span>
3013
+
3014
+
3015
+
3016
+ &mdash;
3017
+ <div class='inline'>
3018
+ <p>User info hash</p>
3019
+ </div>
3020
+
3021
+ </li>
3022
+
3023
+ </ul>
3024
+
3025
+ </div><table class="source_code">
3026
+ <tr>
3027
+ <td>
3028
+ <pre class="lines">
3029
+
3030
+
3031
+ 87
3032
+ 88
3033
+ 89
3034
+ 90
3035
+ 91
3036
+ 92</pre>
3037
+ </td>
3038
+ <td>
3039
+ <pre class="code"><span class="info file"># File 'lib/echochamber/request.rb', line 87</span>
3040
+
3041
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_get_users'>get_users</span><span class='lparen'>(</span><span class='id identifier rubyid_token'>token</span><span class='comma'>,</span> <span class='id identifier rubyid_user_email'>user_email</span><span class='rparen'>)</span>
3042
+ <span class='id identifier rubyid_headers'>headers</span> <span class='op'>=</span> <span class='lbrace'>{</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Access-Token</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_token'>token</span> <span class='rbrace'>}</span>
3043
+ <span class='id identifier rubyid_endpoint'>endpoint</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='const'>ENDPOINT</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:user</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'>?x-user-email=</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_user_email'>user_email</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span>
3044
+ <span class='id identifier rubyid_response'>response</span> <span class='op'>=</span> <span class='id identifier rubyid_get'>get</span><span class='lparen'>(</span><span class='id identifier rubyid_endpoint'>endpoint</span><span class='comma'>,</span> <span class='id identifier rubyid_headers'>headers</span><span class='rparen'>)</span>
3045
+ <span class='const'>JSON</span><span class='period'>.</span><span class='id identifier rubyid_parse'>parse</span><span class='lparen'>(</span><span class='id identifier rubyid_response'>response</span><span class='rparen'>)</span>
3046
+ <span class='kw'>end</span></pre>
3047
+ </td>
3048
+ </tr>
3049
+ </table>
3050
+ </div>
3051
+
3052
+ <div class="method_details ">
3053
+ <h3 class="signature " id="get_widget-class_method">
3054
+
3055
+ + (<tt>Hash</tt>) <strong>get_widget</strong>(token, widget_id)
3056
+
3057
+
3058
+
3059
+
3060
+
3061
+ </h3><div class="docstring">
3062
+ <div class="discussion">
3063
+
3064
+ <p>Performs GET /widget operation</p>
3065
+
3066
+
3067
+ </div>
3068
+ </div>
3069
+ <div class="tags">
3070
+ <p class="tag_title">Parameters:</p>
3071
+ <ul class="param">
3072
+
3073
+ <li>
3074
+
3075
+ <span class='name'>widget_id</span>
3076
+
3077
+
3078
+ <span class='type'>(<tt>String</tt>)</span>
3079
+
3080
+
3081
+
3082
+ </li>
3083
+
3084
+ </ul>
3085
+
3086
+ <p class="tag_title">Returns:</p>
3087
+ <ul class="return">
3088
+
3089
+ <li>
3090
+
3091
+
3092
+ <span class='type'>(<tt>Hash</tt>)</span>
3093
+
3094
+
3095
+
3096
+ &mdash;
3097
+ <div class='inline'>
3098
+ <p>Response body</p>
3099
+ </div>
3100
+
3101
+ </li>
3102
+
3103
+ </ul>
3104
+
3105
+ </div><table class="source_code">
3106
+ <tr>
3107
+ <td>
3108
+ <pre class="lines">
3109
+
3110
+
3111
+ 82
3112
+ 83
3113
+ 84
3114
+ 85
3115
+ 86
3116
+ 87</pre>
3117
+ </td>
3118
+ <td>
3119
+ <pre class="code"><span class="info file"># File 'lib/echochamber/widget/request.rb', line 82</span>
3120
+
3121
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_get_widget'>get_widget</span><span class='lparen'>(</span><span class='id identifier rubyid_token'>token</span><span class='comma'>,</span> <span class='id identifier rubyid_widget_id'>widget_id</span><span class='rparen'>)</span>
3122
+ <span class='id identifier rubyid_headers'>headers</span> <span class='op'>=</span> <span class='lbrace'>{</span> <span class='symbol'>:content_type</span> <span class='op'>=&gt;</span> <span class='symbol'>:json</span><span class='comma'>,</span> <span class='symbol'>:accept</span> <span class='op'>=&gt;</span> <span class='symbol'>:json</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Access-Token</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_token'>token</span> <span class='rbrace'>}</span>
3123
+ <span class='id identifier rubyid_endpoint'>endpoint</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='const'>ENDPOINT</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:widget</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'>/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_widget_id'>widget_id</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span>
3124
+ <span class='id identifier rubyid_response'>response</span> <span class='op'>=</span> <span class='id identifier rubyid_get'>get</span><span class='lparen'>(</span><span class='id identifier rubyid_endpoint'>endpoint</span><span class='comma'>,</span> <span class='id identifier rubyid_headers'>headers</span><span class='rparen'>)</span>
3125
+ <span class='const'>JSON</span><span class='period'>.</span><span class='id identifier rubyid_parse'>parse</span><span class='lparen'>(</span><span class='id identifier rubyid_response'>response</span><span class='period'>.</span><span class='id identifier rubyid_body'>body</span><span class='rparen'>)</span>
3126
+ <span class='kw'>end</span></pre>
3127
+ </td>
3128
+ </tr>
3129
+ </table>
3130
+ </div>
3131
+
3132
+ <div class="method_details ">
3133
+ <h3 class="signature " id="get_widget_audit_trail-class_method">
3134
+
3135
+ + (<tt>Hash</tt>) <strong>get_widget_audit_trail</strong>(token, widget_id)
3136
+
3137
+
3138
+
3139
+
3140
+
3141
+ </h3><div class="docstring">
3142
+ <div class="discussion">
3143
+
3144
+ <p>Performs GET /widget/:id/auditTrail</p>
3145
+
3146
+
3147
+ </div>
3148
+ </div>
3149
+ <div class="tags">
3150
+ <p class="tag_title">Parameters:</p>
3151
+ <ul class="param">
3152
+
3153
+ <li>
3154
+
3155
+ <span class='name'>widget_id</span>
3156
+
3157
+
3158
+ <span class='type'>(<tt>String</tt>)</span>
3159
+
3160
+
3161
+
3162
+ </li>
3163
+
3164
+ </ul>
3165
+
3166
+ <p class="tag_title">Returns:</p>
3167
+ <ul class="return">
3168
+
3169
+ <li>
3170
+
3171
+
3172
+ <span class='type'>(<tt>Hash</tt>)</span>
3173
+
3174
+
3175
+
3176
+ &mdash;
3177
+ <div class='inline'>
3178
+ <p>Response body</p>
3179
+ </div>
3180
+
3181
+ </li>
3182
+
3183
+ </ul>
3184
+
3185
+ </div><table class="source_code">
3186
+ <tr>
3187
+ <td>
3188
+ <pre class="lines">
3189
+
3190
+
3191
+ 116
3192
+ 117
3193
+ 118
3194
+ 119
3195
+ 120</pre>
3196
+ </td>
3197
+ <td>
3198
+ <pre class="code"><span class="info file"># File 'lib/echochamber/widget/request.rb', line 116</span>
3199
+
3200
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_get_widget_audit_trail'>get_widget_audit_trail</span><span class='lparen'>(</span><span class='id identifier rubyid_token'>token</span><span class='comma'>,</span> <span class='id identifier rubyid_widget_id'>widget_id</span><span class='rparen'>)</span>
3201
+ <span class='id identifier rubyid_headers'>headers</span> <span class='op'>=</span> <span class='lbrace'>{</span> <span class='symbol'>:content_type</span> <span class='op'>=&gt;</span> <span class='symbol'>:json</span><span class='comma'>,</span> <span class='symbol'>:accept</span> <span class='op'>=&gt;</span> <span class='symbol'>:json</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Access-Token</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_token'>token</span> <span class='rbrace'>}</span>
3202
+ <span class='id identifier rubyid_endpoint'>endpoint</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='const'>ENDPOINT</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:widget</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'>/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_widget_id'>widget_id</span><span class='embexpr_end'>}</span><span class='tstring_content'>/auditTrail</span><span class='tstring_end'>&quot;</span></span>
3203
+ <span class='id identifier rubyid_response'>response</span> <span class='op'>=</span> <span class='id identifier rubyid_get'>get</span><span class='lparen'>(</span><span class='id identifier rubyid_endpoint'>endpoint</span><span class='comma'>,</span> <span class='id identifier rubyid_headers'>headers</span><span class='rparen'>)</span>
3204
+ <span class='kw'>end</span></pre>
3205
+ </td>
3206
+ </tr>
3207
+ </table>
3208
+ </div>
3209
+
3210
+ <div class="method_details ">
3211
+ <h3 class="signature " id="get_widget_document_file-class_method">
3212
+
3213
+ + (<tt>Hash</tt>) <strong>get_widget_document_file</strong>(token, widget_id, document_id)
3214
+
3215
+
3216
+
3217
+
3218
+
3219
+ </h3><div class="docstring">
3220
+ <div class="discussion">
3221
+
3222
+ <p>Performs GET /widget/:id/documents/:id operation</p>
3223
+
3224
+
3225
+ </div>
3226
+ </div>
3227
+ <div class="tags">
3228
+ <p class="tag_title">Parameters:</p>
3229
+ <ul class="param">
3230
+
3231
+ <li>
3232
+
3233
+ <span class='name'>widget_id</span>
3234
+
3235
+
3236
+ <span class='type'>(<tt>String</tt>)</span>
3237
+
3238
+
3239
+
3240
+ </li>
3241
+
3242
+ </ul>
3243
+
3244
+ <p class="tag_title">Returns:</p>
3245
+ <ul class="return">
3246
+
3247
+ <li>
3248
+
3249
+
3250
+ <span class='type'>(<tt>Hash</tt>)</span>
3251
+
3252
+
3253
+
3254
+ &mdash;
3255
+ <div class='inline'>
3256
+ <p>Response body</p>
3257
+ </div>
3258
+
3259
+ </li>
3260
+
3261
+ </ul>
3262
+
3263
+ </div><table class="source_code">
3264
+ <tr>
3265
+ <td>
3266
+ <pre class="lines">
3267
+
3268
+
3269
+ 106
3270
+ 107
3271
+ 108
3272
+ 109
3273
+ 110</pre>
3274
+ </td>
3275
+ <td>
3276
+ <pre class="code"><span class="info file"># File 'lib/echochamber/widget/request.rb', line 106</span>
3277
+
3278
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_get_widget_document_file'>get_widget_document_file</span><span class='lparen'>(</span><span class='id identifier rubyid_token'>token</span><span class='comma'>,</span> <span class='id identifier rubyid_widget_id'>widget_id</span><span class='comma'>,</span> <span class='id identifier rubyid_document_id'>document_id</span><span class='rparen'>)</span>
3279
+ <span class='id identifier rubyid_headers'>headers</span> <span class='op'>=</span> <span class='lbrace'>{</span> <span class='symbol'>:content_type</span> <span class='op'>=&gt;</span> <span class='symbol'>:json</span><span class='comma'>,</span> <span class='symbol'>:accept</span> <span class='op'>=&gt;</span> <span class='symbol'>:json</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Access-Token</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_token'>token</span> <span class='rbrace'>}</span>
3280
+ <span class='id identifier rubyid_endpoint'>endpoint</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='const'>ENDPOINT</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:widget</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'>/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_widget_id'>widget_id</span><span class='embexpr_end'>}</span><span class='tstring_content'>/documents/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_document_id'>document_id</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span>
3281
+ <span class='id identifier rubyid_response'>response</span> <span class='op'>=</span> <span class='id identifier rubyid_get'>get</span><span class='lparen'>(</span><span class='id identifier rubyid_endpoint'>endpoint</span><span class='comma'>,</span> <span class='id identifier rubyid_headers'>headers</span><span class='rparen'>)</span>
3282
+ <span class='kw'>end</span></pre>
3283
+ </td>
3284
+ </tr>
3285
+ </table>
3286
+ </div>
3287
+
3288
+ <div class="method_details ">
3289
+ <h3 class="signature " id="get_widget_documents-class_method">
3290
+
3291
+ + (<tt>Hash</tt>) <strong>get_widget_documents</strong>(token, widget_id, version_id = nil, participant_email = nil)
3292
+
3293
+
3294
+
3295
+
3296
+
3297
+ </h3><div class="docstring">
3298
+ <div class="discussion">
3299
+
3300
+ <p>Performs GET /widget/:id/documents operation</p>
3301
+
3302
+
3303
+ </div>
3304
+ </div>
3305
+ <div class="tags">
3306
+ <p class="tag_title">Parameters:</p>
3307
+ <ul class="param">
3308
+
3309
+ <li>
3310
+
3311
+ <span class='name'>widget_id</span>
3312
+
3313
+
3314
+ <span class='type'>(<tt>String</tt>)</span>
3315
+
3316
+
3317
+
3318
+ </li>
3319
+
3320
+ </ul>
3321
+
3322
+ <p class="tag_title">Returns:</p>
3323
+ <ul class="return">
3324
+
3325
+ <li>
3326
+
3327
+
3328
+ <span class='type'>(<tt>Hash</tt>)</span>
3329
+
3330
+
3331
+
3332
+ &mdash;
3333
+ <div class='inline'>
3334
+ <p>Response body</p>
3335
+ </div>
3336
+
3337
+ </li>
3338
+
3339
+ </ul>
3340
+
3341
+ </div><table class="source_code">
3342
+ <tr>
3343
+ <td>
3344
+ <pre class="lines">
3345
+
3346
+
3347
+ 93
3348
+ 94
3349
+ 95
3350
+ 96
3351
+ 97
3352
+ 98
3353
+ 99
3354
+ 100</pre>
3355
+ </td>
3356
+ <td>
3357
+ <pre class="code"><span class="info file"># File 'lib/echochamber/widget/request.rb', line 93</span>
3358
+
3359
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_get_widget_documents'>get_widget_documents</span><span class='lparen'>(</span><span class='id identifier rubyid_token'>token</span><span class='comma'>,</span> <span class='id identifier rubyid_widget_id'>widget_id</span><span class='comma'>,</span> <span class='id identifier rubyid_version_id'>version_id</span><span class='op'>=</span><span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_participant_email'>participant_email</span><span class='op'>=</span><span class='kw'>nil</span><span class='rparen'>)</span>
3360
+ <span class='id identifier rubyid_headers'>headers</span> <span class='op'>=</span> <span class='lbrace'>{</span> <span class='symbol'>:content_type</span> <span class='op'>=&gt;</span> <span class='symbol'>:json</span><span class='comma'>,</span> <span class='symbol'>:accept</span> <span class='op'>=&gt;</span> <span class='symbol'>:json</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Access-Token</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_token'>token</span> <span class='rbrace'>}</span>
3361
+ <span class='id identifier rubyid_endpoint'>endpoint</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='const'>ENDPOINT</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:widget</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'>/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_widget_id'>widget_id</span><span class='embexpr_end'>}</span><span class='tstring_content'>/documents</span><span class='tstring_end'>&quot;</span></span>
3362
+ <span class='id identifier rubyid_endpoint'>endpoint</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_add_query'>add_query</span><span class='lparen'>(</span><span class='id identifier rubyid_endpoint'>endpoint</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>versionId=</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_version_id'>version_id</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='kw'>unless</span> <span class='id identifier rubyid_version_id'>version_id</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
3363
+ <span class='id identifier rubyid_endpoint'>endpoint</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_add_query'>add_query</span><span class='lparen'>(</span><span class='id identifier rubyid_endpoint'>endpoint</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>participantEmail=</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_participant_email'>participant_email</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='kw'>unless</span> <span class='id identifier rubyid_participant_email'>participant_email</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
3364
+ <span class='id identifier rubyid_response'>response</span> <span class='op'>=</span> <span class='id identifier rubyid_get'>get</span><span class='lparen'>(</span><span class='id identifier rubyid_endpoint'>endpoint</span><span class='comma'>,</span> <span class='id identifier rubyid_headers'>headers</span><span class='rparen'>)</span>
3365
+ <span class='const'>JSON</span><span class='period'>.</span><span class='id identifier rubyid_parse'>parse</span><span class='lparen'>(</span><span class='id identifier rubyid_response'>response</span><span class='period'>.</span><span class='id identifier rubyid_body'>body</span><span class='rparen'>)</span>
3366
+ <span class='kw'>end</span></pre>
3367
+ </td>
3368
+ </tr>
3369
+ </table>
3370
+ </div>
3371
+
3372
+ <div class="method_details ">
3373
+ <h3 class="signature " id="get_widget_form_data-class_method">
3374
+
3375
+ + (<tt>Hash</tt>) <strong>get_widget_form_data</strong>(token, widget_id)
3376
+
3377
+
3378
+
3379
+
3380
+
3381
+ </h3><div class="docstring">
3382
+ <div class="discussion">
3383
+
3384
+ <p>Performs GET /widget/:id/formData</p>
3385
+
3386
+
3387
+ </div>
3388
+ </div>
3389
+ <div class="tags">
3390
+ <p class="tag_title">Parameters:</p>
3391
+ <ul class="param">
3392
+
3393
+ <li>
3394
+
3395
+ <span class='name'>widget_id</span>
3396
+
3397
+
3398
+ <span class='type'>(<tt>String</tt>)</span>
3399
+
3400
+
3401
+
3402
+ </li>
3403
+
3404
+ </ul>
3405
+
3406
+ <p class="tag_title">Returns:</p>
3407
+ <ul class="return">
3408
+
3409
+ <li>
3410
+
3411
+
3412
+ <span class='type'>(<tt>Hash</tt>)</span>
3413
+
3414
+
3415
+
3416
+ &mdash;
3417
+ <div class='inline'>
3418
+ <p>Response body</p>
3419
+ </div>
3420
+
3421
+ </li>
3422
+
3423
+ </ul>
3424
+
3425
+ </div><table class="source_code">
3426
+ <tr>
3427
+ <td>
3428
+ <pre class="lines">
3429
+
3430
+
3431
+ 126
3432
+ 127
3433
+ 128
3434
+ 129
3435
+ 130</pre>
3436
+ </td>
3437
+ <td>
3438
+ <pre class="code"><span class="info file"># File 'lib/echochamber/widget/request.rb', line 126</span>
3439
+
3440
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_get_widget_form_data'>get_widget_form_data</span><span class='lparen'>(</span><span class='id identifier rubyid_token'>token</span><span class='comma'>,</span> <span class='id identifier rubyid_widget_id'>widget_id</span><span class='rparen'>)</span>
3441
+ <span class='id identifier rubyid_headers'>headers</span> <span class='op'>=</span> <span class='lbrace'>{</span> <span class='symbol'>:content_type</span> <span class='op'>=&gt;</span> <span class='symbol'>:json</span><span class='comma'>,</span> <span class='symbol'>:accept</span> <span class='op'>=&gt;</span> <span class='symbol'>:json</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Access-Token</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_token'>token</span> <span class='rbrace'>}</span>
3442
+ <span class='id identifier rubyid_endpoint'>endpoint</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='const'>ENDPOINT</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:widget</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'>/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_widget_id'>widget_id</span><span class='embexpr_end'>}</span><span class='tstring_content'>/formData</span><span class='tstring_end'>&quot;</span></span>
3443
+ <span class='id identifier rubyid_response'>response</span> <span class='op'>=</span> <span class='id identifier rubyid_get'>get</span><span class='lparen'>(</span><span class='id identifier rubyid_endpoint'>endpoint</span><span class='comma'>,</span> <span class='id identifier rubyid_headers'>headers</span><span class='rparen'>)</span>
3444
+ <span class='kw'>end</span></pre>
3445
+ </td>
3446
+ </tr>
3447
+ </table>
3448
+ </div>
3449
+
3450
+ <div class="method_details ">
3451
+ <h3 class="signature " id="get_widgets-class_method">
3452
+
3453
+ + (<tt>Hash</tt>) <strong>get_widgets</strong>(token, user_id = nil, user_email = nil)
3454
+
3455
+
3456
+
3457
+
3458
+
3459
+ </h3><div class="docstring">
3460
+ <div class="discussion">
3461
+
3462
+ <p>Performs GET /widgets operation</p>
3463
+
3464
+
3465
+ </div>
3466
+ </div>
3467
+ <div class="tags">
3468
+ <p class="tag_title">Parameters:</p>
3469
+ <ul class="param">
3470
+
3471
+ <li>
3472
+
3473
+ <span class='name'>token</span>
3474
+
3475
+
3476
+ <span class='type'>(<tt>String</tt>)</span>
3477
+
3478
+
3479
+
3480
+ &mdash;
3481
+ <div class='inline'>
3482
+ <p>Auth Token</p>
3483
+ </div>
3484
+
3485
+ </li>
3486
+
3487
+ <li>
3488
+
3489
+ <span class='name'>user_id</span>
3490
+
3491
+
3492
+ <span class='type'>(<tt>String</tt>)</span>
3493
+
3494
+
3495
+ <em class="default">(defaults to: <tt>nil</tt>)</em>
3496
+
3497
+
3498
+ </li>
3499
+
3500
+ <li>
3501
+
3502
+ <span class='name'>user_email</span>
3503
+
3504
+
3505
+ <span class='type'>(<tt>String</tt>)</span>
3506
+
3507
+
3508
+ <em class="default">(defaults to: <tt>nil</tt>)</em>
3509
+
3510
+
3511
+ </li>
3512
+
3513
+ </ul>
3514
+
3515
+ <p class="tag_title">Returns:</p>
3516
+ <ul class="return">
3517
+
3518
+ <li>
3519
+
3520
+
3521
+ <span class='type'>(<tt>Hash</tt>)</span>
3522
+
3523
+
3524
+
3525
+ &mdash;
3526
+ <div class='inline'>
3527
+ <p>Response body</p>
3528
+ </div>
3529
+
3530
+ </li>
3531
+
3532
+ </ul>
3533
+
3534
+ </div><table class="source_code">
3535
+ <tr>
3536
+ <td>
3537
+ <pre class="lines">
3538
+
3539
+
3540
+ 69
3541
+ 70
3542
+ 71
3543
+ 72
3544
+ 73
3545
+ 74
3546
+ 75
3547
+ 76</pre>
3548
+ </td>
3549
+ <td>
3550
+ <pre class="code"><span class="info file"># File 'lib/echochamber/widget/request.rb', line 69</span>
3551
+
3552
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_get_widgets'>get_widgets</span><span class='lparen'>(</span><span class='id identifier rubyid_token'>token</span><span class='comma'>,</span> <span class='id identifier rubyid_user_id'>user_id</span><span class='op'>=</span><span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_user_email'>user_email</span><span class='op'>=</span><span class='kw'>nil</span><span class='rparen'>)</span>
3553
+ <span class='id identifier rubyid_headers'>headers</span> <span class='op'>=</span> <span class='lbrace'>{</span> <span class='symbol'>:content_type</span> <span class='op'>=&gt;</span> <span class='symbol'>:json</span><span class='comma'>,</span> <span class='symbol'>:accept</span> <span class='op'>=&gt;</span> <span class='symbol'>:json</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Access-Token</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_token'>token</span> <span class='rbrace'>}</span>
3554
+ <span class='id identifier rubyid_headers'>headers</span><span class='period'>.</span><span class='id identifier rubyid_merge!'>merge!</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>X-User-Id</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_user_id'>user_id</span><span class='rparen'>)</span> <span class='kw'>unless</span> <span class='id identifier rubyid_user_id'>user_id</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
3555
+ <span class='id identifier rubyid_headers'>headers</span><span class='period'>.</span><span class='id identifier rubyid_merge!'>merge!</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>X-User-Email</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_user_email'>user_email</span><span class='rparen'>)</span> <span class='kw'>unless</span> <span class='id identifier rubyid_user_email'>user_email</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
3556
+ <span class='id identifier rubyid_endpoint'>endpoint</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='const'>ENDPOINT</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:widget</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span>
3557
+ <span class='id identifier rubyid_response'>response</span> <span class='op'>=</span> <span class='id identifier rubyid_get'>get</span><span class='lparen'>(</span><span class='id identifier rubyid_endpoint'>endpoint</span><span class='comma'>,</span> <span class='id identifier rubyid_headers'>headers</span><span class='rparen'>)</span>
3558
+ <span class='const'>JSON</span><span class='period'>.</span><span class='id identifier rubyid_parse'>parse</span><span class='lparen'>(</span><span class='id identifier rubyid_response'>response</span><span class='period'>.</span><span class='id identifier rubyid_body'>body</span><span class='rparen'>)</span>
3559
+ <span class='kw'>end</span></pre>
3560
+ </td>
3561
+ </tr>
3562
+ </table>
3563
+ </div>
3564
+
3565
+ <div class="method_details ">
3566
+ <h3 class="signature " id="library_combined_document-class_method">
3567
+
3568
+ + (<tt>String</tt>) <strong>library_combined_document</strong>(token, library_document_id, auditReport)
3569
+
3570
+
3571
+
3572
+
3573
+
3574
+ </h3><div class="docstring">
3575
+ <div class="discussion">
3576
+
3577
+ <p>Retrieves library combined document file</p>
3578
+
3579
+
3580
+ </div>
3581
+ </div>
3582
+ <div class="tags">
3583
+ <p class="tag_title">Parameters:</p>
3584
+ <ul class="param">
3585
+
3586
+ <li>
3587
+
3588
+ <span class='name'>token</span>
3589
+
3590
+
3591
+ <span class='type'>(<tt>String</tt>)</span>
3592
+
3593
+
3594
+
3595
+ &mdash;
3596
+ <div class='inline'>
3597
+ <p>Auth Token</p>
3598
+ </div>
3599
+
3600
+ </li>
3601
+
3602
+ <li>
3603
+
3604
+ <span class='name'>library_document_id</span>
3605
+
3606
+
3607
+ <span class='type'>(<tt>String</tt>)</span>
3608
+
3609
+
3610
+
3611
+ &mdash;
3612
+ <div class='inline'>
3613
+ <p>(REQUIRED)</p>
3614
+ </div>
3615
+
3616
+ </li>
3617
+
3618
+ </ul>
3619
+
3620
+ <p class="tag_title">Returns:</p>
3621
+ <ul class="return">
3622
+
3623
+ <li>
3624
+
3625
+
3626
+ <span class='type'>(<tt>String</tt>)</span>
3627
+
3628
+
3629
+
3630
+ &mdash;
3631
+ <div class='inline'>
3632
+ <p>Raw library combined document file data</p>
3633
+ </div>
3634
+
3635
+ </li>
3636
+
3637
+ </ul>
3638
+
3639
+ </div><table class="source_code">
3640
+ <tr>
3641
+ <td>
3642
+ <pre class="lines">
3643
+
3644
+
3645
+ 70
3646
+ 71
3647
+ 72
3648
+ 73
3649
+ 74
3650
+ 75</pre>
3651
+ </td>
3652
+ <td>
3653
+ <pre class="code"><span class="info file"># File 'lib/echochamber/library_documents/request.rb', line 70</span>
3654
+
3655
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_library_combined_document'>library_combined_document</span><span class='lparen'>(</span><span class='id identifier rubyid_token'>token</span><span class='comma'>,</span> <span class='id identifier rubyid_library_document_id'>library_document_id</span><span class='comma'>,</span> <span class='id identifier rubyid_auditReport'>auditReport</span><span class='rparen'>)</span>
3656
+ <span class='id identifier rubyid_headers'>headers</span> <span class='op'>=</span> <span class='lbrace'>{</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Access-Token</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_token'>token</span> <span class='rbrace'>}</span>
3657
+ <span class='id identifier rubyid_endpoint'>endpoint</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='const'>ENDPOINT</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:libraryDocument</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'>/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_library_document_id'>library_document_id</span><span class='embexpr_end'>}</span><span class='tstring_content'>/combinedDocument</span><span class='tstring_end'>&quot;</span></span>
3658
+ <span class='id identifier rubyid_endpoint'>endpoint</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_add_query'>add_query</span><span class='lparen'>(</span><span class='id identifier rubyid_endpoint'>endpoint</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>auditReport=</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_auditReport'>auditReport</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
3659
+ <span class='id identifier rubyid_response'>response</span> <span class='op'>=</span> <span class='id identifier rubyid_get'>get</span><span class='lparen'>(</span><span class='id identifier rubyid_endpoint'>endpoint</span><span class='comma'>,</span> <span class='id identifier rubyid_headers'>headers</span><span class='rparen'>)</span>
3660
+ <span class='kw'>end</span></pre>
3661
+ </td>
3662
+ </tr>
3663
+ </table>
3664
+ </div>
3665
+
3666
+ <div class="method_details ">
3667
+ <h3 class="signature " id="library_document_audit_trail-class_method">
3668
+
3669
+ + (<tt>String</tt>) <strong>library_document_audit_trail</strong>(token, library_document_id)
3670
+
3671
+
3672
+
3673
+
3674
+
3675
+ </h3><div class="docstring">
3676
+ <div class="discussion">
3677
+
3678
+ <p>Retrieves library document file data</p>
3679
+
3680
+
3681
+ </div>
3682
+ </div>
3683
+ <div class="tags">
3684
+ <p class="tag_title">Parameters:</p>
3685
+ <ul class="param">
3686
+
3687
+ <li>
3688
+
3689
+ <span class='name'>token</span>
3690
+
3691
+
3692
+ <span class='type'>(<tt>String</tt>)</span>
3693
+
3694
+
3695
+
3696
+ &mdash;
3697
+ <div class='inline'>
3698
+ <p>Auth Token</p>
3699
+ </div>
3700
+
3701
+ </li>
3702
+
3703
+ <li>
3704
+
3705
+ <span class='name'>library_document_id</span>
3706
+
3707
+
3708
+ <span class='type'>(<tt>String</tt>)</span>
3709
+
3710
+
3711
+
3712
+ &mdash;
3713
+ <div class='inline'>
3714
+ <p>(REQUIRED)</p>
3715
+ </div>
3716
+
3717
+ </li>
3718
+
3719
+ </ul>
3720
+
3721
+ <p class="tag_title">Returns:</p>
3722
+ <ul class="return">
3723
+
3724
+ <li>
3725
+
3726
+
3727
+ <span class='type'>(<tt>String</tt>)</span>
3728
+
3729
+
3730
+
3731
+ &mdash;
3732
+ <div class='inline'>
3733
+ <p>Library document file data</p>
3734
+ </div>
3735
+
3736
+ </li>
3737
+
3738
+ </ul>
3739
+
3740
+ </div><table class="source_code">
3741
+ <tr>
3742
+ <td>
3743
+ <pre class="lines">
3744
+
3745
+
3746
+ 59
3747
+ 60
3748
+ 61
3749
+ 62
3750
+ 63</pre>
3751
+ </td>
3752
+ <td>
3753
+ <pre class="code"><span class="info file"># File 'lib/echochamber/library_documents/request.rb', line 59</span>
3754
+
3755
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_library_document_audit_trail'>library_document_audit_trail</span><span class='lparen'>(</span><span class='id identifier rubyid_token'>token</span><span class='comma'>,</span> <span class='id identifier rubyid_library_document_id'>library_document_id</span><span class='rparen'>)</span>
3756
+ <span class='id identifier rubyid_headers'>headers</span> <span class='op'>=</span> <span class='lbrace'>{</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Access-Token</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_token'>token</span> <span class='rbrace'>}</span>
3757
+ <span class='id identifier rubyid_endpoint'>endpoint</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='const'>ENDPOINT</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:libraryDocument</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'>/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_library_document_id'>library_document_id</span><span class='embexpr_end'>}</span><span class='tstring_content'>/auditTrail</span><span class='tstring_end'>&quot;</span></span>
3758
+ <span class='id identifier rubyid_response'>response</span> <span class='op'>=</span> <span class='id identifier rubyid_get'>get</span><span class='lparen'>(</span><span class='id identifier rubyid_endpoint'>endpoint</span><span class='comma'>,</span> <span class='id identifier rubyid_headers'>headers</span><span class='rparen'>)</span>
3759
+ <span class='kw'>end</span></pre>
3760
+ </td>
3761
+ </tr>
3762
+ </table>
3763
+ </div>
3764
+
3765
+ <div class="method_details ">
3766
+ <h3 class="signature " id="personalize_widget-class_method">
3767
+
3768
+ + (<tt>Hash</tt>) <strong>personalize_widget</strong>(token, widget_id, personalization)
3769
+
3770
+
3771
+
3772
+
3773
+
3774
+ </h3><div class="docstring">
3775
+ <div class="discussion">
3776
+
3777
+ <p>Performs REST PUT /agreement/:id operation</p>
3778
+
3779
+
3780
+ </div>
3781
+ </div>
3782
+ <div class="tags">
3783
+ <p class="tag_title">Parameters:</p>
3784
+ <ul class="param">
3785
+
3786
+ <li>
3787
+
3788
+ <span class='name'>token</span>
3789
+
3790
+
3791
+ <span class='type'>(<tt>String</tt>)</span>
3792
+
3793
+
3794
+
3795
+ &mdash;
3796
+ <div class='inline'>
3797
+ <p>Auth Token</p>
3798
+ </div>
3799
+
3800
+ </li>
3801
+
3802
+ <li>
3803
+
3804
+ <span class='name'>widget_id</span>
3805
+
3806
+
3807
+ <span class='type'>(<tt>String</tt>)</span>
3808
+
3809
+
3810
+
3811
+ </li>
3812
+
3813
+ <li>
3814
+
3815
+ <span class='name'>personalization</span>
3816
+
3817
+
3818
+ <span class='type'>(<tt><span class='object_link'><a href="WidgetPersonalization.html" title="Echochamber::WidgetPersonalization (class)">Echochamber::WidgetPersonalization</a></span></tt>)</span>
3819
+
3820
+
3821
+
3822
+ </li>
3823
+
3824
+ </ul>
3825
+
3826
+ <p class="tag_title">Returns:</p>
3827
+ <ul class="return">
3828
+
3829
+ <li>
3830
+
3831
+
3832
+ <span class='type'>(<tt>Hash</tt>)</span>
3833
+
3834
+
3835
+
3836
+ &mdash;
3837
+ <div class='inline'>
3838
+ <p>Response body</p>
3839
+ </div>
3840
+
3841
+ </li>
3842
+
3843
+ </ul>
3844
+
3845
+ </div><table class="source_code">
3846
+ <tr>
3847
+ <td>
3848
+ <pre class="lines">
3849
+
3850
+
3851
+ 23
3852
+ 24
3853
+ 25
3854
+ 26
3855
+ 27
3856
+ 28
3857
+ 29
3858
+ 30
3859
+ 31
3860
+ 32
3861
+ 33
3862
+ 34
3863
+ 35
3864
+ 36
3865
+ 37
3866
+ 38</pre>
3867
+ </td>
3868
+ <td>
3869
+ <pre class="code"><span class="info file"># File 'lib/echochamber/widget/request.rb', line 23</span>
3870
+
3871
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_personalize_widget'>personalize_widget</span><span class='lparen'>(</span><span class='id identifier rubyid_token'>token</span><span class='comma'>,</span> <span class='id identifier rubyid_widget_id'>widget_id</span><span class='comma'>,</span> <span class='id identifier rubyid_personalization'>personalization</span><span class='rparen'>)</span>
3872
+ <span class='id identifier rubyid_headers'>headers</span> <span class='op'>=</span> <span class='lbrace'>{</span> <span class='symbol'>:content_type</span> <span class='op'>=&gt;</span> <span class='symbol'>:json</span><span class='comma'>,</span> <span class='symbol'>:accept</span> <span class='op'>=&gt;</span> <span class='symbol'>:json</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Access-Token</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_token'>token</span> <span class='rbrace'>}</span>
3873
+ <span class='id identifier rubyid_endpoint'>endpoint</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='const'>ENDPOINT</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:widget</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'>/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_widget_id'>widget_id</span><span class='embexpr_end'>}</span><span class='tstring_content'>/personalize</span><span class='tstring_end'>&quot;</span></span>
3874
+
3875
+ <span class='kw'>begin</span>
3876
+ <span class='id identifier rubyid_response'>response</span> <span class='op'>=</span> <span class='const'>RestClient</span><span class='period'>.</span><span class='id identifier rubyid_put'>put</span><span class='lparen'>(</span>
3877
+ <span class='id identifier rubyid_endpoint'>endpoint</span><span class='comma'>,</span>
3878
+ <span class='id identifier rubyid_personalization'>personalization</span><span class='period'>.</span><span class='id identifier rubyid_to_json'>to_json</span><span class='comma'>,</span>
3879
+ <span class='id identifier rubyid_headers'>headers</span>
3880
+ <span class='rparen'>)</span>
3881
+ <span class='kw'>rescue</span> <span class='const'>Exception</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_error'>error</span>
3882
+ <span class='id identifier rubyid_raise_error'>raise_error</span><span class='lparen'>(</span><span class='id identifier rubyid_error'>error</span><span class='rparen'>)</span>
3883
+ <span class='kw'>end</span>
3884
+
3885
+ <span class='const'>JSON</span><span class='period'>.</span><span class='id identifier rubyid_parse'>parse</span><span class='lparen'>(</span><span class='id identifier rubyid_response'>response</span><span class='period'>.</span><span class='id identifier rubyid_body'>body</span><span class='rparen'>)</span>
3886
+ <span class='kw'>end</span></pre>
3887
+ </td>
3888
+ </tr>
3889
+ </table>
3890
+ </div>
3891
+
3892
+ <div class="method_details ">
3893
+ <h3 class="signature " id="update_agreement_status-class_method">
3894
+
3895
+ + (<tt>Hash</tt>) <strong>update_agreement_status</strong>(token, agreement_id, request_body)
3896
+
3897
+
3898
+
3899
+
3900
+
3901
+ </h3><div class="docstring">
3902
+ <div class="discussion">
3903
+
3904
+ <p>Performs REST PUT /agreement/:id operation</p>
3905
+
3906
+
3907
+ </div>
3908
+ </div>
3909
+ <div class="tags">
3910
+ <p class="tag_title">Parameters:</p>
3911
+ <ul class="param">
3912
+
3913
+ <li>
3914
+
3915
+ <span class='name'>token</span>
3916
+
3917
+
3918
+ <span class='type'>(<tt>String</tt>)</span>
3919
+
3920
+
3921
+
3922
+ &mdash;
3923
+ <div class='inline'>
3924
+ <p>Auth Token</p>
3925
+ </div>
3926
+
3927
+ </li>
3928
+
3929
+ <li>
3930
+
3931
+ <span class='name'>agreement_id</span>
3932
+
3933
+
3934
+ <span class='type'>(<tt>String</tt>)</span>
3935
+
3936
+
3937
+
3938
+ &mdash;
3939
+ <div class='inline'>
3940
+ <p>ID of agreement to retrieve info on.</p>
3941
+ </div>
3942
+
3943
+ </li>
3944
+
3945
+ <li>
3946
+
3947
+ <span class='name'>request_body</span>
3948
+
3949
+
3950
+ <span class='type'>(<tt>Hash</tt>)</span>
3951
+
3952
+
3953
+
3954
+ &mdash;
3955
+ <div class='inline'>
3956
+ <p>Hash for Agreement status update</p>
3957
+ </div>
3958
+
3959
+ </li>
3960
+
3961
+ </ul>
3962
+
3963
+ <p class="tag_title">Returns:</p>
3964
+ <ul class="return">
3965
+
3966
+ <li>
3967
+
3968
+
3969
+ <span class='type'>(<tt>Hash</tt>)</span>
3970
+
3971
+
3972
+
3973
+ &mdash;
3974
+ <div class='inline'>
3975
+ <p>Agreements response body</p>
3976
+ </div>
3977
+
3978
+ </li>
3979
+
3980
+ </ul>
3981
+
3982
+ </div><table class="source_code">
3983
+ <tr>
3984
+ <td>
3985
+ <pre class="lines">
3986
+
3987
+
3988
+ 124
3989
+ 125
3990
+ 126
3991
+ 127
3992
+ 128
3993
+ 129
3994
+ 130
3995
+ 131
3996
+ 132
3997
+ 133
3998
+ 134
3999
+ 135
4000
+ 136
4001
+ 137
4002
+ 138
4003
+ 139</pre>
4004
+ </td>
4005
+ <td>
4006
+ <pre class="code"><span class="info file"># File 'lib/echochamber/agreement/request.rb', line 124</span>
4007
+
4008
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_update_agreement_status'>update_agreement_status</span><span class='lparen'>(</span><span class='id identifier rubyid_token'>token</span><span class='comma'>,</span> <span class='id identifier rubyid_agreement_id'>agreement_id</span><span class='comma'>,</span> <span class='id identifier rubyid_request_body'>request_body</span><span class='rparen'>)</span>
4009
+ <span class='id identifier rubyid_headers'>headers</span> <span class='op'>=</span> <span class='lbrace'>{</span> <span class='symbol'>:content_type</span> <span class='op'>=&gt;</span> <span class='symbol'>:json</span><span class='comma'>,</span> <span class='symbol'>:accept</span> <span class='op'>=&gt;</span> <span class='symbol'>:json</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Access-Token</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_token'>token</span> <span class='rbrace'>}</span>
4010
+ <span class='id identifier rubyid_endpoint'>endpoint</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='const'>ENDPOINT</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:agreement</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'>/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_agreement_id'>agreement_id</span><span class='embexpr_end'>}</span><span class='tstring_content'>/status</span><span class='tstring_end'>&quot;</span></span>
4011
+
4012
+ <span class='kw'>begin</span>
4013
+ <span class='id identifier rubyid_response'>response</span> <span class='op'>=</span> <span class='const'>RestClient</span><span class='period'>.</span><span class='id identifier rubyid_put'>put</span><span class='lparen'>(</span>
4014
+ <span class='id identifier rubyid_endpoint'>endpoint</span><span class='comma'>,</span>
4015
+ <span class='id identifier rubyid_request_body'>request_body</span><span class='period'>.</span><span class='id identifier rubyid_to_json'>to_json</span><span class='comma'>,</span>
4016
+ <span class='id identifier rubyid_headers'>headers</span>
4017
+ <span class='rparen'>)</span>
4018
+ <span class='kw'>rescue</span> <span class='const'>Exception</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_error'>error</span>
4019
+ <span class='id identifier rubyid_raise_error'>raise_error</span><span class='lparen'>(</span><span class='id identifier rubyid_error'>error</span><span class='rparen'>)</span>
4020
+ <span class='kw'>end</span>
4021
+
4022
+ <span class='const'>JSON</span><span class='period'>.</span><span class='id identifier rubyid_parse'>parse</span><span class='lparen'>(</span><span class='id identifier rubyid_response'>response</span><span class='period'>.</span><span class='id identifier rubyid_body'>body</span><span class='rparen'>)</span>
4023
+ <span class='kw'>end</span></pre>
4024
+ </td>
4025
+ </tr>
4026
+ </table>
4027
+ </div>
4028
+
4029
+ <div class="method_details ">
4030
+ <h3 class="signature " id="update_widget_status-class_method">
4031
+
4032
+ + (<tt>Hash</tt>) <strong>update_widget_status</strong>(token, widget_id, status)
4033
+
4034
+
4035
+
4036
+
4037
+
4038
+ </h3><div class="docstring">
4039
+ <div class="discussion">
4040
+
4041
+ <p>Performs REST PUT /agreement/:id operation</p>
4042
+
4043
+
4044
+ </div>
4045
+ </div>
4046
+ <div class="tags">
4047
+ <p class="tag_title">Parameters:</p>
4048
+ <ul class="param">
4049
+
4050
+ <li>
4051
+
4052
+ <span class='name'>token</span>
4053
+
4054
+
4055
+ <span class='type'>(<tt>String</tt>)</span>
4056
+
4057
+
4058
+
4059
+ &mdash;
4060
+ <div class='inline'>
4061
+ <p>Auth Token</p>
4062
+ </div>
4063
+
4064
+ </li>
4065
+
4066
+ <li>
4067
+
4068
+ <span class='name'>widget_id</span>
4069
+
4070
+
4071
+ <span class='type'>(<tt>String</tt>)</span>
4072
+
4073
+
4074
+
4075
+ </li>
4076
+
4077
+ <li>
4078
+
4079
+ <span class='name'>status</span>
4080
+
4081
+
4082
+ <span class='type'>(<tt><span class='object_link'><a href="WidgetStatus.html" title="Echochamber::WidgetStatus (class)">Echochamber::WidgetStatus</a></span></tt>)</span>
4083
+
4084
+
4085
+
4086
+ </li>
4087
+
4088
+ </ul>
4089
+
4090
+ <p class="tag_title">Returns:</p>
4091
+ <ul class="return">
4092
+
4093
+ <li>
4094
+
4095
+
4096
+ <span class='type'>(<tt>Hash</tt>)</span>
4097
+
4098
+
4099
+
4100
+ &mdash;
4101
+ <div class='inline'>
4102
+ <p>Response body</p>
4103
+ </div>
4104
+
4105
+ </li>
4106
+
4107
+ </ul>
4108
+
4109
+ </div><table class="source_code">
4110
+ <tr>
4111
+ <td>
4112
+ <pre class="lines">
4113
+
4114
+
4115
+ 46
4116
+ 47
4117
+ 48
4118
+ 49
4119
+ 50
4120
+ 51
4121
+ 52
4122
+ 53
4123
+ 54
4124
+ 55
4125
+ 56
4126
+ 57
4127
+ 58
4128
+ 59
4129
+ 60
4130
+ 61</pre>
4131
+ </td>
4132
+ <td>
4133
+ <pre class="code"><span class="info file"># File 'lib/echochamber/widget/request.rb', line 46</span>
4134
+
4135
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_update_widget_status'>update_widget_status</span><span class='lparen'>(</span><span class='id identifier rubyid_token'>token</span><span class='comma'>,</span> <span class='id identifier rubyid_widget_id'>widget_id</span><span class='comma'>,</span> <span class='id identifier rubyid_status'>status</span><span class='rparen'>)</span>
4136
+ <span class='id identifier rubyid_headers'>headers</span> <span class='op'>=</span> <span class='lbrace'>{</span> <span class='symbol'>:content_type</span> <span class='op'>=&gt;</span> <span class='symbol'>:json</span><span class='comma'>,</span> <span class='symbol'>:accept</span> <span class='op'>=&gt;</span> <span class='symbol'>:json</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Access-Token</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_token'>token</span> <span class='rbrace'>}</span>
4137
+ <span class='id identifier rubyid_endpoint'>endpoint</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='const'>ENDPOINT</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:widget</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'>/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_widget_id'>widget_id</span><span class='embexpr_end'>}</span><span class='tstring_content'>/status</span><span class='tstring_end'>&quot;</span></span>
4138
+
4139
+ <span class='kw'>begin</span>
4140
+ <span class='id identifier rubyid_response'>response</span> <span class='op'>=</span> <span class='const'>RestClient</span><span class='period'>.</span><span class='id identifier rubyid_put'>put</span><span class='lparen'>(</span>
4141
+ <span class='id identifier rubyid_endpoint'>endpoint</span><span class='comma'>,</span>
4142
+ <span class='id identifier rubyid_status'>status</span><span class='period'>.</span><span class='id identifier rubyid_to_json'>to_json</span><span class='comma'>,</span>
4143
+ <span class='id identifier rubyid_headers'>headers</span>
4144
+ <span class='rparen'>)</span>
4145
+ <span class='kw'>rescue</span> <span class='const'>Exception</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_error'>error</span>
4146
+ <span class='id identifier rubyid_raise_error'>raise_error</span><span class='lparen'>(</span><span class='id identifier rubyid_error'>error</span><span class='rparen'>)</span>
4147
+ <span class='kw'>end</span>
4148
+
4149
+ <span class='const'>JSON</span><span class='period'>.</span><span class='id identifier rubyid_parse'>parse</span><span class='lparen'>(</span><span class='id identifier rubyid_response'>response</span><span class='period'>.</span><span class='id identifier rubyid_body'>body</span><span class='rparen'>)</span>
4150
+ <span class='kw'>end</span></pre>
4151
+ </td>
4152
+ </tr>
4153
+ </table>
4154
+ </div>
4155
+
4156
+ </div>
4157
+
4158
+ </div>
4159
+
4160
+ <div id="footer">
4161
+ Generated on Thu Aug 21 05:14:33 2014 by
4162
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
4163
+ 0.8.7.4 (ruby-2.0.0).
4164
+ </div>
4165
+
4166
+ </body>
4167
+ </html>