prismic.io 1.4.3 → 1.4.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (95) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +2 -2
  3. data/docs/Prismic/API/BadPrismicResponseError.html +44 -43
  4. data/docs/Prismic/API/OAuth.html +99 -98
  5. data/docs/Prismic/API/PrismicWSAuthError.html +67 -66
  6. data/docs/Prismic/API/PrismicWSConnectionError.html +51 -50
  7. data/docs/Prismic/API.html +434 -280
  8. data/docs/Prismic/BasicNullCache.html +49 -48
  9. data/docs/Prismic/DefaultHTTPClient.html +85 -79
  10. data/docs/Prismic/Document.html +279 -83
  11. data/docs/Prismic/Error.html +52 -51
  12. data/docs/Prismic/Experiment.html +60 -59
  13. data/docs/Prismic/Experiments.html +61 -60
  14. data/docs/Prismic/Field.html +54 -53
  15. data/docs/Prismic/Form.html +70 -69
  16. data/docs/Prismic/Fragments/Color.html +60 -59
  17. data/docs/Prismic/Fragments/Date.html +52 -51
  18. data/docs/Prismic/Fragments/DocumentLink.html +78 -76
  19. data/docs/Prismic/Fragments/Embed.html +60 -59
  20. data/docs/Prismic/Fragments/FileLink.html +58 -57
  21. data/docs/Prismic/Fragments/Fragment.html +49 -48
  22. data/docs/Prismic/Fragments/GeoPoint.html +54 -53
  23. data/docs/Prismic/Fragments/Group.html +65 -63
  24. data/docs/Prismic/Fragments/GroupDocument.html +57 -55
  25. data/docs/Prismic/Fragments/Image/View.html +64 -63
  26. data/docs/Prismic/Fragments/Image/ViewDoesNotExistException.html +44 -43
  27. data/docs/Prismic/Fragments/Image.html +69 -68
  28. data/docs/Prismic/Fragments/ImageLink.html +50 -49
  29. data/docs/Prismic/Fragments/Link.html +53 -52
  30. data/docs/Prismic/Fragments/Multiple.html +58 -57
  31. data/docs/Prismic/Fragments/Number.html +54 -53
  32. data/docs/Prismic/Fragments/Select.html +52 -51
  33. data/docs/Prismic/Fragments/Separator.html +54 -53
  34. data/docs/Prismic/Fragments/Slice.html +58 -57
  35. data/docs/Prismic/Fragments/SliceZone.html +54 -53
  36. data/docs/Prismic/Fragments/StructuredText/Block/Embed.html +52 -51
  37. data/docs/Prismic/Fragments/StructuredText/Block/Heading.html +52 -51
  38. data/docs/Prismic/Fragments/StructuredText/Block/Image.html +66 -65
  39. data/docs/Prismic/Fragments/StructuredText/Block/ListItem.html +52 -51
  40. data/docs/Prismic/Fragments/StructuredText/Block/Paragraph.html +47 -46
  41. data/docs/Prismic/Fragments/StructuredText/Block/Preformatted.html +47 -46
  42. data/docs/Prismic/Fragments/StructuredText/Block/Text.html +68 -64
  43. data/docs/Prismic/Fragments/StructuredText/Block.html +47 -46
  44. data/docs/Prismic/Fragments/StructuredText/BlockGroup.html +54 -53
  45. data/docs/Prismic/Fragments/StructuredText/Span/Em.html +47 -46
  46. data/docs/Prismic/Fragments/StructuredText/Span/Hyperlink.html +53 -52
  47. data/docs/Prismic/Fragments/StructuredText/Span/Label.html +52 -51
  48. data/docs/Prismic/Fragments/StructuredText/Span/Strong.html +47 -46
  49. data/docs/Prismic/Fragments/StructuredText/Span.html +52 -51
  50. data/docs/Prismic/Fragments/StructuredText.html +59 -58
  51. data/docs/Prismic/Fragments/Text.html +54 -53
  52. data/docs/Prismic/Fragments/Timestamp.html +52 -51
  53. data/docs/Prismic/Fragments/WebLink.html +50 -49
  54. data/docs/Prismic/Fragments.html +39 -39
  55. data/docs/Prismic/HtmlSerializer.html +57 -56
  56. data/docs/Prismic/JsonParser.html +145 -143
  57. data/docs/Prismic/LinkResolver.html +73 -72
  58. data/docs/Prismic/LruCache.html +70 -69
  59. data/docs/Prismic/Predicates.html +261 -209
  60. data/docs/Prismic/Ref.html +86 -85
  61. data/docs/Prismic/Response.html +75 -73
  62. data/docs/Prismic/SearchForm/AuthenticationException.html +44 -43
  63. data/docs/Prismic/SearchForm/AuthorizationException.html +44 -43
  64. data/docs/Prismic/SearchForm/FormSearchException.html +44 -43
  65. data/docs/Prismic/SearchForm/NoRefSetException.html +44 -43
  66. data/docs/Prismic/SearchForm/RefNotFoundException.html +44 -43
  67. data/docs/Prismic/SearchForm/UnsupportedFormKind.html +44 -43
  68. data/docs/Prismic/SearchForm.html +97 -96
  69. data/docs/Prismic/Variation.html +57 -56
  70. data/docs/Prismic/WithFragments.html +115 -113
  71. data/docs/Prismic.html +91 -93
  72. data/docs/_index.html +32 -35
  73. data/docs/class_list.html +24 -27
  74. data/docs/css/full_list.css +32 -31
  75. data/docs/css/style.css +244 -91
  76. data/docs/file.README.html +39 -74
  77. data/docs/file_list.html +26 -26
  78. data/docs/frames.html +7 -16
  79. data/docs/index.html +39 -74
  80. data/docs/js/app.js +101 -77
  81. data/docs/js/full_list.js +170 -132
  82. data/docs/method_list.html +1995 -1189
  83. data/docs/top-level-namespace.html +34 -36
  84. data/lib/prismic/api.rb +10 -1
  85. data/lib/prismic/fragments/link.rb +3 -2
  86. data/lib/prismic/json_parsers.rb +14 -0
  87. data/lib/prismic/version.rb +1 -1
  88. data/lib/prismic.rb +47 -5
  89. data/spec/cache_spec.rb +2 -2
  90. data/spec/fragments_spec.rb +8 -1
  91. data/spec/json_parsers_spec.rb +13 -1
  92. data/spec/prismic_spec.rb +14 -7
  93. data/spec/responses_mocks/document.json +13 -0
  94. data/spec/simple_search_spec.rb +9 -0
  95. metadata +2 -2
@@ -1,12 +1,12 @@
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">
1
+ <!DOCTYPE html>
2
+ <html>
4
3
  <head>
5
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
6
  <title>
7
7
  Class: Prismic::API
8
8
 
9
- &mdash; Documentation by YARD 0.8.7.4
9
+ &mdash; Documentation by YARD 0.9.8
10
10
 
11
11
  </title>
12
12
 
@@ -15,9 +15,8 @@
15
15
  <link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
16
16
 
17
17
  <script type="text/javascript" charset="utf-8">
18
- hasFrames = window.top.frames.main ? true : false;
18
+ pathId = "Prismic::API";
19
19
  relpath = '../';
20
- framesUrl = "../frames.html#!Prismic/API.html";
21
20
  </script>
22
21
 
23
22
 
@@ -28,51 +27,48 @@
28
27
 
29
28
  </head>
30
29
  <body>
31
- <div id="header">
32
- <div id="menu">
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">
33
38
 
34
39
  <a href="../_index.html">Index (A)</a> &raquo;
35
40
  <span class='title'><span class='object_link'><a href="../Prismic.html" title="Prismic (module)">Prismic</a></span></span>
36
41
  &raquo;
37
42
  <span class="title">API</span>
38
43
 
39
-
40
- <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
41
44
  </div>
42
45
 
43
- <div id="search">
46
+ <div id="search">
44
47
 
45
48
  <a class="full_list_link" id="class_list_link"
46
49
  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
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>
58
56
  </a>
59
57
 
60
58
  </div>
61
- <div class="clear"></div>
62
- </div>
63
-
64
- <iframe id="search_frame"></iframe>
59
+ <div class="clear"></div>
60
+ </div>
65
61
 
66
- <div id="content"><h1>Class: Prismic::API
62
+ <div id="content"><h1>Class: Prismic::API
67
63
 
68
64
 
69
65
 
70
66
  </h1>
71
-
72
- <dl class="box">
67
+ <div class="box_info">
73
68
 
74
- <dt class="r1">Inherits:</dt>
75
- <dd class="r1">
69
+ <dl>
70
+ <dt>Inherits:</dt>
71
+ <dd>
76
72
  <span class="inheritName">Object</span>
77
73
 
78
74
  <ul class="fullTree">
@@ -83,21 +79,25 @@
83
79
  </ul>
84
80
  <a href="#" class="inheritanceTree">show all</a>
85
81
 
86
- </dd>
87
-
82
+ </dd>
83
+ </dl>
88
84
 
85
+
89
86
 
90
-
91
87
 
92
-
93
88
 
94
89
 
95
90
 
96
- <dt class="r2 last">Defined in:</dt>
97
- <dd class="r2 last">lib/prismic/api.rb</dd>
91
+
98
92
 
99
- </dl>
100
- <div class="clear"></div>
93
+
94
+
95
+ <dl>
96
+ <dt>Defined in:</dt>
97
+ <dd>lib/prismic/api.rb</dd>
98
+ </dl>
99
+
100
+ </div>
101
101
 
102
102
  <h2>Overview</h2><div class="docstring">
103
103
  <div class="discussion">
@@ -121,37 +121,35 @@
121
121
  </p>
122
122
 
123
123
  <h2>Constant Summary</h2>
124
-
125
- <dl class="constants">
126
-
127
- <dt id="warned_create_search_form-classvariable" class="">@@warned_create_search_form =
128
-
129
- </dt>
130
- <dd><pre class="code"><span class='kw'>false</span></pre></dd>
131
-
132
- <dt id="warned_oauth_initiate_url-classvariable" class="">@@warned_oauth_initiate_url =
133
-
134
- </dt>
135
- <dd><pre class="code"><span class='kw'>false</span></pre></dd>
136
-
137
- <dt id="warned_oauth_check_token-classvariable" class="">@@warned_oauth_check_token =
138
-
139
- </dt>
140
- <dd><pre class="code"><span class='kw'>false</span></pre></dd>
141
-
142
- </dl>
143
-
124
+ <dl class="constants">
125
+
126
+ <dt id="warned_create_search_form-classvariable" class="">@@warned_create_search_form =
127
+
128
+ </dt>
129
+ <dd><pre class="code"><span class='kw'>false</span></pre></dd>
130
+
131
+ <dt id="warned_oauth_initiate_url-classvariable" class="">@@warned_oauth_initiate_url =
132
+
133
+ </dt>
134
+ <dd><pre class="code"><span class='kw'>false</span></pre></dd>
135
+
136
+ <dt id="warned_oauth_check_token-classvariable" class="">@@warned_oauth_check_token =
137
+
138
+ </dt>
139
+ <dd><pre class="code"><span class='kw'>false</span></pre></dd>
140
+
141
+ </dl>
144
142
 
145
143
 
146
144
 
147
145
 
148
- <h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
146
+ <h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
149
147
  <ul class="summary">
150
148
 
151
149
  <li class="public ">
152
150
  <span class="summary_signature">
153
151
 
154
- <a href="#access_token-instance_method" title="#access_token (instance method)">- (String) <strong>access_token</strong> </a>
152
+ <a href="#access_token-instance_method" title="#access_token (instance method)">#<strong>access_token</strong> &#x21d2; String </a>
155
153
 
156
154
 
157
155
 
@@ -178,7 +176,7 @@
178
176
  <li class="public ">
179
177
  <span class="summary_signature">
180
178
 
181
- <a href="#bookmarks-instance_method" title="#bookmarks (instance method)">- (Hash{String =&gt; String}) <strong>bookmarks</strong> </a>
179
+ <a href="#bookmarks-instance_method" title="#bookmarks (instance method)">#<strong>bookmarks</strong> &#x21d2; Hash{String =&gt; String} </a>
182
180
 
183
181
 
184
182
 
@@ -204,7 +202,7 @@
204
202
  <li class="public ">
205
203
  <span class="summary_signature">
206
204
 
207
- <a href="#cache-instance_method" title="#cache (instance method)">- (Object) <strong>cache</strong> </a>
205
+ <a href="#cache-instance_method" title="#cache (instance method)">#<strong>cache</strong> &#x21d2; Object </a>
208
206
 
209
207
 
210
208
 
@@ -230,7 +228,7 @@
230
228
  <li class="public ">
231
229
  <span class="summary_signature">
232
230
 
233
- <a href="#experiments-instance_method" title="#experiments (instance method)">- (Experiments) <strong>experiments</strong> </a>
231
+ <a href="#experiments-instance_method" title="#experiments (instance method)">#<strong>experiments</strong> &#x21d2; Experiments </a>
234
232
 
235
233
 
236
234
 
@@ -256,7 +254,7 @@
256
254
  <li class="public ">
257
255
  <span class="summary_signature">
258
256
 
259
- <a href="#forms-instance_method" title="#forms (instance method)">- (Hash{String =&gt; Form}) <strong>forms</strong> </a>
257
+ <a href="#forms-instance_method" title="#forms (instance method)">#<strong>forms</strong> &#x21d2; Hash{String =&gt; Form} </a>
260
258
 
261
259
 
262
260
 
@@ -282,7 +280,7 @@
282
280
  <li class="public ">
283
281
  <span class="summary_signature">
284
282
 
285
- <a href="#http_client-instance_method" title="#http_client (instance method)">- (Object) <strong>http_client</strong> </a>
283
+ <a href="#http_client-instance_method" title="#http_client (instance method)">#<strong>http_client</strong> &#x21d2; Object </a>
286
284
 
287
285
 
288
286
 
@@ -310,7 +308,7 @@
310
308
  <li class="public ">
311
309
  <span class="summary_signature">
312
310
 
313
- <a href="#json-instance_method" title="#json (instance method)">- (Object) <strong>json</strong> </a>
311
+ <a href="#json-instance_method" title="#json (instance method)">#<strong>json</strong> &#x21d2; Object </a>
314
312
 
315
313
 
316
314
 
@@ -338,7 +336,7 @@
338
336
  <li class="public ">
339
337
  <span class="summary_signature">
340
338
 
341
- <a href="#master-instance_method" title="#master (instance method)">- (Ref) <strong>master</strong> </a>
339
+ <a href="#master-instance_method" title="#master (instance method)">#<strong>master</strong> &#x21d2; Ref </a>
342
340
 
343
341
 
344
342
 
@@ -366,7 +364,7 @@
366
364
  <li class="public ">
367
365
  <span class="summary_signature">
368
366
 
369
- <a href="#oauth-instance_method" title="#oauth (instance method)">- (Object) <strong>oauth</strong> </a>
367
+ <a href="#oauth-instance_method" title="#oauth (instance method)">#<strong>oauth</strong> &#x21d2; Object </a>
370
368
 
371
369
 
372
370
 
@@ -392,7 +390,7 @@
392
390
  <li class="public ">
393
391
  <span class="summary_signature">
394
392
 
395
- <a href="#refs-instance_method" title="#refs (instance method)">- (Hash{String =&gt; Ref}) <strong>refs</strong> </a>
393
+ <a href="#refs-instance_method" title="#refs (instance method)">#<strong>refs</strong> &#x21d2; Hash{String =&gt; Ref} </a>
396
394
 
397
395
 
398
396
 
@@ -418,7 +416,7 @@
418
416
  <li class="public ">
419
417
  <span class="summary_signature">
420
418
 
421
- <a href="#tags-instance_method" title="#tags (instance method)">- (Object) <strong>tags</strong> </a>
419
+ <a href="#tags-instance_method" title="#tags (instance method)">#<strong>tags</strong> &#x21d2; Object </a>
422
420
 
423
421
 
424
422
 
@@ -444,7 +442,7 @@
444
442
  <li class="public ">
445
443
  <span class="summary_signature">
446
444
 
447
- <a href="#types-instance_method" title="#types (instance method)">- (Object) <strong>types</strong> </a>
445
+ <a href="#types-instance_method" title="#types (instance method)">#<strong>types</strong> &#x21d2; Object </a>
448
446
 
449
447
 
450
448
 
@@ -475,7 +473,7 @@
475
473
 
476
474
  <h2>
477
475
  Class Method Summary
478
- <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
476
+ <small><a href="#" class="summary_toggle">collapse</a></small>
479
477
  </h2>
480
478
 
481
479
  <ul class="summary">
@@ -483,7 +481,7 @@
483
481
  <li class="public ">
484
482
  <span class="summary_signature">
485
483
 
486
- <a href="#get-class_method" title="get (class method)">+ (Object) <strong>get</strong>(url, access_token = nil, http_client = Prismic::DefaultHTTPClient, api_cache = Prismic::DefaultCache) </a>
484
+ <a href="#get-class_method" title="get (class method)">.<strong>get</strong>(url, access_token = nil, http_client = Prismic::DefaultHTTPClient, api_cache = Prismic::DefaultCache) &#x21d2; Object </a>
487
485
 
488
486
 
489
487
 
@@ -506,7 +504,7 @@
506
504
  <li class="public ">
507
505
  <span class="summary_signature">
508
506
 
509
- <a href="#oauth_check_token-class_method" title="oauth_check_token (class method)">+ (Object) <strong>oauth_check_token</strong>(url, oauth_params, api_opts = {}) </a>
507
+ <a href="#oauth_check_token-class_method" title="oauth_check_token (class method)">.<strong>oauth_check_token</strong>(url, oauth_params, api_opts = {}) &#x21d2; Object </a>
510
508
 
511
509
 
512
510
 
@@ -528,7 +526,7 @@
528
526
  <li class="public ">
529
527
  <span class="summary_signature">
530
528
 
531
- <a href="#oauth_initiate_url-class_method" title="oauth_initiate_url (class method)">+ (Object) <strong>oauth_initiate_url</strong>(url, oauth_opts, api_opts = {}) </a>
529
+ <a href="#oauth_initiate_url-class_method" title="oauth_initiate_url (class method)">.<strong>oauth_initiate_url</strong>(url, oauth_opts, api_opts = {}) &#x21d2; Object </a>
532
530
 
533
531
 
534
532
 
@@ -550,7 +548,7 @@
550
548
  <li class="public ">
551
549
  <span class="summary_signature">
552
550
 
553
- <a href="#parse_api_response-class_method" title="parse_api_response (class method)">+ (Object) <strong>parse_api_response</strong>(data, access_token, http_client, cache) </a>
551
+ <a href="#parse_api_response-class_method" title="parse_api_response (class method)">.<strong>parse_api_response</strong>(data, access_token, http_client, cache) &#x21d2; Object </a>
554
552
 
555
553
 
556
554
 
@@ -572,7 +570,7 @@
572
570
  <li class="public ">
573
571
  <span class="summary_signature">
574
572
 
575
- <a href="#start-class_method" title="start (class method)">+ (Object) <strong>start</strong>(url, opts = {}) </a>
573
+ <a href="#start-class_method" title="start (class method)">.<strong>start</strong>(url, opts = {}) &#x21d2; Object </a>
576
574
 
577
575
 
578
576
 
@@ -595,7 +593,7 @@
595
593
 
596
594
  <h2>
597
595
  Instance Method Summary
598
- <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
596
+ <small><a href="#" class="summary_toggle">collapse</a></small>
599
597
  </h2>
600
598
 
601
599
  <ul class="summary">
@@ -603,7 +601,7 @@
603
601
  <li class="public ">
604
602
  <span class="summary_signature">
605
603
 
606
- <a href="#all-instance_method" title="#all (instance method)">- (Object) <strong>all</strong>(data = {}) </a>
604
+ <a href="#all-instance_method" title="#all (instance method)">#<strong>all</strong>(opts = {}) &#x21d2; Object </a>
607
605
 
608
606
 
609
607
 
@@ -626,7 +624,7 @@
626
624
  <li class="public ">
627
625
  <span class="summary_signature">
628
626
 
629
- <a href="#as_json-instance_method" title="#as_json (instance method)">- (Object) <strong>as_json</strong> </a>
627
+ <a href="#as_json-instance_method" title="#as_json (instance method)">#<strong>as_json</strong> &#x21d2; Object </a>
630
628
 
631
629
 
632
630
 
@@ -648,7 +646,7 @@
648
646
  <li class="public ">
649
647
  <span class="summary_signature">
650
648
 
651
- <a href="#bookmark-instance_method" title="#bookmark (instance method)">- (String) <strong>bookmark</strong>(name) </a>
649
+ <a href="#bookmark-instance_method" title="#bookmark (instance method)">#<strong>bookmark</strong>(name) &#x21d2; String </a>
652
650
 
653
651
 
654
652
 
@@ -671,7 +669,7 @@
671
669
  <li class="public deprecated">
672
670
  <span class="summary_signature">
673
671
 
674
- <a href="#create_search_form-instance_method" title="#create_search_form (instance method)">- (Object) <strong>create_search_form</strong>(name, data = {}, ref = {}) </a>
672
+ <a href="#create_search_form-instance_method" title="#create_search_form (instance method)">#<strong>create_search_form</strong>(name, data = {}, ref = {}) &#x21d2; Object </a>
675
673
 
676
674
 
677
675
 
@@ -694,7 +692,7 @@
694
692
  <li class="public ">
695
693
  <span class="summary_signature">
696
694
 
697
- <a href="#form-instance_method" title="#form (instance method)">- (SearchForm) <strong>form</strong>(name, data = {}, ref = {}) </a>
695
+ <a href="#form-instance_method" title="#form (instance method)">#<strong>form</strong>(name, data = {}, ref = {}) &#x21d2; SearchForm </a>
698
696
 
699
697
 
700
698
 
@@ -717,10 +715,12 @@
717
715
  <li class="public ">
718
716
  <span class="summary_signature">
719
717
 
720
- <a href="#getByID-instance_method" title="#getByID (instance method)">- (Object) <strong>getByID</strong>(id, data = {}) </a>
718
+ <a href="#get_by_id-instance_method" title="#get_by_id (instance method)">#<strong>get_by_id</strong>(id, opts = {}) &#x21d2; Object </a>
721
719
 
722
720
 
723
721
 
722
+ (also: #getByID)
723
+
724
724
  </span>
725
725
 
726
726
 
@@ -740,10 +740,12 @@
740
740
  <li class="public ">
741
741
  <span class="summary_signature">
742
742
 
743
- <a href="#getByIDs-instance_method" title="#getByIDs (instance method)">- (Object) <strong>getByIDs</strong>(ids, data = {}) </a>
743
+ <a href="#get_by_ids-instance_method" title="#get_by_ids (instance method)">#<strong>get_by_ids</strong>(ids, opts = {}) &#x21d2; Object </a>
744
744
 
745
745
 
746
746
 
747
+ (also: #getByIDs)
748
+
747
749
  </span>
748
750
 
749
751
 
@@ -763,10 +765,12 @@
763
765
  <li class="public ">
764
766
  <span class="summary_signature">
765
767
 
766
- <a href="#getByUID-instance_method" title="#getByUID (instance method)">- (Object) <strong>getByUID</strong>(typ, uid, data = {}) </a>
768
+ <a href="#get_by_uid-instance_method" title="#get_by_uid (instance method)">#<strong>get_by_uid</strong>(typ, uid, opts = {}) &#x21d2; Object </a>
767
769
 
768
770
 
769
771
 
772
+ (also: #getByUID)
773
+
770
774
  </span>
771
775
 
772
776
 
@@ -786,7 +790,32 @@
786
790
  <li class="public ">
787
791
  <span class="summary_signature">
788
792
 
789
- <a href="#has_cache%3F-instance_method" title="#has_cache? (instance method)">- (Boolean) <strong>has_cache?</strong> </a>
793
+ <a href="#get_single-instance_method" title="#get_single (instance method)">#<strong>get_single</strong>(typ, opts = {}) &#x21d2; Object </a>
794
+
795
+
796
+
797
+ (also: #getSingle)
798
+
799
+ </span>
800
+
801
+
802
+
803
+
804
+
805
+
806
+
807
+
808
+
809
+ <span class="summary_desc"><div class='inline'><p>Retrieve one single typed document by its type.</p>
810
+ </div></span>
811
+
812
+ </li>
813
+
814
+
815
+ <li class="public ">
816
+ <span class="summary_signature">
817
+
818
+ <a href="#has_cache%3F-instance_method" title="#has_cache? (instance method)">#<strong>has_cache?</strong> &#x21d2; Boolean </a>
790
819
 
791
820
 
792
821
 
@@ -809,7 +838,7 @@
809
838
  <li class="public ">
810
839
  <span class="summary_signature">
811
840
 
812
- <a href="#initialize-instance_method" title="#initialize (instance method)">- (API) <strong>initialize</strong>(json, access_token, http_client, cache) {|_self| ... }</a>
841
+ <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(json, access_token, http_client, cache) {|_self| ... } &#x21d2; API </a>
813
842
 
814
843
 
815
844
 
@@ -834,7 +863,7 @@
834
863
  <li class="public ">
835
864
  <span class="summary_signature">
836
865
 
837
- <a href="#oauth_check_token-instance_method" title="#oauth_check_token (instance method)">- (Object) <strong>oauth_check_token</strong>(params) </a>
866
+ <a href="#oauth_check_token-instance_method" title="#oauth_check_token (instance method)">#<strong>oauth_check_token</strong>(params) &#x21d2; Object </a>
838
867
 
839
868
 
840
869
 
@@ -856,7 +885,7 @@
856
885
  <li class="public ">
857
886
  <span class="summary_signature">
858
887
 
859
- <a href="#oauth_initiate_url-instance_method" title="#oauth_initiate_url (instance method)">- (Object) <strong>oauth_initiate_url</strong>(opts) </a>
888
+ <a href="#oauth_initiate_url-instance_method" title="#oauth_initiate_url (instance method)">#<strong>oauth_initiate_url</strong>(opts) &#x21d2; Object </a>
860
889
 
861
890
 
862
891
 
@@ -878,7 +907,7 @@
878
907
  <li class="public ">
879
908
  <span class="summary_signature">
880
909
 
881
- <a href="#preview_session-instance_method" title="#preview_session (instance method)">- (String) <strong>preview_session</strong>(token, link_resolver, default_url) </a>
910
+ <a href="#preview_session-instance_method" title="#preview_session (instance method)">#<strong>preview_session</strong>(token, link_resolver, default_url) &#x21d2; String </a>
882
911
 
883
912
 
884
913
 
@@ -901,7 +930,7 @@
901
930
  <li class="public ">
902
931
  <span class="summary_signature">
903
932
 
904
- <a href="#query-instance_method" title="#query (instance method)">- (Object) <strong>query</strong>(q, data = {}) </a>
933
+ <a href="#query-instance_method" title="#query (instance method)">#<strong>query</strong>(q, opts = {}) &#x21d2; Object </a>
905
934
 
906
935
 
907
936
 
@@ -924,7 +953,7 @@
924
953
  <li class="public ">
925
954
  <span class="summary_signature">
926
955
 
927
- <a href="#ref-instance_method" title="#ref (instance method)">- (Ref) <strong>ref</strong>(name) </a>
956
+ <a href="#ref-instance_method" title="#ref (instance method)">#<strong>ref</strong>(name) &#x21d2; Ref </a>
928
957
 
929
958
 
930
959
 
@@ -953,7 +982,7 @@
953
982
  <div class="method_details first">
954
983
  <h3 class="signature first" id="initialize-instance_method">
955
984
 
956
- - (<tt><span class='object_link'><a href="" title="Prismic::API (class)">API</a></span></tt>) <strong>initialize</strong>(json, access_token, http_client, cache) {|_self| ... }
985
+ #<strong>initialize</strong>(json, access_token, http_client, cache) {|_self| ... } &#x21d2; <tt><span class='object_link'><a href="" title="Prismic::API (class)">API</a></span></tt>
957
986
 
958
987
 
959
988
 
@@ -1040,7 +1069,7 @@
1040
1069
  <span class='kw'>yield</span> <span class='kw'>self</span> <span class='kw'>if</span> <span class='id identifier rubyid_block_given?'>block_given?</span>
1041
1070
  <span class='ivar'>@cache</span> <span class='op'>=</span> <span class='id identifier rubyid_cache'>cache</span>
1042
1071
  <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_master'>master</span> <span class='op'>=</span> <span class='id identifier rubyid_refs'>refs</span><span class='period'>.</span><span class='id identifier rubyid_values'>values</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_refs'>refs</span><span class='period'>.</span><span class='id identifier rubyid_values'>values</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_ref'>ref</span><span class='op'>|</span> <span class='id identifier rubyid_ref'>ref</span> <span class='kw'>if</span> <span class='id identifier rubyid_ref'>ref</span><span class='period'>.</span><span class='id identifier rubyid_master?'>master?</span> <span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_compact'>compact</span><span class='period'>.</span><span class='id identifier rubyid_first'>first</span>
1043
- <span class='id identifier rubyid_raise'>raise</span> <span class='const'>BadPrismicResponseError</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>No master Ref found</span><span class='tstring_end'>&#39;</span></span> <span class='kw'>unless</span> <span class='id identifier rubyid_master'>master</span>
1072
+ <span class='id identifier rubyid_raise'>raise</span> <span class='const'><span class='object_link'><a href="API/BadPrismicResponseError.html" title="Prismic::API::BadPrismicResponseError (class)">BadPrismicResponseError</a></span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>No master Ref found</span><span class='tstring_end'>&#39;</span></span> <span class='kw'>unless</span> <span class='id identifier rubyid_master'>master</span>
1044
1073
  <span class='kw'>end</span></pre>
1045
1074
  </td>
1046
1075
  </tr>
@@ -1057,7 +1086,7 @@
1057
1086
  <div class="method_details first">
1058
1087
  <h3 class="signature first" id="access_token-instance_method">
1059
1088
 
1060
- - (<tt>String</tt>) <strong>access_token</strong> <span class="extras">(readonly)</span>
1089
+ #<strong>access_token</strong> &#x21d2; <tt>String</tt> <span class="extras">(readonly)</span>
1061
1090
 
1062
1091
 
1063
1092
 
@@ -1111,7 +1140,7 @@
1111
1140
  <div class="method_details ">
1112
1141
  <h3 class="signature " id="bookmarks-instance_method">
1113
1142
 
1114
- - (<tt>Hash{String =&gt; String}</tt>) <strong>bookmarks</strong>
1143
+ #<strong>bookmarks</strong> &#x21d2; <tt>Hash{String =&gt; String}</tt>
1115
1144
 
1116
1145
 
1117
1146
 
@@ -1170,7 +1199,7 @@
1170
1199
  <div class="method_details ">
1171
1200
  <h3 class="signature " id="cache-instance_method">
1172
1201
 
1173
- - (<tt>Object</tt>) <strong>cache</strong>
1202
+ #<strong>cache</strong> &#x21d2; <tt>Object</tt>
1174
1203
 
1175
1204
 
1176
1205
 
@@ -1212,7 +1241,7 @@
1212
1241
  <div class="method_details ">
1213
1242
  <h3 class="signature " id="experiments-instance_method">
1214
1243
 
1215
- - (<tt><span class='object_link'><a href="Experiments.html" title="Prismic::Experiments (class)">Experiments</a></span></tt>) <strong>experiments</strong>
1244
+ #<strong>experiments</strong> &#x21d2; <tt><span class='object_link'><a href="Experiments.html" title="Prismic::Experiments (class)">Experiments</a></span></tt>
1216
1245
 
1217
1246
 
1218
1247
 
@@ -1271,7 +1300,7 @@
1271
1300
  <div class="method_details ">
1272
1301
  <h3 class="signature " id="forms-instance_method">
1273
1302
 
1274
- - (<tt>Hash{String =&gt; <span class='object_link'><a href="Form.html" title="Prismic::Form (class)">Form</a></span>}</tt>) <strong>forms</strong>
1303
+ #<strong>forms</strong> &#x21d2; <tt>Hash{String =&gt; <span class='object_link'><a href="Form.html" title="Prismic::Form (class)">Form</a></span>}</tt>
1275
1304
 
1276
1305
 
1277
1306
 
@@ -1330,7 +1359,7 @@
1330
1359
  <div class="method_details ">
1331
1360
  <h3 class="signature " id="http_client-instance_method">
1332
1361
 
1333
- - (<tt>Object</tt>) <strong>http_client</strong> <span class="extras">(readonly)</span>
1362
+ #<strong>http_client</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span>
1334
1363
 
1335
1364
 
1336
1365
 
@@ -1372,7 +1401,7 @@
1372
1401
  <div class="method_details ">
1373
1402
  <h3 class="signature " id="json-instance_method">
1374
1403
 
1375
- - (<tt>Object</tt>) <strong>json</strong> <span class="extras">(readonly)</span>
1404
+ #<strong>json</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span>
1376
1405
 
1377
1406
 
1378
1407
 
@@ -1414,7 +1443,7 @@
1414
1443
  <div class="method_details ">
1415
1444
  <h3 class="signature " id="master-instance_method">
1416
1445
 
1417
- - (<tt><span class='object_link'><a href="Ref.html" title="Prismic::Ref (class)">Ref</a></span></tt>) <strong>master</strong>
1446
+ #<strong>master</strong> &#x21d2; <tt><span class='object_link'><a href="Ref.html" title="Prismic::Ref (class)">Ref</a></span></tt>
1418
1447
 
1419
1448
 
1420
1449
 
@@ -1477,7 +1506,7 @@
1477
1506
  <div class="method_details ">
1478
1507
  <h3 class="signature " id="oauth-instance_method">
1479
1508
 
1480
- - (<tt>Object</tt>) <strong>oauth</strong>
1509
+ #<strong>oauth</strong> &#x21d2; <tt>Object</tt>
1481
1510
 
1482
1511
 
1483
1512
 
@@ -1519,7 +1548,7 @@
1519
1548
  <div class="method_details ">
1520
1549
  <h3 class="signature " id="refs-instance_method">
1521
1550
 
1522
- - (<tt>Hash{String =&gt; <span class='object_link'><a href="Ref.html" title="Prismic::Ref (class)">Ref</a></span>}</tt>) <strong>refs</strong>
1551
+ #<strong>refs</strong> &#x21d2; <tt>Hash{String =&gt; <span class='object_link'><a href="Ref.html" title="Prismic::Ref (class)">Ref</a></span>}</tt>
1523
1552
 
1524
1553
 
1525
1554
 
@@ -1578,7 +1607,7 @@
1578
1607
  <div class="method_details ">
1579
1608
  <h3 class="signature " id="tags-instance_method">
1580
1609
 
1581
- - (<tt>Object</tt>) <strong>tags</strong>
1610
+ #<strong>tags</strong> &#x21d2; <tt>Object</tt>
1582
1611
 
1583
1612
 
1584
1613
 
@@ -1620,7 +1649,7 @@
1620
1649
  <div class="method_details ">
1621
1650
  <h3 class="signature " id="types-instance_method">
1622
1651
 
1623
- - (<tt>Object</tt>) <strong>types</strong>
1652
+ #<strong>types</strong> &#x21d2; <tt>Object</tt>
1624
1653
 
1625
1654
 
1626
1655
 
@@ -1667,7 +1696,7 @@
1667
1696
  <div class="method_details first">
1668
1697
  <h3 class="signature first" id="get-class_method">
1669
1698
 
1670
- + (<tt>Object</tt>) <strong>get</strong>(url, access_token = nil, http_client = Prismic::DefaultHTTPClient, api_cache = Prismic::DefaultCache)
1699
+ .<strong>get</strong>(url, access_token = nil, http_client = Prismic::DefaultHTTPClient, api_cache = Prismic::DefaultCache) &#x21d2; <tt>Object</tt>
1671
1700
 
1672
1701
 
1673
1702
 
@@ -1689,19 +1718,6 @@
1689
1718
  <pre class="lines">
1690
1719
 
1691
1720
 
1692
- 151
1693
- 152
1694
- 153
1695
- 154
1696
- 155
1697
- 156
1698
- 157
1699
- 158
1700
- 159
1701
- 160
1702
- 161
1703
- 162
1704
- 163
1705
1721
  164
1706
1722
  165
1707
1723
  166
@@ -1714,10 +1730,23 @@
1714
1730
  173
1715
1731
  174
1716
1732
  175
1717
- 176</pre>
1733
+ 176
1734
+ 177
1735
+ 178
1736
+ 179
1737
+ 180
1738
+ 181
1739
+ 182
1740
+ 183
1741
+ 184
1742
+ 185
1743
+ 186
1744
+ 187
1745
+ 188
1746
+ 189</pre>
1718
1747
  </td>
1719
1748
  <td>
1720
- <pre class="code"><span class="info file"># File 'lib/prismic/api.rb', line 151</span>
1749
+ <pre class="code"><span class="info file"># File 'lib/prismic/api.rb', line 164</span>
1721
1750
 
1722
1751
  <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_get'>get</span><span class='lparen'>(</span><span class='id identifier rubyid_url'>url</span><span class='comma'>,</span> <span class='id identifier rubyid_access_token'>access_token</span><span class='op'>=</span><span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_http_client'>http_client</span><span class='op'>=</span><span class='const'>Prismic</span><span class='op'>::</span><span class='const'>DefaultHTTPClient</span><span class='comma'>,</span> <span class='id identifier rubyid_api_cache'>api_cache</span><span class='op'>=</span><span class='const'>Prismic</span><span class='op'>::</span><span class='const'>DefaultCache</span><span class='rparen'>)</span>
1723
1752
  <span class='id identifier rubyid_data'>data</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
@@ -1731,17 +1760,17 @@
1731
1760
  <span class='kw'>when</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>401</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>403</span><span class='tstring_end'>&#39;</span></span>
1732
1761
  <span class='kw'>begin</span>
1733
1762
  <span class='id identifier rubyid_json'>json</span> <span class='op'>=</span> <span class='const'>JSON</span><span class='period'>.</span><span class='id identifier rubyid_load'>load</span><span class='lparen'>(</span><span class='id identifier rubyid_res'>res</span><span class='period'>.</span><span class='id identifier rubyid_body'>body</span><span class='rparen'>)</span>
1734
- <span class='id identifier rubyid_raise'>raise</span> <span class='const'>PrismicWSAuthError</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span>
1763
+ <span class='id identifier rubyid_raise'>raise</span> <span class='const'><span class='object_link'><a href="API/PrismicWSAuthError.html" title="Prismic::API::PrismicWSAuthError (class)">PrismicWSAuthError</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="API/PrismicWSAuthError.html#initialize-instance_method" title="Prismic::API::PrismicWSAuthError#initialize (method)">new</a></span></span><span class='lparen'>(</span>
1735
1764
  <span class='id identifier rubyid_json'>json</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>error</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='comma'>,</span>
1736
1765
  <span class='id identifier rubyid_json'>json</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>oauth_initiate</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='comma'>,</span>
1737
1766
  <span class='id identifier rubyid_json'>json</span><span class='lbracket'>[</span><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='rbracket'>]</span><span class='comma'>,</span>
1738
1767
  <span class='id identifier rubyid_http_client'>http_client</span>
1739
1768
  <span class='rparen'>)</span>
1740
1769
  <span class='kw'>rescue</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_e'>e</span>
1741
- <span class='id identifier rubyid_raise'>raise</span> <span class='const'>PrismicWSConnectionError</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_res'>res</span><span class='comma'>,</span> <span class='id identifier rubyid_e'>e</span><span class='rparen'>)</span>
1770
+ <span class='id identifier rubyid_raise'>raise</span> <span class='const'><span class='object_link'><a href="API/PrismicWSConnectionError.html" title="Prismic::API::PrismicWSConnectionError (class)">PrismicWSConnectionError</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="API/PrismicWSConnectionError.html#initialize-instance_method" title="Prismic::API::PrismicWSConnectionError#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_res'>res</span><span class='comma'>,</span> <span class='id identifier rubyid_e'>e</span><span class='rparen'>)</span>
1742
1771
  <span class='kw'>end</span>
1743
1772
  <span class='kw'>else</span>
1744
- <span class='id identifier rubyid_raise'>raise</span> <span class='const'>PrismicWSConnectionError</span><span class='comma'>,</span> <span class='id identifier rubyid_res'>res</span>
1773
+ <span class='id identifier rubyid_raise'>raise</span> <span class='const'><span class='object_link'><a href="API/PrismicWSConnectionError.html" title="Prismic::API::PrismicWSConnectionError (class)">PrismicWSConnectionError</a></span></span><span class='comma'>,</span> <span class='id identifier rubyid_res'>res</span>
1745
1774
  <span class='kw'>end</span>
1746
1775
  <span class='rbrace'>}</span>
1747
1776
  <span class='kw'>end</span></pre>
@@ -1753,7 +1782,7 @@
1753
1782
  <div class="method_details ">
1754
1783
  <h3 class="signature " id="oauth_check_token-class_method">
1755
1784
 
1756
- + (<tt>Object</tt>) <strong>oauth_check_token</strong>(url, oauth_params, api_opts = {})
1785
+ .<strong>oauth_check_token</strong>(url, oauth_params, api_opts = {}) &#x21d2; <tt>Object</tt>
1757
1786
 
1758
1787
 
1759
1788
 
@@ -1765,26 +1794,26 @@
1765
1794
  <pre class="lines">
1766
1795
 
1767
1796
 
1768
- 229
1769
- 230
1770
- 231
1771
- 232
1772
- 233
1773
- 234
1774
- 235
1775
- 236
1776
- 237
1777
- 238</pre>
1797
+ 242
1798
+ 243
1799
+ 244
1800
+ 245
1801
+ 246
1802
+ 247
1803
+ 248
1804
+ 249
1805
+ 250
1806
+ 251</pre>
1778
1807
  </td>
1779
1808
  <td>
1780
- <pre class="code"><span class="info file"># File 'lib/prismic/api.rb', line 229</span>
1809
+ <pre class="code"><span class="info file"># File 'lib/prismic/api.rb', line 242</span>
1781
1810
 
1782
1811
  <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_oauth_check_token'>oauth_check_token</span><span class='lparen'>(</span><span class='id identifier rubyid_url'>url</span><span class='comma'>,</span> <span class='id identifier rubyid_oauth_params'>oauth_params</span><span class='comma'>,</span> <span class='id identifier rubyid_api_opts'>api_opts</span><span class='op'>=</span><span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
1783
1812
  <span class='id identifier rubyid_oauth'>oauth</span> <span class='op'>=</span>
1784
1813
  <span class='kw'>begin</span>
1785
1814
  <span class='id identifier rubyid_api'>api</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_start'>start</span><span class='lparen'>(</span><span class='id identifier rubyid_url'>url</span><span class='comma'>,</span> <span class='id identifier rubyid_api_opts'>api_opts</span><span class='rparen'>)</span>
1786
1815
  <span class='id identifier rubyid_api'>api</span><span class='period'>.</span><span class='id identifier rubyid_oauth'>oauth</span>
1787
- <span class='kw'>rescue</span> <span class='const'>PrismicWSAuthError</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_e'>e</span>
1816
+ <span class='kw'>rescue</span> <span class='const'><span class='object_link'><a href="API/PrismicWSAuthError.html" title="Prismic::API::PrismicWSAuthError (class)">PrismicWSAuthError</a></span></span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_e'>e</span>
1788
1817
  <span class='id identifier rubyid_e'>e</span><span class='period'>.</span><span class='id identifier rubyid_oauth'>oauth</span>
1789
1818
  <span class='kw'>end</span>
1790
1819
  <span class='id identifier rubyid_oauth'>oauth</span><span class='period'>.</span><span class='id identifier rubyid_check_token'>check_token</span><span class='lparen'>(</span><span class='id identifier rubyid_oauth_params'>oauth_params</span><span class='rparen'>)</span>
@@ -1797,7 +1826,7 @@
1797
1826
  <div class="method_details ">
1798
1827
  <h3 class="signature " id="oauth_initiate_url-class_method">
1799
1828
 
1800
- + (<tt>Object</tt>) <strong>oauth_initiate_url</strong>(url, oauth_opts, api_opts = {})
1829
+ .<strong>oauth_initiate_url</strong>(url, oauth_opts, api_opts = {}) &#x21d2; <tt>Object</tt>
1801
1830
 
1802
1831
 
1803
1832
 
@@ -1809,26 +1838,26 @@
1809
1838
  <pre class="lines">
1810
1839
 
1811
1840
 
1812
- 209
1813
- 210
1814
- 211
1815
- 212
1816
- 213
1817
- 214
1818
- 215
1819
- 216
1820
- 217
1821
- 218</pre>
1841
+ 222
1842
+ 223
1843
+ 224
1844
+ 225
1845
+ 226
1846
+ 227
1847
+ 228
1848
+ 229
1849
+ 230
1850
+ 231</pre>
1822
1851
  </td>
1823
1852
  <td>
1824
- <pre class="code"><span class="info file"># File 'lib/prismic/api.rb', line 209</span>
1853
+ <pre class="code"><span class="info file"># File 'lib/prismic/api.rb', line 222</span>
1825
1854
 
1826
1855
  <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_oauth_initiate_url'>oauth_initiate_url</span><span class='lparen'>(</span><span class='id identifier rubyid_url'>url</span><span class='comma'>,</span> <span class='id identifier rubyid_oauth_opts'>oauth_opts</span><span class='comma'>,</span> <span class='id identifier rubyid_api_opts'>api_opts</span><span class='op'>=</span><span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
1827
1856
  <span class='id identifier rubyid_oauth'>oauth</span> <span class='op'>=</span>
1828
1857
  <span class='kw'>begin</span>
1829
1858
  <span class='id identifier rubyid_api'>api</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_start'>start</span><span class='lparen'>(</span><span class='id identifier rubyid_url'>url</span><span class='comma'>,</span> <span class='id identifier rubyid_api_opts'>api_opts</span><span class='rparen'>)</span>
1830
1859
  <span class='id identifier rubyid_api'>api</span><span class='period'>.</span><span class='id identifier rubyid_oauth'>oauth</span>
1831
- <span class='kw'>rescue</span> <span class='const'>PrismicWSAuthError</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_e'>e</span>
1860
+ <span class='kw'>rescue</span> <span class='const'><span class='object_link'><a href="API/PrismicWSAuthError.html" title="Prismic::API::PrismicWSAuthError (class)">PrismicWSAuthError</a></span></span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_e'>e</span>
1832
1861
  <span class='id identifier rubyid_e'>e</span><span class='period'>.</span><span class='id identifier rubyid_oauth'>oauth</span>
1833
1862
  <span class='kw'>end</span>
1834
1863
  <span class='id identifier rubyid_oauth'>oauth</span><span class='period'>.</span><span class='id identifier rubyid_initiate_url'>initiate_url</span><span class='lparen'>(</span><span class='id identifier rubyid_oauth_opts'>oauth_opts</span><span class='rparen'>)</span>
@@ -1841,7 +1870,7 @@
1841
1870
  <div class="method_details ">
1842
1871
  <h3 class="signature " id="parse_api_response-class_method">
1843
1872
 
1844
- + (<tt>Object</tt>) <strong>parse_api_response</strong>(data, access_token, http_client, cache)
1873
+ .<strong>parse_api_response</strong>(data, access_token, http_client, cache) &#x21d2; <tt>Object</tt>
1845
1874
 
1846
1875
 
1847
1876
 
@@ -1853,44 +1882,44 @@
1853
1882
  <pre class="lines">
1854
1883
 
1855
1884
 
1856
- 190
1857
- 191
1858
- 192
1859
- 193
1860
- 194
1861
- 195
1862
- 196
1863
- 197
1864
- 198
1865
- 199
1866
- 200
1867
- 201
1868
- 202
1869
1885
  203
1870
1886
  204
1871
1887
  205
1872
1888
  206
1873
- 207</pre>
1889
+ 207
1890
+ 208
1891
+ 209
1892
+ 210
1893
+ 211
1894
+ 212
1895
+ 213
1896
+ 214
1897
+ 215
1898
+ 216
1899
+ 217
1900
+ 218
1901
+ 219
1902
+ 220</pre>
1874
1903
  </td>
1875
1904
  <td>
1876
- <pre class="code"><span class="info file"># File 'lib/prismic/api.rb', line 190</span>
1905
+ <pre class="code"><span class="info file"># File 'lib/prismic/api.rb', line 203</span>
1877
1906
 
1878
1907
  <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_parse_api_response'>parse_api_response</span><span class='lparen'>(</span><span class='id identifier rubyid_data'>data</span><span class='comma'>,</span> <span class='id identifier rubyid_access_token'>access_token</span><span class='comma'>,</span> <span class='id identifier rubyid_http_client'>http_client</span><span class='comma'>,</span> <span class='id identifier rubyid_cache'>cache</span><span class='rparen'>)</span>
1879
1908
  <span class='id identifier rubyid_data_forms'>data_forms</span> <span class='op'>=</span> <span class='id identifier rubyid_data'>data</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>forms</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
1880
- <span class='id identifier rubyid_data_refs'>data_refs</span> <span class='op'>=</span> <span class='id identifier rubyid_data'>data</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>refs</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span><span class='lbrace'>{</span> <span class='id identifier rubyid_raise'>raise</span> <span class='const'>BadPrismicResponseError</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>No refs given</span><span class='tstring_end'>&quot;</span></span> <span class='rbrace'>}</span>
1909
+ <span class='id identifier rubyid_data_refs'>data_refs</span> <span class='op'>=</span> <span class='id identifier rubyid_data'>data</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>refs</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span><span class='lbrace'>{</span> <span class='id identifier rubyid_raise'>raise</span> <span class='const'><span class='object_link'><a href="API/BadPrismicResponseError.html" title="Prismic::API::BadPrismicResponseError (class)">BadPrismicResponseError</a></span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>No refs given</span><span class='tstring_end'>&quot;</span></span> <span class='rbrace'>}</span>
1881
1910
  <span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_data'>data</span><span class='comma'>,</span> <span class='id identifier rubyid_access_token'>access_token</span><span class='comma'>,</span> <span class='id identifier rubyid_http_client'>http_client</span><span class='comma'>,</span> <span class='id identifier rubyid_cache'>cache</span><span class='rparen'>)</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_api'>api</span><span class='op'>|</span>
1882
1911
  <span class='id identifier rubyid_api'>api</span><span class='period'>.</span><span class='id identifier rubyid_bookmarks'>bookmarks</span> <span class='op'>=</span> <span class='id identifier rubyid_data'>data</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>bookmarks</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span>
1883
1912
  <span class='id identifier rubyid_api'>api</span><span class='period'>.</span><span class='id identifier rubyid_forms'>forms</span> <span class='op'>=</span> <span class='const'>Hash</span><span class='lbracket'>[</span><span class='id identifier rubyid_data_forms'>data_forms</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_k'>k</span><span class='comma'>,</span> <span class='id identifier rubyid_form'>form</span><span class='op'>|</span>
1884
- <span class='lbracket'>[</span><span class='id identifier rubyid_k'>k</span><span class='comma'>,</span> <span class='const'>Form</span><span class='period'>.</span><span class='id identifier rubyid_from_json'>from_json</span><span class='lparen'>(</span><span class='id identifier rubyid_api'>api</span><span class='comma'>,</span> <span class='id identifier rubyid_form'>form</span><span class='rparen'>)</span><span class='rbracket'>]</span>
1913
+ <span class='lbracket'>[</span><span class='id identifier rubyid_k'>k</span><span class='comma'>,</span> <span class='const'><span class='object_link'><a href="Form.html" title="Prismic::Form (class)">Form</a></span></span><span class='period'>.</span><span class='id identifier rubyid_from_json'><span class='object_link'><a href="Form.html#from_json-class_method" title="Prismic::Form.from_json (method)">from_json</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_api'>api</span><span class='comma'>,</span> <span class='id identifier rubyid_form'>form</span><span class='rparen'>)</span><span class='rbracket'>]</span>
1885
1914
  <span class='rbrace'>}</span><span class='rbracket'>]</span>
1886
1915
  <span class='id identifier rubyid_api'>api</span><span class='period'>.</span><span class='id identifier rubyid_refs'>refs</span> <span class='op'>=</span> <span class='const'>Hash</span><span class='lbracket'>[</span><span class='id identifier rubyid_data_refs'>data_refs</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_ref'>ref</span><span class='op'>|</span>
1887
1916
  <span class='id identifier rubyid_scheduled_at'>scheduled_at</span> <span class='op'>=</span> <span class='id identifier rubyid_ref'>ref</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>scheduledAt</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span>
1888
- <span class='lbracket'>[</span><span class='id identifier rubyid_ref'>ref</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>label</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_downcase'>downcase</span><span class='comma'>,</span> <span class='const'>Ref</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_ref'>ref</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>id</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='id identifier rubyid_ref'>ref</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>ref</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='id identifier rubyid_ref'>ref</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>label</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='id identifier rubyid_ref'>ref</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>isMasterRef</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='id identifier rubyid_scheduled_at'>scheduled_at</span> <span class='op'>&amp;&amp;</span> <span class='const'>Time</span><span class='period'>.</span><span class='id identifier rubyid_at'>at</span><span class='lparen'>(</span><span class='id identifier rubyid_scheduled_at'>scheduled_at</span> <span class='op'>/</span> <span class='float'>1000.0</span><span class='rparen'>)</span><span class='rparen'>)</span><span class='rbracket'>]</span>
1917
+ <span class='lbracket'>[</span><span class='id identifier rubyid_ref'>ref</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>label</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_downcase'>downcase</span><span class='comma'>,</span> <span class='const'><span class='object_link'><a href="Ref.html" title="Prismic::Ref (class)">Ref</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="Ref.html#initialize-instance_method" title="Prismic::Ref#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_ref'>ref</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>id</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='id identifier rubyid_ref'>ref</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>ref</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='id identifier rubyid_ref'>ref</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>label</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='id identifier rubyid_ref'>ref</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>isMasterRef</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='id identifier rubyid_scheduled_at'>scheduled_at</span> <span class='op'>&amp;&amp;</span> <span class='const'>Time</span><span class='period'>.</span><span class='id identifier rubyid_at'>at</span><span class='lparen'>(</span><span class='id identifier rubyid_scheduled_at'>scheduled_at</span> <span class='op'>/</span> <span class='float'>1000.0</span><span class='rparen'>)</span><span class='rparen'>)</span><span class='rbracket'>]</span>
1889
1918
  <span class='rbrace'>}</span><span class='rbracket'>]</span>
1890
1919
  <span class='id identifier rubyid_api'>api</span><span class='period'>.</span><span class='id identifier rubyid_tags'>tags</span> <span class='op'>=</span> <span class='id identifier rubyid_data'>data</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>tags</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span>
1891
1920
  <span class='id identifier rubyid_api'>api</span><span class='period'>.</span><span class='id identifier rubyid_types'>types</span> <span class='op'>=</span> <span class='id identifier rubyid_data'>data</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>types</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span>
1892
- <span class='id identifier rubyid_api'>api</span><span class='period'>.</span><span class='id identifier rubyid_oauth'>oauth</span> <span class='op'>=</span> <span class='const'>OAuth</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_data'>data</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>oauth_initiate</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='id identifier rubyid_data'>data</span><span class='lbracket'>[</span><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='rbracket'>]</span><span class='comma'>,</span> <span class='id identifier rubyid_http_client'>http_client</span><span class='rparen'>)</span>
1893
- <span class='id identifier rubyid_api'>api</span><span class='period'>.</span><span class='id identifier rubyid_experiments'>experiments</span> <span class='op'>=</span> <span class='const'>Experiments</span><span class='period'>.</span><span class='id identifier rubyid_parse'>parse</span><span class='lparen'>(</span><span class='id identifier rubyid_data'>data</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>experiments</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='rparen'>)</span>
1921
+ <span class='id identifier rubyid_api'>api</span><span class='period'>.</span><span class='id identifier rubyid_oauth'>oauth</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="API/OAuth.html" title="Prismic::API::OAuth (class)">OAuth</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="API/OAuth.html#initialize-instance_method" title="Prismic::API::OAuth#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_data'>data</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>oauth_initiate</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='id identifier rubyid_data'>data</span><span class='lbracket'>[</span><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='rbracket'>]</span><span class='comma'>,</span> <span class='id identifier rubyid_http_client'>http_client</span><span class='rparen'>)</span>
1922
+ <span class='id identifier rubyid_api'>api</span><span class='period'>.</span><span class='id identifier rubyid_experiments'>experiments</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="Experiments.html" title="Prismic::Experiments (class)">Experiments</a></span></span><span class='period'>.</span><span class='id identifier rubyid_parse'><span class='object_link'><a href="Experiments.html#parse-class_method" title="Prismic::Experiments.parse (method)">parse</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_data'>data</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>experiments</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='rparen'>)</span>
1894
1923
  <span class='rbrace'>}</span>
1895
1924
  <span class='kw'>end</span></pre>
1896
1925
  </td>
@@ -1901,7 +1930,7 @@
1901
1930
  <div class="method_details ">
1902
1931
  <h3 class="signature " id="start-class_method">
1903
1932
 
1904
- + (<tt>Object</tt>) <strong>start</strong>(url, opts = {})
1933
+ .<strong>start</strong>(url, opts = {}) &#x21d2; <tt>Object</tt>
1905
1934
 
1906
1935
 
1907
1936
 
@@ -1913,27 +1942,27 @@
1913
1942
  <pre class="lines">
1914
1943
 
1915
1944
 
1916
- 178
1917
- 179
1918
- 180
1919
- 181
1920
- 182
1921
- 183
1922
- 184
1923
- 185
1924
- 186
1925
- 187
1926
- 188</pre>
1945
+ 191
1946
+ 192
1947
+ 193
1948
+ 194
1949
+ 195
1950
+ 196
1951
+ 197
1952
+ 198
1953
+ 199
1954
+ 200
1955
+ 201</pre>
1927
1956
  </td>
1928
1957
  <td>
1929
- <pre class="code"><span class="info file"># File 'lib/prismic/api.rb', line 178</span>
1958
+ <pre class="code"><span class="info file"># File 'lib/prismic/api.rb', line 191</span>
1930
1959
 
1931
1960
  <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_start'>start</span><span class='lparen'>(</span><span class='id identifier rubyid_url'>url</span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span><span class='op'>=</span><span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
1932
- <span class='id identifier rubyid_http_client'>http_client</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:http_client</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='const'>Prismic</span><span class='op'>::</span><span class='const'>DefaultHTTPClient</span>
1961
+ <span class='id identifier rubyid_http_client'>http_client</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:http_client</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='const'><span class='object_link'><a href="../Prismic.html" title="Prismic (module)">Prismic</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="DefaultHTTPClient.html" title="Prismic::DefaultHTTPClient (module)">DefaultHTTPClient</a></span></span>
1933
1962
  <span class='id identifier rubyid_access_token'>access_token</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:access_token</span><span class='rbracket'>]</span>
1934
1963
  <span class='comment'># We don&#39;t use ||= because we want to keep the DefaultCache if nil was explicitly passed
1935
- </span> <span class='id identifier rubyid_api_cache'>api_cache</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_has_key?'>has_key?</span><span class='lparen'>(</span><span class='symbol'>:api_cache</span><span class='rparen'>)</span> <span class='op'>?</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:api_cache</span><span class='rbracket'>]</span> <span class='op'>:</span> <span class='const'>Prismic</span><span class='op'>::</span><span class='const'>DefaultCache</span>
1936
- <span class='id identifier rubyid_cache'>cache</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_has_key?'>has_key?</span><span class='lparen'>(</span><span class='symbol'>:cache</span><span class='rparen'>)</span> <span class='op'>?</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:cache</span><span class='rbracket'>]</span> <span class='op'>:</span> <span class='const'>Prismic</span><span class='op'>::</span><span class='const'>DefaultCache</span>
1964
+ </span> <span class='id identifier rubyid_api_cache'>api_cache</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_has_key?'>has_key?</span><span class='lparen'>(</span><span class='symbol'>:api_cache</span><span class='rparen'>)</span> <span class='op'>?</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:api_cache</span><span class='rbracket'>]</span> <span class='op'>:</span> <span class='const'><span class='object_link'><a href="../Prismic.html" title="Prismic (module)">Prismic</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Prismic.html#DefaultCache-constant" title="Prismic::DefaultCache (constant)">DefaultCache</a></span></span>
1965
+ <span class='id identifier rubyid_cache'>cache</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_has_key?'>has_key?</span><span class='lparen'>(</span><span class='symbol'>:cache</span><span class='rparen'>)</span> <span class='op'>?</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:cache</span><span class='rbracket'>]</span> <span class='op'>:</span> <span class='const'><span class='object_link'><a href="../Prismic.html" title="Prismic (module)">Prismic</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Prismic.html#DefaultCache-constant" title="Prismic::DefaultCache (constant)">DefaultCache</a></span></span>
1937
1966
 
1938
1967
  <span class='id identifier rubyid_resp'>resp</span> <span class='op'>=</span> <span class='id identifier rubyid_get'>get</span><span class='lparen'>(</span><span class='id identifier rubyid_url'>url</span><span class='comma'>,</span> <span class='id identifier rubyid_access_token'>access_token</span><span class='comma'>,</span> <span class='id identifier rubyid_http_client'>http_client</span><span class='comma'>,</span> <span class='id identifier rubyid_api_cache'>api_cache</span><span class='rparen'>)</span>
1939
1968
  <span class='id identifier rubyid_json'>json</span> <span class='op'>=</span> <span class='const'>JSON</span><span class='period'>.</span><span class='id identifier rubyid_load'>load</span><span class='lparen'>(</span><span class='id identifier rubyid_resp'>resp</span><span class='period'>.</span><span class='id identifier rubyid_body'>body</span><span class='rparen'>)</span>
@@ -1953,7 +1982,7 @@
1953
1982
  <div class="method_details first">
1954
1983
  <h3 class="signature first" id="all-instance_method">
1955
1984
 
1956
- - (<tt>Object</tt>) <strong>all</strong>(data = {})
1985
+ #<strong>all</strong>(opts = {}) &#x21d2; <tt>Object</tt>
1957
1986
 
1958
1987
 
1959
1988
 
@@ -1972,7 +2001,7 @@
1972
2001
 
1973
2002
  <li>
1974
2003
 
1975
- <span class='name'>data</span>
2004
+ <span class='name'>opts</span>
1976
2005
 
1977
2006
 
1978
2007
  <span class='type'>(<tt>Hash</tt>)</span>
@@ -2004,9 +2033,9 @@
2004
2033
  <td>
2005
2034
  <pre class="code"><span class="info file"># File 'lib/prismic/api.rb', line 96</span>
2006
2035
 
2007
- <span class='kw'>def</span> <span class='id identifier rubyid_all'>all</span><span class='lparen'>(</span><span class='id identifier rubyid_data'>data</span><span class='op'>=</span><span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
2008
- <span class='id identifier rubyid_ref'>ref</span> <span class='op'>=</span> <span class='id identifier rubyid_data'>data</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>ref</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_master'>master</span><span class='period'>.</span><span class='id identifier rubyid_ref'>ref</span>
2009
- <span class='id identifier rubyid_form'>form</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>everything</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_data'>data</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_submit'>submit</span><span class='lparen'>(</span><span class='id identifier rubyid_ref'>ref</span><span class='rparen'>)</span>
2036
+ <span class='kw'>def</span> <span class='id identifier rubyid_all'>all</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span><span class='op'>=</span><span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
2037
+ <span class='id identifier rubyid_ref'>ref</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>ref</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:ref</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_master'>master</span><span class='period'>.</span><span class='id identifier rubyid_ref'>ref</span>
2038
+ <span class='id identifier rubyid_form'>form</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>everything</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_submit'>submit</span><span class='lparen'>(</span><span class='id identifier rubyid_ref'>ref</span><span class='rparen'>)</span>
2010
2039
  <span class='kw'>end</span></pre>
2011
2040
  </td>
2012
2041
  </tr>
@@ -2016,7 +2045,7 @@
2016
2045
  <div class="method_details ">
2017
2046
  <h3 class="signature " id="as_json-instance_method">
2018
2047
 
2019
- - (<tt>Object</tt>) <strong>as_json</strong>
2048
+ #<strong>as_json</strong> &#x21d2; <tt>Object</tt>
2020
2049
 
2021
2050
 
2022
2051
 
@@ -2028,12 +2057,12 @@
2028
2057
  <pre class="lines">
2029
2058
 
2030
2059
 
2031
- 146
2032
- 147
2033
- 148</pre>
2060
+ 159
2061
+ 160
2062
+ 161</pre>
2034
2063
  </td>
2035
2064
  <td>
2036
- <pre class="code"><span class="info file"># File 'lib/prismic/api.rb', line 146</span>
2065
+ <pre class="code"><span class="info file"># File 'lib/prismic/api.rb', line 159</span>
2037
2066
 
2038
2067
  <span class='kw'>def</span> <span class='id identifier rubyid_as_json'>as_json</span>
2039
2068
  <span class='ivar'>@json</span>
@@ -2046,7 +2075,7 @@
2046
2075
  <div class="method_details ">
2047
2076
  <h3 class="signature " id="bookmark-instance_method">
2048
2077
 
2049
- - (<tt>String</tt>) <strong>bookmark</strong>(name)
2078
+ #<strong>bookmark</strong>(name) &#x21d2; <tt>String</tt>
2050
2079
 
2051
2080
 
2052
2081
 
@@ -2122,7 +2151,7 @@
2122
2151
  <div class="method_details ">
2123
2152
  <h3 class="signature " id="create_search_form-instance_method">
2124
2153
 
2125
- - (<tt>Object</tt>) <strong>create_search_form</strong>(name, data = {}, ref = {})
2154
+ #<strong>create_search_form</strong>(name, data = {}, ref = {}) &#x21d2; <tt>Object</tt>
2126
2155
 
2127
2156
 
2128
2157
 
@@ -2171,7 +2200,7 @@
2171
2200
  <div class="method_details ">
2172
2201
  <h3 class="signature " id="form-instance_method">
2173
2202
 
2174
- - (<tt><span class='object_link'><a href="SearchForm.html" title="Prismic::SearchForm (class)">SearchForm</a></span></tt>) <strong>form</strong>(name, data = {}, ref = {})
2203
+ #<strong>form</strong>(name, data = {}, ref = {}) &#x21d2; <tt><span class='object_link'><a href="SearchForm.html" title="Prismic::SearchForm (class)">SearchForm</a></span></tt>
2175
2204
 
2176
2205
 
2177
2206
 
@@ -2281,12 +2310,16 @@
2281
2310
  </div>
2282
2311
 
2283
2312
  <div class="method_details ">
2284
- <h3 class="signature " id="getByID-instance_method">
2313
+ <h3 class="signature " id="get_by_id-instance_method">
2285
2314
 
2286
- - (<tt>Object</tt>) <strong>getByID</strong>(id, data = {})
2315
+ #<strong>get_by_id</strong>(id, opts = {}) &#x21d2; <tt>Object</tt>
2287
2316
 
2288
2317
 
2289
2318
 
2319
+ <span class="aliases">Also known as:
2320
+ <span class="names"><span id='getByID-instance_method'>getByID</span></span>
2321
+ </span>
2322
+
2290
2323
 
2291
2324
 
2292
2325
  </h3><div class="docstring">
@@ -2302,7 +2335,7 @@
2302
2335
 
2303
2336
  <li>
2304
2337
 
2305
- <span class='name'>q</span>
2338
+ <span class='name'>id</span>
2306
2339
 
2307
2340
 
2308
2341
  <span class='type'>(<tt>String</tt>)</span>
@@ -2310,14 +2343,14 @@
2310
2343
 
2311
2344
 
2312
2345
  &mdash;
2313
- <div class='inline'><p>the query to perform</p>
2346
+ <div class='inline'><p>the id to search</p>
2314
2347
  </div>
2315
2348
 
2316
2349
  </li>
2317
2350
 
2318
2351
  <li>
2319
2352
 
2320
- <span class='name'>data</span>
2353
+ <span class='name'>opts</span>
2321
2354
 
2322
2355
 
2323
2356
  <span class='type'>(<tt>Hash</tt>)</span>
@@ -2365,8 +2398,8 @@
2365
2398
  <td>
2366
2399
  <pre class="code"><span class="info file"># File 'lib/prismic/api.rb', line 105</span>
2367
2400
 
2368
- <span class='kw'>def</span> <span class='id identifier rubyid_getByID'>getByID</span><span class='lparen'>(</span><span class='id identifier rubyid_id'>id</span><span class='comma'>,</span> <span class='id identifier rubyid_data'>data</span><span class='op'>=</span><span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
2369
- <span class='id identifier rubyid_query'>query</span><span class='lparen'>(</span><span class='const'>Prismic</span><span class='op'>::</span><span class='const'>Predicates</span><span class='op'>::</span><span class='id identifier rubyid_at'>at</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>document.id</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_id'>id</span><span class='rparen'>)</span><span class='comma'>,</span> <span class='id identifier rubyid_data'>data</span><span class='rparen'>)</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span>
2401
+ <span class='kw'>def</span> <span class='id identifier rubyid_get_by_id'>get_by_id</span><span class='lparen'>(</span><span class='id identifier rubyid_id'>id</span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span><span class='op'>=</span><span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
2402
+ <span class='id identifier rubyid_query'>query</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="../Prismic.html" title="Prismic (module)">Prismic</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Predicates.html" title="Prismic::Predicates (module)">Predicates</a></span></span><span class='op'>::</span><span class='id identifier rubyid_at'><span class='object_link'><a href="Predicates.html#at-class_method" title="Prismic::Predicates.at (method)">at</a></span></span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>document.id</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_id'>id</span><span class='rparen'>)</span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span><span class='rparen'>)</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span>
2370
2403
  <span class='kw'>end</span></pre>
2371
2404
  </td>
2372
2405
  </tr>
@@ -2374,12 +2407,16 @@
2374
2407
  </div>
2375
2408
 
2376
2409
  <div class="method_details ">
2377
- <h3 class="signature " id="getByIDs-instance_method">
2410
+ <h3 class="signature " id="get_by_ids-instance_method">
2378
2411
 
2379
- - (<tt>Object</tt>) <strong>getByIDs</strong>(ids, data = {})
2412
+ #<strong>get_by_ids</strong>(ids, opts = {}) &#x21d2; <tt>Object</tt>
2380
2413
 
2381
2414
 
2382
2415
 
2416
+ <span class="aliases">Also known as:
2417
+ <span class="names"><span id='getByIDs-instance_method'>getByIDs</span></span>
2418
+ </span>
2419
+
2383
2420
 
2384
2421
 
2385
2422
  </h3><div class="docstring">
@@ -2395,7 +2432,7 @@
2395
2432
 
2396
2433
  <li>
2397
2434
 
2398
- <span class='name'>q</span>
2435
+ <span class='name'>ids</span>
2399
2436
 
2400
2437
 
2401
2438
  <span class='type'>(<tt>String</tt>)</span>
@@ -2403,14 +2440,14 @@
2403
2440
 
2404
2441
 
2405
2442
  &mdash;
2406
- <div class='inline'><p>the query to perform</p>
2443
+ <div class='inline'><p>the ids to fetch</p>
2407
2444
  </div>
2408
2445
 
2409
2446
  </li>
2410
2447
 
2411
2448
  <li>
2412
2449
 
2413
- <span class='name'>data</span>
2450
+ <span class='name'>opts</span>
2414
2451
 
2415
2452
 
2416
2453
  <span class='type'>(<tt>Hash</tt>)</span>
@@ -2451,15 +2488,15 @@
2451
2488
  <pre class="lines">
2452
2489
 
2453
2490
 
2454
- 121
2455
- 122
2456
- 123</pre>
2491
+ 124
2492
+ 125
2493
+ 126</pre>
2457
2494
  </td>
2458
2495
  <td>
2459
- <pre class="code"><span class="info file"># File 'lib/prismic/api.rb', line 121</span>
2496
+ <pre class="code"><span class="info file"># File 'lib/prismic/api.rb', line 124</span>
2460
2497
 
2461
- <span class='kw'>def</span> <span class='id identifier rubyid_getByIDs'>getByIDs</span><span class='lparen'>(</span><span class='id identifier rubyid_ids'>ids</span><span class='comma'>,</span> <span class='id identifier rubyid_data'>data</span><span class='op'>=</span><span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
2462
- <span class='id identifier rubyid_query'>query</span><span class='lparen'>(</span><span class='const'>Prismic</span><span class='op'>::</span><span class='const'>Predicates</span><span class='op'>::</span><span class='id identifier rubyid_in'>in</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>document.id</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_ids'>ids</span><span class='rparen'>)</span><span class='comma'>,</span> <span class='id identifier rubyid_data'>data</span><span class='rparen'>)</span>
2498
+ <span class='kw'>def</span> <span class='id identifier rubyid_get_by_ids'>get_by_ids</span><span class='lparen'>(</span><span class='id identifier rubyid_ids'>ids</span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span><span class='op'>=</span><span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
2499
+ <span class='id identifier rubyid_query'>query</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="../Prismic.html" title="Prismic (module)">Prismic</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Predicates.html" title="Prismic::Predicates (module)">Predicates</a></span></span><span class='op'>::</span><span class='id identifier rubyid_in'><span class='object_link'><a href="Predicates.html#in-class_method" title="Prismic::Predicates.in (method)">in</a></span></span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>document.id</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_ids'>ids</span><span class='rparen'>)</span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span><span class='rparen'>)</span>
2463
2500
  <span class='kw'>end</span></pre>
2464
2501
  </td>
2465
2502
  </tr>
@@ -2467,12 +2504,16 @@
2467
2504
  </div>
2468
2505
 
2469
2506
  <div class="method_details ">
2470
- <h3 class="signature " id="getByUID-instance_method">
2507
+ <h3 class="signature " id="get_by_uid-instance_method">
2471
2508
 
2472
- - (<tt>Object</tt>) <strong>getByUID</strong>(typ, uid, data = {})
2509
+ #<strong>get_by_uid</strong>(typ, uid, opts = {}) &#x21d2; <tt>Object</tt>
2473
2510
 
2474
2511
 
2475
2512
 
2513
+ <span class="aliases">Also known as:
2514
+ <span class="names"><span id='getByUID-instance_method'>getByUID</span></span>
2515
+ </span>
2516
+
2476
2517
 
2477
2518
 
2478
2519
  </h3><div class="docstring">
@@ -2488,7 +2529,7 @@
2488
2529
 
2489
2530
  <li>
2490
2531
 
2491
- <span class='name'>q</span>
2532
+ <span class='name'>typ</span>
2492
2533
 
2493
2534
 
2494
2535
  <span class='type'>(<tt>String</tt>)</span>
@@ -2496,14 +2537,29 @@
2496
2537
 
2497
2538
 
2498
2539
  &mdash;
2499
- <div class='inline'><p>the query to perform</p>
2540
+ <div class='inline'><p>the document type&#39;s name</p>
2500
2541
  </div>
2501
2542
 
2502
2543
  </li>
2503
2544
 
2504
2545
  <li>
2505
2546
 
2506
- <span class='name'>data</span>
2547
+ <span class='name'>uid</span>
2548
+
2549
+
2550
+ <span class='type'>(<tt>String</tt>)</span>
2551
+
2552
+
2553
+
2554
+ &mdash;
2555
+ <div class='inline'><p>the uid to search</p>
2556
+ </div>
2557
+
2558
+ </li>
2559
+
2560
+ <li>
2561
+
2562
+ <span class='name'>opts</span>
2507
2563
 
2508
2564
 
2509
2565
  <span class='type'>(<tt>Hash</tt>)</span>
@@ -2513,7 +2569,7 @@
2513
2569
 
2514
2570
 
2515
2571
  &mdash;
2516
- <div class='inline'><p>query options (page, pageSize, ref, etc.)</p>
2572
+ <div class='inline'><p>query options (ref, etc.)</p>
2517
2573
  </div>
2518
2574
 
2519
2575
  </li>
@@ -2544,15 +2600,112 @@
2544
2600
  <pre class="lines">
2545
2601
 
2546
2602
 
2547
- 113
2548
- 114
2549
- 115</pre>
2603
+ 115
2604
+ 116
2605
+ 117</pre>
2550
2606
  </td>
2551
2607
  <td>
2552
- <pre class="code"><span class="info file"># File 'lib/prismic/api.rb', line 113</span>
2608
+ <pre class="code"><span class="info file"># File 'lib/prismic/api.rb', line 115</span>
2553
2609
 
2554
- <span class='kw'>def</span> <span class='id identifier rubyid_getByUID'>getByUID</span><span class='lparen'>(</span><span class='id identifier rubyid_typ'>typ</span><span class='comma'>,</span> <span class='id identifier rubyid_uid'>uid</span><span class='comma'>,</span> <span class='id identifier rubyid_data'>data</span><span class='op'>=</span><span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
2555
- <span class='id identifier rubyid_query'>query</span><span class='lparen'>(</span><span class='const'>Prismic</span><span class='op'>::</span><span class='const'>Predicates</span><span class='op'>::</span><span class='id identifier rubyid_at'>at</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>my.</span><span class='tstring_end'>&#39;</span></span><span class='op'>+</span><span class='id identifier rubyid_typ'>typ</span><span class='op'>+</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>.uid</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_uid'>uid</span><span class='rparen'>)</span><span class='comma'>,</span> <span class='id identifier rubyid_data'>data</span><span class='rparen'>)</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span>
2610
+ <span class='kw'>def</span> <span class='id identifier rubyid_get_by_uid'>get_by_uid</span><span class='lparen'>(</span><span class='id identifier rubyid_typ'>typ</span><span class='comma'>,</span> <span class='id identifier rubyid_uid'>uid</span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span><span class='op'>=</span><span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
2611
+ <span class='id identifier rubyid_query'>query</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="../Prismic.html" title="Prismic (module)">Prismic</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Predicates.html" title="Prismic::Predicates (module)">Predicates</a></span></span><span class='op'>::</span><span class='id identifier rubyid_at'><span class='object_link'><a href="Predicates.html#at-class_method" title="Prismic::Predicates.at (method)">at</a></span></span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>my.</span><span class='tstring_end'>&#39;</span></span><span class='op'>+</span><span class='id identifier rubyid_typ'>typ</span><span class='op'>+</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>.uid</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_uid'>uid</span><span class='rparen'>)</span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span><span class='rparen'>)</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span>
2612
+ <span class='kw'>end</span></pre>
2613
+ </td>
2614
+ </tr>
2615
+ </table>
2616
+ </div>
2617
+
2618
+ <div class="method_details ">
2619
+ <h3 class="signature " id="get_single-instance_method">
2620
+
2621
+ #<strong>get_single</strong>(typ, opts = {}) &#x21d2; <tt>Object</tt>
2622
+
2623
+
2624
+
2625
+ <span class="aliases">Also known as:
2626
+ <span class="names"><span id='getSingle-instance_method'>getSingle</span></span>
2627
+ </span>
2628
+
2629
+
2630
+
2631
+ </h3><div class="docstring">
2632
+ <div class="discussion">
2633
+ <p>Retrieve one single typed document by its type</p>
2634
+
2635
+
2636
+ </div>
2637
+ </div>
2638
+ <div class="tags">
2639
+ <p class="tag_title">Parameters:</p>
2640
+ <ul class="param">
2641
+
2642
+ <li>
2643
+
2644
+ <span class='name'>typ</span>
2645
+
2646
+
2647
+ <span class='type'>(<tt>String</tt>)</span>
2648
+
2649
+
2650
+
2651
+ &mdash;
2652
+ <div class='inline'><p>the document type&#39;s name</p>
2653
+ </div>
2654
+
2655
+ </li>
2656
+
2657
+ <li>
2658
+
2659
+ <span class='name'>opts</span>
2660
+
2661
+
2662
+ <span class='type'>(<tt>Hash</tt>)</span>
2663
+
2664
+
2665
+ <em class="default">(defaults to: <tt>{}</tt>)</em>
2666
+
2667
+
2668
+ &mdash;
2669
+ <div class='inline'><p>query options (ref, etc.)</p>
2670
+ </div>
2671
+
2672
+ </li>
2673
+
2674
+ </ul>
2675
+
2676
+ <p class="tag_title">Returns:</p>
2677
+ <ul class="return">
2678
+
2679
+ <li>
2680
+
2681
+
2682
+ <span class='type'></span>
2683
+
2684
+
2685
+
2686
+
2687
+ <div class='inline'><p>the document, or nil if not found</p>
2688
+ </div>
2689
+
2690
+ </li>
2691
+
2692
+ </ul>
2693
+
2694
+ </div><table class="source_code">
2695
+ <tr>
2696
+ <td>
2697
+ <pre class="lines">
2698
+
2699
+
2700
+ 133
2701
+ 134
2702
+ 135</pre>
2703
+ </td>
2704
+ <td>
2705
+ <pre class="code"><span class="info file"># File 'lib/prismic/api.rb', line 133</span>
2706
+
2707
+ <span class='kw'>def</span> <span class='id identifier rubyid_get_single'>get_single</span><span class='lparen'>(</span><span class='id identifier rubyid_typ'>typ</span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span><span class='op'>=</span><span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
2708
+ <span class='id identifier rubyid_query'>query</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="../Prismic.html" title="Prismic (module)">Prismic</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Predicates.html" title="Prismic::Predicates (module)">Predicates</a></span></span><span class='op'>::</span><span class='id identifier rubyid_at'><span class='object_link'><a href="Predicates.html#at-class_method" title="Prismic::Predicates.at (method)">at</a></span></span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>document.type</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_typ'>typ</span><span class='rparen'>)</span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span><span class='rparen'>)</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span>
2556
2709
  <span class='kw'>end</span></pre>
2557
2710
  </td>
2558
2711
  </tr>
@@ -2562,7 +2715,7 @@
2562
2715
  <div class="method_details ">
2563
2716
  <h3 class="signature " id="has_cache?-instance_method">
2564
2717
 
2565
- - (<tt>Boolean</tt>) <strong>has_cache?</strong>
2718
+ #<strong>has_cache?</strong> &#x21d2; <tt>Boolean</tt>
2566
2719
 
2567
2720
 
2568
2721
 
@@ -2615,7 +2768,7 @@
2615
2768
  <div class="method_details ">
2616
2769
  <h3 class="signature " id="oauth_check_token-instance_method">
2617
2770
 
2618
- - (<tt>Object</tt>) <strong>oauth_check_token</strong>(params)
2771
+ #<strong>oauth_check_token</strong>(params) &#x21d2; <tt>Object</tt>
2619
2772
 
2620
2773
 
2621
2774
 
@@ -2627,17 +2780,17 @@
2627
2780
  <pre class="lines">
2628
2781
 
2629
2782
 
2630
- 240
2631
- 241
2632
- 242
2633
- 243
2634
- 244
2635
- 245
2636
- 246
2637
- 247</pre>
2783
+ 253
2784
+ 254
2785
+ 255
2786
+ 256
2787
+ 257
2788
+ 258
2789
+ 259
2790
+ 260</pre>
2638
2791
  </td>
2639
2792
  <td>
2640
- <pre class="code"><span class="info file"># File 'lib/prismic/api.rb', line 240</span>
2793
+ <pre class="code"><span class="info file"># File 'lib/prismic/api.rb', line 253</span>
2641
2794
 
2642
2795
  <span class='kw'>def</span> <span class='id identifier rubyid_oauth_check_token'>oauth_check_token</span><span class='lparen'>(</span><span class='id identifier rubyid_params'>params</span><span class='rparen'>)</span>
2643
2796
  <span class='kw'>unless</span> <span class='cvar'>@@warned_oauth_check_token</span>
@@ -2655,7 +2808,7 @@
2655
2808
  <div class="method_details ">
2656
2809
  <h3 class="signature " id="oauth_initiate_url-instance_method">
2657
2810
 
2658
- - (<tt>Object</tt>) <strong>oauth_initiate_url</strong>(opts)
2811
+ #<strong>oauth_initiate_url</strong>(opts) &#x21d2; <tt>Object</tt>
2659
2812
 
2660
2813
 
2661
2814
 
@@ -2667,17 +2820,17 @@
2667
2820
  <pre class="lines">
2668
2821
 
2669
2822
 
2670
- 220
2671
- 221
2672
- 222
2673
- 223
2674
- 224
2675
- 225
2676
- 226
2677
- 227</pre>
2823
+ 233
2824
+ 234
2825
+ 235
2826
+ 236
2827
+ 237
2828
+ 238
2829
+ 239
2830
+ 240</pre>
2678
2831
  </td>
2679
2832
  <td>
2680
- <pre class="code"><span class="info file"># File 'lib/prismic/api.rb', line 220</span>
2833
+ <pre class="code"><span class="info file"># File 'lib/prismic/api.rb', line 233</span>
2681
2834
 
2682
2835
  <span class='kw'>def</span> <span class='id identifier rubyid_oauth_initiate_url'>oauth_initiate_url</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span><span class='rparen'>)</span>
2683
2836
  <span class='kw'>if</span> <span class='op'>!</span><span class='cvar'>@@warned_oauth_initiate_url</span>
@@ -2695,7 +2848,7 @@
2695
2848
  <div class="method_details ">
2696
2849
  <h3 class="signature " id="preview_session-instance_method">
2697
2850
 
2698
- - (<tt>String</tt>) <strong>preview_session</strong>(token, link_resolver, default_url)
2851
+ #<strong>preview_session</strong>(token, link_resolver, default_url) &#x21d2; <tt>String</tt>
2699
2852
 
2700
2853
 
2701
2854
 
@@ -2784,22 +2937,22 @@
2784
2937
  <pre class="lines">
2785
2938
 
2786
2939
 
2787
- 132
2788
- 133
2789
- 134
2790
- 135
2791
- 136
2792
- 137
2793
- 138
2794
- 139
2795
- 140
2796
- 141
2797
- 142
2798
- 143
2799
- 144</pre>
2940
+ 145
2941
+ 146
2942
+ 147
2943
+ 148
2944
+ 149
2945
+ 150
2946
+ 151
2947
+ 152
2948
+ 153
2949
+ 154
2950
+ 155
2951
+ 156
2952
+ 157</pre>
2800
2953
  </td>
2801
2954
  <td>
2802
- <pre class="code"><span class="info file"># File 'lib/prismic/api.rb', line 132</span>
2955
+ <pre class="code"><span class="info file"># File 'lib/prismic/api.rb', line 145</span>
2803
2956
 
2804
2957
  <span class='kw'>def</span> <span class='id identifier rubyid_preview_session'>preview_session</span><span class='lparen'>(</span><span class='id identifier rubyid_token'>token</span><span class='comma'>,</span> <span class='id identifier rubyid_link_resolver'>link_resolver</span><span class='comma'>,</span> <span class='id identifier rubyid_default_url'>default_url</span><span class='rparen'>)</span>
2805
2958
  <span class='id identifier rubyid_response'>response</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_http_client'>http_client</span><span class='period'>.</span><span class='id identifier rubyid_get'>get</span><span class='lparen'>(</span><span class='id identifier rubyid_token'>token</span><span class='comma'>,</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Accept</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <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='rparen'>)</span>
@@ -2807,7 +2960,7 @@
2807
2960
  <span class='kw'>return</span> <span class='id identifier rubyid_default_url'>default_url</span>
2808
2961
  <span class='kw'>end</span>
2809
2962
  <span class='id identifier rubyid_json'>json</span> <span class='op'>=</span> <span class='const'>JSON</span><span class='period'>.</span><span class='id identifier rubyid_load'>load</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>
2810
- <span class='id identifier rubyid_documents'>documents</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_form'>form</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>everything</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_query'>query</span><span class='lparen'>(</span><span class='const'>Prismic</span><span class='op'>::</span><span class='const'>Predicates</span><span class='period'>.</span><span class='id identifier rubyid_at'>at</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>document.id</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_json'>json</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>mainDocument</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='rparen'>)</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_submit'>submit</span><span class='lparen'>(</span><span class='id identifier rubyid_token'>token</span><span class='rparen'>)</span>
2963
+ <span class='id identifier rubyid_documents'>documents</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_form'>form</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>everything</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_query'>query</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="../Prismic.html" title="Prismic (module)">Prismic</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Predicates.html" title="Prismic::Predicates (module)">Predicates</a></span></span><span class='period'>.</span><span class='id identifier rubyid_at'><span class='object_link'><a href="Predicates.html#at-class_method" title="Prismic::Predicates.at (method)">at</a></span></span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>document.id</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_json'>json</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>mainDocument</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='rparen'>)</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_submit'>submit</span><span class='lparen'>(</span><span class='id identifier rubyid_token'>token</span><span class='rparen'>)</span>
2811
2964
  <span class='kw'>if</span> <span class='id identifier rubyid_documents'>documents</span><span class='period'>.</span><span class='id identifier rubyid_results'>results</span><span class='period'>.</span><span class='id identifier rubyid_size'>size</span> <span class='op'>&gt;</span> <span class='int'>0</span>
2812
2965
  <span class='id identifier rubyid_link_resolver'>link_resolver</span><span class='period'>.</span><span class='id identifier rubyid_link_to'>link_to</span><span class='lparen'>(</span><span class='id identifier rubyid_documents'>documents</span><span class='period'>.</span><span class='id identifier rubyid_results'>results</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span><span class='rparen'>)</span>
2813
2966
  <span class='kw'>else</span>
@@ -2822,7 +2975,7 @@
2822
2975
  <div class="method_details ">
2823
2976
  <h3 class="signature " id="query-instance_method">
2824
2977
 
2825
- - (<tt>Object</tt>) <strong>query</strong>(q, data = {})
2978
+ #<strong>query</strong>(q, opts = {}) &#x21d2; <tt>Object</tt>
2826
2979
 
2827
2980
 
2828
2981
 
@@ -2856,7 +3009,7 @@
2856
3009
 
2857
3010
  <li>
2858
3011
 
2859
- <span class='name'>data</span>
3012
+ <span class='name'>opts</span>
2860
3013
 
2861
3014
 
2862
3015
  <span class='type'>(<tt>Hash</tt>)</span>
@@ -2888,9 +3041,9 @@
2888
3041
  <td>
2889
3042
  <pre class="code"><span class="info file"># File 'lib/prismic/api.rb', line 89</span>
2890
3043
 
2891
- <span class='kw'>def</span> <span class='id identifier rubyid_query'>query</span><span class='lparen'>(</span><span class='id identifier rubyid_q'>q</span><span class='comma'>,</span> <span class='id identifier rubyid_data'>data</span><span class='op'>=</span><span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
2892
- <span class='id identifier rubyid_ref'>ref</span> <span class='op'>=</span> <span class='id identifier rubyid_data'>data</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>ref</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_master'>master</span><span class='period'>.</span><span class='id identifier rubyid_ref'>ref</span>
2893
- <span class='id identifier rubyid_form'>form</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>everything</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_data'>data</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_query'>query</span><span class='lparen'>(</span><span class='id identifier rubyid_q'>q</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_submit'>submit</span><span class='lparen'>(</span><span class='id identifier rubyid_ref'>ref</span><span class='rparen'>)</span>
3044
+ <span class='kw'>def</span> <span class='id identifier rubyid_query'>query</span><span class='lparen'>(</span><span class='id identifier rubyid_q'>q</span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span><span class='op'>=</span><span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
3045
+ <span class='id identifier rubyid_ref'>ref</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>ref</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:ref</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_master'>master</span><span class='period'>.</span><span class='id identifier rubyid_ref'>ref</span>
3046
+ <span class='id identifier rubyid_form'>form</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>everything</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_query'>query</span><span class='lparen'>(</span><span class='id identifier rubyid_q'>q</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_submit'>submit</span><span class='lparen'>(</span><span class='id identifier rubyid_ref'>ref</span><span class='rparen'>)</span>
2894
3047
  <span class='kw'>end</span></pre>
2895
3048
  </td>
2896
3049
  </tr>
@@ -2900,7 +3053,7 @@
2900
3053
  <div class="method_details ">
2901
3054
  <h3 class="signature " id="ref-instance_method">
2902
3055
 
2903
- - (<tt><span class='object_link'><a href="Ref.html" title="Prismic::Ref (class)">Ref</a></span></tt>) <strong>ref</strong>(name)
3056
+ #<strong>ref</strong>(name) &#x21d2; <tt><span class='object_link'><a href="Ref.html" title="Prismic::Ref (class)">Ref</a></span></tt>
2904
3057
 
2905
3058
 
2906
3059
 
@@ -2977,11 +3130,12 @@
2977
3130
 
2978
3131
  </div>
2979
3132
 
2980
- <div id="footer">
2981
- Generated on Tue Sep 27 10:47:06 2016 by
3133
+ <div id="footer">
3134
+ Generated on Mon Jan 16 16:05:09 2017 by
2982
3135
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
2983
- 0.8.7.4 (ruby-2.0.0).
3136
+ 0.9.8 (ruby-2.3.1).
2984
3137
  </div>
2985
3138
 
3139
+ </div>
2986
3140
  </body>
2987
3141
  </html>