built.io 0.1 → 0.2

Sign up to get free protection for your applications and to get access to all the features.
data/doc/Built.html ADDED
@@ -0,0 +1,518 @@
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: Built
8
+
9
+ &mdash; Documentation by YARD 0.8.7.2
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#!" + escape(window.location.href);
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 (B)</a> &raquo;
35
+
36
+
37
+ <span class="title">Built</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: Built
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/built.rb<span class="defines">,<br />
83
+ lib/built/util.rb,<br /> lib/built/class.rb,<br /> lib/built/query.rb,<br /> lib/built/error.rb,<br /> lib/built/client.rb,<br /> lib/built/object.rb,<br /> lib/built/timestamps.rb,<br /> lib/built/application.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
+ <strong class="modules">Modules:</strong> <span class='object_link'><a href="Built/Timestamps.html" title="Built::Timestamps (module)">Timestamps</a></span>
94
+
95
+
96
+
97
+ <strong class="classes">Classes:</strong> <span class='object_link'><a href="Built/Application.html" title="Built::Application (class)">Application</a></span>, <span class='object_link'><a href="Built/BuiltAPIError.html" title="Built::BuiltAPIError (class)">BuiltAPIError</a></span>, <span class='object_link'><a href="Built/BuiltError.html" title="Built::BuiltError (class)">BuiltError</a></span>, <span class='object_link'><a href="Built/Class.html" title="Built::Class (class)">Class</a></span>, <span class='object_link'><a href="Built/Client.html" title="Built::Client (class)">Client</a></span>, <span class='object_link'><a href="Built/Object.html" title="Built::Object (class)">Object</a></span>, <span class='object_link'><a href="Built/Query.html" title="Built::Query (class)">Query</a></span>, <span class='object_link'><a href="Built/QueryResponse.html" title="Built::QueryResponse (class)">QueryResponse</a></span>, <span class='object_link'><a href="Built/Util.html" title="Built::Util (class)">Util</a></span>
98
+
99
+
100
+ </p>
101
+
102
+ <h2>Constant Summary</h2>
103
+
104
+ <dl class="constants">
105
+
106
+ <dt id="client-classvariable" class="">@@client =
107
+ <div class="docstring">
108
+ <div class="discussion">
109
+ <p class="note private">
110
+ <strong>This classvariable is part of a private API.</strong>
111
+ You should avoid using this classvariable if possible, as it may be removed or be changed in the future.
112
+ </p>
113
+
114
+ <p>singleton http client</p>
115
+
116
+
117
+ </div>
118
+ </div>
119
+ <div class="tags">
120
+
121
+
122
+ </div>
123
+ </dt>
124
+ <dd><pre class="code"><span class='kw'>nil</span></pre></dd>
125
+
126
+ </dl>
127
+
128
+
129
+
130
+
131
+
132
+
133
+
134
+
135
+
136
+ <h2>
137
+ Class Method Summary
138
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
139
+ </h2>
140
+
141
+ <ul class="summary">
142
+
143
+ <li class="public ">
144
+ <span class="summary_signature">
145
+
146
+ <a href="#client-class_method" title="client (class method)">+ (Object) <strong>client</strong> </a>
147
+
148
+
149
+
150
+ </span>
151
+
152
+
153
+
154
+
155
+
156
+
157
+ <span class="private note title">private</span>
158
+
159
+
160
+ <span class="summary_desc"><div class='inline'>
161
+ <p>Get the singleton client.</p>
162
+ </div></span>
163
+
164
+ </li>
165
+
166
+
167
+ <li class="public ">
168
+ <span class="summary_signature">
169
+
170
+ <a href="#init-class_method" title="init (class method)">+ (Object) <strong>init</strong>(options) </a>
171
+
172
+
173
+
174
+ </span>
175
+
176
+
177
+
178
+
179
+
180
+
181
+
182
+
183
+
184
+ <span class="summary_desc"><div class='inline'>
185
+ <p>Initialize the SDK.</p>
186
+ </div></span>
187
+
188
+ </li>
189
+
190
+
191
+ <li class="public ">
192
+ <span class="summary_signature">
193
+
194
+ <a href="#root-class_method" title="root (class method)">+ (Object) <strong>root</strong> </a>
195
+
196
+
197
+
198
+ </span>
199
+
200
+
201
+
202
+
203
+
204
+
205
+ <span class="private note title">private</span>
206
+
207
+
208
+ <span class="summary_desc"><div class='inline'></div></span>
209
+
210
+ </li>
211
+
212
+
213
+ </ul>
214
+
215
+
216
+
217
+
218
+ <div id="class_method_details" class="method_details_list">
219
+ <h2>Class Method Details</h2>
220
+
221
+
222
+ <div class="method_details first">
223
+ <h3 class="signature first" id="client-class_method">
224
+
225
+ + (<tt><span class='object_link'><a href="Built/Object.html" title="Built::Object (class)">Object</a></span></tt>) <strong>client</strong>
226
+
227
+
228
+
229
+
230
+
231
+ </h3><div class="docstring">
232
+ <div class="discussion">
233
+ <p class="note private">
234
+ <strong>This method is part of a private API.</strong>
235
+ You should avoid using this method if possible, as it may be removed or be changed in the future.
236
+ </p>
237
+
238
+ <p>Get the singleton client</p>
239
+
240
+
241
+ </div>
242
+ </div>
243
+ <div class="tags">
244
+
245
+
246
+ </div><table class="source_code">
247
+ <tr>
248
+ <td>
249
+ <pre class="lines">
250
+
251
+
252
+ 44
253
+ 45
254
+ 46
255
+ 47
256
+ 48
257
+ 49
258
+ 50</pre>
259
+ </td>
260
+ <td>
261
+ <pre class="code"><span class="info file"># File 'lib/built.rb', line 44</span>
262
+
263
+ <span class='kw'>def</span> <span class='id identifier rubyid_client'>client</span>
264
+ <span class='kw'>if</span> <span class='op'>!</span><span class='cvar'>@@client</span>
265
+ <span class='id identifier rubyid_raise'>raise</span> <span class='const'>BuiltError</span><span class='comma'>,</span> <span class='const'>I18n</span><span class='period'>.</span><span class='id identifier rubyid_t'>t</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>not_initialized</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
266
+ <span class='kw'>end</span>
267
+
268
+ <span class='cvar'>@@client</span>
269
+ <span class='kw'>end</span></pre>
270
+ </td>
271
+ </tr>
272
+ </table>
273
+ </div>
274
+
275
+ <div class="method_details ">
276
+ <h3 class="signature " id="init-class_method">
277
+
278
+ + (<tt><span class='object_link'><a href="Built/Object.html" title="Built::Object (class)">Object</a></span></tt>) <strong>init</strong>(options)
279
+
280
+
281
+
282
+
283
+
284
+ </h3><div class="docstring">
285
+ <div class="discussion">
286
+
287
+ <p>Initialize the SDK</p>
288
+
289
+
290
+ </div>
291
+ </div>
292
+ <div class="tags">
293
+ <p class="tag_title">Parameters:</p>
294
+ <ul class="param">
295
+
296
+ <li>
297
+
298
+ <span class='name'>options</span>
299
+
300
+
301
+ <span class='type'>(<tt>Hash</tt>)</span>
302
+
303
+
304
+
305
+ &mdash;
306
+ <div class='inline'>
307
+ <p>Options</p>
308
+ </div>
309
+
310
+ </li>
311
+
312
+ </ul>
313
+
314
+
315
+
316
+
317
+ <p class="tag_title">Options Hash (<tt>options</tt>):</p>
318
+ <ul class="option">
319
+
320
+ <li>
321
+ <span class="name">:application_api_key</span>
322
+ <span class="type">(<tt>String</tt>)</span>
323
+ <span class="default">
324
+
325
+ </span>
326
+
327
+ &mdash; <div class='inline'>
328
+ <p>Your app’s api_key. Required.</p>
329
+ </div>
330
+
331
+ </li>
332
+
333
+ <li>
334
+ <span class="name">:master_key</span>
335
+ <span class="type">(<tt>String</tt>)</span>
336
+ <span class="default">
337
+
338
+ </span>
339
+
340
+ &mdash; <div class='inline'>
341
+ <p>Your app’s master_key</p>
342
+ </div>
343
+
344
+ </li>
345
+
346
+ <li>
347
+ <span class="name">:authtoken</span>
348
+ <span class="type">(<tt>String</tt>)</span>
349
+ <span class="default">
350
+
351
+ </span>
352
+
353
+ &mdash; <div class='inline'>
354
+ <p>A user’s authtoken</p>
355
+ </div>
356
+
357
+ </li>
358
+
359
+ <li>
360
+ <span class="name">:host</span>
361
+ <span class="type">(<tt>String</tt>)</span>
362
+ <span class="default">
363
+
364
+ </span>
365
+
366
+ &mdash; <div class='inline'>
367
+ <p>built.io API host (defaults to <a
368
+ href="https://api.built.io">api.built.io</a>)</p>
369
+ </div>
370
+
371
+ </li>
372
+
373
+ <li>
374
+ <span class="name">:version</span>
375
+ <span class="type">(<tt>String</tt>)</span>
376
+ <span class="default">
377
+
378
+ </span>
379
+
380
+ &mdash; <div class='inline'>
381
+ <p>built.io version delimiter (v1, v2, etc)</p>
382
+ </div>
383
+
384
+ </li>
385
+
386
+ </ul>
387
+
388
+
389
+ <p class="tag_title">Raises:</p>
390
+ <ul class="raise">
391
+
392
+ <li>
393
+
394
+
395
+ <span class='type'>(<tt><span class='object_link'><a href="Built/BuiltError.html" title="Built::BuiltError (class)">BuiltError</a></span></tt>)</span>
396
+
397
+
398
+
399
+ </li>
400
+
401
+ </ul>
402
+
403
+ </div><table class="source_code">
404
+ <tr>
405
+ <td>
406
+ <pre class="lines">
407
+
408
+
409
+ 18
410
+ 19
411
+ 20
412
+ 21
413
+ 22
414
+ 23
415
+ 24
416
+ 25
417
+ 26
418
+ 27
419
+ 28
420
+ 29
421
+ 30
422
+ 31
423
+ 32
424
+ 33
425
+ 34
426
+ 35
427
+ 36
428
+ 37
429
+ 38
430
+ 39
431
+ 40</pre>
432
+ </td>
433
+ <td>
434
+ <pre class="code"><span class="info file"># File 'lib/built.rb', line 18</span>
435
+
436
+ <span class='kw'>def</span> <span class='id identifier rubyid_init'>init</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
437
+ <span class='id identifier rubyid_options'>options</span> <span class='op'>||=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
438
+
439
+ <span class='id identifier rubyid_host'>host</span> <span class='op'>=</span> <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:host</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='const'>API_URI</span>
440
+ <span class='id identifier rubyid_version'>version</span> <span class='op'>=</span> <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:version</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='const'>API_VERSION</span>
441
+ <span class='id identifier rubyid_master_key'>master_key</span> <span class='op'>=</span> <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:master_key</span><span class='rbracket'>]</span>
442
+ <span class='id identifier rubyid_api_key'>api_key</span> <span class='op'>=</span> <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:application_api_key</span><span class='rbracket'>]</span>
443
+ <span class='id identifier rubyid_authtoken'>authtoken</span> <span class='op'>=</span> <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:authtoken</span><span class='rbracket'>]</span>
444
+
445
+ <span class='kw'>if</span> <span class='const'>Util</span><span class='period'>.</span><span class='id identifier rubyid_blank?'>blank?</span><span class='lparen'>(</span><span class='id identifier rubyid_api_key'>api_key</span><span class='rparen'>)</span>
446
+ <span class='id identifier rubyid_raise'>raise</span> <span class='const'>BuiltError</span><span class='comma'>,</span> <span class='const'>I18n</span><span class='period'>.</span><span class='id identifier rubyid_t'>t</span><span class='lparen'>(</span>
447
+ <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>required_parameter</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='lbrace'>{</span><span class='symbol'>:param</span> <span class='op'>=&gt;</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>application_api_key</span><span class='tstring_end'>&quot;</span></span><span class='rbrace'>}</span><span class='rparen'>)</span>
448
+ <span class='kw'>end</span>
449
+
450
+ <span class='comment'># create the client
451
+ </span> <span class='cvar'>@@client</span> <span class='op'>=</span> <span class='const'>Client</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='lbrace'>{</span>
452
+ <span class='label'>host:</span> <span class='id identifier rubyid_host'>host</span><span class='comma'>,</span>
453
+ <span class='label'>version:</span> <span class='id identifier rubyid_version'>version</span><span class='comma'>,</span>
454
+ <span class='label'>application_api_key:</span> <span class='id identifier rubyid_api_key'>api_key</span><span class='comma'>,</span>
455
+ <span class='label'>master_key:</span> <span class='id identifier rubyid_master_key'>master_key</span><span class='comma'>,</span>
456
+ <span class='label'>authtoken:</span> <span class='id identifier rubyid_authtoken'>authtoken</span>
457
+ <span class='rbrace'>}</span><span class='rparen'>)</span>
458
+ <span class='kw'>end</span></pre>
459
+ </td>
460
+ </tr>
461
+ </table>
462
+ </div>
463
+
464
+ <div class="method_details ">
465
+ <h3 class="signature " id="root-class_method">
466
+
467
+ + (<tt><span class='object_link'><a href="Built/Object.html" title="Built::Object (class)">Object</a></span></tt>) <strong>root</strong>
468
+
469
+
470
+
471
+
472
+
473
+ </h3><div class="docstring">
474
+ <div class="discussion">
475
+ <p class="note private">
476
+ <strong>This method is part of a private API.</strong>
477
+ You should avoid using this method if possible, as it may be removed or be changed in the future.
478
+ </p>
479
+
480
+
481
+ </div>
482
+ </div>
483
+ <div class="tags">
484
+
485
+
486
+ </div><table class="source_code">
487
+ <tr>
488
+ <td>
489
+ <pre class="lines">
490
+
491
+
492
+ 53
493
+ 54
494
+ 55</pre>
495
+ </td>
496
+ <td>
497
+ <pre class="code"><span class="info file"># File 'lib/built.rb', line 53</span>
498
+
499
+ <span class='kw'>def</span> <span class='id identifier rubyid_root'>root</span>
500
+ <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_expand_path'>expand_path</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>..</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='kw'>__FILE__</span>
501
+ <span class='kw'>end</span></pre>
502
+ </td>
503
+ </tr>
504
+ </table>
505
+ </div>
506
+
507
+ </div>
508
+
509
+ </div>
510
+
511
+ <div id="footer">
512
+ Generated on Mon Mar 24 18:20:49 2014 by
513
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
514
+ 0.8.7.2 (ruby-1.9.3).
515
+ </div>
516
+
517
+ </body>
518
+ </html>