ed_fi_client 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (47) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +11 -0
  3. data/.rspec +3 -0
  4. data/.rubocop.yml +78 -0
  5. data/.ruby-version +1 -0
  6. data/.travis.yml +5 -0
  7. data/.yardopts +1 -0
  8. data/Gemfile +6 -0
  9. data/Gemfile.lock +65 -0
  10. data/LICENSE.txt +21 -0
  11. data/README.md +113 -0
  12. data/Rakefile +6 -0
  13. data/bin/console +14 -0
  14. data/bin/setup +8 -0
  15. data/docs/EdFi.html +127 -0
  16. data/docs/EdFi/Client.html +1204 -0
  17. data/docs/EdFi/Client/AccessToken.html +541 -0
  18. data/docs/EdFi/Client/ArgumentError.html +143 -0
  19. data/docs/EdFi/Client/Auth.html +440 -0
  20. data/docs/EdFi/Client/Error.html +139 -0
  21. data/docs/EdFi/Client/Proxy.html +521 -0
  22. data/docs/EdFi/Client/Response.html +479 -0
  23. data/docs/EdFi/Client/UnableToAuthenticateError.html +145 -0
  24. data/docs/_index.html +203 -0
  25. data/docs/class_list.html +51 -0
  26. data/docs/css/common.css +1 -0
  27. data/docs/css/full_list.css +58 -0
  28. data/docs/css/style.css +499 -0
  29. data/docs/file.README.html +124 -0
  30. data/docs/file_list.html +56 -0
  31. data/docs/frames.html +17 -0
  32. data/docs/index.html +124 -0
  33. data/docs/js/app.js +248 -0
  34. data/docs/js/full_list.js +216 -0
  35. data/docs/js/jquery.js +4 -0
  36. data/docs/method_list.html +235 -0
  37. data/docs/top-level-namespace.html +110 -0
  38. data/ed_fi_client.gemspec +32 -0
  39. data/lib/ed_fi/client.rb +244 -0
  40. data/lib/ed_fi/client/access_token.rb +63 -0
  41. data/lib/ed_fi/client/auth.rb +99 -0
  42. data/lib/ed_fi/client/errors.rb +19 -0
  43. data/lib/ed_fi/client/proxy.rb +65 -0
  44. data/lib/ed_fi/client/response.rb +150 -0
  45. data/lib/ed_fi/client/version.rb +18 -0
  46. data/lib/ed_fi_client.rb +1 -0
  47. metadata +201 -0
@@ -0,0 +1,143 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>
7
+ Exception: EdFi::Client::ArgumentError
8
+
9
+ &mdash; Documentation by YARD 0.9.12
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
+ pathId = "EdFi::Client::ArgumentError";
19
+ relpath = '../../';
20
+ </script>
21
+
22
+
23
+ <script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
24
+
25
+ <script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
26
+
27
+
28
+ </head>
29
+ <body>
30
+ <div class="nav_wrap">
31
+ <iframe id="nav" src="../../class_list.html?1"></iframe>
32
+ <div id="resizer"></div>
33
+ </div>
34
+
35
+ <div id="main" tabindex="-1">
36
+ <div id="header">
37
+ <div id="menu">
38
+
39
+ <a href="../../_index.html">Index (A)</a> &raquo;
40
+ <span class='title'><span class='object_link'><a href="../../EdFi.html" title="EdFi (module)">EdFi</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Client.html" title="EdFi::Client (class)">Client</a></span></span>
41
+ &raquo;
42
+ <span class="title">ArgumentError</span>
43
+
44
+ </div>
45
+
46
+ <div id="search">
47
+
48
+ <a class="full_list_link" id="class_list_link"
49
+ href="../../class_list.html">
50
+
51
+ <svg width="24" height="24">
52
+ <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
53
+ <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
54
+ <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
55
+ </svg>
56
+ </a>
57
+
58
+ </div>
59
+ <div class="clear"></div>
60
+ </div>
61
+
62
+ <div id="content"><h1>Exception: EdFi::Client::ArgumentError
63
+
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+ <dl>
70
+ <dt>Inherits:</dt>
71
+ <dd>
72
+ <span class="inheritName"><span class='object_link'><a href="Error.html" title="EdFi::Client::Error (class)">Error</a></span></span>
73
+
74
+ <ul class="fullTree">
75
+ <li>Object</li>
76
+
77
+ <li class="next">StandardError</li>
78
+
79
+ <li class="next"><span class='object_link'><a href="Error.html" title="EdFi::Client::Error (class)">Error</a></span></li>
80
+
81
+ <li class="next">EdFi::Client::ArgumentError</li>
82
+
83
+ </ul>
84
+ <a href="#" class="inheritanceTree">show all</a>
85
+
86
+ </dd>
87
+ </dl>
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+
97
+
98
+
99
+ <dl>
100
+ <dt>Defined in:</dt>
101
+ <dd>lib/ed_fi/client/errors.rb</dd>
102
+ </dl>
103
+
104
+ </div>
105
+
106
+ <h2>Overview</h2><div class="docstring">
107
+ <div class="discussion">
108
+
109
+ <p>An error relating to missing, invalid, or incompatible method arguments.</p>
110
+
111
+
112
+ </div>
113
+ </div>
114
+ <div class="tags">
115
+
116
+
117
+ </div>
118
+
119
+
120
+
121
+
122
+
123
+
124
+
125
+
126
+
127
+
128
+
129
+
130
+
131
+
132
+
133
+ </div>
134
+
135
+ <div id="footer">
136
+ Generated on Thu May 24 18:35:39 2018 by
137
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
138
+ 0.9.12 (ruby-2.5.1).
139
+ </div>
140
+
141
+ </div>
142
+ </body>
143
+ </html>
@@ -0,0 +1,440 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>
7
+ Class: EdFi::Client::Auth
8
+
9
+ &mdash; Documentation by YARD 0.9.12
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
+ pathId = "EdFi::Client::Auth";
19
+ relpath = '../../';
20
+ </script>
21
+
22
+
23
+ <script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
24
+
25
+ <script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
26
+
27
+
28
+ </head>
29
+ <body>
30
+ <div class="nav_wrap">
31
+ <iframe id="nav" src="../../class_list.html?1"></iframe>
32
+ <div id="resizer"></div>
33
+ </div>
34
+
35
+ <div id="main" tabindex="-1">
36
+ <div id="header">
37
+ <div id="menu">
38
+
39
+ <a href="../../_index.html">Index (A)</a> &raquo;
40
+ <span class='title'><span class='object_link'><a href="../../EdFi.html" title="EdFi (module)">EdFi</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Client.html" title="EdFi::Client (class)">Client</a></span></span>
41
+ &raquo;
42
+ <span class="title">Auth</span>
43
+
44
+ </div>
45
+
46
+ <div id="search">
47
+
48
+ <a class="full_list_link" id="class_list_link"
49
+ href="../../class_list.html">
50
+
51
+ <svg width="24" height="24">
52
+ <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
53
+ <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
54
+ <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
55
+ </svg>
56
+ </a>
57
+
58
+ </div>
59
+ <div class="clear"></div>
60
+ </div>
61
+
62
+ <div id="content"><h1>Class: EdFi::Client::Auth
63
+
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+ <dl>
70
+ <dt>Inherits:</dt>
71
+ <dd>
72
+ <span class="inheritName">Object</span>
73
+
74
+ <ul class="fullTree">
75
+ <li>Object</li>
76
+
77
+ <li class="next">EdFi::Client::Auth</li>
78
+
79
+ </ul>
80
+ <a href="#" class="inheritanceTree">show all</a>
81
+
82
+ </dd>
83
+ </dl>
84
+
85
+
86
+
87
+
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+ <dl>
96
+ <dt>Defined in:</dt>
97
+ <dd>lib/ed_fi/client/auth.rb</dd>
98
+ </dl>
99
+
100
+ </div>
101
+
102
+ <h2>Overview</h2><div class="docstring">
103
+ <div class="discussion">
104
+
105
+ <p>The <span class='object_link'><a href="" title="EdFi::Client::Auth (class)">EdFi::Client::Auth</a></span> represents a complete
106
+ authentication <em>mechanism</em> that makes the necessary calls for
107
+ authorization codes and access tokens, keeps track of any token generated,
108
+ and re-requests new tokens as necessary based on the existing token&#39;s
109
+ lifecycle.</p>
110
+
111
+
112
+ </div>
113
+ </div>
114
+ <div class="tags">
115
+
116
+
117
+ </div>
118
+ <h2>Constant Summary</h2>
119
+ <dl class="constants">
120
+
121
+ <dt id="AUTHORIZATION_CODE_URI-constant" class="">AUTHORIZATION_CODE_URI =
122
+ <div class="docstring">
123
+ <div class="discussion">
124
+
125
+ <p>The URI to request an authorization code.</p>
126
+
127
+
128
+ </div>
129
+ </div>
130
+ <div class="tags">
131
+
132
+
133
+ </div>
134
+ </dt>
135
+ <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>/oauth/authorize</span><span class='tstring_end'>&#39;</span></span><span class='period'>.</span><span class='id identifier rubyid_freeze'>freeze</span></pre></dd>
136
+
137
+ <dt id="AUTHORIZATION_CODE_CONTENT_TYPE-constant" class="">AUTHORIZATION_CODE_CONTENT_TYPE =
138
+ <div class="docstring">
139
+ <div class="discussion">
140
+
141
+ <p>The MIME content type to use for authorization code requests.</p>
142
+
143
+
144
+ </div>
145
+ </div>
146
+ <div class="tags">
147
+
148
+
149
+ </div>
150
+ </dt>
151
+ <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>application/x-www-form-urlencoded</span><span class='tstring_end'>&#39;</span></span><span class='period'>.</span><span class='id identifier rubyid_freeze'>freeze</span></pre></dd>
152
+
153
+ <dt id="ACCESS_TOKEN_URI-constant" class="">ACCESS_TOKEN_URI =
154
+ <div class="docstring">
155
+ <div class="discussion">
156
+
157
+ <p>The URI to request an access token.</p>
158
+
159
+
160
+ </div>
161
+ </div>
162
+ <div class="tags">
163
+
164
+
165
+ </div>
166
+ </dt>
167
+ <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>/oauth/token</span><span class='tstring_end'>&#39;</span></span><span class='period'>.</span><span class='id identifier rubyid_freeze'>freeze</span></pre></dd>
168
+
169
+ <dt id="ACCESS_TOKEN_CONTENT_TYPE-constant" class="">ACCESS_TOKEN_CONTENT_TYPE =
170
+ <div class="docstring">
171
+ <div class="discussion">
172
+
173
+ <p>The MIME content type to use for access token requests.</p>
174
+
175
+
176
+ </div>
177
+ </div>
178
+ <div class="tags">
179
+
180
+
181
+ </div>
182
+ </dt>
183
+ <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>application/json</span><span class='tstring_end'>&#39;</span></span><span class='period'>.</span><span class='id identifier rubyid_freeze'>freeze</span></pre></dd>
184
+
185
+ </dl>
186
+
187
+
188
+
189
+
190
+
191
+
192
+
193
+
194
+ <h2>
195
+ Instance Method Summary
196
+ <small><a href="#" class="summary_toggle">collapse</a></small>
197
+ </h2>
198
+
199
+ <ul class="summary">
200
+
201
+ <li class="public ">
202
+ <span class="summary_signature">
203
+
204
+ <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(client:, client_id:, client_secret:) &#x21d2; Auth </a>
205
+
206
+
207
+
208
+ </span>
209
+
210
+
211
+ <span class="note title constructor">constructor</span>
212
+
213
+
214
+
215
+
216
+
217
+
218
+
219
+
220
+ <span class="summary_desc"><div class='inline'>
221
+ <p>A new instance of Auth.</p>
222
+ </div></span>
223
+
224
+ </li>
225
+
226
+
227
+ <li class="public ">
228
+ <span class="summary_signature">
229
+
230
+ <a href="#token-instance_method" title="#token (instance method)">#<strong>token</strong> &#x21d2; String </a>
231
+
232
+
233
+
234
+ </span>
235
+
236
+
237
+
238
+
239
+
240
+
241
+
242
+
243
+
244
+ <span class="summary_desc"><div class='inline'>
245
+ <p>Gives an access token string that is guaranteed to be valid for <em>at
246
+ least</em> 5 seconds.</p>
247
+ </div></span>
248
+
249
+ </li>
250
+
251
+
252
+ </ul>
253
+
254
+
255
+ <div id="constructor_details" class="method_details_list">
256
+ <h2>Constructor Details</h2>
257
+
258
+ <div class="method_details first">
259
+ <h3 class="signature first" id="initialize-instance_method">
260
+
261
+ #<strong>initialize</strong>(client:, client_id:, client_secret:) &#x21d2; <tt><span class='object_link'><a href="" title="EdFi::Client::Auth (class)">Auth</a></span></tt>
262
+
263
+
264
+
265
+
266
+
267
+ </h3><div class="docstring">
268
+ <div class="discussion">
269
+
270
+ <p>Returns a new instance of Auth</p>
271
+
272
+
273
+ </div>
274
+ </div>
275
+ <div class="tags">
276
+ <p class="tag_title">Parameters:</p>
277
+ <ul class="param">
278
+
279
+ <li>
280
+
281
+ <span class='name'>client</span>
282
+
283
+
284
+ <span class='type'>(<tt>Crapi::Client</tt>)</span>
285
+
286
+
287
+
288
+ &mdash;
289
+ <div class='inline'>
290
+ <p>The client to use for making auth calls.</p>
291
+ </div>
292
+
293
+ </li>
294
+
295
+ <li>
296
+
297
+ <span class='name'>client_id</span>
298
+
299
+
300
+ <span class='type'>(<tt>String</tt>)</span>
301
+
302
+
303
+
304
+ &mdash;
305
+ <div class='inline'>
306
+ <p>The client id to use for authentication. This is AKA the “api key” /
307
+ “username”.</p>
308
+ </div>
309
+
310
+ </li>
311
+
312
+ <li>
313
+
314
+ <span class='name'>client_secret</span>
315
+
316
+
317
+ <span class='type'>(<tt>String</tt>)</span>
318
+
319
+
320
+
321
+ &mdash;
322
+ <div class='inline'>
323
+ <p>The client secret to use for authentication. This is AKA the “api secret” /
324
+ “password”.</p>
325
+ </div>
326
+
327
+ </li>
328
+
329
+ </ul>
330
+
331
+
332
+ </div><table class="source_code">
333
+ <tr>
334
+ <td>
335
+ <pre class="lines">
336
+
337
+
338
+ 36
339
+ 37
340
+ 38
341
+ 39
342
+ 40
343
+ 41
344
+ 42</pre>
345
+ </td>
346
+ <td>
347
+ <pre class="code"><span class="info file"># File 'lib/ed_fi/client/auth.rb', line 36</span>
348
+
349
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='label'>client:</span><span class='comma'>,</span> <span class='label'>client_id:</span><span class='comma'>,</span> <span class='label'>client_secret:</span><span class='rparen'>)</span>
350
+ <span class='ivar'>@client</span> <span class='op'>=</span> <span class='id identifier rubyid_client'>client</span>
351
+ <span class='ivar'>@client_id</span> <span class='op'>=</span> <span class='id identifier rubyid_client_id'>client_id</span>
352
+ <span class='ivar'>@client_secret</span> <span class='op'>=</span> <span class='id identifier rubyid_client_secret'>client_secret</span>
353
+
354
+ <span class='ivar'>@access_token</span> <span class='op'>=</span> <span class='kw'>nil</span>
355
+ <span class='kw'>end</span></pre>
356
+ </td>
357
+ </tr>
358
+ </table>
359
+ </div>
360
+
361
+ </div>
362
+
363
+
364
+ <div id="instance_method_details" class="method_details_list">
365
+ <h2>Instance Method Details</h2>
366
+
367
+
368
+ <div class="method_details first">
369
+ <h3 class="signature first" id="token-instance_method">
370
+
371
+ #<strong>token</strong> &#x21d2; <tt>String</tt>
372
+
373
+
374
+
375
+
376
+
377
+ </h3><div class="docstring">
378
+ <div class="discussion">
379
+
380
+ <p>Gives an access token string that is guaranteed to be valid for <em>at
381
+ least</em> 5 seconds.</p>
382
+
383
+ <p>Note a new token is requested and returned if the existing token is no
384
+ longer valid.</p>
385
+
386
+
387
+ </div>
388
+ </div>
389
+ <div class="tags">
390
+
391
+ <p class="tag_title">Returns:</p>
392
+ <ul class="return">
393
+
394
+ <li>
395
+
396
+
397
+ <span class='type'>(<tt>String</tt>)</span>
398
+
399
+
400
+
401
+ </li>
402
+
403
+ </ul>
404
+
405
+ </div><table class="source_code">
406
+ <tr>
407
+ <td>
408
+ <pre class="lines">
409
+
410
+
411
+ 51
412
+ 52
413
+ 53
414
+ 54</pre>
415
+ </td>
416
+ <td>
417
+ <pre class="code"><span class="info file"># File 'lib/ed_fi/client/auth.rb', line 51</span>
418
+
419
+ <span class='kw'>def</span> <span class='id identifier rubyid_token'>token</span>
420
+ <span class='ivar'>@access_token</span> <span class='op'>=</span> <span class='id identifier rubyid_new_access_token'>new_access_token</span> <span class='kw'>unless</span> <span class='ivar'>@access_token</span><span class='op'>&amp;.</span><span class='id identifier rubyid_valid?'>valid?</span>
421
+ <span class='ivar'>@access_token</span><span class='period'>.</span><span class='id identifier rubyid_token'>token</span>
422
+ <span class='kw'>end</span></pre>
423
+ </td>
424
+ </tr>
425
+ </table>
426
+ </div>
427
+
428
+ </div>
429
+
430
+ </div>
431
+
432
+ <div id="footer">
433
+ Generated on Thu May 24 18:35:39 2018 by
434
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
435
+ 0.9.12 (ruby-2.5.1).
436
+ </div>
437
+
438
+ </div>
439
+ </body>
440
+ </html>