contentful 2.1.1 → 2.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (115) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +6 -0
  3. data/Gemfile.lock +37 -46
  4. data/lib/contentful/array.rb +8 -1
  5. data/lib/contentful/entry.rb +9 -9
  6. data/lib/contentful/fields_resource.rb +9 -8
  7. data/lib/contentful/resource_builder.rb +1 -7
  8. data/lib/contentful/support.rb +22 -0
  9. data/lib/contentful/version.rb +1 -1
  10. data/spec/array_spec.rb +21 -0
  11. data/spec/fixtures/vcr_cassettes/array/nested_resources.yml +159 -0
  12. metadata +5 -106
  13. data/coverage/.last_run.json +0 -5
  14. data/coverage/.resultset.json +0 -1887
  15. data/coverage/.resultset.json.lock +0 -0
  16. data/coverage/assets/0.10.0/application.css +0 -799
  17. data/coverage/assets/0.10.0/application.js +0 -1707
  18. data/coverage/assets/0.10.0/colorbox/border.png +0 -0
  19. data/coverage/assets/0.10.0/colorbox/controls.png +0 -0
  20. data/coverage/assets/0.10.0/colorbox/loading.gif +0 -0
  21. data/coverage/assets/0.10.0/colorbox/loading_background.png +0 -0
  22. data/coverage/assets/0.10.0/favicon_green.png +0 -0
  23. data/coverage/assets/0.10.0/favicon_red.png +0 -0
  24. data/coverage/assets/0.10.0/favicon_yellow.png +0 -0
  25. data/coverage/assets/0.10.0/loading.gif +0 -0
  26. data/coverage/assets/0.10.0/magnify.png +0 -0
  27. data/coverage/assets/0.10.0/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  28. data/coverage/assets/0.10.0/smoothness/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
  29. data/coverage/assets/0.10.0/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  30. data/coverage/assets/0.10.0/smoothness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  31. data/coverage/assets/0.10.0/smoothness/images/ui-bg_glass_75_dadada_1x400.png +0 -0
  32. data/coverage/assets/0.10.0/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  33. data/coverage/assets/0.10.0/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  34. data/coverage/assets/0.10.0/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  35. data/coverage/assets/0.10.0/smoothness/images/ui-icons_222222_256x240.png +0 -0
  36. data/coverage/assets/0.10.0/smoothness/images/ui-icons_2e83ff_256x240.png +0 -0
  37. data/coverage/assets/0.10.0/smoothness/images/ui-icons_454545_256x240.png +0 -0
  38. data/coverage/assets/0.10.0/smoothness/images/ui-icons_888888_256x240.png +0 -0
  39. data/coverage/assets/0.10.0/smoothness/images/ui-icons_cd0a0a_256x240.png +0 -0
  40. data/coverage/index.html +0 -11816
  41. data/doc/Contentful.html +0 -153
  42. data/doc/Contentful/AccessDenied.html +0 -161
  43. data/doc/Contentful/Array.html +0 -743
  44. data/doc/Contentful/ArrayCoercion.html +0 -244
  45. data/doc/Contentful/ArrayLike.html +0 -627
  46. data/doc/Contentful/Asset.html +0 -475
  47. data/doc/Contentful/BadRequest.html +0 -161
  48. data/doc/Contentful/BaseCoercion.html +0 -447
  49. data/doc/Contentful/BaseResource.html +0 -599
  50. data/doc/Contentful/BooleanCoercion.html +0 -244
  51. data/doc/Contentful/Client.html +0 -1606
  52. data/doc/Contentful/Constants.html +0 -636
  53. data/doc/Contentful/ContentType.html +0 -614
  54. data/doc/Contentful/ContentTypeCache.html +0 -430
  55. data/doc/Contentful/DateCoercion.html +0 -240
  56. data/doc/Contentful/DeletedAsset.html +0 -159
  57. data/doc/Contentful/DeletedEntry.html +0 -159
  58. data/doc/Contentful/DynamicEntry.html +0 -214
  59. data/doc/Contentful/Entry.html +0 -273
  60. data/doc/Contentful/Error.html +0 -424
  61. data/doc/Contentful/Field.html +0 -929
  62. data/doc/Contentful/FieldsResource.html +0 -501
  63. data/doc/Contentful/File.html +0 -520
  64. data/doc/Contentful/FloatCoercion.html +0 -240
  65. data/doc/Contentful/IntegerCoercion.html +0 -240
  66. data/doc/Contentful/Link.html +0 -251
  67. data/doc/Contentful/LinkCoercion.html +0 -160
  68. data/doc/Contentful/Locale.html +0 -447
  69. data/doc/Contentful/Location.html +0 -385
  70. data/doc/Contentful/LocationCoercion.html +0 -240
  71. data/doc/Contentful/NotFound.html +0 -161
  72. data/doc/Contentful/ObjectCoercion.html +0 -240
  73. data/doc/Contentful/RateLimitExceeded.html +0 -161
  74. data/doc/Contentful/Request.html +0 -889
  75. data/doc/Contentful/Resource.html +0 -117
  76. data/doc/Contentful/Resource/ArrayLike.html +0 -627
  77. data/doc/Contentful/Resource/AssetFields.html +0 -246
  78. data/doc/Contentful/Resource/AssetFields/ClassMethods.html +0 -174
  79. data/doc/Contentful/Resource/ClassMethods.html +0 -378
  80. data/doc/Contentful/Resource/CustomResource.html +0 -119
  81. data/doc/Contentful/Resource/Fields.html +0 -288
  82. data/doc/Contentful/Resource/Fields/ClassMethods.html +0 -187
  83. data/doc/Contentful/Resource/LocalizedFields.html +0 -305
  84. data/doc/Contentful/Resource/SystemProperties.html +0 -205
  85. data/doc/Contentful/Resource/SystemProperties/ClassMethods.html +0 -174
  86. data/doc/Contentful/ResourceBuilder.html +0 -969
  87. data/doc/Contentful/Response.html +0 -641
  88. data/doc/Contentful/ServerError.html +0 -161
  89. data/doc/Contentful/ServiceUnavailable.html +0 -161
  90. data/doc/Contentful/Space.html +0 -395
  91. data/doc/Contentful/StringCoercion.html +0 -244
  92. data/doc/Contentful/Support.html +0 -550
  93. data/doc/Contentful/SymbolCoercion.html +0 -171
  94. data/doc/Contentful/Sync.html +0 -655
  95. data/doc/Contentful/SyncPage.html +0 -801
  96. data/doc/Contentful/TextCoercion.html +0 -171
  97. data/doc/Contentful/Unauthorized.html +0 -161
  98. data/doc/Contentful/UnparsableJson.html +0 -161
  99. data/doc/Contentful/UnparsableResource.html +0 -137
  100. data/doc/_index.html +0 -537
  101. data/doc/class_list.html +0 -51
  102. data/doc/css/common.css +0 -1
  103. data/doc/css/full_list.css +0 -58
  104. data/doc/css/style.css +0 -481
  105. data/doc/file.CHANGELOG.html +0 -506
  106. data/doc/file.LICENSE.html +0 -72
  107. data/doc/file.README.html +0 -565
  108. data/doc/file_list.html +0 -66
  109. data/doc/frames.html +0 -17
  110. data/doc/index.html +0 -565
  111. data/doc/js/app.js +0 -243
  112. data/doc/js/full_list.js +0 -216
  113. data/doc/js/jquery.js +0 -4
  114. data/doc/method_list.html +0 -1115
  115. data/doc/top-level-namespace.html +0 -112
data/doc/Contentful.html DELETED
@@ -1,153 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8">
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <title>
7
- Module: Contentful
8
-
9
- &mdash; Documentation by YARD 0.9.5
10
-
11
- </title>
12
-
13
- <link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
14
-
15
- <link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
16
-
17
- <script type="text/javascript" charset="utf-8">
18
- pathId = "Contentful";
19
- relpath = '';
20
- </script>
21
-
22
-
23
- <script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
24
-
25
- <script type="text/javascript" charset="utf-8" src="js/app.js"></script>
26
-
27
-
28
- </head>
29
- <body>
30
- <div class="nav_wrap">
31
- <iframe id="nav" src="class_list.html"></iframe>
32
- <div id="resizer"></div>
33
- </div>
34
-
35
- <div id="main" tabindex="-1">
36
- <div id="header">
37
- <div id="menu">
38
-
39
- <a href="_index.html">Index (C)</a> &raquo;
40
-
41
-
42
- <span class="title">Contentful</span>
43
-
44
- </div>
45
-
46
- <div id="search">
47
-
48
- <a class="full_list_link" id="class_list_link"
49
- href="class_list.html">
50
-
51
- <svg width="24" height="24">
52
- <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
53
- <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
54
- <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
55
- </svg>
56
- </a>
57
-
58
- </div>
59
- <div class="clear"></div>
60
- </div>
61
-
62
- <iframe id="search_frame" src="class_list.html"></iframe>
63
-
64
- <div id="content"><h1>Module: Contentful
65
-
66
-
67
-
68
- </h1>
69
- <div class="box_info">
70
-
71
-
72
-
73
-
74
-
75
-
76
-
77
-
78
-
79
-
80
-
81
- <dl>
82
- <dt>Defined in:</dt>
83
- <dd>lib/contentful/version.rb<span class="defines">,<br />
84
- lib/contentful/link.rb,<br /> lib/contentful/file.rb,<br /> lib/contentful/sync.rb,<br /> lib/contentful/array.rb,<br /> lib/contentful/asset.rb,<br /> lib/contentful/entry.rb,<br /> lib/contentful/error.rb,<br /> lib/contentful/field.rb,<br /> lib/contentful/space.rb,<br /> lib/contentful/client.rb,<br /> lib/contentful/locale.rb,<br /> lib/contentful/support.rb,<br /> lib/contentful/request.rb,<br /> lib/contentful/response.rb,<br /> lib/contentful/location.rb,<br /> lib/contentful/sync_page.rb,<br /> lib/contentful/coercions.rb,<br /> lib/contentful/array_like.rb,<br /> lib/contentful/content_type.rb,<br /> lib/contentful/deleted_entry.rb,<br /> lib/contentful/deleted_asset.rb,<br /> lib/contentful/base_resource.rb,<br /> lib/contentful/fields_resource.rb,<br /> lib/contentful/resource_builder.rb,<br /> lib/contentful/content_type_cache.rb</span>
85
- </dd>
86
- </dl>
87
-
88
- </div>
89
-
90
- <h2>Overview</h2><div class="docstring">
91
- <div class="discussion">
92
-
93
- <p>Contentful Namespace</p>
94
-
95
-
96
- </div>
97
- </div>
98
- <div class="tags">
99
-
100
-
101
- </div><h2>Defined Under Namespace</h2>
102
- <p class="children">
103
-
104
-
105
- <strong class="modules">Modules:</strong> <span class='object_link'><a href="Contentful/ArrayLike.html" title="Contentful::ArrayLike (module)">ArrayLike</a></span>, <span class='object_link'><a href="Contentful/Support.html" title="Contentful::Support (module)">Support</a></span>
106
-
107
-
108
-
109
- <strong class="classes">Classes:</strong> <span class='object_link'><a href="Contentful/AccessDenied.html" title="Contentful::AccessDenied (class)">AccessDenied</a></span>, <span class='object_link'><a href="Contentful/Array.html" title="Contentful::Array (class)">Array</a></span>, <span class='object_link'><a href="Contentful/ArrayCoercion.html" title="Contentful::ArrayCoercion (class)">ArrayCoercion</a></span>, <span class='object_link'><a href="Contentful/Asset.html" title="Contentful::Asset (class)">Asset</a></span>, <span class='object_link'><a href="Contentful/BadRequest.html" title="Contentful::BadRequest (class)">BadRequest</a></span>, <span class='object_link'><a href="Contentful/BaseCoercion.html" title="Contentful::BaseCoercion (class)">BaseCoercion</a></span>, <span class='object_link'><a href="Contentful/BaseResource.html" title="Contentful::BaseResource (class)">BaseResource</a></span>, <span class='object_link'><a href="Contentful/BooleanCoercion.html" title="Contentful::BooleanCoercion (class)">BooleanCoercion</a></span>, <span class='object_link'><a href="Contentful/Client.html" title="Contentful::Client (class)">Client</a></span>, <span class='object_link'><a href="Contentful/ContentType.html" title="Contentful::ContentType (class)">ContentType</a></span>, <span class='object_link'><a href="Contentful/ContentTypeCache.html" title="Contentful::ContentTypeCache (class)">ContentTypeCache</a></span>, <span class='object_link'><a href="Contentful/DateCoercion.html" title="Contentful::DateCoercion (class)">DateCoercion</a></span>, <span class='object_link'><a href="Contentful/DeletedAsset.html" title="Contentful::DeletedAsset (class)">DeletedAsset</a></span>, <span class='object_link'><a href="Contentful/DeletedEntry.html" title="Contentful::DeletedEntry (class)">DeletedEntry</a></span>, <span class='object_link'><a href="Contentful/Entry.html" title="Contentful::Entry (class)">Entry</a></span>, <span class='object_link'><a href="Contentful/Error.html" title="Contentful::Error (class)">Error</a></span>, <span class='object_link'><a href="Contentful/Field.html" title="Contentful::Field (class)">Field</a></span>, <span class='object_link'><a href="Contentful/FieldsResource.html" title="Contentful::FieldsResource (class)">FieldsResource</a></span>, <span class='object_link'><a href="Contentful/File.html" title="Contentful::File (class)">File</a></span>, <span class='object_link'><a href="Contentful/FloatCoercion.html" title="Contentful::FloatCoercion (class)">FloatCoercion</a></span>, <span class='object_link'><a href="Contentful/IntegerCoercion.html" title="Contentful::IntegerCoercion (class)">IntegerCoercion</a></span>, <span class='object_link'><a href="Contentful/Link.html" title="Contentful::Link (class)">Link</a></span>, <span class='object_link'><a href="Contentful/LinkCoercion.html" title="Contentful::LinkCoercion (class)">LinkCoercion</a></span>, <span class='object_link'><a href="Contentful/Locale.html" title="Contentful::Locale (class)">Locale</a></span>, <span class='object_link'><a href="Contentful/Location.html" title="Contentful::Location (class)">Location</a></span>, <span class='object_link'><a href="Contentful/LocationCoercion.html" title="Contentful::LocationCoercion (class)">LocationCoercion</a></span>, <span class='object_link'><a href="Contentful/NotFound.html" title="Contentful::NotFound (class)">NotFound</a></span>, <span class='object_link'><a href="Contentful/ObjectCoercion.html" title="Contentful::ObjectCoercion (class)">ObjectCoercion</a></span>, <span class='object_link'><a href="Contentful/RateLimitExceeded.html" title="Contentful::RateLimitExceeded (class)">RateLimitExceeded</a></span>, <span class='object_link'><a href="Contentful/Request.html" title="Contentful::Request (class)">Request</a></span>, <span class='object_link'><a href="Contentful/ResourceBuilder.html" title="Contentful::ResourceBuilder (class)">ResourceBuilder</a></span>, <span class='object_link'><a href="Contentful/Response.html" title="Contentful::Response (class)">Response</a></span>, <span class='object_link'><a href="Contentful/ServerError.html" title="Contentful::ServerError (class)">ServerError</a></span>, <span class='object_link'><a href="Contentful/ServiceUnavailable.html" title="Contentful::ServiceUnavailable (class)">ServiceUnavailable</a></span>, <span class='object_link'><a href="Contentful/Space.html" title="Contentful::Space (class)">Space</a></span>, <span class='object_link'><a href="Contentful/StringCoercion.html" title="Contentful::StringCoercion (class)">StringCoercion</a></span>, <span class='object_link'><a href="Contentful/SymbolCoercion.html" title="Contentful::SymbolCoercion (class)">SymbolCoercion</a></span>, <span class='object_link'><a href="Contentful/Sync.html" title="Contentful::Sync (class)">Sync</a></span>, <span class='object_link'><a href="Contentful/SyncPage.html" title="Contentful::SyncPage (class)">SyncPage</a></span>, <span class='object_link'><a href="Contentful/TextCoercion.html" title="Contentful::TextCoercion (class)">TextCoercion</a></span>, <span class='object_link'><a href="Contentful/Unauthorized.html" title="Contentful::Unauthorized (class)">Unauthorized</a></span>, <span class='object_link'><a href="Contentful/UnparsableJson.html" title="Contentful::UnparsableJson (class)">UnparsableJson</a></span>, <span class='object_link'><a href="Contentful/UnparsableResource.html" title="Contentful::UnparsableResource (class)">UnparsableResource</a></span>
110
-
111
-
112
- </p>
113
-
114
- <h2>Constant Summary</h2>
115
- <dl class="constants">
116
-
117
- <dt id="VERSION-constant" class="">VERSION =
118
- <div class="docstring">
119
- <div class="discussion">
120
-
121
- <p>Gem Version</p>
122
-
123
-
124
- </div>
125
- </div>
126
- <div class="tags">
127
-
128
-
129
- </div>
130
- </dt>
131
- <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>2.1.0</span><span class='tstring_end'>&#39;</span></span></pre></dd>
132
-
133
- </dl>
134
-
135
-
136
-
137
-
138
-
139
-
140
-
141
-
142
-
143
- </div>
144
-
145
- <div id="footer">
146
- Generated on Tue Jul 25 15:15:32 2017 by
147
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
148
- 0.9.5 (ruby-2.4.1).
149
- </div>
150
-
151
- </div>
152
- </body>
153
- </html>
@@ -1,161 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8">
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <title>
7
- Exception: Contentful::AccessDenied
8
-
9
- &mdash; Documentation by YARD 0.9.5
10
-
11
- </title>
12
-
13
- <link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
14
-
15
- <link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
16
-
17
- <script type="text/javascript" charset="utf-8">
18
- pathId = "Contentful::AccessDenied";
19
- relpath = '../';
20
- </script>
21
-
22
-
23
- <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
24
-
25
- <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
26
-
27
-
28
- </head>
29
- <body>
30
- <div class="nav_wrap">
31
- <iframe id="nav" src="../class_list.html"></iframe>
32
- <div id="resizer"></div>
33
- </div>
34
-
35
- <div id="main" tabindex="-1">
36
- <div id="header">
37
- <div id="menu">
38
-
39
- <a href="../_index.html">Index (A)</a> &raquo;
40
- <span class='title'><span class='object_link'><a href="../Contentful.html" title="Contentful (module)">Contentful</a></span></span>
41
- &raquo;
42
- <span class="title">AccessDenied</span>
43
-
44
- </div>
45
-
46
- <div id="search">
47
-
48
- <a class="full_list_link" id="class_list_link"
49
- href="../class_list.html">
50
-
51
- <svg width="24" height="24">
52
- <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
53
- <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
54
- <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
55
- </svg>
56
- </a>
57
-
58
- </div>
59
- <div class="clear"></div>
60
- </div>
61
-
62
- <iframe id="search_frame" src="../class_list.html"></iframe>
63
-
64
- <div id="content"><h1>Exception: Contentful::AccessDenied
65
-
66
-
67
-
68
- </h1>
69
- <div class="box_info">
70
-
71
- <dl>
72
- <dt>Inherits:</dt>
73
- <dd>
74
- <span class="inheritName"><span class='object_link'><a href="Error.html" title="Contentful::Error (class)">Error</a></span></span>
75
-
76
- <ul class="fullTree">
77
- <li>Object</li>
78
-
79
- <li class="next">StandardError</li>
80
-
81
- <li class="next"><span class='object_link'><a href="Error.html" title="Contentful::Error (class)">Error</a></span></li>
82
-
83
- <li class="next">Contentful::AccessDenied</li>
84
-
85
- </ul>
86
- <a href="#" class="inheritanceTree">show all</a>
87
-
88
- </dd>
89
- </dl>
90
-
91
-
92
-
93
-
94
-
95
-
96
-
97
-
98
-
99
-
100
-
101
- <dl>
102
- <dt>Defined in:</dt>
103
- <dd>lib/contentful/error.rb</dd>
104
- </dl>
105
-
106
- </div>
107
-
108
- <h2>Overview</h2><div class="docstring">
109
- <div class="discussion">
110
-
111
- <p>403</p>
112
-
113
-
114
- </div>
115
- </div>
116
- <div class="tags">
117
-
118
-
119
- </div>
120
-
121
-
122
-
123
-
124
-
125
- <h2>Instance Attribute Summary</h2>
126
-
127
- <h3 class="inherited">Attributes inherited from <span class='object_link'><a href="Error.html" title="Contentful::Error (class)">Error</a></span></h3>
128
- <p class="inherited"><span class='object_link'><a href="Error.html#response-instance_method" title="Contentful::Error#response (method)">#response</a></span></p>
129
-
130
-
131
-
132
-
133
-
134
-
135
-
136
-
137
-
138
- <h2>Method Summary</h2>
139
-
140
- <h3 class="inherited">Methods inherited from <span class='object_link'><a href="Error.html" title="Contentful::Error (class)">Error</a></span></h3>
141
- <p class="inherited"><span class='object_link'><a href="Error.html#%5B%5D-class_method" title="Contentful::Error.[] (method)">[]</a></span>, <span class='object_link'><a href="Error.html#initialize-instance_method" title="Contentful::Error#initialize (method)">#initialize</a></span></p>
142
-
143
- <div id="constructor_details" class="method_details_list">
144
- <h2>Constructor Details</h2>
145
-
146
- <p class="notice">This class inherits a constructor from <span class='object_link'><a href="Error.html#initialize-instance_method" title="Contentful::Error#initialize (method)">Contentful::Error</a></span></p>
147
-
148
- </div>
149
-
150
-
151
- </div>
152
-
153
- <div id="footer">
154
- Generated on Tue Jul 25 15:15:32 2017 by
155
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
156
- 0.9.5 (ruby-2.4.1).
157
- </div>
158
-
159
- </div>
160
- </body>
161
- </html>
@@ -1,743 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8">
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <title>
7
- Class: Contentful::Array
8
-
9
- &mdash; Documentation by YARD 0.9.5
10
-
11
- </title>
12
-
13
- <link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
14
-
15
- <link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
16
-
17
- <script type="text/javascript" charset="utf-8">
18
- pathId = "Contentful::Array";
19
- relpath = '../';
20
- </script>
21
-
22
-
23
- <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
24
-
25
- <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
26
-
27
-
28
- </head>
29
- <body>
30
- <div class="nav_wrap">
31
- <iframe id="nav" src="../class_list.html"></iframe>
32
- <div id="resizer"></div>
33
- </div>
34
-
35
- <div id="main" tabindex="-1">
36
- <div id="header">
37
- <div id="menu">
38
-
39
- <a href="../_index.html">Index (A)</a> &raquo;
40
- <span class='title'><span class='object_link'><a href="../Contentful.html" title="Contentful (module)">Contentful</a></span></span>
41
- &raquo;
42
- <span class="title">Array</span>
43
-
44
- </div>
45
-
46
- <div id="search">
47
-
48
- <a class="full_list_link" id="class_list_link"
49
- href="../class_list.html">
50
-
51
- <svg width="24" height="24">
52
- <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
53
- <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
54
- <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
55
- </svg>
56
- </a>
57
-
58
- </div>
59
- <div class="clear"></div>
60
- </div>
61
-
62
- <iframe id="search_frame" src="../class_list.html"></iframe>
63
-
64
- <div id="content"><h1>Class: Contentful::Array
65
-
66
-
67
-
68
- </h1>
69
- <div class="box_info">
70
-
71
- <dl>
72
- <dt>Inherits:</dt>
73
- <dd>
74
- <span class="inheritName"><span class='object_link'><a href="BaseResource.html" title="Contentful::BaseResource (class)">BaseResource</a></span></span>
75
-
76
- <ul class="fullTree">
77
- <li>Object</li>
78
-
79
- <li class="next"><span class='object_link'><a href="BaseResource.html" title="Contentful::BaseResource (class)">BaseResource</a></span></li>
80
-
81
- <li class="next">Contentful::Array</li>
82
-
83
- </ul>
84
- <a href="#" class="inheritanceTree">show all</a>
85
-
86
- </dd>
87
- </dl>
88
-
89
-
90
-
91
-
92
-
93
-
94
- <dl>
95
- <dt>Includes:</dt>
96
- <dd><span class='object_link'><a href="ArrayLike.html" title="Contentful::ArrayLike (module)">ArrayLike</a></span></dd>
97
- </dl>
98
-
99
-
100
-
101
-
102
-
103
-
104
- <dl>
105
- <dt>Defined in:</dt>
106
- <dd>lib/contentful/array.rb</dd>
107
- </dl>
108
-
109
- </div>
110
-
111
- <h2>Overview</h2><div class="docstring">
112
- <div class="discussion">
113
-
114
- <div class="note notetag">
115
- <strong>Note:</strong>
116
- <div class='inline'>
117
- <p>It also provides an #each method and includes Ruby&#39;s Enumerable module
118
- (gives you methods like #min, #first, etc)</p>
119
- </div>
120
- </div>
121
-
122
-
123
- <p>Resource Class for Arrays (e.g. search results)</p>
124
-
125
-
126
- </div>
127
- </div>
128
- <div class="tags">
129
-
130
-
131
- <p class="tag_title">See Also:</p>
132
- <ul class="see">
133
-
134
- <li>https://www.contentful.com/developers/documentation/content-delivery-api/#arrays</li>
135
-
136
- </ul>
137
-
138
- </div>
139
-
140
-
141
-
142
- <h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
143
- <ul class="summary">
144
-
145
- <li class="public ">
146
- <span class="summary_signature">
147
-
148
- <a href="#endpoint-instance_method" title="#endpoint (instance method)">#<strong>endpoint</strong> &#x21d2; Object </a>
149
-
150
-
151
-
152
- </span>
153
-
154
-
155
-
156
-
157
- <span class="note title readonly">readonly</span>
158
-
159
-
160
-
161
-
162
-
163
-
164
-
165
-
166
-
167
- <span class="summary_desc"><div class='inline'>
168
- <p>Returns the value of attribute endpoint.</p>
169
- </div></span>
170
-
171
- </li>
172
-
173
-
174
- <li class="public ">
175
- <span class="summary_signature">
176
-
177
- <a href="#items-instance_method" title="#items (instance method)">#<strong>items</strong> &#x21d2; Object </a>
178
-
179
-
180
-
181
- </span>
182
-
183
-
184
-
185
-
186
- <span class="note title readonly">readonly</span>
187
-
188
-
189
-
190
-
191
-
192
-
193
-
194
-
195
-
196
- <span class="summary_desc"><div class='inline'>
197
- <p>Returns the value of attribute items.</p>
198
- </div></span>
199
-
200
- </li>
201
-
202
-
203
- <li class="public ">
204
- <span class="summary_signature">
205
-
206
- <a href="#limit-instance_method" title="#limit (instance method)">#<strong>limit</strong> &#x21d2; Object </a>
207
-
208
-
209
-
210
- </span>
211
-
212
-
213
-
214
-
215
- <span class="note title readonly">readonly</span>
216
-
217
-
218
-
219
-
220
-
221
-
222
-
223
-
224
-
225
- <span class="summary_desc"><div class='inline'>
226
- <p>Returns the value of attribute limit.</p>
227
- </div></span>
228
-
229
- </li>
230
-
231
-
232
- <li class="public ">
233
- <span class="summary_signature">
234
-
235
- <a href="#skip-instance_method" title="#skip (instance method)">#<strong>skip</strong> &#x21d2; Object </a>
236
-
237
-
238
-
239
- </span>
240
-
241
-
242
-
243
-
244
- <span class="note title readonly">readonly</span>
245
-
246
-
247
-
248
-
249
-
250
-
251
-
252
-
253
-
254
- <span class="summary_desc"><div class='inline'>
255
- <p>Returns the value of attribute skip.</p>
256
- </div></span>
257
-
258
- </li>
259
-
260
-
261
- <li class="public ">
262
- <span class="summary_signature">
263
-
264
- <a href="#total-instance_method" title="#total (instance method)">#<strong>total</strong> &#x21d2; Object </a>
265
-
266
-
267
-
268
- </span>
269
-
270
-
271
-
272
-
273
- <span class="note title readonly">readonly</span>
274
-
275
-
276
-
277
-
278
-
279
-
280
-
281
-
282
-
283
- <span class="summary_desc"><div class='inline'>
284
- <p>Returns the value of attribute total.</p>
285
- </div></span>
286
-
287
- </li>
288
-
289
-
290
- </ul>
291
-
292
-
293
-
294
-
295
-
296
- <h3 class="inherited">Attributes inherited from <span class='object_link'><a href="BaseResource.html" title="Contentful::BaseResource (class)">BaseResource</a></span></h3>
297
- <p class="inherited"><span class='object_link'><a href="BaseResource.html#default_locale-instance_method" title="Contentful::BaseResource#default_locale (method)">#default_locale</a></span>, <span class='object_link'><a href="BaseResource.html#raw-instance_method" title="Contentful::BaseResource#raw (method)">#raw</a></span>, <span class='object_link'><a href="BaseResource.html#sys-instance_method" title="Contentful::BaseResource#sys (method)">#sys</a></span></p>
298
-
299
-
300
-
301
- <h2>
302
- Instance Method Summary
303
- <small><a href="#" class="summary_toggle">collapse</a></small>
304
- </h2>
305
-
306
- <ul class="summary">
307
-
308
- <li class="public ">
309
- <span class="summary_signature">
310
-
311
- <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(item = nil, default_locale = Contentful::Client::DEFAULT_CONFIGURATION[:default_locale], endpoint = &#39;&#39;) &#x21d2; Array </a>
312
-
313
-
314
-
315
- </span>
316
-
317
-
318
- <span class="note title constructor">constructor</span>
319
-
320
-
321
-
322
-
323
-
324
-
325
-
326
-
327
- <span class="summary_desc"><div class='inline'>
328
- <p>A new instance of Array.</p>
329
- </div></span>
330
-
331
- </li>
332
-
333
-
334
- <li class="public ">
335
- <span class="summary_signature">
336
-
337
- <a href="#next_page-instance_method" title="#next_page (instance method)">#<strong>next_page</strong>(client = nil) &#x21d2; Contentful::Array, false </a>
338
-
339
-
340
-
341
- </span>
342
-
343
-
344
-
345
-
346
-
347
-
348
-
349
-
350
-
351
- <span class="summary_desc"><div class='inline'>
352
- <p>Simplifies pagination.</p>
353
- </div></span>
354
-
355
- </li>
356
-
357
-
358
- </ul>
359
-
360
-
361
-
362
-
363
-
364
-
365
-
366
-
367
-
368
-
369
-
370
- <h3 class="inherited">Methods included from <span class='object_link'><a href="ArrayLike.html" title="Contentful::ArrayLike (module)">ArrayLike</a></span></h3>
371
- <p class="inherited"><span class='object_link'><a href="ArrayLike.html#%5B%5D-instance_method" title="Contentful::ArrayLike#[] (method)">#[]</a></span>, <span class='object_link'><a href="ArrayLike.html#array%3F-instance_method" title="Contentful::ArrayLike#array? (method)">#array?</a></span>, <span class='object_link'><a href="ArrayLike.html#each_item-instance_method" title="Contentful::ArrayLike#each_item (method)">#each_item</a></span>, <span class='object_link'><a href="ArrayLike.html#empty%3F-instance_method" title="Contentful::ArrayLike#empty? (method)">#empty?</a></span>, <span class='object_link'><a href="ArrayLike.html#last-instance_method" title="Contentful::ArrayLike#last (method)">#last</a></span>, <span class='object_link'><a href="ArrayLike.html#size-instance_method" title="Contentful::ArrayLike#size (method)">#size</a></span></p>
372
-
373
-
374
-
375
-
376
-
377
-
378
-
379
-
380
-
381
-
382
- <h3 class="inherited">Methods inherited from <span class='object_link'><a href="BaseResource.html" title="Contentful::BaseResource (class)">BaseResource</a></span></h3>
383
- <p class="inherited"><span class='object_link'><a href="BaseResource.html#%3D%3D-instance_method" title="Contentful::BaseResource#== (method)">#==</a></span>, <span class='object_link'><a href="BaseResource.html#reload-instance_method" title="Contentful::BaseResource#reload (method)">#reload</a></span></p>
384
- <div id="constructor_details" class="method_details_list">
385
- <h2>Constructor Details</h2>
386
-
387
- <div class="method_details first">
388
- <h3 class="signature first" id="initialize-instance_method">
389
-
390
- #<strong>initialize</strong>(item = nil, default_locale = Contentful::Client::DEFAULT_CONFIGURATION[:default_locale], endpoint = &#39;&#39;) &#x21d2; <tt><span class='object_link'><a href="" title="Contentful::Array (class)">Array</a></span></tt>
391
-
392
-
393
-
394
-
395
-
396
- </h3><div class="docstring">
397
- <div class="discussion">
398
-
399
- <p>Returns a new instance of Array</p>
400
-
401
-
402
- </div>
403
- </div>
404
- <div class="tags">
405
-
406
-
407
- </div><table class="source_code">
408
- <tr>
409
- <td>
410
- <pre class="lines">
411
-
412
-
413
- 16
414
- 17
415
- 18
416
- 19
417
- 20
418
- 21
419
- 22
420
- 23
421
- 24
422
- 25
423
- 26</pre>
424
- </td>
425
- <td>
426
- <pre class="code"><span class="info file"># File 'lib/contentful/array.rb', line 16</span>
427
-
428
- <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_item'>item</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span>
429
- <span class='id identifier rubyid_default_locale'>default_locale</span> <span class='op'>=</span> <span class='const'>Contentful</span><span class='op'>::</span><span class='const'>Client</span><span class='op'>::</span><span class='const'>DEFAULT_CONFIGURATION</span><span class='lbracket'>[</span><span class='symbol'>:default_locale</span><span class='rbracket'>]</span><span class='comma'>,</span>
430
- <span class='id identifier rubyid_endpoint'>endpoint</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='op'>*</span><span class='rparen'>)</span>
431
- <span class='kw'>super</span><span class='lparen'>(</span><span class='id identifier rubyid_item'>item</span><span class='comma'>,</span> <span class='lbrace'>{</span> <span class='label'>default_locale:</span> <span class='id identifier rubyid_default_locale'>default_locale</span> <span class='rbrace'>}</span><span class='rparen'>)</span>
432
-
433
- <span class='ivar'>@endpoint</span> <span class='op'>=</span> <span class='id identifier rubyid_endpoint'>endpoint</span>
434
- <span class='ivar'>@total</span> <span class='op'>=</span> <span class='id identifier rubyid_item'>item</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'>total</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='kw'>nil</span><span class='rparen'>)</span>
435
- <span class='ivar'>@limit</span> <span class='op'>=</span> <span class='id identifier rubyid_item'>item</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'>limit</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='kw'>nil</span><span class='rparen'>)</span>
436
- <span class='ivar'>@skip</span> <span class='op'>=</span> <span class='id identifier rubyid_item'>item</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'>skip</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='kw'>nil</span><span class='rparen'>)</span>
437
- <span class='ivar'>@items</span> <span class='op'>=</span> <span class='id identifier rubyid_item'>item</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'>items</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='rparen'>)</span>
438
- <span class='kw'>end</span></pre>
439
- </td>
440
- </tr>
441
- </table>
442
- </div>
443
-
444
- </div>
445
-
446
- <div id="instance_attr_details" class="attr_details">
447
- <h2>Instance Attribute Details</h2>
448
-
449
-
450
- <span id=""></span>
451
- <div class="method_details first">
452
- <h3 class="signature first" id="endpoint-instance_method">
453
-
454
- #<strong>endpoint</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span>
455
-
456
-
457
-
458
-
459
-
460
- </h3><div class="docstring">
461
- <div class="discussion">
462
-
463
- <p>Returns the value of attribute endpoint</p>
464
-
465
-
466
- </div>
467
- </div>
468
- <div class="tags">
469
-
470
-
471
- </div><table class="source_code">
472
- <tr>
473
- <td>
474
- <pre class="lines">
475
-
476
-
477
- 14
478
- 15
479
- 16</pre>
480
- </td>
481
- <td>
482
- <pre class="code"><span class="info file"># File 'lib/contentful/array.rb', line 14</span>
483
-
484
- <span class='kw'>def</span> <span class='id identifier rubyid_endpoint'>endpoint</span>
485
- <span class='ivar'>@endpoint</span>
486
- <span class='kw'>end</span></pre>
487
- </td>
488
- </tr>
489
- </table>
490
- </div>
491
-
492
-
493
- <span id=""></span>
494
- <div class="method_details ">
495
- <h3 class="signature " id="items-instance_method">
496
-
497
- #<strong>items</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span>
498
-
499
-
500
-
501
-
502
-
503
- </h3><div class="docstring">
504
- <div class="discussion">
505
-
506
- <p>Returns the value of attribute items</p>
507
-
508
-
509
- </div>
510
- </div>
511
- <div class="tags">
512
-
513
-
514
- </div><table class="source_code">
515
- <tr>
516
- <td>
517
- <pre class="lines">
518
-
519
-
520
- 14
521
- 15
522
- 16</pre>
523
- </td>
524
- <td>
525
- <pre class="code"><span class="info file"># File 'lib/contentful/array.rb', line 14</span>
526
-
527
- <span class='kw'>def</span> <span class='id identifier rubyid_items'>items</span>
528
- <span class='ivar'>@items</span>
529
- <span class='kw'>end</span></pre>
530
- </td>
531
- </tr>
532
- </table>
533
- </div>
534
-
535
-
536
- <span id=""></span>
537
- <div class="method_details ">
538
- <h3 class="signature " id="limit-instance_method">
539
-
540
- #<strong>limit</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span>
541
-
542
-
543
-
544
-
545
-
546
- </h3><div class="docstring">
547
- <div class="discussion">
548
-
549
- <p>Returns the value of attribute limit</p>
550
-
551
-
552
- </div>
553
- </div>
554
- <div class="tags">
555
-
556
-
557
- </div><table class="source_code">
558
- <tr>
559
- <td>
560
- <pre class="lines">
561
-
562
-
563
- 14
564
- 15
565
- 16</pre>
566
- </td>
567
- <td>
568
- <pre class="code"><span class="info file"># File 'lib/contentful/array.rb', line 14</span>
569
-
570
- <span class='kw'>def</span> <span class='id identifier rubyid_limit'>limit</span>
571
- <span class='ivar'>@limit</span>
572
- <span class='kw'>end</span></pre>
573
- </td>
574
- </tr>
575
- </table>
576
- </div>
577
-
578
-
579
- <span id=""></span>
580
- <div class="method_details ">
581
- <h3 class="signature " id="skip-instance_method">
582
-
583
- #<strong>skip</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span>
584
-
585
-
586
-
587
-
588
-
589
- </h3><div class="docstring">
590
- <div class="discussion">
591
-
592
- <p>Returns the value of attribute skip</p>
593
-
594
-
595
- </div>
596
- </div>
597
- <div class="tags">
598
-
599
-
600
- </div><table class="source_code">
601
- <tr>
602
- <td>
603
- <pre class="lines">
604
-
605
-
606
- 14
607
- 15
608
- 16</pre>
609
- </td>
610
- <td>
611
- <pre class="code"><span class="info file"># File 'lib/contentful/array.rb', line 14</span>
612
-
613
- <span class='kw'>def</span> <span class='id identifier rubyid_skip'>skip</span>
614
- <span class='ivar'>@skip</span>
615
- <span class='kw'>end</span></pre>
616
- </td>
617
- </tr>
618
- </table>
619
- </div>
620
-
621
-
622
- <span id=""></span>
623
- <div class="method_details ">
624
- <h3 class="signature " id="total-instance_method">
625
-
626
- #<strong>total</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span>
627
-
628
-
629
-
630
-
631
-
632
- </h3><div class="docstring">
633
- <div class="discussion">
634
-
635
- <p>Returns the value of attribute total</p>
636
-
637
-
638
- </div>
639
- </div>
640
- <div class="tags">
641
-
642
-
643
- </div><table class="source_code">
644
- <tr>
645
- <td>
646
- <pre class="lines">
647
-
648
-
649
- 14
650
- 15
651
- 16</pre>
652
- </td>
653
- <td>
654
- <pre class="code"><span class="info file"># File 'lib/contentful/array.rb', line 14</span>
655
-
656
- <span class='kw'>def</span> <span class='id identifier rubyid_total'>total</span>
657
- <span class='ivar'>@total</span>
658
- <span class='kw'>end</span></pre>
659
- </td>
660
- </tr>
661
- </table>
662
- </div>
663
-
664
- </div>
665
-
666
-
667
- <div id="instance_method_details" class="method_details_list">
668
- <h2>Instance Method Details</h2>
669
-
670
-
671
- <div class="method_details first">
672
- <h3 class="signature first" id="next_page-instance_method">
673
-
674
- #<strong>next_page</strong>(client = nil) &#x21d2; <tt><span class='object_link'><a href="" title="Contentful::Array (class)">Contentful::Array</a></span></tt>, <tt>false</tt>
675
-
676
-
677
-
678
-
679
-
680
- </h3><div class="docstring">
681
- <div class="discussion">
682
-
683
- <p>Simplifies pagination</p>
684
-
685
-
686
- </div>
687
- </div>
688
- <div class="tags">
689
-
690
- <p class="tag_title">Returns:</p>
691
- <ul class="return">
692
-
693
- <li>
694
-
695
-
696
- <span class='type'>(<tt><span class='object_link'><a href="" title="Contentful::Array (class)">Contentful::Array</a></span></tt>, <tt>false</tt>)</span>
697
-
698
-
699
-
700
- </li>
701
-
702
- </ul>
703
-
704
- </div><table class="source_code">
705
- <tr>
706
- <td>
707
- <pre class="lines">
708
-
709
-
710
- 51
711
- 52
712
- 53
713
- 54
714
- 55
715
- 56</pre>
716
- </td>
717
- <td>
718
- <pre class="code"><span class="info file"># File 'lib/contentful/array.rb', line 51</span>
719
-
720
- <span class='kw'>def</span> <span class='id identifier rubyid_next_page'>next_page</span><span class='lparen'>(</span><span class='id identifier rubyid_client'>client</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
721
- <span class='kw'>return</span> <span class='kw'>false</span> <span class='kw'>if</span> <span class='id identifier rubyid_client'>client</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
722
-
723
- <span class='id identifier rubyid_new_skip'>new_skip</span> <span class='op'>=</span> <span class='lparen'>(</span><span class='id identifier rubyid_skip'>skip</span> <span class='op'>||</span> <span class='int'>0</span><span class='rparen'>)</span> <span class='op'>+</span> <span class='lparen'>(</span><span class='id identifier rubyid_limit'>limit</span> <span class='op'>||</span> <span class='const'>DEFAULT_LIMIT</span><span class='rparen'>)</span>
724
- <span class='id identifier rubyid_client'>client</span><span class='period'>.</span><span class='id identifier rubyid_send'>send</span><span class='lparen'>(</span><span class='id identifier rubyid_endpoint'>endpoint</span><span class='period'>.</span><span class='id identifier rubyid_delete'>delete</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>/</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span><span class='comma'>,</span> <span class='label'>limit:</span> <span class='id identifier rubyid_limit'>limit</span><span class='comma'>,</span> <span class='label'>skip:</span> <span class='id identifier rubyid_new_skip'>new_skip</span><span class='rparen'>)</span>
725
- <span class='kw'>end</span></pre>
726
- </td>
727
- </tr>
728
- </table>
729
- </div>
730
-
731
- </div>
732
-
733
- </div>
734
-
735
- <div id="footer">
736
- Generated on Tue Jul 25 15:15:32 2017 by
737
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
738
- 0.9.5 (ruby-2.4.1).
739
- </div>
740
-
741
- </div>
742
- </body>
743
- </html>