contentful 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (76) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +1 -0
  3. data/ChangeLog.md +6 -0
  4. data/Gemfile +5 -0
  5. data/README.md +1 -0
  6. data/contentful.gemspec +1 -1
  7. data/lib/contentful/array.rb +1 -2
  8. data/lib/contentful/asset.rb +3 -3
  9. data/lib/contentful/client.rb +15 -18
  10. data/lib/contentful/content_type.rb +1 -1
  11. data/lib/contentful/dynamic_entry.rb +6 -6
  12. data/lib/contentful/entry.rb +1 -1
  13. data/lib/contentful/error.rb +3 -3
  14. data/lib/contentful/field.rb +1 -1
  15. data/lib/contentful/file.rb +1 -1
  16. data/lib/contentful/link.rb +2 -2
  17. data/lib/contentful/locale.rb +1 -1
  18. data/lib/contentful/location.rb +1 -1
  19. data/lib/contentful/resource.rb +10 -11
  20. data/lib/contentful/resource_builder.rb +63 -39
  21. data/lib/contentful/space.rb +1 -1
  22. data/lib/contentful/support.rb +5 -3
  23. data/lib/contentful/version.rb +1 -1
  24. data/spec/fixtures/json_responses/includes.json +111 -0
  25. data/spec/fixtures/json_responses/link_array.json +43 -0
  26. data/spec/resource_building_spec.rb +20 -0
  27. data/spec/spec_helper.rb +5 -1
  28. metadata +138 -192
  29. data/.README.md.swp +0 -0
  30. data/do_request.sh +0 -5
  31. data/doc/Contentful.html +0 -131
  32. data/doc/Contentful/AccessDenied.html +0 -158
  33. data/doc/Contentful/Array.html +0 -346
  34. data/doc/Contentful/Asset.html +0 -315
  35. data/doc/Contentful/BadRequest.html +0 -158
  36. data/doc/Contentful/Client.html +0 -1407
  37. data/doc/Contentful/ContentType.html +0 -183
  38. data/doc/Contentful/DynamicEntry.html +0 -333
  39. data/doc/Contentful/Entry.html +0 -198
  40. data/doc/Contentful/Error.html +0 -413
  41. data/doc/Contentful/Field.html +0 -161
  42. data/doc/Contentful/File.html +0 -160
  43. data/doc/Contentful/Link.html +0 -275
  44. data/doc/Contentful/Locale.html +0 -161
  45. data/doc/Contentful/NotFound.html +0 -158
  46. data/doc/Contentful/Request.html +0 -669
  47. data/doc/Contentful/Resource.html +0 -606
  48. data/doc/Contentful/Resource/AssetFields.html +0 -413
  49. data/doc/Contentful/Resource/AssetFields/ClassMethods.html +0 -174
  50. data/doc/Contentful/Resource/ClassMethods.html +0 -271
  51. data/doc/Contentful/Resource/Fields.html +0 -398
  52. data/doc/Contentful/Resource/Fields/ClassMethods.html +0 -187
  53. data/doc/Contentful/Resource/SystemProperties.html +0 -444
  54. data/doc/Contentful/Resource/SystemProperties/ClassMethods.html +0 -174
  55. data/doc/Contentful/ResourceBuilder.html +0 -1400
  56. data/doc/Contentful/Response.html +0 -546
  57. data/doc/Contentful/ServerError.html +0 -158
  58. data/doc/Contentful/Space.html +0 -183
  59. data/doc/Contentful/Support.html +0 -198
  60. data/doc/Contentful/Unauthorized.html +0 -158
  61. data/doc/Contentful/UnparsableJson.html +0 -158
  62. data/doc/Contentful/UnparsableResource.html +0 -158
  63. data/doc/_index.html +0 -410
  64. data/doc/class_list.html +0 -54
  65. data/doc/css/common.css +0 -1
  66. data/doc/css/full_list.css +0 -57
  67. data/doc/css/style.css +0 -338
  68. data/doc/file.README.html +0 -214
  69. data/doc/file_list.html +0 -56
  70. data/doc/frames.html +0 -26
  71. data/doc/index.html +0 -214
  72. data/doc/js/app.js +0 -219
  73. data/doc/js/full_list.js +0 -178
  74. data/doc/js/jquery.js +0 -4
  75. data/doc/method_list.html +0 -533
  76. data/doc/top-level-namespace.html +0 -112
@@ -1,161 +0,0 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
- <head>
5
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
- <title>
7
- Class: Contentful::Locale
8
-
9
- &mdash; Documentation by YARD 0.8.7.3
10
-
11
- </title>
12
-
13
- <link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
14
-
15
- <link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
16
-
17
- <script type="text/javascript" charset="utf-8">
18
- hasFrames = window.top.frames.main ? true : false;
19
- relpath = '../';
20
- framesUrl = "../frames.html#!" + escape(window.location.href);
21
- </script>
22
-
23
-
24
- <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
25
-
26
- <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
27
-
28
-
29
- </head>
30
- <body>
31
- <div id="header">
32
- <div id="menu">
33
-
34
- <a href="../_index.html">Index (L)</a> &raquo;
35
- <span class='title'><span class='object_link'><a href="../Contentful.html" title="Contentful (module)">Contentful</a></span></span>
36
- &raquo;
37
- <span class="title">Locale</span>
38
-
39
-
40
- <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
41
- </div>
42
-
43
- <div id="search">
44
-
45
- <a class="full_list_link" id="class_list_link"
46
- href="../class_list.html">
47
- Class List
48
- </a>
49
-
50
- <a class="full_list_link" id="method_list_link"
51
- href="../method_list.html">
52
- Method List
53
- </a>
54
-
55
- <a class="full_list_link" id="file_list_link"
56
- href="../file_list.html">
57
- File List
58
- </a>
59
-
60
- </div>
61
- <div class="clear"></div>
62
- </div>
63
-
64
- <iframe id="search_frame"></iframe>
65
-
66
- <div id="content"><h1>Class: Contentful::Locale
67
-
68
-
69
-
70
- </h1>
71
-
72
- <dl class="box">
73
-
74
- <dt class="r1">Inherits:</dt>
75
- <dd class="r1">
76
- <span class="inheritName">Object</span>
77
-
78
- <ul class="fullTree">
79
- <li>Object</li>
80
-
81
- <li class="next">Contentful::Locale</li>
82
-
83
- </ul>
84
- <a href="#" class="inheritanceTree">show all</a>
85
-
86
- </dd>
87
-
88
-
89
-
90
-
91
-
92
-
93
- <dt class="r2">Includes:</dt>
94
- <dd class="r2"><span class='object_link'><a href="Resource.html" title="Contentful::Resource (module)">Resource</a></span></dd>
95
-
96
-
97
-
98
-
99
-
100
- <dt class="r1 last">Defined in:</dt>
101
- <dd class="r1 last">lib/contentful/locale.rb</dd>
102
-
103
- </dl>
104
- <div class="clear"></div>
105
-
106
- <h2>Overview</h2><div class="docstring">
107
- <div class="discussion">
108
-
109
- <p>A Locale definition as included in Space Read more about Localization at <a
110
- href="https://www.contentful.com/developers/documentation/content-delivery-api/#i18n">www.contentful.com/developers/documentation/content-delivery-api/#i18n</a></p>
111
-
112
-
113
- </div>
114
- </div>
115
- <div class="tags">
116
-
117
-
118
- </div>
119
- <h2>Constant Summary</h2>
120
-
121
-
122
-
123
-
124
- <h2>Constant Summary</h2>
125
-
126
- <h3 class="inherited">Constants included
127
- from <span class='object_link'><a href="Resource.html" title="Contentful::Resource (module)">Resource</a></span></h3>
128
- <p class="inherited"><span class='object_link'><a href="Resource.html#COERCIONS-constant" title="Contentful::Resource::COERCIONS (constant)">Resource::COERCIONS</a></span></p>
129
-
130
-
131
-
132
-
133
- <h2>Instance Attribute Summary</h2>
134
-
135
- <h3 class="inherited">Attributes included from <span class='object_link'><a href="Resource.html" title="Contentful::Resource (module)">Resource</a></span></h3>
136
- <p class="inherited"><span class='object_link'><a href="Resource.html#client-instance_method" title="Contentful::Resource#client (method)">#client</a></span>, <span class='object_link'><a href="Resource.html#properties-instance_method" title="Contentful::Resource#properties (method)">#properties</a></span></p>
137
-
138
-
139
-
140
-
141
-
142
-
143
-
144
-
145
-
146
- <h2>Method Summary</h2>
147
-
148
- <h3 class="inherited">Methods included from <span class='object_link'><a href="Resource.html" title="Contentful::Resource (module)">Resource</a></span></h3>
149
- <p class="inherited"><span class='object_link'><a href="Resource.html#array%3F-instance_method" title="Contentful::Resource#array? (method)">#array?</a></span>, <span class='object_link'><a href="Resource.html#fields-instance_method" title="Contentful::Resource#fields (method)">#fields</a></span>, <span class='object_link'><a href="Resource.html#initialize-instance_method" title="Contentful::Resource#initialize (method)">#initialize</a></span>, <span class='object_link'><a href="Resource.html#inspect-instance_method" title="Contentful::Resource#inspect (method)">#inspect</a></span>, <span class='object_link'><a href="Resource.html#sys-instance_method" title="Contentful::Resource#sys (method)">#sys</a></span></p>
150
-
151
-
152
- </div>
153
-
154
- <div id="footer">
155
- Generated on Tue Mar 11 09:25:52 2014 by
156
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
157
- 0.8.7.3 (ruby-1.9.3).
158
- </div>
159
-
160
- </body>
161
- </html>
@@ -1,158 +0,0 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
- <head>
5
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
- <title>
7
- Exception: Contentful::NotFound
8
-
9
- &mdash; Documentation by YARD 0.8.7.3
10
-
11
- </title>
12
-
13
- <link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
14
-
15
- <link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
16
-
17
- <script type="text/javascript" charset="utf-8">
18
- hasFrames = window.top.frames.main ? true : false;
19
- relpath = '../';
20
- framesUrl = "../frames.html#!" + escape(window.location.href);
21
- </script>
22
-
23
-
24
- <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
25
-
26
- <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
27
-
28
-
29
- </head>
30
- <body>
31
- <div id="header">
32
- <div id="menu">
33
-
34
- <a href="../_index.html">Index (N)</a> &raquo;
35
- <span class='title'><span class='object_link'><a href="../Contentful.html" title="Contentful (module)">Contentful</a></span></span>
36
- &raquo;
37
- <span class="title">NotFound</span>
38
-
39
-
40
- <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
41
- </div>
42
-
43
- <div id="search">
44
-
45
- <a class="full_list_link" id="class_list_link"
46
- href="../class_list.html">
47
- Class List
48
- </a>
49
-
50
- <a class="full_list_link" id="method_list_link"
51
- href="../method_list.html">
52
- Method List
53
- </a>
54
-
55
- <a class="full_list_link" id="file_list_link"
56
- href="../file_list.html">
57
- File List
58
- </a>
59
-
60
- </div>
61
- <div class="clear"></div>
62
- </div>
63
-
64
- <iframe id="search_frame"></iframe>
65
-
66
- <div id="content"><h1>Exception: Contentful::NotFound
67
-
68
-
69
-
70
- </h1>
71
-
72
- <dl class="box">
73
-
74
- <dt class="r1">Inherits:</dt>
75
- <dd class="r1">
76
- <span class="inheritName"><span class='object_link'><a href="Error.html" title="Contentful::Error (class)">Error</a></span></span>
77
-
78
- <ul class="fullTree">
79
- <li>Object</li>
80
-
81
- <li class="next">StandardError</li>
82
-
83
- <li class="next"><span class='object_link'><a href="Error.html" title="Contentful::Error (class)">Error</a></span></li>
84
-
85
- <li class="next">Contentful::NotFound</li>
86
-
87
- </ul>
88
- <a href="#" class="inheritanceTree">show all</a>
89
-
90
- </dd>
91
-
92
-
93
-
94
-
95
-
96
-
97
-
98
-
99
-
100
- <dt class="r2 last">Defined in:</dt>
101
- <dd class="r2 last">lib/contentful/error.rb</dd>
102
-
103
- </dl>
104
- <div class="clear"></div>
105
-
106
- <h2>Overview</h2><div class="docstring">
107
- <div class="discussion">
108
-
109
- <p>404</p>
110
-
111
-
112
- </div>
113
- </div>
114
- <div class="tags">
115
-
116
-
117
- </div>
118
-
119
-
120
-
121
-
122
-
123
- <h2>Instance Attribute Summary</h2>
124
-
125
- <h3 class="inherited">Attributes inherited from <span class='object_link'><a href="Error.html" title="Contentful::Error (class)">Error</a></span></h3>
126
- <p class="inherited"><span class='object_link'><a href="Error.html#response-instance_method" title="Contentful::Error#response (method)">#response</a></span></p>
127
-
128
-
129
-
130
-
131
-
132
-
133
-
134
-
135
-
136
- <h2>Method Summary</h2>
137
-
138
- <h3 class="inherited">Methods inherited from <span class='object_link'><a href="Error.html" title="Contentful::Error (class)">Error</a></span></h3>
139
- <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>
140
-
141
- <div id="constructor_details" class="method_details_list">
142
- <h2>Constructor Details</h2>
143
-
144
- <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>
145
-
146
- </div>
147
-
148
-
149
- </div>
150
-
151
- <div id="footer">
152
- Generated on Tue Mar 11 09:25:52 2014 by
153
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
154
- 0.8.7.3 (ruby-1.9.3).
155
- </div>
156
-
157
- </body>
158
- </html>
@@ -1,669 +0,0 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
- <head>
5
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
- <title>
7
- Class: Contentful::Request
8
-
9
- &mdash; Documentation by YARD 0.8.7.3
10
-
11
- </title>
12
-
13
- <link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
14
-
15
- <link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
16
-
17
- <script type="text/javascript" charset="utf-8">
18
- hasFrames = window.top.frames.main ? true : false;
19
- relpath = '../';
20
- framesUrl = "../frames.html#!" + escape(window.location.href);
21
- </script>
22
-
23
-
24
- <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
25
-
26
- <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
27
-
28
-
29
- </head>
30
- <body>
31
- <div id="header">
32
- <div id="menu">
33
-
34
- <a href="../_index.html">Index (R)</a> &raquo;
35
- <span class='title'><span class='object_link'><a href="../Contentful.html" title="Contentful (module)">Contentful</a></span></span>
36
- &raquo;
37
- <span class="title">Request</span>
38
-
39
-
40
- <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
41
- </div>
42
-
43
- <div id="search">
44
-
45
- <a class="full_list_link" id="class_list_link"
46
- href="../class_list.html">
47
- Class List
48
- </a>
49
-
50
- <a class="full_list_link" id="method_list_link"
51
- href="../method_list.html">
52
- Method List
53
- </a>
54
-
55
- <a class="full_list_link" id="file_list_link"
56
- href="../file_list.html">
57
- File List
58
- </a>
59
-
60
- </div>
61
- <div class="clear"></div>
62
- </div>
63
-
64
- <iframe id="search_frame"></iframe>
65
-
66
- <div id="content"><h1>Class: Contentful::Request
67
-
68
-
69
-
70
- </h1>
71
-
72
- <dl class="box">
73
-
74
- <dt class="r1">Inherits:</dt>
75
- <dd class="r1">
76
- <span class="inheritName">Object</span>
77
-
78
- <ul class="fullTree">
79
- <li>Object</li>
80
-
81
- <li class="next">Contentful::Request</li>
82
-
83
- </ul>
84
- <a href="#" class="inheritanceTree">show all</a>
85
-
86
- </dd>
87
-
88
-
89
-
90
-
91
-
92
-
93
-
94
-
95
-
96
- <dt class="r2 last">Defined in:</dt>
97
- <dd class="r2 last">lib/contentful/request.rb</dd>
98
-
99
- </dl>
100
- <div class="clear"></div>
101
-
102
- <h2>Overview</h2><div class="docstring">
103
- <div class="discussion">
104
-
105
- <p>This object represents a request that is to be made. It gets initialized by
106
- the client with domain specific logic. The client later uses the Request's
107
- #url and #query methods to execute the HTTP request.</p>
108
-
109
-
110
- </div>
111
- </div>
112
- <div class="tags">
113
-
114
-
115
- </div>
116
-
117
-
118
-
119
- <h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
120
- <ul class="summary">
121
-
122
- <li class="public ">
123
- <span class="summary_signature">
124
-
125
- <a href="#client-instance_method" title="#client (instance method)">- (Object) <strong>client</strong> </a>
126
-
127
-
128
-
129
- </span>
130
-
131
-
132
-
133
-
134
- <span class="note title readonly">readonly</span>
135
-
136
-
137
-
138
-
139
-
140
-
141
-
142
-
143
-
144
- <span class="summary_desc"><div class='inline'>
145
- <p>Returns the value of attribute client.</p>
146
- </div></span>
147
-
148
- </li>
149
-
150
-
151
- <li class="public ">
152
- <span class="summary_signature">
153
-
154
- <a href="#id-instance_method" title="#id (instance method)">- (Object) <strong>id</strong> </a>
155
-
156
-
157
-
158
- </span>
159
-
160
-
161
-
162
-
163
- <span class="note title readonly">readonly</span>
164
-
165
-
166
-
167
-
168
-
169
-
170
-
171
-
172
-
173
- <span class="summary_desc"><div class='inline'>
174
- <p>Returns the value of attribute id.</p>
175
- </div></span>
176
-
177
- </li>
178
-
179
-
180
- <li class="public ">
181
- <span class="summary_signature">
182
-
183
- <a href="#query-instance_method" title="#query (instance method)">- (Object) <strong>query</strong> </a>
184
-
185
-
186
-
187
- </span>
188
-
189
-
190
-
191
-
192
- <span class="note title readonly">readonly</span>
193
-
194
-
195
-
196
-
197
-
198
-
199
-
200
-
201
-
202
- <span class="summary_desc"><div class='inline'>
203
- <p>Returns the value of attribute query.</p>
204
- </div></span>
205
-
206
- </li>
207
-
208
-
209
- <li class="public ">
210
- <span class="summary_signature">
211
-
212
- <a href="#type-instance_method" title="#type (instance method)">- (Object) <strong>type</strong> </a>
213
-
214
-
215
-
216
- </span>
217
-
218
-
219
-
220
-
221
- <span class="note title readonly">readonly</span>
222
-
223
-
224
-
225
-
226
-
227
-
228
-
229
-
230
-
231
- <span class="summary_desc"><div class='inline'>
232
- <p>Returns the value of attribute type.</p>
233
- </div></span>
234
-
235
- </li>
236
-
237
-
238
- </ul>
239
-
240
-
241
-
242
-
243
-
244
- <h2>
245
- Instance Method Summary
246
- <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
247
- </h2>
248
-
249
- <ul class="summary">
250
-
251
- <li class="public ">
252
- <span class="summary_signature">
253
-
254
- <a href="#get-instance_method" title="#get (instance method)">- (Object) <strong>get</strong> </a>
255
-
256
-
257
-
258
- </span>
259
-
260
-
261
-
262
-
263
-
264
-
265
-
266
-
267
-
268
- <span class="summary_desc"><div class='inline'>
269
- <p>Delegates the actual HTTP work to the client.</p>
270
- </div></span>
271
-
272
- </li>
273
-
274
-
275
- <li class="public ">
276
- <span class="summary_signature">
277
-
278
- <a href="#initialize-instance_method" title="#initialize (instance method)">- (Request) <strong>initialize</strong>(client, endpoint, query = {}, id = nil) </a>
279
-
280
-
281
-
282
- </span>
283
-
284
-
285
- <span class="note title constructor">constructor</span>
286
-
287
-
288
-
289
-
290
-
291
-
292
-
293
-
294
- <span class="summary_desc"><div class='inline'>
295
- <p>A new instance of Request.</p>
296
- </div></span>
297
-
298
- </li>
299
-
300
-
301
- <li class="public ">
302
- <span class="summary_signature">
303
-
304
- <a href="#url-instance_method" title="#url (instance method)">- (Object) <strong>url</strong> </a>
305
-
306
-
307
-
308
- </span>
309
-
310
-
311
-
312
-
313
-
314
-
315
-
316
-
317
-
318
- <span class="summary_desc"><div class='inline'>
319
- <p>Returns the final URL, relative to a contentful space.</p>
320
- </div></span>
321
-
322
- </li>
323
-
324
-
325
- </ul>
326
-
327
-
328
- <div id="constructor_details" class="method_details_list">
329
- <h2>Constructor Details</h2>
330
-
331
- <div class="method_details first">
332
- <h3 class="signature first" id="initialize-instance_method">
333
-
334
- - (<tt><span class='object_link'><a href="" title="Contentful::Request (class)">Request</a></span></tt>) <strong>initialize</strong>(client, endpoint, query = {}, id = nil)
335
-
336
-
337
-
338
-
339
-
340
- </h3><div class="docstring">
341
- <div class="discussion">
342
-
343
- <p>Returns a new instance of Request</p>
344
-
345
-
346
- </div>
347
- </div>
348
- <div class="tags">
349
-
350
-
351
- </div><table class="source_code">
352
- <tr>
353
- <td>
354
- <pre class="lines">
355
-
356
-
357
- 8
358
- 9
359
- 10
360
- 11
361
- 12
362
- 13
363
- 14
364
- 15
365
- 16
366
- 17
367
- 18
368
- 19
369
- 20</pre>
370
- </td>
371
- <td>
372
- <pre class="code"><span class="info file"># File 'lib/contentful/request.rb', line 8</span>
373
-
374
- <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_client'>client</span><span class='comma'>,</span> <span class='id identifier rubyid_endpoint'>endpoint</span><span class='comma'>,</span> <span class='id identifier rubyid_query'>query</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='comma'>,</span> <span class='id identifier rubyid_id'>id</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
375
- <span class='ivar'>@client</span> <span class='op'>=</span> <span class='id identifier rubyid_client'>client</span>
376
- <span class='ivar'>@endpoint</span> <span class='op'>=</span> <span class='id identifier rubyid_endpoint'>endpoint</span>
377
- <span class='ivar'>@query</span> <span class='op'>=</span> <span class='op'>!</span><span class='id identifier rubyid_query'>query</span> <span class='op'>||</span> <span class='id identifier rubyid_query'>query</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span> <span class='op'>?</span> <span class='kw'>nil</span> <span class='op'>:</span> <span class='id identifier rubyid_query'>query</span>
378
-
379
- <span class='kw'>if</span> <span class='id identifier rubyid_id'>id</span>
380
- <span class='ivar'>@type</span> <span class='op'>=</span> <span class='symbol'>:single</span>
381
- <span class='ivar'>@id</span> <span class='op'>=</span> <span class='const'>URI</span><span class='period'>.</span><span class='id identifier rubyid_escape'>escape</span><span class='lparen'>(</span><span class='id identifier rubyid_id'>id</span><span class='rparen'>)</span>
382
- <span class='kw'>else</span>
383
- <span class='ivar'>@type</span> <span class='op'>=</span> <span class='symbol'>:multi</span>
384
- <span class='ivar'>@id</span> <span class='op'>=</span> <span class='kw'>nil</span>
385
- <span class='kw'>end</span>
386
- <span class='kw'>end</span></pre>
387
- </td>
388
- </tr>
389
- </table>
390
- </div>
391
-
392
- </div>
393
-
394
- <div id="instance_attr_details" class="attr_details">
395
- <h2>Instance Attribute Details</h2>
396
-
397
-
398
- <span id=""></span>
399
- <div class="method_details first">
400
- <h3 class="signature first" id="client-instance_method">
401
-
402
- - (<tt>Object</tt>) <strong>client</strong> <span class="extras">(readonly)</span>
403
-
404
-
405
-
406
-
407
-
408
- </h3><div class="docstring">
409
- <div class="discussion">
410
-
411
- <p>Returns the value of attribute client</p>
412
-
413
-
414
- </div>
415
- </div>
416
- <div class="tags">
417
-
418
-
419
- </div><table class="source_code">
420
- <tr>
421
- <td>
422
- <pre class="lines">
423
-
424
-
425
- 6
426
- 7
427
- 8</pre>
428
- </td>
429
- <td>
430
- <pre class="code"><span class="info file"># File 'lib/contentful/request.rb', line 6</span>
431
-
432
- <span class='kw'>def</span> <span class='id identifier rubyid_client'>client</span>
433
- <span class='ivar'>@client</span>
434
- <span class='kw'>end</span></pre>
435
- </td>
436
- </tr>
437
- </table>
438
- </div>
439
-
440
-
441
- <span id=""></span>
442
- <div class="method_details ">
443
- <h3 class="signature " id="id-instance_method">
444
-
445
- - (<tt>Object</tt>) <strong>id</strong> <span class="extras">(readonly)</span>
446
-
447
-
448
-
449
-
450
-
451
- </h3><div class="docstring">
452
- <div class="discussion">
453
-
454
- <p>Returns the value of attribute id</p>
455
-
456
-
457
- </div>
458
- </div>
459
- <div class="tags">
460
-
461
-
462
- </div><table class="source_code">
463
- <tr>
464
- <td>
465
- <pre class="lines">
466
-
467
-
468
- 6
469
- 7
470
- 8</pre>
471
- </td>
472
- <td>
473
- <pre class="code"><span class="info file"># File 'lib/contentful/request.rb', line 6</span>
474
-
475
- <span class='kw'>def</span> <span class='id identifier rubyid_id'>id</span>
476
- <span class='ivar'>@id</span>
477
- <span class='kw'>end</span></pre>
478
- </td>
479
- </tr>
480
- </table>
481
- </div>
482
-
483
-
484
- <span id=""></span>
485
- <div class="method_details ">
486
- <h3 class="signature " id="query-instance_method">
487
-
488
- - (<tt>Object</tt>) <strong>query</strong> <span class="extras">(readonly)</span>
489
-
490
-
491
-
492
-
493
-
494
- </h3><div class="docstring">
495
- <div class="discussion">
496
-
497
- <p>Returns the value of attribute query</p>
498
-
499
-
500
- </div>
501
- </div>
502
- <div class="tags">
503
-
504
-
505
- </div><table class="source_code">
506
- <tr>
507
- <td>
508
- <pre class="lines">
509
-
510
-
511
- 6
512
- 7
513
- 8</pre>
514
- </td>
515
- <td>
516
- <pre class="code"><span class="info file"># File 'lib/contentful/request.rb', line 6</span>
517
-
518
- <span class='kw'>def</span> <span class='id identifier rubyid_query'>query</span>
519
- <span class='ivar'>@query</span>
520
- <span class='kw'>end</span></pre>
521
- </td>
522
- </tr>
523
- </table>
524
- </div>
525
-
526
-
527
- <span id=""></span>
528
- <div class="method_details ">
529
- <h3 class="signature " id="type-instance_method">
530
-
531
- - (<tt>Object</tt>) <strong>type</strong> <span class="extras">(readonly)</span>
532
-
533
-
534
-
535
-
536
-
537
- </h3><div class="docstring">
538
- <div class="discussion">
539
-
540
- <p>Returns the value of attribute type</p>
541
-
542
-
543
- </div>
544
- </div>
545
- <div class="tags">
546
-
547
-
548
- </div><table class="source_code">
549
- <tr>
550
- <td>
551
- <pre class="lines">
552
-
553
-
554
- 6
555
- 7
556
- 8</pre>
557
- </td>
558
- <td>
559
- <pre class="code"><span class="info file"># File 'lib/contentful/request.rb', line 6</span>
560
-
561
- <span class='kw'>def</span> <span class='id identifier rubyid_type'>type</span>
562
- <span class='ivar'>@type</span>
563
- <span class='kw'>end</span></pre>
564
- </td>
565
- </tr>
566
- </table>
567
- </div>
568
-
569
- </div>
570
-
571
-
572
- <div id="instance_method_details" class="method_details_list">
573
- <h2>Instance Method Details</h2>
574
-
575
-
576
- <div class="method_details first">
577
- <h3 class="signature first" id="get-instance_method">
578
-
579
- - (<tt>Object</tt>) <strong>get</strong>
580
-
581
-
582
-
583
-
584
-
585
- </h3><div class="docstring">
586
- <div class="discussion">
587
-
588
- <p>Delegates the actual HTTP work to the client</p>
589
-
590
-
591
- </div>
592
- </div>
593
- <div class="tags">
594
-
595
-
596
- </div><table class="source_code">
597
- <tr>
598
- <td>
599
- <pre class="lines">
600
-
601
-
602
- 28
603
- 29
604
- 30</pre>
605
- </td>
606
- <td>
607
- <pre class="code"><span class="info file"># File 'lib/contentful/request.rb', line 28</span>
608
-
609
- <span class='kw'>def</span> <span class='id identifier rubyid_get'>get</span>
610
- <span class='id identifier rubyid_client'>client</span><span class='period'>.</span><span class='id identifier rubyid_get'>get</span><span class='lparen'>(</span><span class='kw'>self</span><span class='rparen'>)</span>
611
- <span class='kw'>end</span></pre>
612
- </td>
613
- </tr>
614
- </table>
615
- </div>
616
-
617
- <div class="method_details ">
618
- <h3 class="signature " id="url-instance_method">
619
-
620
- - (<tt>Object</tt>) <strong>url</strong>
621
-
622
-
623
-
624
-
625
-
626
- </h3><div class="docstring">
627
- <div class="discussion">
628
-
629
- <p>Returns the final URL, relative to a contentful space</p>
630
-
631
-
632
- </div>
633
- </div>
634
- <div class="tags">
635
-
636
-
637
- </div><table class="source_code">
638
- <tr>
639
- <td>
640
- <pre class="lines">
641
-
642
-
643
- 23
644
- 24
645
- 25</pre>
646
- </td>
647
- <td>
648
- <pre class="code"><span class="info file"># File 'lib/contentful/request.rb', line 23</span>
649
-
650
- <span class='kw'>def</span> <span class='id identifier rubyid_url'>url</span>
651
- <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='ivar'>@endpoint</span><span class='rbrace'>}</span><span class='embexpr_beg'>#{</span> <span class='ivar'>@type</span> <span class='op'>==</span> <span class='symbol'>:single</span> <span class='op'>?</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_id'>id</span><span class='rbrace'>}</span><span class='tstring_end'>&quot;</span></span> <span class='op'>:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span> <span class='rbrace'>}</span><span class='tstring_end'>&quot;</span></span>
652
- <span class='kw'>end</span></pre>
653
- </td>
654
- </tr>
655
- </table>
656
- </div>
657
-
658
- </div>
659
-
660
- </div>
661
-
662
- <div id="footer">
663
- Generated on Tue Mar 11 09:25:53 2014 by
664
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
665
- 0.8.7.3 (ruby-1.9.3).
666
- </div>
667
-
668
- </body>
669
- </html>