filestack 2.1.0 → 2.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (48) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +3 -0
  3. data/README.md +2 -2
  4. data/VERSION +1 -1
  5. data/docs/AV.html +557 -0
  6. data/docs/Filestack.html +115 -0
  7. data/docs/Filestack/Ruby.html +115 -0
  8. data/docs/FilestackClient.html +702 -0
  9. data/docs/FilestackCommon.html +884 -0
  10. data/docs/FilestackConfig.html +197 -0
  11. data/docs/FilestackFilelink.html +1277 -0
  12. data/docs/FilestackSecurity.html +654 -0
  13. data/docs/IntelligentState.html +729 -0
  14. data/docs/IntelligentUtils.html +1639 -0
  15. data/docs/MultipartUploadUtils.html +1543 -0
  16. data/docs/Transform.html +1152 -0
  17. data/docs/TransformConfig.html +138 -0
  18. data/docs/TransformUtils.html +272 -0
  19. data/docs/UploadUtils.html +673 -0
  20. data/docs/_index.html +227 -0
  21. data/docs/class_list.html +51 -0
  22. data/docs/css/common.css +1 -0
  23. data/docs/css/full_list.css +58 -0
  24. data/docs/css/style.css +492 -0
  25. data/docs/file.README.html +210 -0
  26. data/docs/file_list.html +56 -0
  27. data/docs/frames.html +17 -0
  28. data/docs/index.html +210 -0
  29. data/docs/js/app.js +248 -0
  30. data/docs/js/full_list.js +216 -0
  31. data/docs/js/jquery.js +4 -0
  32. data/docs/method_list.html +643 -0
  33. data/docs/top-level-namespace.html +145 -0
  34. data/examples/file_transformations.rb +6 -0
  35. data/examples/intelligent_upload.rb +7 -0
  36. data/examples/normal_upload.rb +5 -0
  37. data/examples/upload_external_url.rb +7 -0
  38. data/examples/upload_with_security.rb +6 -0
  39. data/examples/video_convert.rb +10 -0
  40. data/filestack-ruby.gemspec +1 -0
  41. data/lib/filestack/config.rb +9 -5
  42. data/lib/filestack/mixins/filestack_common.rb +17 -1
  43. data/lib/filestack/models/filelink.rb +8 -1
  44. data/lib/filestack/models/filestack_client.rb +17 -3
  45. data/lib/filestack/ruby/version.rb +1 -1
  46. data/lib/filestack/utils/multipart_upload_utils.rb +91 -36
  47. data/lib/filestack/utils/utils.rb +309 -1
  48. metadata +52 -3
@@ -0,0 +1,115 @@
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: Filestack
8
+
9
+ &mdash; Documentation by YARD 0.9.9
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 = "Filestack";
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?1"></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 (F)</a> &raquo;
40
+
41
+
42
+ <span class="title">Filestack</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
+ <div id="content"><h1>Module: Filestack
63
+
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+
70
+
71
+
72
+
73
+
74
+
75
+
76
+
77
+
78
+
79
+ <dl>
80
+ <dt>Defined in:</dt>
81
+ <dd>lib/filestack/ruby/version.rb</dd>
82
+ </dl>
83
+
84
+ </div>
85
+
86
+ <h2>Defined Under Namespace</h2>
87
+ <p class="children">
88
+
89
+
90
+ <strong class="modules">Modules:</strong> <span class='object_link'><a href="Filestack/Ruby.html" title="Filestack::Ruby (module)">Ruby</a></span>
91
+
92
+
93
+
94
+
95
+ </p>
96
+
97
+
98
+
99
+
100
+
101
+
102
+
103
+
104
+
105
+ </div>
106
+
107
+ <div id="footer">
108
+ Generated on Thu Aug 17 10:04:38 2017 by
109
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
110
+ 0.9.9 (ruby-2.4.0).
111
+ </div>
112
+
113
+ </div>
114
+ </body>
115
+ </html>
@@ -0,0 +1,115 @@
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: Filestack::Ruby
8
+
9
+ &mdash; Documentation by YARD 0.9.9
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 = "Filestack::Ruby";
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?1"></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 (R)</a> &raquo;
40
+ <span class='title'><span class='object_link'><a href="../Filestack.html" title="Filestack (module)">Filestack</a></span></span>
41
+ &raquo;
42
+ <span class="title">Ruby</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
+ <div id="content"><h1>Module: Filestack::Ruby
63
+
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+
70
+
71
+
72
+
73
+
74
+
75
+
76
+
77
+
78
+
79
+ <dl>
80
+ <dt>Defined in:</dt>
81
+ <dd>lib/filestack/ruby/version.rb</dd>
82
+ </dl>
83
+
84
+ </div>
85
+
86
+
87
+ <h2>Constant Summary</h2>
88
+ <dl class="constants">
89
+
90
+ <dt id="VERSION-constant" class="">VERSION =
91
+
92
+ </dt>
93
+ <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>2.0.1</span><span class='tstring_end'>&#39;</span></span><span class='period'>.</span><span class='id identifier rubyid_freeze'>freeze</span></pre></dd>
94
+
95
+ </dl>
96
+
97
+
98
+
99
+
100
+
101
+
102
+
103
+
104
+
105
+ </div>
106
+
107
+ <div id="footer">
108
+ Generated on Thu Aug 17 10:04:38 2017 by
109
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
110
+ 0.9.9 (ruby-2.4.0).
111
+ </div>
112
+
113
+ </div>
114
+ </body>
115
+ </html>
@@ -0,0 +1,702 @@
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: FilestackClient
8
+
9
+ &mdash; Documentation by YARD 0.9.9
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 = "FilestackClient";
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?1"></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 (F)</a> &raquo;
40
+
41
+
42
+ <span class="title">FilestackClient</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
+ <div id="content"><h1>Class: FilestackClient
63
+
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+ <dl>
70
+ <dt>Inherits:</dt>
71
+ <dd>
72
+ <span class="inheritName">Object</span>
73
+
74
+ <ul class="fullTree">
75
+ <li>Object</li>
76
+
77
+ <li class="next">FilestackClient</li>
78
+
79
+ </ul>
80
+ <a href="#" class="inheritanceTree">show all</a>
81
+
82
+ </dd>
83
+ </dl>
84
+
85
+
86
+
87
+
88
+
89
+
90
+ <dl>
91
+ <dt>Includes:</dt>
92
+ <dd><span class='object_link'><a href="MultipartUploadUtils.html" title="MultipartUploadUtils (module)">MultipartUploadUtils</a></span>, <span class='object_link'><a href="UploadUtils.html" title="UploadUtils (module)">UploadUtils</a></span></dd>
93
+ </dl>
94
+
95
+
96
+
97
+
98
+
99
+
100
+ <dl>
101
+ <dt>Defined in:</dt>
102
+ <dd>lib/filestack/models/filestack_client.rb</dd>
103
+ </dl>
104
+
105
+ </div>
106
+
107
+ <h2>Overview</h2><div class="docstring">
108
+ <div class="discussion">
109
+
110
+ <p>The Filestack FilestackClient class acts as a hub for all Filestack actions
111
+ that do not require a file handle, including uploading files (both local
112
+ and external), initiating an external transformation, and other tasks</p>
113
+
114
+
115
+ </div>
116
+ </div>
117
+ <div class="tags">
118
+
119
+
120
+ </div>
121
+
122
+
123
+
124
+ <h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
125
+ <ul class="summary">
126
+
127
+ <li class="public ">
128
+ <span class="summary_signature">
129
+
130
+ <a href="#apikey-instance_method" title="#apikey (instance method)">#<strong>apikey</strong> &#x21d2; Object </a>
131
+
132
+
133
+
134
+ </span>
135
+
136
+
137
+
138
+
139
+ <span class="note title readonly">readonly</span>
140
+
141
+
142
+
143
+
144
+
145
+
146
+
147
+
148
+
149
+ <span class="summary_desc"><div class='inline'>
150
+ <p>Returns the value of attribute apikey.</p>
151
+ </div></span>
152
+
153
+ </li>
154
+
155
+
156
+ <li class="public ">
157
+ <span class="summary_signature">
158
+
159
+ <a href="#security-instance_method" title="#security (instance method)">#<strong>security</strong> &#x21d2; Object </a>
160
+
161
+
162
+
163
+ </span>
164
+
165
+
166
+
167
+
168
+ <span class="note title readonly">readonly</span>
169
+
170
+
171
+
172
+
173
+
174
+
175
+
176
+
177
+
178
+ <span class="summary_desc"><div class='inline'>
179
+ <p>Returns the value of attribute security.</p>
180
+ </div></span>
181
+
182
+ </li>
183
+
184
+
185
+ </ul>
186
+
187
+
188
+
189
+
190
+
191
+ <h2>
192
+ Instance Method Summary
193
+ <small><a href="#" class="summary_toggle">collapse</a></small>
194
+ </h2>
195
+
196
+ <ul class="summary">
197
+
198
+ <li class="public ">
199
+ <span class="summary_signature">
200
+
201
+ <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(apikey, security: nil) &#x21d2; FilestackClient </a>
202
+
203
+
204
+
205
+ </span>
206
+
207
+
208
+ <span class="note title constructor">constructor</span>
209
+
210
+
211
+
212
+
213
+
214
+
215
+
216
+
217
+ <span class="summary_desc"><div class='inline'>
218
+ <p>Initialize FilestackClient.</p>
219
+ </div></span>
220
+
221
+ </li>
222
+
223
+
224
+ <li class="public ">
225
+ <span class="summary_signature">
226
+
227
+ <a href="#transform_external-instance_method" title="#transform_external (instance method)">#<strong>transform_external</strong>(external_url) &#x21d2; Filestack::Transform </a>
228
+
229
+
230
+
231
+ </span>
232
+
233
+
234
+
235
+
236
+
237
+
238
+
239
+
240
+
241
+ <span class="summary_desc"><div class='inline'>
242
+ <p>Transform an external URL.</p>
243
+ </div></span>
244
+
245
+ </li>
246
+
247
+
248
+ <li class="public ">
249
+ <span class="summary_signature">
250
+
251
+ <a href="#upload-instance_method" title="#upload (instance method)">#<strong>upload</strong>(filepath: nil, external_url: nil, multipart: true, options: nil, storage: &#39;s3&#39;, intelligent: false, timeout: 60) &#x21d2; Object </a>
252
+
253
+
254
+
255
+ </span>
256
+
257
+
258
+
259
+
260
+
261
+
262
+
263
+
264
+
265
+ <span class="summary_desc"><div class='inline'>
266
+ <p>Upload a local file or external url return [Filestack::FilestackFilelink].</p>
267
+ </div></span>
268
+
269
+ </li>
270
+
271
+
272
+ </ul>
273
+
274
+
275
+
276
+
277
+
278
+
279
+
280
+
281
+
282
+
283
+
284
+ <h3 class="inherited">Methods included from <span class='object_link'><a href="UploadUtils.html" title="UploadUtils (module)">UploadUtils</a></span></h3>
285
+ <p class="inherited"><span class='object_link'><a href="UploadUtils.html#get_url-instance_method" title="UploadUtils#get_url (method)">#get_url</a></span>, <span class='object_link'><a href="UploadUtils.html#make_call-instance_method" title="UploadUtils#make_call (method)">#make_call</a></span>, <span class='object_link'><a href="UploadUtils.html#send_upload-instance_method" title="UploadUtils#send_upload (method)">#send_upload</a></span></p>
286
+
287
+
288
+
289
+
290
+
291
+
292
+
293
+
294
+
295
+ <h3 class="inherited">Methods included from <span class='object_link'><a href="MultipartUploadUtils.html" title="MultipartUploadUtils (module)">MultipartUploadUtils</a></span></h3>
296
+ <p class="inherited"><span class='object_link'><a href="MultipartUploadUtils.html#create_upload_jobs-instance_method" title="MultipartUploadUtils#create_upload_jobs (method)">#create_upload_jobs</a></span>, <span class='object_link'><a href="MultipartUploadUtils.html#get_file_info-instance_method" title="MultipartUploadUtils#get_file_info (method)">#get_file_info</a></span>, <span class='object_link'><a href="MultipartUploadUtils.html#multipart_complete-instance_method" title="MultipartUploadUtils#multipart_complete (method)">#multipart_complete</a></span>, <span class='object_link'><a href="MultipartUploadUtils.html#multipart_start-instance_method" title="MultipartUploadUtils#multipart_start (method)">#multipart_start</a></span>, <span class='object_link'><a href="MultipartUploadUtils.html#multipart_upload-instance_method" title="MultipartUploadUtils#multipart_upload (method)">#multipart_upload</a></span>, <span class='object_link'><a href="MultipartUploadUtils.html#run_uploads-instance_method" title="MultipartUploadUtils#run_uploads (method)">#run_uploads</a></span>, <span class='object_link'><a href="MultipartUploadUtils.html#upload_chunk-instance_method" title="MultipartUploadUtils#upload_chunk (method)">#upload_chunk</a></span></p>
297
+ <div id="constructor_details" class="method_details_list">
298
+ <h2>Constructor Details</h2>
299
+
300
+ <div class="method_details first">
301
+ <h3 class="signature first" id="initialize-instance_method">
302
+
303
+ #<strong>initialize</strong>(apikey, security: nil) &#x21d2; <tt><span class='object_link'><a href="" title="FilestackClient (class)">FilestackClient</a></span></tt>
304
+
305
+
306
+
307
+
308
+
309
+ </h3><div class="docstring">
310
+ <div class="discussion">
311
+
312
+ <p>Initialize FilestackClient</p>
313
+
314
+
315
+ </div>
316
+ </div>
317
+ <div class="tags">
318
+ <p class="tag_title">Parameters:</p>
319
+ <ul class="param">
320
+
321
+ <li>
322
+
323
+ <span class='name'>apikey</span>
324
+
325
+
326
+ <span class='type'>(<tt>String</tt>)</span>
327
+
328
+
329
+
330
+ &mdash;
331
+ <div class='inline'>
332
+ <p>Your Filestack API key</p>
333
+ </div>
334
+
335
+ </li>
336
+
337
+ <li>
338
+
339
+ <span class='name'>security</span>
340
+
341
+
342
+ <span class='type'>(<tt><span class='object_link'><a href="FilestackSecurity.html" title="FilestackSecurity (class)">FilestackSecurity</a></span></tt>)</span>
343
+
344
+
345
+
346
+ &mdash;
347
+ <div class='inline'>
348
+ <p>A Filestack security object, if security is enabled</p>
349
+ </div>
350
+
351
+ </li>
352
+
353
+ </ul>
354
+
355
+
356
+ </div><table class="source_code">
357
+ <tr>
358
+ <td>
359
+ <pre class="lines">
360
+
361
+
362
+ 19
363
+ 20
364
+ 21
365
+ 22</pre>
366
+ </td>
367
+ <td>
368
+ <pre class="code"><span class="info file"># File 'lib/filestack/models/filestack_client.rb', line 19</span>
369
+
370
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_apikey'>apikey</span><span class='comma'>,</span> <span class='label'>security:</span> <span class='kw'>nil</span><span class='rparen'>)</span>
371
+ <span class='ivar'>@apikey</span> <span class='op'>=</span> <span class='id identifier rubyid_apikey'>apikey</span>
372
+ <span class='ivar'>@security</span> <span class='op'>=</span> <span class='id identifier rubyid_security'>security</span>
373
+ <span class='kw'>end</span></pre>
374
+ </td>
375
+ </tr>
376
+ </table>
377
+ </div>
378
+
379
+ </div>
380
+
381
+ <div id="instance_attr_details" class="attr_details">
382
+ <h2>Instance Attribute Details</h2>
383
+
384
+
385
+ <span id=""></span>
386
+ <div class="method_details first">
387
+ <h3 class="signature first" id="apikey-instance_method">
388
+
389
+ #<strong>apikey</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span>
390
+
391
+
392
+
393
+
394
+
395
+ </h3><div class="docstring">
396
+ <div class="discussion">
397
+
398
+ <p>Returns the value of attribute apikey</p>
399
+
400
+
401
+ </div>
402
+ </div>
403
+ <div class="tags">
404
+
405
+
406
+ </div><table class="source_code">
407
+ <tr>
408
+ <td>
409
+ <pre class="lines">
410
+
411
+
412
+ 12
413
+ 13
414
+ 14</pre>
415
+ </td>
416
+ <td>
417
+ <pre class="code"><span class="info file"># File 'lib/filestack/models/filestack_client.rb', line 12</span>
418
+
419
+ <span class='kw'>def</span> <span class='id identifier rubyid_apikey'>apikey</span>
420
+ <span class='ivar'>@apikey</span>
421
+ <span class='kw'>end</span></pre>
422
+ </td>
423
+ </tr>
424
+ </table>
425
+ </div>
426
+
427
+
428
+ <span id=""></span>
429
+ <div class="method_details ">
430
+ <h3 class="signature " id="security-instance_method">
431
+
432
+ #<strong>security</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span>
433
+
434
+
435
+
436
+
437
+
438
+ </h3><div class="docstring">
439
+ <div class="discussion">
440
+
441
+ <p>Returns the value of attribute security</p>
442
+
443
+
444
+ </div>
445
+ </div>
446
+ <div class="tags">
447
+
448
+
449
+ </div><table class="source_code">
450
+ <tr>
451
+ <td>
452
+ <pre class="lines">
453
+
454
+
455
+ 12
456
+ 13
457
+ 14</pre>
458
+ </td>
459
+ <td>
460
+ <pre class="code"><span class="info file"># File 'lib/filestack/models/filestack_client.rb', line 12</span>
461
+
462
+ <span class='kw'>def</span> <span class='id identifier rubyid_security'>security</span>
463
+ <span class='ivar'>@security</span>
464
+ <span class='kw'>end</span></pre>
465
+ </td>
466
+ </tr>
467
+ </table>
468
+ </div>
469
+
470
+ </div>
471
+
472
+
473
+ <div id="instance_method_details" class="method_details_list">
474
+ <h2>Instance Method Details</h2>
475
+
476
+
477
+ <div class="method_details first">
478
+ <h3 class="signature first" id="transform_external-instance_method">
479
+
480
+ #<strong>transform_external</strong>(external_url) &#x21d2; <tt>Filestack::Transform</tt>
481
+
482
+
483
+
484
+
485
+
486
+ </h3><div class="docstring">
487
+ <div class="discussion">
488
+
489
+ <p>Transform an external URL</p>
490
+
491
+
492
+ </div>
493
+ </div>
494
+ <div class="tags">
495
+ <p class="tag_title">Parameters:</p>
496
+ <ul class="param">
497
+
498
+ <li>
499
+
500
+ <span class='name'>external_url</span>
501
+
502
+
503
+ <span class='type'>(<tt>string</tt>)</span>
504
+
505
+
506
+
507
+ &mdash;
508
+ <div class='inline'>
509
+ <p>A valid URL</p>
510
+ </div>
511
+
512
+ </li>
513
+
514
+ </ul>
515
+
516
+ <p class="tag_title">Returns:</p>
517
+ <ul class="return">
518
+
519
+ <li>
520
+
521
+
522
+ <span class='type'>(<tt>Filestack::Transform</tt>)</span>
523
+
524
+
525
+
526
+ </li>
527
+
528
+ </ul>
529
+
530
+ </div><table class="source_code">
531
+ <tr>
532
+ <td>
533
+ <pre class="lines">
534
+
535
+
536
+ 55
537
+ 56
538
+ 57</pre>
539
+ </td>
540
+ <td>
541
+ <pre class="code"><span class="info file"># File 'lib/filestack/models/filestack_client.rb', line 55</span>
542
+
543
+ <span class='kw'>def</span> <span class='id identifier rubyid_transform_external'>transform_external</span><span class='lparen'>(</span><span class='id identifier rubyid_external_url'>external_url</span><span class='rparen'>)</span>
544
+ <span class='const'><span class='object_link'><a href="Transform.html" title="Transform (class)">Transform</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="Transform.html#initialize-instance_method" title="Transform#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='label'>external_url:</span> <span class='id identifier rubyid_external_url'>external_url</span><span class='comma'>,</span> <span class='label'>security:</span> <span class='ivar'>@security</span><span class='comma'>,</span> <span class='label'>apikey:</span> <span class='ivar'>@apikey</span><span class='rparen'>)</span>
545
+ <span class='kw'>end</span></pre>
546
+ </td>
547
+ </tr>
548
+ </table>
549
+ </div>
550
+
551
+ <div class="method_details ">
552
+ <h3 class="signature " id="upload-instance_method">
553
+
554
+ #<strong>upload</strong>(filepath: nil, external_url: nil, multipart: true, options: nil, storage: &#39;s3&#39;, intelligent: false, timeout: 60) &#x21d2; <tt>Object</tt>
555
+
556
+
557
+
558
+
559
+
560
+ </h3><div class="docstring">
561
+ <div class="discussion">
562
+
563
+ <p>Upload a local file or external url return [Filestack::FilestackFilelink]</p>
564
+
565
+
566
+ </div>
567
+ </div>
568
+ <div class="tags">
569
+ <p class="tag_title">Parameters:</p>
570
+ <ul class="param">
571
+
572
+ <li>
573
+
574
+ <span class='name'>filepath</span>
575
+
576
+
577
+ <span class='type'>(<tt>String</tt>)</span>
578
+
579
+
580
+
581
+ &mdash;
582
+ <div class='inline'>
583
+ <p>The path of a local file</p>
584
+ </div>
585
+
586
+ </li>
587
+
588
+ <li>
589
+
590
+ <span class='name'>external_url</span>
591
+
592
+
593
+ <span class='type'>(<tt>String</tt>)</span>
594
+
595
+
596
+
597
+ &mdash;
598
+ <div class='inline'>
599
+ <p>An external URL</p>
600
+ </div>
601
+
602
+ </li>
603
+
604
+ <li>
605
+
606
+ <span class='name'>multipart</span>
607
+
608
+
609
+ <span class='type'>(<tt>Bool</tt>)</span>
610
+
611
+
612
+
613
+ &mdash;
614
+ <div class='inline'>
615
+ <p>Switch for miltipart (Default: true)</p>
616
+ </div>
617
+
618
+ </li>
619
+
620
+ <li>
621
+
622
+ <span class='name'>options</span>
623
+
624
+
625
+ <span class='type'>(<tt>Hash</tt>)</span>
626
+
627
+
628
+
629
+ &mdash;
630
+ <div class='inline'>
631
+ <p>User-supplied upload options</p>
632
+ </div>
633
+
634
+ </li>
635
+
636
+ </ul>
637
+
638
+
639
+ </div><table class="source_code">
640
+ <tr>
641
+ <td>
642
+ <pre class="lines">
643
+
644
+
645
+ 32
646
+ 33
647
+ 34
648
+ 35
649
+ 36
650
+ 37
651
+ 38
652
+ 39
653
+ 40
654
+ 41
655
+ 42
656
+ 43
657
+ 44
658
+ 45
659
+ 46
660
+ 47
661
+ 48
662
+ 49</pre>
663
+ </td>
664
+ <td>
665
+ <pre class="code"><span class="info file"># File 'lib/filestack/models/filestack_client.rb', line 32</span>
666
+
667
+ <span class='kw'>def</span> <span class='id identifier rubyid_upload'>upload</span><span class='lparen'>(</span><span class='label'>filepath:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>external_url:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>multipart:</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='label'>options:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>storage:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>s3</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='label'>intelligent:</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='label'>timeout:</span> <span class='int'>60</span><span class='rparen'>)</span>
668
+ <span class='kw'>if</span> <span class='id identifier rubyid_filepath'>filepath</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_external_url'>external_url</span>
669
+ <span class='kw'>return</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>You cannot upload a URL and file at the same time</span><span class='tstring_end'>&#39;</span></span>
670
+ <span class='kw'>end</span>
671
+ <span class='id identifier rubyid_response'>response</span> <span class='op'>=</span> <span class='kw'>if</span> <span class='id identifier rubyid_filepath'>filepath</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_multipart'>multipart</span>
672
+ <span class='id identifier rubyid_multipart_upload'>multipart_upload</span><span class='lparen'>(</span><span class='ivar'>@apikey</span><span class='comma'>,</span> <span class='id identifier rubyid_filepath'>filepath</span><span class='comma'>,</span> <span class='ivar'>@security</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='comma'>,</span> <span class='id identifier rubyid_timeout'>timeout</span><span class='comma'>,</span> <span class='label'>intelligent:</span> <span class='id identifier rubyid_intelligent'>intelligent</span><span class='rparen'>)</span>
673
+ <span class='kw'>else</span>
674
+ <span class='id identifier rubyid_send_upload'><span class='object_link'><a href="UploadUtils.html#send_upload-instance_method" title="UploadUtils#send_upload (method)">send_upload</a></span></span><span class='lparen'>(</span>
675
+ <span class='ivar'>@apikey</span><span class='comma'>,</span>
676
+ <span class='label'>filepath:</span> <span class='id identifier rubyid_filepath'>filepath</span><span class='comma'>,</span>
677
+ <span class='label'>external_url:</span> <span class='id identifier rubyid_external_url'>external_url</span><span class='comma'>,</span>
678
+ <span class='label'>options:</span> <span class='id identifier rubyid_options'>options</span><span class='comma'>,</span>
679
+ <span class='label'>security:</span> <span class='ivar'>@security</span><span class='comma'>,</span>
680
+ <span class='label'>storage:</span> <span class='id identifier rubyid_storage'>storage</span>
681
+ <span class='rparen'>)</span>
682
+ <span class='kw'>end</span>
683
+ <span class='const'><span class='object_link'><a href="FilestackFilelink.html" title="FilestackFilelink (class)">FilestackFilelink</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="FilestackFilelink.html#initialize-instance_method" title="FilestackFilelink#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_response'>response</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>handle</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='label'>security:</span> <span class='ivar'>@security</span><span class='comma'>,</span> <span class='label'>apikey:</span> <span class='ivar'>@apikey</span><span class='rparen'>)</span>
684
+ <span class='kw'>end</span></pre>
685
+ </td>
686
+ </tr>
687
+ </table>
688
+ </div>
689
+
690
+ </div>
691
+
692
+ </div>
693
+
694
+ <div id="footer">
695
+ Generated on Thu Aug 17 10:04:38 2017 by
696
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
697
+ 0.9.9 (ruby-2.4.0).
698
+ </div>
699
+
700
+ </div>
701
+ </body>
702
+ </html>