contentful 2.1.1 → 2.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/Gemfile.lock +37 -46
- data/lib/contentful/array.rb +8 -1
- data/lib/contentful/entry.rb +9 -9
- data/lib/contentful/fields_resource.rb +9 -8
- data/lib/contentful/resource_builder.rb +1 -7
- data/lib/contentful/support.rb +22 -0
- data/lib/contentful/version.rb +1 -1
- data/spec/array_spec.rb +21 -0
- data/spec/fixtures/vcr_cassettes/array/nested_resources.yml +159 -0
- metadata +5 -106
- data/coverage/.last_run.json +0 -5
- data/coverage/.resultset.json +0 -1887
- data/coverage/.resultset.json.lock +0 -0
- data/coverage/assets/0.10.0/application.css +0 -799
- data/coverage/assets/0.10.0/application.js +0 -1707
- data/coverage/assets/0.10.0/colorbox/border.png +0 -0
- data/coverage/assets/0.10.0/colorbox/controls.png +0 -0
- data/coverage/assets/0.10.0/colorbox/loading.gif +0 -0
- data/coverage/assets/0.10.0/colorbox/loading_background.png +0 -0
- data/coverage/assets/0.10.0/favicon_green.png +0 -0
- data/coverage/assets/0.10.0/favicon_red.png +0 -0
- data/coverage/assets/0.10.0/favicon_yellow.png +0 -0
- data/coverage/assets/0.10.0/loading.gif +0 -0
- data/coverage/assets/0.10.0/magnify.png +0 -0
- data/coverage/assets/0.10.0/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/coverage/assets/0.10.0/smoothness/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/coverage/assets/0.10.0/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- data/coverage/assets/0.10.0/smoothness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/coverage/assets/0.10.0/smoothness/images/ui-bg_glass_75_dadada_1x400.png +0 -0
- data/coverage/assets/0.10.0/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- data/coverage/assets/0.10.0/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/coverage/assets/0.10.0/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- data/coverage/assets/0.10.0/smoothness/images/ui-icons_222222_256x240.png +0 -0
- data/coverage/assets/0.10.0/smoothness/images/ui-icons_2e83ff_256x240.png +0 -0
- data/coverage/assets/0.10.0/smoothness/images/ui-icons_454545_256x240.png +0 -0
- data/coverage/assets/0.10.0/smoothness/images/ui-icons_888888_256x240.png +0 -0
- data/coverage/assets/0.10.0/smoothness/images/ui-icons_cd0a0a_256x240.png +0 -0
- data/coverage/index.html +0 -11816
- data/doc/Contentful.html +0 -153
- data/doc/Contentful/AccessDenied.html +0 -161
- data/doc/Contentful/Array.html +0 -743
- data/doc/Contentful/ArrayCoercion.html +0 -244
- data/doc/Contentful/ArrayLike.html +0 -627
- data/doc/Contentful/Asset.html +0 -475
- data/doc/Contentful/BadRequest.html +0 -161
- data/doc/Contentful/BaseCoercion.html +0 -447
- data/doc/Contentful/BaseResource.html +0 -599
- data/doc/Contentful/BooleanCoercion.html +0 -244
- data/doc/Contentful/Client.html +0 -1606
- data/doc/Contentful/Constants.html +0 -636
- data/doc/Contentful/ContentType.html +0 -614
- data/doc/Contentful/ContentTypeCache.html +0 -430
- data/doc/Contentful/DateCoercion.html +0 -240
- data/doc/Contentful/DeletedAsset.html +0 -159
- data/doc/Contentful/DeletedEntry.html +0 -159
- data/doc/Contentful/DynamicEntry.html +0 -214
- data/doc/Contentful/Entry.html +0 -273
- data/doc/Contentful/Error.html +0 -424
- data/doc/Contentful/Field.html +0 -929
- data/doc/Contentful/FieldsResource.html +0 -501
- data/doc/Contentful/File.html +0 -520
- data/doc/Contentful/FloatCoercion.html +0 -240
- data/doc/Contentful/IntegerCoercion.html +0 -240
- data/doc/Contentful/Link.html +0 -251
- data/doc/Contentful/LinkCoercion.html +0 -160
- data/doc/Contentful/Locale.html +0 -447
- data/doc/Contentful/Location.html +0 -385
- data/doc/Contentful/LocationCoercion.html +0 -240
- data/doc/Contentful/NotFound.html +0 -161
- data/doc/Contentful/ObjectCoercion.html +0 -240
- data/doc/Contentful/RateLimitExceeded.html +0 -161
- data/doc/Contentful/Request.html +0 -889
- data/doc/Contentful/Resource.html +0 -117
- data/doc/Contentful/Resource/ArrayLike.html +0 -627
- data/doc/Contentful/Resource/AssetFields.html +0 -246
- data/doc/Contentful/Resource/AssetFields/ClassMethods.html +0 -174
- data/doc/Contentful/Resource/ClassMethods.html +0 -378
- data/doc/Contentful/Resource/CustomResource.html +0 -119
- data/doc/Contentful/Resource/Fields.html +0 -288
- data/doc/Contentful/Resource/Fields/ClassMethods.html +0 -187
- data/doc/Contentful/Resource/LocalizedFields.html +0 -305
- data/doc/Contentful/Resource/SystemProperties.html +0 -205
- data/doc/Contentful/Resource/SystemProperties/ClassMethods.html +0 -174
- data/doc/Contentful/ResourceBuilder.html +0 -969
- data/doc/Contentful/Response.html +0 -641
- data/doc/Contentful/ServerError.html +0 -161
- data/doc/Contentful/ServiceUnavailable.html +0 -161
- data/doc/Contentful/Space.html +0 -395
- data/doc/Contentful/StringCoercion.html +0 -244
- data/doc/Contentful/Support.html +0 -550
- data/doc/Contentful/SymbolCoercion.html +0 -171
- data/doc/Contentful/Sync.html +0 -655
- data/doc/Contentful/SyncPage.html +0 -801
- data/doc/Contentful/TextCoercion.html +0 -171
- data/doc/Contentful/Unauthorized.html +0 -161
- data/doc/Contentful/UnparsableJson.html +0 -161
- data/doc/Contentful/UnparsableResource.html +0 -137
- data/doc/_index.html +0 -537
- data/doc/class_list.html +0 -51
- data/doc/css/common.css +0 -1
- data/doc/css/full_list.css +0 -58
- data/doc/css/style.css +0 -481
- data/doc/file.CHANGELOG.html +0 -506
- data/doc/file.LICENSE.html +0 -72
- data/doc/file.README.html +0 -565
- data/doc/file_list.html +0 -66
- data/doc/frames.html +0 -17
- data/doc/index.html +0 -565
- data/doc/js/app.js +0 -243
- data/doc/js/full_list.js +0 -216
- data/doc/js/jquery.js +0 -4
- data/doc/method_list.html +0 -1115
- data/doc/top-level-namespace.html +0 -112
data/doc/Contentful/Asset.html
DELETED
|
@@ -1,475 +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::Asset
|
|
8
|
-
|
|
9
|
-
— 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::Asset";
|
|
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> »
|
|
40
|
-
<span class='title'><span class='object_link'><a href="../Contentful.html" title="Contentful (module)">Contentful</a></span></span>
|
|
41
|
-
»
|
|
42
|
-
<span class="title">Asset</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::Asset
|
|
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="FieldsResource.html" title="Contentful::FieldsResource (class)">FieldsResource</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"><span class='object_link'><a href="FieldsResource.html" title="Contentful::FieldsResource (class)">FieldsResource</a></span></li>
|
|
82
|
-
|
|
83
|
-
<li class="next">Contentful::Asset</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/asset.rb</dd>
|
|
104
|
-
</dl>
|
|
105
|
-
|
|
106
|
-
</div>
|
|
107
|
-
|
|
108
|
-
<h2>Overview</h2><div class="docstring">
|
|
109
|
-
<div class="discussion">
|
|
110
|
-
|
|
111
|
-
<p>Resource class for Asset. <a
|
|
112
|
-
href="https://www.contentful.com/developers/documentation/content-delivery-api/#assets">www.contentful.com/developers/documentation/content-delivery-api/#assets</a></p>
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
</div>
|
|
116
|
-
</div>
|
|
117
|
-
<div class="tags">
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
</div>
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
<h2>Instance Attribute Summary</h2>
|
|
127
|
-
|
|
128
|
-
<h3 class="inherited">Attributes inherited from <span class='object_link'><a href="BaseResource.html" title="Contentful::BaseResource (class)">BaseResource</a></span></h3>
|
|
129
|
-
<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>
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
<h2>
|
|
134
|
-
Instance Method Summary
|
|
135
|
-
<small><a href="#" class="summary_toggle">collapse</a></small>
|
|
136
|
-
</h2>
|
|
137
|
-
|
|
138
|
-
<ul class="summary">
|
|
139
|
-
|
|
140
|
-
<li class="public ">
|
|
141
|
-
<span class="summary_signature">
|
|
142
|
-
|
|
143
|
-
<a href="#image_url-instance_method" title="#image_url (instance method)">#<strong>image_url</strong>(options = {}) ⇒ String </a>
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
(also: #url)
|
|
148
|
-
|
|
149
|
-
</span>
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
<span class="summary_desc"><div class='inline'>
|
|
160
|
-
<p>Generates a URL for the Contentful Image API.</p>
|
|
161
|
-
</div></span>
|
|
162
|
-
|
|
163
|
-
</li>
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
<li class="public ">
|
|
167
|
-
<span class="summary_signature">
|
|
168
|
-
|
|
169
|
-
<a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong> ⇒ Asset </a>
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
</span>
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
<span class="note title constructor">constructor</span>
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
<span class="summary_desc"><div class='inline'>
|
|
186
|
-
<p>A new instance of Asset.</p>
|
|
187
|
-
</div></span>
|
|
188
|
-
|
|
189
|
-
</li>
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
</ul>
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
<h3 class="inherited">Methods inherited from <span class='object_link'><a href="FieldsResource.html" title="Contentful::FieldsResource (class)">FieldsResource</a></span></h3>
|
|
205
|
-
<p class="inherited"><span class='object_link'><a href="FieldsResource.html#fields-instance_method" title="Contentful::FieldsResource#fields (method)">#fields</a></span>, <span class='object_link'><a href="FieldsResource.html#fields_with_locales-instance_method" title="Contentful::FieldsResource#fields_with_locales (method)">#fields_with_locales</a></span>, <span class='object_link'><a href="FieldsResource.html#locales-instance_method" title="Contentful::FieldsResource#locales (method)">#locales</a></span></p>
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
<h3 class="inherited">Methods inherited from <span class='object_link'><a href="BaseResource.html" title="Contentful::BaseResource (class)">BaseResource</a></span></h3>
|
|
216
|
-
<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>
|
|
217
|
-
<div id="constructor_details" class="method_details_list">
|
|
218
|
-
<h2>Constructor Details</h2>
|
|
219
|
-
|
|
220
|
-
<div class="method_details first">
|
|
221
|
-
<h3 class="signature first" id="initialize-instance_method">
|
|
222
|
-
|
|
223
|
-
#<strong>initialize</strong> ⇒ <tt><span class='object_link'><a href="" title="Contentful::Asset (class)">Asset</a></span></tt>
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
</h3><div class="docstring">
|
|
230
|
-
<div class="discussion">
|
|
231
|
-
|
|
232
|
-
<p>Returns a new instance of Asset</p>
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
</div>
|
|
236
|
-
</div>
|
|
237
|
-
<div class="tags">
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
</div><table class="source_code">
|
|
241
|
-
<tr>
|
|
242
|
-
<td>
|
|
243
|
-
<pre class="lines">
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
28
|
|
247
|
-
29
|
|
248
|
-
30
|
|
249
|
-
31
|
|
250
|
-
32</pre>
|
|
251
|
-
</td>
|
|
252
|
-
<td>
|
|
253
|
-
<pre class="code"><span class="info file"># File 'lib/contentful/asset.rb', line 28</span>
|
|
254
|
-
|
|
255
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='op'>*</span><span class='rparen'>)</span>
|
|
256
|
-
<span class='kw'>super</span>
|
|
257
|
-
<span class='id identifier rubyid_create_files!'>create_files!</span>
|
|
258
|
-
<span class='id identifier rubyid_define_asset_methods!'>define_asset_methods!</span>
|
|
259
|
-
<span class='kw'>end</span></pre>
|
|
260
|
-
</td>
|
|
261
|
-
</tr>
|
|
262
|
-
</table>
|
|
263
|
-
</div>
|
|
264
|
-
|
|
265
|
-
</div>
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
<div id="instance_method_details" class="method_details_list">
|
|
269
|
-
<h2>Instance Method Details</h2>
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
<div class="method_details first">
|
|
273
|
-
<h3 class="signature first" id="image_url-instance_method">
|
|
274
|
-
|
|
275
|
-
#<strong>image_url</strong>(options = {}) ⇒ <tt>String</tt>
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
<span class="aliases">Also known as:
|
|
280
|
-
<span class="names"><span id='url-instance_method'>url</span></span>
|
|
281
|
-
</span>
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
</h3><div class="docstring">
|
|
286
|
-
<div class="discussion">
|
|
287
|
-
|
|
288
|
-
<p>Generates a URL for the Contentful Image API</p>
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
</div>
|
|
292
|
-
</div>
|
|
293
|
-
<div class="tags">
|
|
294
|
-
<p class="tag_title">Parameters:</p>
|
|
295
|
-
<ul class="param">
|
|
296
|
-
|
|
297
|
-
<li>
|
|
298
|
-
|
|
299
|
-
<span class='name'>options</span>
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
<span class='type'>(<tt>Hash</tt>)</span>
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
<em class="default">(defaults to: <tt>{}</tt>)</em>
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
</li>
|
|
309
|
-
|
|
310
|
-
</ul>
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
<p class="tag_title">Options Hash (<tt>options</tt>):</p>
|
|
316
|
-
<ul class="option">
|
|
317
|
-
|
|
318
|
-
<li>
|
|
319
|
-
<span class="name">:width</span>
|
|
320
|
-
<span class="type">(<tt>Integer</tt>)</span>
|
|
321
|
-
<span class="default">
|
|
322
|
-
|
|
323
|
-
</span>
|
|
324
|
-
|
|
325
|
-
</li>
|
|
326
|
-
|
|
327
|
-
<li>
|
|
328
|
-
<span class="name">:height</span>
|
|
329
|
-
<span class="type">(<tt>Integer</tt>)</span>
|
|
330
|
-
<span class="default">
|
|
331
|
-
|
|
332
|
-
</span>
|
|
333
|
-
|
|
334
|
-
</li>
|
|
335
|
-
|
|
336
|
-
<li>
|
|
337
|
-
<span class="name">:format</span>
|
|
338
|
-
<span class="type">(<tt>String</tt>)</span>
|
|
339
|
-
<span class="default">
|
|
340
|
-
|
|
341
|
-
</span>
|
|
342
|
-
|
|
343
|
-
</li>
|
|
344
|
-
|
|
345
|
-
<li>
|
|
346
|
-
<span class="name">:quality</span>
|
|
347
|
-
<span class="type">(<tt>String</tt>)</span>
|
|
348
|
-
<span class="default">
|
|
349
|
-
|
|
350
|
-
</span>
|
|
351
|
-
|
|
352
|
-
</li>
|
|
353
|
-
|
|
354
|
-
<li>
|
|
355
|
-
<span class="name">:focus</span>
|
|
356
|
-
<span class="type">(<tt>String</tt>)</span>
|
|
357
|
-
<span class="default">
|
|
358
|
-
|
|
359
|
-
</span>
|
|
360
|
-
|
|
361
|
-
</li>
|
|
362
|
-
|
|
363
|
-
<li>
|
|
364
|
-
<span class="name">:fit</span>
|
|
365
|
-
<span class="type">(<tt>String</tt>)</span>
|
|
366
|
-
<span class="default">
|
|
367
|
-
|
|
368
|
-
</span>
|
|
369
|
-
|
|
370
|
-
</li>
|
|
371
|
-
|
|
372
|
-
<li>
|
|
373
|
-
<span class="name">:fl</span>
|
|
374
|
-
<span class="type">(<tt>String</tt>)</span>
|
|
375
|
-
<span class="default">
|
|
376
|
-
|
|
377
|
-
</span>
|
|
378
|
-
|
|
379
|
-
— <div class='inline'>
|
|
380
|
-
<p>File Layering - 'progressive'</p>
|
|
381
|
-
</div>
|
|
382
|
-
|
|
383
|
-
</li>
|
|
384
|
-
|
|
385
|
-
</ul>
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
<p class="tag_title">Returns:</p>
|
|
389
|
-
<ul class="return">
|
|
390
|
-
|
|
391
|
-
<li>
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
<span class='type'>(<tt>String</tt>)</span>
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
—
|
|
399
|
-
<div class='inline'>
|
|
400
|
-
<p>Image API URL</p>
|
|
401
|
-
</div>
|
|
402
|
-
|
|
403
|
-
</li>
|
|
404
|
-
|
|
405
|
-
</ul>
|
|
406
|
-
|
|
407
|
-
<p class="tag_title">See Also:</p>
|
|
408
|
-
<ul class="see">
|
|
409
|
-
|
|
410
|
-
<li>https://www.contentful.com/developers/documentation/content-delivery-api/#image-asset-resizing</li>
|
|
411
|
-
|
|
412
|
-
</ul>
|
|
413
|
-
|
|
414
|
-
</div><table class="source_code">
|
|
415
|
-
<tr>
|
|
416
|
-
<td>
|
|
417
|
-
<pre class="lines">
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
47
|
|
421
|
-
48
|
|
422
|
-
49
|
|
423
|
-
50
|
|
424
|
-
51
|
|
425
|
-
52
|
|
426
|
-
53
|
|
427
|
-
54
|
|
428
|
-
55
|
|
429
|
-
56
|
|
430
|
-
57
|
|
431
|
-
58
|
|
432
|
-
59
|
|
433
|
-
60
|
|
434
|
-
61
|
|
435
|
-
62
|
|
436
|
-
63</pre>
|
|
437
|
-
</td>
|
|
438
|
-
<td>
|
|
439
|
-
<pre class="code"><span class="info file"># File 'lib/contentful/asset.rb', line 47</span>
|
|
440
|
-
|
|
441
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_image_url'>image_url</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
|
442
|
-
<span class='id identifier rubyid_query'>query</span> <span class='op'>=</span> <span class='lbrace'>{</span>
|
|
443
|
-
<span class='label'>w:</span> <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:w</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:width</span><span class='rbracket'>]</span><span class='comma'>,</span>
|
|
444
|
-
<span class='label'>h:</span> <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:h</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:height</span><span class='rbracket'>]</span><span class='comma'>,</span>
|
|
445
|
-
<span class='label'>fm:</span> <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:fm</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:format</span><span class='rbracket'>]</span><span class='comma'>,</span>
|
|
446
|
-
<span class='label'>q:</span> <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:q</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:quality</span><span class='rbracket'>]</span><span class='comma'>,</span>
|
|
447
|
-
<span class='label'>f:</span> <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:f</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:focus</span><span class='rbracket'>]</span><span class='comma'>,</span>
|
|
448
|
-
<span class='label'>fit:</span> <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:fit</span><span class='rbracket'>]</span><span class='comma'>,</span>
|
|
449
|
-
<span class='label'>fl:</span> <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:fl</span><span class='rbracket'>]</span>
|
|
450
|
-
<span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_reject'>reject</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_v'>v</span><span class='op'>|</span> <span class='id identifier rubyid_v'>v</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='rbrace'>}</span>
|
|
451
|
-
|
|
452
|
-
<span class='kw'>if</span> <span class='id identifier rubyid_query'>query</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
|
|
453
|
-
<span class='id identifier rubyid_file'>file</span><span class='period'>.</span><span class='id identifier rubyid_url'>url</span>
|
|
454
|
-
<span class='kw'>else</span>
|
|
455
|
-
<span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_file'>file</span><span class='period'>.</span><span class='id identifier rubyid_url'>url</span><span class='embexpr_end'>}</span><span class='tstring_content'>?</span><span class='embexpr_beg'>#{</span><span class='const'>URI</span><span class='period'>.</span><span class='id identifier rubyid_encode_www_form'>encode_www_form</span><span class='lparen'>(</span><span class='id identifier rubyid_query'>query</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span>
|
|
456
|
-
<span class='kw'>end</span>
|
|
457
|
-
<span class='kw'>end</span></pre>
|
|
458
|
-
</td>
|
|
459
|
-
</tr>
|
|
460
|
-
</table>
|
|
461
|
-
</div>
|
|
462
|
-
|
|
463
|
-
</div>
|
|
464
|
-
|
|
465
|
-
</div>
|
|
466
|
-
|
|
467
|
-
<div id="footer">
|
|
468
|
-
Generated on Tue Jul 25 15:15:32 2017 by
|
|
469
|
-
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
470
|
-
0.9.5 (ruby-2.4.1).
|
|
471
|
-
</div>
|
|
472
|
-
|
|
473
|
-
</div>
|
|
474
|
-
</body>
|
|
475
|
-
</html>
|