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,1152 @@
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: Transform
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 = "Transform";
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 (T)</a> &raquo;
40
+
41
+
42
+ <span class="title">Transform</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: Transform
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">Transform</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="TransformUtils.html" title="TransformUtils (module)">TransformUtils</a></span></dd>
93
+ </dl>
94
+
95
+
96
+
97
+
98
+
99
+
100
+ <dl>
101
+ <dt>Defined in:</dt>
102
+ <dd>lib/filestack/models/filestack_transform.rb</dd>
103
+ </dl>
104
+
105
+ </div>
106
+
107
+ <h2>Overview</h2><div class="docstring">
108
+ <div class="discussion">
109
+
110
+ <p>Class for creating transformation chains and storing them to Filestack</p>
111
+
112
+
113
+ </div>
114
+ </div>
115
+ <div class="tags">
116
+
117
+
118
+ </div>
119
+
120
+
121
+
122
+ <h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
123
+ <ul class="summary">
124
+
125
+ <li class="public ">
126
+ <span class="summary_signature">
127
+
128
+ <a href="#external_url-instance_method" title="#external_url (instance method)">#<strong>external_url</strong> &#x21d2; Object </a>
129
+
130
+
131
+
132
+ </span>
133
+
134
+
135
+
136
+
137
+ <span class="note title readonly">readonly</span>
138
+
139
+
140
+
141
+
142
+
143
+
144
+
145
+
146
+
147
+ <span class="summary_desc"><div class='inline'>
148
+ <p>Returns the value of attribute external_url.</p>
149
+ </div></span>
150
+
151
+ </li>
152
+
153
+
154
+ <li class="public ">
155
+ <span class="summary_signature">
156
+
157
+ <a href="#handle-instance_method" title="#handle (instance method)">#<strong>handle</strong> &#x21d2; Object </a>
158
+
159
+
160
+
161
+ </span>
162
+
163
+
164
+
165
+
166
+ <span class="note title readonly">readonly</span>
167
+
168
+
169
+
170
+
171
+
172
+
173
+
174
+
175
+
176
+ <span class="summary_desc"><div class='inline'>
177
+ <p>Returns the value of attribute handle.</p>
178
+ </div></span>
179
+
180
+ </li>
181
+
182
+
183
+ <li class="public ">
184
+ <span class="summary_signature">
185
+
186
+ <a href="#security-instance_method" title="#security (instance method)">#<strong>security</strong> &#x21d2; Object </a>
187
+
188
+
189
+
190
+ </span>
191
+
192
+
193
+
194
+
195
+ <span class="note title readonly">readonly</span>
196
+
197
+
198
+
199
+
200
+
201
+
202
+
203
+
204
+
205
+ <span class="summary_desc"><div class='inline'>
206
+ <p>Returns the value of attribute security.</p>
207
+ </div></span>
208
+
209
+ </li>
210
+
211
+
212
+ </ul>
213
+
214
+
215
+
216
+
217
+
218
+ <h2>
219
+ Instance Method Summary
220
+ <small><a href="#" class="summary_toggle">collapse</a></small>
221
+ </h2>
222
+
223
+ <ul class="summary">
224
+
225
+ <li class="public ">
226
+ <span class="summary_signature">
227
+
228
+ <a href="#av_convert-instance_method" title="#av_convert (instance method)">#<strong>av_convert</strong>(options) &#x21d2; Filestack::AV </a>
229
+
230
+
231
+
232
+ </span>
233
+
234
+
235
+
236
+
237
+
238
+
239
+
240
+
241
+
242
+ <span class="summary_desc"><div class='inline'>
243
+ <p>Converts video or audio based on user-provided parameters.</p>
244
+ </div></span>
245
+
246
+ </li>
247
+
248
+
249
+ <li class="public ">
250
+ <span class="summary_signature">
251
+
252
+ <a href="#debug-instance_method" title="#debug (instance method)">#<strong>debug</strong> &#x21d2; Unirest::Response </a>
253
+
254
+
255
+
256
+ </span>
257
+
258
+
259
+
260
+
261
+
262
+
263
+
264
+
265
+
266
+ <span class="summary_desc"><div class='inline'>
267
+ <p>Add debug parameter to get information on transformation image.</p>
268
+ </div></span>
269
+
270
+ </li>
271
+
272
+
273
+ <li class="public ">
274
+ <span class="summary_signature">
275
+
276
+ <a href="#filetype_conversion-instance_method" title="#filetype_conversion (instance method)">#<strong>filetype_conversion</strong>(options) &#x21d2; Filestack::Transform </a>
277
+
278
+
279
+
280
+ </span>
281
+
282
+
283
+
284
+
285
+
286
+
287
+
288
+
289
+
290
+ <span class="summary_desc"><div class='inline'>
291
+ <p>Converts one filetype to the other.</p>
292
+ </div></span>
293
+
294
+ </li>
295
+
296
+
297
+ <li class="public ">
298
+ <span class="summary_signature">
299
+
300
+ <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(handle: nil, external_url: nil, security: nil, apikey: nil) &#x21d2; Transform </a>
301
+
302
+
303
+
304
+ </span>
305
+
306
+
307
+ <span class="note title constructor">constructor</span>
308
+
309
+
310
+
311
+
312
+
313
+
314
+
315
+
316
+ <span class="summary_desc"><div class='inline'>
317
+ <p>A new instance of Transform.</p>
318
+ </div></span>
319
+
320
+ </li>
321
+
322
+
323
+ <li class="public ">
324
+ <span class="summary_signature">
325
+
326
+ <a href="#method_missing-instance_method" title="#method_missing (instance method)">#<strong>method_missing</strong>(method_name, **args) &#x21d2; Filestack::Transform </a>
327
+
328
+
329
+
330
+ </span>
331
+
332
+
333
+
334
+
335
+
336
+
337
+
338
+
339
+
340
+ <span class="summary_desc"><div class='inline'>
341
+ <p>Catches method calls and checks to see if they exist in transformation
342
+ list.</p>
343
+ </div></span>
344
+
345
+ </li>
346
+
347
+
348
+ <li class="public ">
349
+ <span class="summary_signature">
350
+
351
+ <a href="#respond_to_missing%3F-instance_method" title="#respond_to_missing? (instance method)">#<strong>respond_to_missing?</strong>(method_name) &#x21d2; Boolean </a>
352
+
353
+
354
+
355
+ </span>
356
+
357
+
358
+
359
+
360
+
361
+
362
+
363
+
364
+
365
+ <span class="summary_desc"><div class='inline'>
366
+ <p>Override default method (best practice when overriding method_missing).</p>
367
+ </div></span>
368
+
369
+ </li>
370
+
371
+
372
+ <li class="public ">
373
+ <span class="summary_signature">
374
+
375
+ <a href="#store-instance_method" title="#store (instance method)">#<strong>store</strong> &#x21d2; Filestack::FilestackFilelink </a>
376
+
377
+
378
+
379
+ </span>
380
+
381
+
382
+
383
+
384
+
385
+
386
+
387
+
388
+
389
+ <span class="summary_desc"><div class='inline'>
390
+ <p>Stores a transformation URL and returns a filelink.</p>
391
+ </div></span>
392
+
393
+ </li>
394
+
395
+
396
+ <li class="public ">
397
+ <span class="summary_signature">
398
+
399
+ <a href="#url-instance_method" title="#url (instance method)">#<strong>url</strong> &#x21d2; String </a>
400
+
401
+
402
+
403
+ </span>
404
+
405
+
406
+
407
+
408
+
409
+
410
+
411
+
412
+
413
+ <span class="summary_desc"><div class='inline'>
414
+ <p>Creates a URL based on transformation instance state.</p>
415
+ </div></span>
416
+
417
+ </li>
418
+
419
+
420
+ </ul>
421
+
422
+
423
+
424
+
425
+
426
+
427
+
428
+
429
+
430
+
431
+
432
+ <h3 class="inherited">Methods included from <span class='object_link'><a href="TransformUtils.html" title="TransformUtils (module)">TransformUtils</a></span></h3>
433
+ <p class="inherited"><span class='object_link'><a href="TransformUtils.html#add_transform_task-instance_method" title="TransformUtils#add_transform_task (method)">#add_transform_task</a></span></p>
434
+ <div id="constructor_details" class="method_details_list">
435
+ <h2>Constructor Details</h2>
436
+
437
+ <div class="method_details first">
438
+ <h3 class="signature first" id="initialize-instance_method">
439
+
440
+ #<strong>initialize</strong>(handle: nil, external_url: nil, security: nil, apikey: nil) &#x21d2; <tt><span class='object_link'><a href="" title="Transform (class)">Transform</a></span></tt>
441
+
442
+
443
+
444
+
445
+
446
+ </h3><div class="docstring">
447
+ <div class="discussion">
448
+
449
+ <p>Returns a new instance of Transform</p>
450
+
451
+
452
+ </div>
453
+ </div>
454
+ <div class="tags">
455
+
456
+
457
+ </div><table class="source_code">
458
+ <tr>
459
+ <td>
460
+ <pre class="lines">
461
+
462
+
463
+ 9
464
+ 10
465
+ 11
466
+ 12
467
+ 13
468
+ 14
469
+ 15</pre>
470
+ </td>
471
+ <td>
472
+ <pre class="code"><span class="info file"># File 'lib/filestack/models/filestack_transform.rb', line 9</span>
473
+
474
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='label'>handle:</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'>security:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>apikey:</span> <span class='kw'>nil</span><span class='rparen'>)</span>
475
+ <span class='ivar'>@apikey</span> <span class='op'>=</span> <span class='id identifier rubyid_apikey'>apikey</span>
476
+ <span class='ivar'>@handle</span> <span class='op'>=</span> <span class='id identifier rubyid_handle'>handle</span>
477
+ <span class='ivar'>@external_url</span> <span class='op'>=</span> <span class='id identifier rubyid_external_url'>external_url</span>
478
+ <span class='ivar'>@security</span> <span class='op'>=</span> <span class='id identifier rubyid_security'>security</span>
479
+ <span class='ivar'>@transform_tasks</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
480
+ <span class='kw'>end</span></pre>
481
+ </td>
482
+ </tr>
483
+ </table>
484
+ </div>
485
+
486
+ </div>
487
+ <div id="method_missing_details" class="method_details_list">
488
+ <h2>Dynamic Method Handling</h2>
489
+ <p class="notice this">
490
+ This class handles dynamic methods through the <tt>method_missing</tt> method
491
+
492
+ </p>
493
+
494
+ <div class="method_details first">
495
+ <h3 class="signature first" id="method_missing-instance_method">
496
+
497
+ #<strong>method_missing</strong>(method_name, **args) &#x21d2; <tt>Filestack::Transform</tt>
498
+
499
+
500
+
501
+
502
+
503
+ </h3><div class="docstring">
504
+ <div class="discussion">
505
+
506
+ <p>Catches method calls and checks to see if they exist in transformation list</p>
507
+
508
+ <p>This is to avoid rewriting the same code over and over for transform
509
+ chaining</p>
510
+
511
+
512
+ </div>
513
+ </div>
514
+ <div class="tags">
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
+ &mdash;
527
+ <div class='inline'>
528
+ <p>or Error</p>
529
+ </div>
530
+
531
+ </li>
532
+
533
+ </ul>
534
+
535
+ </div><table class="source_code">
536
+ <tr>
537
+ <td>
538
+ <pre class="lines">
539
+
540
+
541
+ 23
542
+ 24
543
+ 25
544
+ 26
545
+ 27
546
+ 28
547
+ 29
548
+ 30
549
+ 31
550
+ 32</pre>
551
+ </td>
552
+ <td>
553
+ <pre class="code"><span class="info file"># File 'lib/filestack/models/filestack_transform.rb', line 23</span>
554
+
555
+ <span class='kw'>def</span> <span class='id identifier rubyid_method_missing'>method_missing</span><span class='lparen'>(</span><span class='id identifier rubyid_method_name'>method_name</span><span class='comma'>,</span> <span class='op'>**</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
556
+ <span class='kw'>if</span> <span class='const'><span class='object_link'><a href="TransformConfig.html" title="TransformConfig (class)">TransformConfig</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="TransformConfig.html#TRANSFORMATIONS-constant" title="TransformConfig::TRANSFORMATIONS (constant)">TRANSFORMATIONS</a></span></span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span> <span class='id identifier rubyid_method_name'>method_name</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span>
557
+ <span class='ivar'>@transform_tasks</span><span class='period'>.</span><span class='id identifier rubyid_push'>push</span><span class='lparen'>(</span>
558
+ <span class='id identifier rubyid_add_transform_task'>add_transform_task</span><span class='lparen'>(</span><span class='id identifier rubyid_method_name'>method_name</span><span class='comma'>,</span> <span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
559
+ <span class='rparen'>)</span>
560
+ <span class='kw'>self</span>
561
+ <span class='kw'>else</span>
562
+ <span class='kw'>super</span>
563
+ <span class='kw'>end</span>
564
+ <span class='kw'>end</span></pre>
565
+ </td>
566
+ </tr>
567
+ </table>
568
+ </div>
569
+
570
+ </div>
571
+
572
+ <div id="instance_attr_details" class="attr_details">
573
+ <h2>Instance Attribute Details</h2>
574
+
575
+
576
+ <span id=""></span>
577
+ <div class="method_details first">
578
+ <h3 class="signature first" id="external_url-instance_method">
579
+
580
+ #<strong>external_url</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span>
581
+
582
+
583
+
584
+
585
+
586
+ </h3><div class="docstring">
587
+ <div class="discussion">
588
+
589
+ <p>Returns the value of attribute external_url</p>
590
+
591
+
592
+ </div>
593
+ </div>
594
+ <div class="tags">
595
+
596
+
597
+ </div><table class="source_code">
598
+ <tr>
599
+ <td>
600
+ <pre class="lines">
601
+
602
+
603
+ 7
604
+ 8
605
+ 9</pre>
606
+ </td>
607
+ <td>
608
+ <pre class="code"><span class="info file"># File 'lib/filestack/models/filestack_transform.rb', line 7</span>
609
+
610
+ <span class='kw'>def</span> <span class='id identifier rubyid_external_url'>external_url</span>
611
+ <span class='ivar'>@external_url</span>
612
+ <span class='kw'>end</span></pre>
613
+ </td>
614
+ </tr>
615
+ </table>
616
+ </div>
617
+
618
+
619
+ <span id=""></span>
620
+ <div class="method_details ">
621
+ <h3 class="signature " id="handle-instance_method">
622
+
623
+ #<strong>handle</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span>
624
+
625
+
626
+
627
+
628
+
629
+ </h3><div class="docstring">
630
+ <div class="discussion">
631
+
632
+ <p>Returns the value of attribute handle</p>
633
+
634
+
635
+ </div>
636
+ </div>
637
+ <div class="tags">
638
+
639
+
640
+ </div><table class="source_code">
641
+ <tr>
642
+ <td>
643
+ <pre class="lines">
644
+
645
+
646
+ 7
647
+ 8
648
+ 9</pre>
649
+ </td>
650
+ <td>
651
+ <pre class="code"><span class="info file"># File 'lib/filestack/models/filestack_transform.rb', line 7</span>
652
+
653
+ <span class='kw'>def</span> <span class='id identifier rubyid_handle'>handle</span>
654
+ <span class='ivar'>@handle</span>
655
+ <span class='kw'>end</span></pre>
656
+ </td>
657
+ </tr>
658
+ </table>
659
+ </div>
660
+
661
+
662
+ <span id=""></span>
663
+ <div class="method_details ">
664
+ <h3 class="signature " id="security-instance_method">
665
+
666
+ #<strong>security</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span>
667
+
668
+
669
+
670
+
671
+
672
+ </h3><div class="docstring">
673
+ <div class="discussion">
674
+
675
+ <p>Returns the value of attribute security</p>
676
+
677
+
678
+ </div>
679
+ </div>
680
+ <div class="tags">
681
+
682
+
683
+ </div><table class="source_code">
684
+ <tr>
685
+ <td>
686
+ <pre class="lines">
687
+
688
+
689
+ 7
690
+ 8
691
+ 9</pre>
692
+ </td>
693
+ <td>
694
+ <pre class="code"><span class="info file"># File 'lib/filestack/models/filestack_transform.rb', line 7</span>
695
+
696
+ <span class='kw'>def</span> <span class='id identifier rubyid_security'>security</span>
697
+ <span class='ivar'>@security</span>
698
+ <span class='kw'>end</span></pre>
699
+ </td>
700
+ </tr>
701
+ </table>
702
+ </div>
703
+
704
+ </div>
705
+
706
+
707
+ <div id="instance_method_details" class="method_details_list">
708
+ <h2>Instance Method Details</h2>
709
+
710
+
711
+ <div class="method_details first">
712
+ <h3 class="signature first" id="av_convert-instance_method">
713
+
714
+ #<strong>av_convert</strong>(options) &#x21d2; <tt>Filestack::AV</tt>
715
+
716
+
717
+
718
+
719
+
720
+ </h3><div class="docstring">
721
+ <div class="discussion">
722
+
723
+ <p>Converts video or audio based on user-provided parameters</p>
724
+
725
+
726
+ </div>
727
+ </div>
728
+ <div class="tags">
729
+ <p class="tag_title">Parameters:</p>
730
+ <ul class="param">
731
+
732
+ <li>
733
+
734
+ <span class='name'>options</span>
735
+
736
+
737
+ <span class='type'>(<tt>Hash</tt>)</span>
738
+
739
+
740
+
741
+ &mdash;
742
+ <div class='inline'>
743
+ <p>User-provided parameters</p>
744
+ </div>
745
+
746
+ </li>
747
+
748
+ </ul>
749
+
750
+ <p class="tag_title">Returns:</p>
751
+ <ul class="return">
752
+
753
+ <li>
754
+
755
+
756
+ <span class='type'>(<tt>Filestack::AV</tt>)</span>
757
+
758
+
759
+
760
+ </li>
761
+
762
+ </ul>
763
+
764
+ </div><table class="source_code">
765
+ <tr>
766
+ <td>
767
+ <pre class="lines">
768
+
769
+
770
+ 51
771
+ 52
772
+ 53
773
+ 54
774
+ 55
775
+ 56
776
+ 57
777
+ 58
778
+ 59
779
+ 60
780
+ 61
781
+ 62
782
+ 63</pre>
783
+ </td>
784
+ <td>
785
+ <pre class="code"><span class="info file"># File 'lib/filestack/models/filestack_transform.rb', line 51</span>
786
+
787
+ <span class='kw'>def</span> <span class='id identifier rubyid_av_convert'>av_convert</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
788
+ <span class='kw'>if</span> <span class='ivar'>@external_url</span>
789
+ <span class='kw'>return</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>av_convert does not support external URLs. Please upload file first.</span><span class='tstring_end'>&#39;</span></span>
790
+ <span class='kw'>end</span>
791
+ <span class='ivar'>@transform_tasks</span><span class='period'>.</span><span class='id identifier rubyid_push'>push</span><span class='lparen'>(</span>
792
+ <span class='id identifier rubyid_add_transform_task'>add_transform_task</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>video_convert</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
793
+ <span class='rparen'>)</span>
794
+ <span class='id identifier rubyid_response'>response</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="UploadUtils.html" title="UploadUtils (module)">UploadUtils</a></span></span><span class='period'>.</span><span class='id identifier rubyid_make_call'><span class='object_link'><a href="UploadUtils.html#make_call-instance_method" title="UploadUtils#make_call (method)">make_call</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_url'>url</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>post</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
795
+ <span class='kw'>if</span> <span class='id identifier rubyid_response'>response</span><span class='period'>.</span><span class='id identifier rubyid_code'>code</span> <span class='op'>==</span> <span class='int'>200</span>
796
+ <span class='kw'>return</span> <span class='const'><span class='object_link'><a href="AV.html" title="AV (class)">AV</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="AV.html#initialize-instance_method" title="AV#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_url'>url</span><span class='comma'>,</span> <span class='label'>apikey:</span> <span class='ivar'>@apikey</span><span class='comma'>,</span> <span class='label'>security:</span> <span class='ivar'>@security</span><span class='rparen'>)</span>
797
+ <span class='kw'>end</span>
798
+ <span class='id identifier rubyid_response'>response</span><span class='period'>.</span><span class='id identifier rubyid_body'>body</span>
799
+ <span class='kw'>end</span></pre>
800
+ </td>
801
+ </tr>
802
+ </table>
803
+ </div>
804
+
805
+ <div class="method_details ">
806
+ <h3 class="signature " id="debug-instance_method">
807
+
808
+ #<strong>debug</strong> &#x21d2; <tt>Unirest::Response</tt>
809
+
810
+
811
+
812
+
813
+
814
+ </h3><div class="docstring">
815
+ <div class="discussion">
816
+
817
+ <p>Add debug parameter to get information on transformation image</p>
818
+
819
+
820
+ </div>
821
+ </div>
822
+ <div class="tags">
823
+
824
+ <p class="tag_title">Returns:</p>
825
+ <ul class="return">
826
+
827
+ <li>
828
+
829
+
830
+ <span class='type'>(<tt>Unirest::Response</tt>)</span>
831
+
832
+
833
+
834
+ </li>
835
+
836
+ </ul>
837
+
838
+ </div><table class="source_code">
839
+ <tr>
840
+ <td>
841
+ <pre class="lines">
842
+
843
+
844
+ 68
845
+ 69
846
+ 70
847
+ 71
848
+ 72
849
+ 73</pre>
850
+ </td>
851
+ <td>
852
+ <pre class="code"><span class="info file"># File 'lib/filestack/models/filestack_transform.rb', line 68</span>
853
+
854
+ <span class='kw'>def</span> <span class='id identifier rubyid_debug'>debug</span>
855
+ <span class='ivar'>@transform_tasks</span><span class='period'>.</span><span class='id identifier rubyid_push'>push</span><span class='lparen'>(</span>
856
+ <span class='id identifier rubyid_add_transform_task'>add_transform_task</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>debug</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
857
+ <span class='rparen'>)</span>
858
+ <span class='const'><span class='object_link'><a href="UploadUtils.html" title="UploadUtils (module)">UploadUtils</a></span></span><span class='period'>.</span><span class='id identifier rubyid_make_call'><span class='object_link'><a href="UploadUtils.html#make_call-instance_method" title="UploadUtils#make_call (method)">make_call</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_url'>url</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>get</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_body'>body</span>
859
+ <span class='kw'>end</span></pre>
860
+ </td>
861
+ </tr>
862
+ </table>
863
+ </div>
864
+
865
+ <div class="method_details ">
866
+ <h3 class="signature " id="filetype_conversion-instance_method">
867
+
868
+ #<strong>filetype_conversion</strong>(options) &#x21d2; <tt>Filestack::Transform</tt>
869
+
870
+
871
+
872
+
873
+
874
+ </h3><div class="docstring">
875
+ <div class="discussion">
876
+
877
+ <p>Converts one filetype to the other</p>
878
+
879
+
880
+ </div>
881
+ </div>
882
+ <div class="tags">
883
+ <p class="tag_title">Parameters:</p>
884
+ <ul class="param">
885
+
886
+ <li>
887
+
888
+ <span class='name'>options</span>
889
+
890
+
891
+ <span class='type'></span>
892
+
893
+
894
+
895
+ </li>
896
+
897
+ </ul>
898
+
899
+ <p class="tag_title">Returns:</p>
900
+ <ul class="return">
901
+
902
+ <li>
903
+
904
+
905
+ <span class='type'>(<tt>Filestack::Transform</tt>)</span>
906
+
907
+
908
+
909
+ </li>
910
+
911
+ </ul>
912
+
913
+ </div><table class="source_code">
914
+ <tr>
915
+ <td>
916
+ <pre class="lines">
917
+
918
+
919
+ 39
920
+ 40
921
+ 41
922
+ 42
923
+ 43
924
+ 44</pre>
925
+ </td>
926
+ <td>
927
+ <pre class="code"><span class="info file"># File 'lib/filestack/models/filestack_transform.rb', line 39</span>
928
+
929
+ <span class='kw'>def</span> <span class='id identifier rubyid_filetype_conversion'>filetype_conversion</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
930
+ <span class='ivar'>@transform_tasks</span><span class='period'>.</span><span class='id identifier rubyid_push'>push</span><span class='lparen'>(</span>
931
+ <span class='id identifier rubyid_add_transform_task'>add_transform_task</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>output</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
932
+ <span class='rparen'>)</span>
933
+ <span class='kw'>self</span>
934
+ <span class='kw'>end</span></pre>
935
+ </td>
936
+ </tr>
937
+ </table>
938
+ </div>
939
+
940
+ <div class="method_details ">
941
+ <h3 class="signature " id="respond_to_missing?-instance_method">
942
+
943
+ #<strong>respond_to_missing?</strong>(method_name) &#x21d2; <tt>Boolean</tt>
944
+
945
+
946
+
947
+
948
+
949
+ </h3><div class="docstring">
950
+ <div class="discussion">
951
+
952
+ <p>Override default method (best practice when overriding method_missing)</p>
953
+
954
+
955
+ </div>
956
+ </div>
957
+ <div class="tags">
958
+
959
+ <p class="tag_title">Returns:</p>
960
+ <ul class="return">
961
+
962
+ <li>
963
+
964
+
965
+ <span class='type'>(<tt>Boolean</tt>)</span>
966
+
967
+
968
+
969
+ </li>
970
+
971
+ </ul>
972
+
973
+ </div><table class="source_code">
974
+ <tr>
975
+ <td>
976
+ <pre class="lines">
977
+
978
+
979
+ 88
980
+ 89
981
+ 90</pre>
982
+ </td>
983
+ <td>
984
+ <pre class="code"><span class="info file"># File 'lib/filestack/models/filestack_transform.rb', line 88</span>
985
+
986
+ <span class='kw'>def</span> <span class='id identifier rubyid_respond_to_missing?'>respond_to_missing?</span><span class='lparen'>(</span><span class='id identifier rubyid_method_name'>method_name</span><span class='comma'>,</span> <span class='op'>*</span><span class='rparen'>)</span>
987
+ <span class='const'><span class='object_link'><a href="TransformConfig.html" title="TransformConfig (class)">TransformConfig</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="TransformConfig.html#TRANSFORMATIONS-constant" title="TransformConfig::TRANSFORMATIONS (constant)">TRANSFORMATIONS</a></span></span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='id identifier rubyid_method_name'>method_name</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span> <span class='op'>||</span> <span class='kw'>super</span><span class='rparen'>)</span>
988
+ <span class='kw'>end</span></pre>
989
+ </td>
990
+ </tr>
991
+ </table>
992
+ </div>
993
+
994
+ <div class="method_details ">
995
+ <h3 class="signature " id="store-instance_method">
996
+
997
+ #<strong>store</strong> &#x21d2; <tt>Filestack::FilestackFilelink</tt>
998
+
999
+
1000
+
1001
+
1002
+
1003
+ </h3><div class="docstring">
1004
+ <div class="discussion">
1005
+
1006
+ <p>Stores a transformation URL and returns a filelink</p>
1007
+
1008
+
1009
+ </div>
1010
+ </div>
1011
+ <div class="tags">
1012
+
1013
+ <p class="tag_title">Returns:</p>
1014
+ <ul class="return">
1015
+
1016
+ <li>
1017
+
1018
+
1019
+ <span class='type'>(<tt>Filestack::FilestackFilelink</tt>)</span>
1020
+
1021
+
1022
+
1023
+ </li>
1024
+
1025
+ </ul>
1026
+
1027
+ </div><table class="source_code">
1028
+ <tr>
1029
+ <td>
1030
+ <pre class="lines">
1031
+
1032
+
1033
+ 78
1034
+ 79
1035
+ 80
1036
+ 81
1037
+ 82
1038
+ 83
1039
+ 84
1040
+ 85</pre>
1041
+ </td>
1042
+ <td>
1043
+ <pre class="code"><span class="info file"># File 'lib/filestack/models/filestack_transform.rb', line 78</span>
1044
+
1045
+ <span class='kw'>def</span> <span class='id identifier rubyid_store'>store</span>
1046
+ <span class='ivar'>@transform_tasks</span><span class='period'>.</span><span class='id identifier rubyid_push'>push</span><span class='lparen'>(</span>
1047
+ <span class='id identifier rubyid_add_transform_task'>add_transform_task</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>store</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
1048
+ <span class='rparen'>)</span>
1049
+ <span class='id identifier rubyid_response'>response</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="UploadUtils.html" title="UploadUtils (module)">UploadUtils</a></span></span><span class='period'>.</span><span class='id identifier rubyid_make_call'><span class='object_link'><a href="UploadUtils.html#make_call-instance_method" title="UploadUtils#make_call (method)">make_call</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_url'>url</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>get</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
1050
+ <span class='id identifier rubyid_handle'>handle</span> <span class='op'>=</span> <span class='id identifier rubyid_response'>response</span><span class='period'>.</span><span class='id identifier rubyid_body'>body</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>url</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_split'>split</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='period'>.</span><span class='id identifier rubyid_last'>last</span>
1051
+ <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_handle'>handle</span><span class='comma'>,</span> <span class='label'>apikey:</span> <span class='ivar'>@apikey</span><span class='comma'>,</span> <span class='label'>security:</span> <span class='ivar'>@security</span><span class='rparen'>)</span>
1052
+ <span class='kw'>end</span></pre>
1053
+ </td>
1054
+ </tr>
1055
+ </table>
1056
+ </div>
1057
+
1058
+ <div class="method_details ">
1059
+ <h3 class="signature " id="url-instance_method">
1060
+
1061
+ #<strong>url</strong> &#x21d2; <tt>String</tt>
1062
+
1063
+
1064
+
1065
+
1066
+
1067
+ </h3><div class="docstring">
1068
+ <div class="discussion">
1069
+
1070
+ <p>Creates a URL based on transformation instance state</p>
1071
+
1072
+
1073
+ </div>
1074
+ </div>
1075
+ <div class="tags">
1076
+
1077
+ <p class="tag_title">Returns:</p>
1078
+ <ul class="return">
1079
+
1080
+ <li>
1081
+
1082
+
1083
+ <span class='type'>(<tt>String</tt>)</span>
1084
+
1085
+
1086
+
1087
+ </li>
1088
+
1089
+ </ul>
1090
+
1091
+ </div><table class="source_code">
1092
+ <tr>
1093
+ <td>
1094
+ <pre class="lines">
1095
+
1096
+
1097
+ 95
1098
+ 96
1099
+ 97
1100
+ 98
1101
+ 99
1102
+ 100
1103
+ 101
1104
+ 102
1105
+ 103
1106
+ 104
1107
+ 105
1108
+ 106
1109
+ 107
1110
+ 108
1111
+ 109
1112
+ 110
1113
+ 111</pre>
1114
+ </td>
1115
+ <td>
1116
+ <pre class="code"><span class="info file"># File 'lib/filestack/models/filestack_transform.rb', line 95</span>
1117
+
1118
+ <span class='kw'>def</span> <span class='id identifier rubyid_url'>url</span>
1119
+ <span class='id identifier rubyid_base'>base</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='const'><span class='object_link'><a href="FilestackConfig.html" title="FilestackConfig (class)">FilestackConfig</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FilestackConfig.html#CDN_URL-constant" title="FilestackConfig::CDN_URL (constant)">CDN_URL</a></span></span><span class='rbracket'>]</span>
1120
+ <span class='kw'>if</span> <span class='ivar'>@transform_tasks</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>debug</span><span class='tstring_end'>&#39;</span></span>
1121
+ <span class='ivar'>@transform_tasks</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'>debug</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
1122
+ <span class='id identifier rubyid_base'>base</span><span class='period'>.</span><span class='id identifier rubyid_push'>push</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>debug</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
1123
+ <span class='kw'>end</span>
1124
+ <span class='id identifier rubyid_base'>base</span><span class='period'>.</span><span class='id identifier rubyid_push'>push</span><span class='lparen'>(</span><span class='ivar'>@apikey</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='ivar'>@apikey</span> <span class='op'>&amp;&amp;</span> <span class='ivar'>@external_url</span>
1125
+ <span class='kw'>if</span> <span class='ivar'>@security</span>
1126
+ <span class='id identifier rubyid_policy'>policy</span> <span class='op'>=</span> <span class='ivar'>@security</span><span class='period'>.</span><span class='id identifier rubyid_policy'>policy</span>
1127
+ <span class='id identifier rubyid_signature'>signature</span> <span class='op'>=</span> <span class='ivar'>@security</span><span class='period'>.</span><span class='id identifier rubyid_signature'>signature</span>
1128
+ <span class='id identifier rubyid_security_string'>security_string</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>security=policy:</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_policy'>policy</span><span class='embexpr_end'>}</span><span class='tstring_content'>,signature:</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_signature'>signature</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span>
1129
+ <span class='id identifier rubyid_base'>base</span><span class='period'>.</span><span class='id identifier rubyid_push'>push</span><span class='lparen'>(</span><span class='id identifier rubyid_security_string'>security_string</span><span class='rparen'>)</span>
1130
+ <span class='kw'>end</span>
1131
+ <span class='id identifier rubyid_base'>base</span> <span class='op'>+=</span> <span class='ivar'>@transform_tasks</span>
1132
+ <span class='id identifier rubyid_base'>base</span><span class='period'>.</span><span class='id identifier rubyid_push'>push</span><span class='lparen'>(</span><span class='ivar'>@handle</span> <span class='op'>||</span> <span class='ivar'>@external_url</span><span class='rparen'>)</span>
1133
+ <span class='id identifier rubyid_base'>base</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</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>
1134
+ <span class='kw'>end</span></pre>
1135
+ </td>
1136
+ </tr>
1137
+ </table>
1138
+ </div>
1139
+
1140
+ </div>
1141
+
1142
+ </div>
1143
+
1144
+ <div id="footer">
1145
+ Generated on Thu Aug 17 10:04:38 2017 by
1146
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1147
+ 0.9.9 (ruby-2.4.0).
1148
+ </div>
1149
+
1150
+ </div>
1151
+ </body>
1152
+ </html>