miniphonic 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +23 -0
  3. data/Gemfile +4 -0
  4. data/Gemfile.lock +34 -0
  5. data/LICENSE +20 -0
  6. data/README.md +145 -0
  7. data/Rakefile +19 -0
  8. data/lib/miniphonic/api_object.rb +96 -0
  9. data/lib/miniphonic/helpers.rb +51 -0
  10. data/lib/miniphonic/info.rb +68 -0
  11. data/lib/miniphonic/preset.rb +17 -0
  12. data/lib/miniphonic/preset_attributes.rb +53 -0
  13. data/lib/miniphonic/production.rb +33 -0
  14. data/lib/miniphonic/production_attributes.rb +66 -0
  15. data/lib/miniphonic/response.rb +5 -0
  16. data/lib/miniphonic/version.rb +3 -0
  17. data/lib/miniphonic.rb +40 -0
  18. data/miniphonic.gemspec +29 -0
  19. data/test/spec/api_object_spec.rb +164 -0
  20. data/test/spec/cassettes/info/algorithms.yml +170 -0
  21. data/test/spec/cassettes/info/info.yml +740 -0
  22. data/test/spec/cassettes/info/output_files.yml +343 -0
  23. data/test/spec/cassettes/info/service_types.yml +263 -0
  24. data/test/spec/cassettes/info/services.yml +125 -0
  25. data/test/spec/cassettes/info/status_codes.yml +70 -0
  26. data/test/spec/cassettes/info/user_info.yml +63 -0
  27. data/test/spec/cassettes/preset/all.yml +795 -0
  28. data/test/spec/cassettes/preset/create.yml +97 -0
  29. data/test/spec/cassettes/preset/delete.yml +142 -0
  30. data/test/spec/cassettes/preset/upload_cover.yml +484 -0
  31. data/test/spec/cassettes/production/all.yml +6764 -0
  32. data/test/spec/cassettes/production/create.yml +118 -0
  33. data/test/spec/cassettes/production/delete.yml +163 -0
  34. data/test/spec/cassettes/production/start.yml +164 -0
  35. data/test/spec/cassettes/production/upload_audio.yml +20047 -0
  36. data/test/spec/cassettes/production/upload_audio_from_service.yml +233 -0
  37. data/test/spec/cassettes/production/upload_cover.yml +526 -0
  38. data/test/spec/data/test.jpg +0 -0
  39. data/test/spec/data/test.m4a +0 -0
  40. data/test/spec/helper.rb +32 -0
  41. data/test/spec/info_spec.rb +137 -0
  42. data/test/spec/preset_spec.rb +115 -0
  43. data/test/spec/production_spec.rb +181 -0
  44. metadata +223 -0
@@ -0,0 +1,740 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://auphonic.com/api/info.json
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - Faraday v0.8.8
12
+ Authorization:
13
+ - Basic c2lybWFyY2VsOm5hYy1kaWQtY2lkLXlvZC1qYS1zaGxlai15dWwteQ==
14
+ response:
15
+ status:
16
+ code: 200
17
+ message:
18
+ headers:
19
+ server:
20
+ - nginx/1.2.0
21
+ date:
22
+ - Fri, 18 Oct 2013 22:58:42 GMT
23
+ content-type:
24
+ - application/json; charset=utf-8
25
+ transfer-encoding:
26
+ - chunked
27
+ connection:
28
+ - close
29
+ cache-control:
30
+ - max-age=600
31
+ vary:
32
+ - Authorization
33
+ expires:
34
+ - Fri, 18 Oct 2013 23:08:42 GMT
35
+ last-modified:
36
+ - Fri, 18 Oct 2013 22:58:42 GMT
37
+ access-control-allow-origin:
38
+ - '*'
39
+ access-control-allow-credentials:
40
+ - 'true'
41
+ access-control-allow-headers:
42
+ - Authorization,DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type
43
+ body:
44
+ encoding: UTF-8
45
+ string: |-
46
+ {
47
+ "status_code": 200,
48
+ "form_errors": {},
49
+ "error_code": null,
50
+ "error_message": "",
51
+ "data": {
52
+ "output_files": {
53
+ "alac": {
54
+ "display_name": "ALAC (M4A, MP4)",
55
+ "bitrate_strings": [
56
+ "optimal (stereo ~140MB/h, mono ~70MB/h)"
57
+ ],
58
+ "type": "lossless",
59
+ "endings": [
60
+ "m4a",
61
+ "mp4"
62
+ ]
63
+ },
64
+ "aac": {
65
+ "display_name": "AAC (M4A, MP4, M4B)",
66
+ "bitrates": [
67
+ "24",
68
+ "32",
69
+ "40",
70
+ "48",
71
+ "56",
72
+ "64",
73
+ "80",
74
+ "96",
75
+ "112",
76
+ "128",
77
+ "160",
78
+ "192",
79
+ "256"
80
+ ],
81
+ "endings": [
82
+ "m4a",
83
+ "mp4",
84
+ "m4b"
85
+ ],
86
+ "type": "lossy",
87
+ "default_bitrate": "80",
88
+ "bitrate_strings": [
89
+ "24 kbps, HE AAC (~11MB/h)",
90
+ "32 kbps, HE AAC (~14MB/h)",
91
+ "40 kbps, HE AAC (~18MB/h)",
92
+ "48 kbps, HE AAC (~21MB/h)",
93
+ "56 kbps, HE AAC (~25MB/h)",
94
+ "64 kbps, HE AAC (~28MB/h)",
95
+ "80 kbps, HE AAC (~35MB/h)",
96
+ "96 kbps, HE AAC (~42MB/h)",
97
+ "112 kbps, HE AAC (~49MB/h)",
98
+ "128 kbps (~56MB/h)",
99
+ "160 kbps (~70MB/h)",
100
+ "192 kbps (~84MB/h)",
101
+ "256 kbps (~113MB/h)"
102
+ ]
103
+ },
104
+ "descr": {
105
+ "display_name": "Production Description",
106
+ "type": "description",
107
+ "endings": [
108
+ "json",
109
+ "xml",
110
+ "yaml"
111
+ ]
112
+ },
113
+ "waveform": {
114
+ "display_name": "Waveform Image",
115
+ "type": "description",
116
+ "endings": [
117
+ "waveform.png"
118
+ ]
119
+ },
120
+ "psc": {
121
+ "display_name": "Podlove Simple Chapters",
122
+ "type": "description",
123
+ "endings": [
124
+ "psc",
125
+ "xml"
126
+ ]
127
+ },
128
+ "image": {
129
+ "display_name": "Cover Image",
130
+ "type": "description"
131
+ },
132
+ "mp3-vbr": {
133
+ "display_name": "MP3 Variable Bitrate",
134
+ "bitrates": [
135
+ "32",
136
+ "40",
137
+ "48",
138
+ "56",
139
+ "64",
140
+ "80",
141
+ "96",
142
+ "112",
143
+ "128",
144
+ "160",
145
+ "192",
146
+ "224",
147
+ "256",
148
+ "320"
149
+ ],
150
+ "endings": [
151
+ "mp3"
152
+ ],
153
+ "type": "lossy",
154
+ "default_bitrate": "96",
155
+ "bitrate_strings": [
156
+ "~32 kbps (~14MB/h)",
157
+ "~40 kbps (~18MB/h)",
158
+ "~48 kbps (~21MB/h)",
159
+ "~56 kbps (~25MB/h)",
160
+ "~64 kbps (~28MB/h)",
161
+ "~80 kbps (~35MB/h)",
162
+ "~96 kbps (~42MB/h)",
163
+ "~112 kbps (~49MB/h)",
164
+ "~128 kbps (~56MB/h)",
165
+ "~160 kbps (~70MB/h)",
166
+ "~192 kbps (~84MB/h)",
167
+ "~224 kbps (~98MB/h)",
168
+ "~256 kbps (~113MB/h)",
169
+ "~320 kbps (~141MB/h)"
170
+ ]
171
+ },
172
+ "vorbis": {
173
+ "display_name": "Ogg Vorbis",
174
+ "bitrates": [
175
+ "32",
176
+ "40",
177
+ "48",
178
+ "56",
179
+ "64",
180
+ "80",
181
+ "96",
182
+ "112",
183
+ "128",
184
+ "160",
185
+ "192",
186
+ "224",
187
+ "256",
188
+ "320"
189
+ ],
190
+ "endings": [
191
+ "ogg",
192
+ "oga"
193
+ ],
194
+ "type": "lossy",
195
+ "default_bitrate": "96",
196
+ "bitrate_strings": [
197
+ "~32 kbps (~14MB/h)",
198
+ "~40 kbps (~18MB/h)",
199
+ "~48 kbps (~21MB/h)",
200
+ "~56 kbps (~25MB/h)",
201
+ "~64 kbps (~28MB/h)",
202
+ "~80 kbps (~35MB/h)",
203
+ "~96 kbps (~42MB/h)",
204
+ "~112 kbps (~49MB/h)",
205
+ "~128 kbps (~56MB/h)",
206
+ "~160 kbps (~70MB/h)",
207
+ "~192 kbps (~84MB/h)",
208
+ "~224 kbps (~98MB/h)",
209
+ "~256 kbps (~113MB/h)",
210
+ "~320 kbps (~141MB/h)"
211
+ ]
212
+ },
213
+ "opus": {
214
+ "display_name": "Opus",
215
+ "bitrates": [
216
+ "6",
217
+ "12",
218
+ "16",
219
+ "20",
220
+ "24",
221
+ "32",
222
+ "40",
223
+ "48",
224
+ "56",
225
+ "64",
226
+ "80",
227
+ "96",
228
+ "112",
229
+ "128",
230
+ "160",
231
+ "192",
232
+ "256"
233
+ ],
234
+ "endings": [
235
+ "opus"
236
+ ],
237
+ "type": "lossy",
238
+ "default_bitrate": "64",
239
+ "bitrate_strings": [
240
+ "~6 kbps (~3MB/h)",
241
+ "~12 kbps (~5MB/h)",
242
+ "~16 kbps (~7MB/h)",
243
+ "~20 kbps (~9MB/h)",
244
+ "~24 kbps (~11MB/h)",
245
+ "~32 kbps (~14MB/h)",
246
+ "~40 kbps (~18MB/h)",
247
+ "~48 kbps (~21MB/h)",
248
+ "~56 kbps (~25MB/h)",
249
+ "~64 kbps (~28MB/h)",
250
+ "~80 kbps (~35MB/h)",
251
+ "~96 kbps (~42MB/h)",
252
+ "~112 kbps (~49MB/h)",
253
+ "~128 kbps (~56MB/h)",
254
+ "~160 kbps (~70MB/h)",
255
+ "~192 kbps (~84MB/h)",
256
+ "~256 kbps (~113MB/h)"
257
+ ]
258
+ },
259
+ "video": {
260
+ "display_name": "Video (same format as input)",
261
+ "type": "video",
262
+ "bitrate_strings": [
263
+ "same bitrate as input"
264
+ ]
265
+ },
266
+ "mp3": {
267
+ "display_name": "MP3",
268
+ "bitrates": [
269
+ "32",
270
+ "40",
271
+ "48",
272
+ "56",
273
+ "64",
274
+ "80",
275
+ "96",
276
+ "112",
277
+ "128",
278
+ "160",
279
+ "192",
280
+ "224",
281
+ "256",
282
+ "320"
283
+ ],
284
+ "endings": [
285
+ "mp3"
286
+ ],
287
+ "type": "lossy",
288
+ "default_bitrate": "112",
289
+ "bitrate_strings": [
290
+ "32 kbps (~14MB/h)",
291
+ "40 kbps (~18MB/h)",
292
+ "48 kbps (~21MB/h)",
293
+ "56 kbps (~25MB/h)",
294
+ "64 kbps (~28MB/h)",
295
+ "80 kbps (~35MB/h)",
296
+ "96 kbps (~42MB/h)",
297
+ "112 kbps (~49MB/h)",
298
+ "128 kbps (~56MB/h)",
299
+ "160 kbps (~70MB/h)",
300
+ "192 kbps (~84MB/h)",
301
+ "224 kbps (~98MB/h)",
302
+ "256 kbps (~113MB/h)",
303
+ "320 kbps (~141MB/h)"
304
+ ]
305
+ },
306
+ "flac": {
307
+ "display_name": "FLAC",
308
+ "bitrate_strings": [
309
+ "optimal (stereo ~130MB/h, mono ~65MB/h)"
310
+ ],
311
+ "type": "lossless",
312
+ "endings": [
313
+ "flac"
314
+ ]
315
+ },
316
+ "input": {
317
+ "display_name": "Unprocessed Input File",
318
+ "type": "description",
319
+ "bitrate_strings": [
320
+ "same bitrate as input"
321
+ ]
322
+ },
323
+ "wav": {
324
+ "display_name": "WAV 16-bit PCM",
325
+ "bitrate_strings": [
326
+ "optimal (stereo ~635MB/h, mono ~318MB/h)"
327
+ ],
328
+ "type": "lossless",
329
+ "endings": [
330
+ "wav"
331
+ ]
332
+ },
333
+ "chaps": {
334
+ "display_name": "Chapters File",
335
+ "type": "description",
336
+ "endings": [
337
+ "chapters.txt"
338
+ ]
339
+ }
340
+ },
341
+ "service_types": {
342
+ "ftp": {
343
+ "display_name": "FTP",
344
+ "parameters": null
345
+ },
346
+ "webdav": {
347
+ "display_name": "WebDAV",
348
+ "parameters": null
349
+ },
350
+ "youtube": {
351
+ "display_name": "YouTube",
352
+ "parameters": {
353
+ "category": {
354
+ "default_value": "",
355
+ "type": "select",
356
+ "display_name": "Category",
357
+ "options": [
358
+ {
359
+ "display_name": "Autos & Vehicles",
360
+ "value": "Autos"
361
+ },
362
+ {
363
+ "display_name": "Comedy",
364
+ "value": "Comedy"
365
+ },
366
+ {
367
+ "display_name": "Education",
368
+ "value": "Education"
369
+ },
370
+ {
371
+ "display_name": "Entertainment",
372
+ "value": "Entertainment"
373
+ },
374
+ {
375
+ "display_name": "Film & Animation",
376
+ "value": "Film"
377
+ },
378
+ {
379
+ "display_name": "Gaming",
380
+ "value": "Games"
381
+ },
382
+ {
383
+ "display_name": "Howto & Style",
384
+ "value": "Howto"
385
+ },
386
+ {
387
+ "display_name": "Music",
388
+ "value": "Music"
389
+ },
390
+ {
391
+ "display_name": "News & Politics",
392
+ "value": "News"
393
+ },
394
+ {
395
+ "display_name": "Nonprofits & Activism",
396
+ "value": "Nonprofit"
397
+ },
398
+ {
399
+ "display_name": "People & Blogs",
400
+ "value": "People"
401
+ },
402
+ {
403
+ "display_name": "Pets & Animals",
404
+ "value": "Animals"
405
+ },
406
+ {
407
+ "display_name": "Science & Technology",
408
+ "value": "Tech"
409
+ },
410
+ {
411
+ "display_name": "Sports",
412
+ "value": "Sports"
413
+ },
414
+ {
415
+ "display_name": "Travel & Events",
416
+ "value": "Travel"
417
+ }
418
+ ]
419
+ },
420
+ "privacy": {
421
+ "default_value": "public",
422
+ "type": "select",
423
+ "display_name": "Privacy",
424
+ "options": [
425
+ {
426
+ "display_name": "Private",
427
+ "value": "private"
428
+ },
429
+ {
430
+ "display_name": "Public",
431
+ "value": "public"
432
+ }
433
+ ]
434
+ }
435
+ }
436
+ },
437
+ "libsyn": {
438
+ "display_name": "libsyn",
439
+ "parameters": null
440
+ },
441
+ "archiveorg": {
442
+ "display_name": "ArchiveOrg",
443
+ "parameters": null
444
+ },
445
+ "amazons3": {
446
+ "display_name": "AmazonS3",
447
+ "parameters": null
448
+ },
449
+ "blubrry": {
450
+ "display_name": "blubrry",
451
+ "parameters": null
452
+ },
453
+ "dropbox": {
454
+ "display_name": "Dropbox",
455
+ "parameters": null
456
+ },
457
+ "sftp": {
458
+ "display_name": "SFTP",
459
+ "parameters": null
460
+ },
461
+ "soundcloud": {
462
+ "display_name": "SoundCloud",
463
+ "parameters": {
464
+ "track_type": {
465
+ "default_value": "",
466
+ "type": "select",
467
+ "display_name": "Type",
468
+ "options": [
469
+ {
470
+ "display_name": "",
471
+ "value": ""
472
+ },
473
+ {
474
+ "display_name": "Other",
475
+ "value": "other"
476
+ },
477
+ {
478
+ "display_name": "One Shot Sample",
479
+ "value": "sample"
480
+ },
481
+ {
482
+ "display_name": "Sound Effect",
483
+ "value": "sound effect"
484
+ },
485
+ {
486
+ "display_name": "Loop",
487
+ "value": "loop"
488
+ },
489
+ {
490
+ "display_name": "Stem",
491
+ "value": "stem"
492
+ },
493
+ {
494
+ "display_name": "Work in Progress",
495
+ "value": "in progress"
496
+ },
497
+ {
498
+ "display_name": "Demo",
499
+ "value": "demo"
500
+ },
501
+ {
502
+ "display_name": "Podcast",
503
+ "value": "podcast"
504
+ },
505
+ {
506
+ "display_name": "Spoken",
507
+ "value": "spoken"
508
+ },
509
+ {
510
+ "display_name": "Recording",
511
+ "value": "recording"
512
+ },
513
+ {
514
+ "display_name": "Live",
515
+ "value": "live"
516
+ },
517
+ {
518
+ "display_name": "Remix",
519
+ "value": "remix"
520
+ },
521
+ {
522
+ "display_name": "Original",
523
+ "value": "original"
524
+ }
525
+ ]
526
+ },
527
+ "sharing": {
528
+ "default_value": "public",
529
+ "type": "select",
530
+ "display_name": "Sharing",
531
+ "options": [
532
+ {
533
+ "display_name": "Private",
534
+ "value": "private"
535
+ },
536
+ {
537
+ "display_name": "Public",
538
+ "value": "public"
539
+ }
540
+ ]
541
+ },
542
+ "downloadable": {
543
+ "default_value": true,
544
+ "type": "checkbox",
545
+ "display_name": "Downloadable"
546
+ }
547
+ }
548
+ }
549
+ },
550
+ "production_status": {
551
+ "0": "File Upload",
552
+ "1": "Waiting",
553
+ "2": "Error",
554
+ "3": "Done",
555
+ "4": "Audio Processing",
556
+ "5": "Audio Encoding",
557
+ "6": "Outgoing File Transfer",
558
+ "7": "Audio Mono Mixdown",
559
+ "8": "Splitting Audio On Chapter Marks",
560
+ "9": "Incomplete Form",
561
+ "10": "Production Not Started Yet",
562
+ "11": "Production Outdated",
563
+ "12": "Incoming File Transfer",
564
+ "13": "Stopping the Production"
565
+ },
566
+ "algorithms": {
567
+ "normloudness": {
568
+ "default_value": true,
569
+ "type": "checkbox",
570
+ "display_name": "Global Loudness Normalization",
571
+ "description": "Adjusts the global, overall loudness to the specified Loudness Target, so that all processed files have a similar average loudness."
572
+ },
573
+ "loudnesstarget": {
574
+ "default_value": -16,
575
+ "display_name": "Loudness Target",
576
+ "description": "Select the loudness target in LUFS for Global Loudness Normalization, higher values result in louder audio outputs.",
577
+ "belongs_to": "normloudness",
578
+ "type": "select",
579
+ "options": [
580
+ {
581
+ "display_name": "-13 LUFS (very loud)",
582
+ "value": -13
583
+ },
584
+ {
585
+ "display_name": "-15 LUFS",
586
+ "value": -15
587
+ },
588
+ {
589
+ "display_name": "-16 LUFS (mobile)",
590
+ "value": -16
591
+ },
592
+ {
593
+ "display_name": "-18 LUFS (ReplayGain similarity)",
594
+ "value": -18
595
+ },
596
+ {
597
+ "display_name": "-20 LUFS",
598
+ "value": -20
599
+ },
600
+ {
601
+ "display_name": "-23 LUFS, EBU R128 (TV, Europe)",
602
+ "value": -23
603
+ },
604
+ {
605
+ "display_name": "-24 LUFS, ATSC A/85, no gate (TV, US)",
606
+ "value": -24
607
+ },
608
+ {
609
+ "display_name": "-31 LUFS (very quiet)",
610
+ "value": -31
611
+ }
612
+ ]
613
+ },
614
+ "denoise": {
615
+ "default_value": false,
616
+ "type": "checkbox",
617
+ "display_name": "Noise Reduction ",
618
+ "description": "Classifies regions with different backgrounds and automatically removes noise and hum."
619
+ },
620
+ "denoiseamount": {
621
+ "default_value": 0,
622
+ "display_name": "Noise Reduction Amount",
623
+ "description": "Maximum noise reduction amount, higher values remove more noise. Use Automatic if you are no expert!",
624
+ "belongs_to": "denoise",
625
+ "type": "select",
626
+ "options": [
627
+ {
628
+ "display_name": "Auto",
629
+ "value": 0
630
+ },
631
+ {
632
+ "display_name": "3 dB",
633
+ "value": 3
634
+ },
635
+ {
636
+ "display_name": "6 dB (low)",
637
+ "value": 6
638
+ },
639
+ {
640
+ "display_name": "9 dB",
641
+ "value": 9
642
+ },
643
+ {
644
+ "display_name": "12 dB (medium)",
645
+ "value": 12
646
+ },
647
+ {
648
+ "display_name": "15 dB",
649
+ "value": 15
650
+ },
651
+ {
652
+ "display_name": "18 dB",
653
+ "value": 18
654
+ },
655
+ {
656
+ "display_name": "24 dB (high)",
657
+ "value": 24
658
+ },
659
+ {
660
+ "display_name": "30 dB",
661
+ "value": 30
662
+ },
663
+ {
664
+ "display_name": "100 dB (complete)",
665
+ "value": 100
666
+ }
667
+ ]
668
+ },
669
+ "hipfilter": {
670
+ "default_value": true,
671
+ "type": "checkbox",
672
+ "display_name": "Filtering",
673
+ "description": "Filters unnecessary and disturbing low frequencies depending on the context (speech, music, noise)."
674
+ },
675
+ "leveler": {
676
+ "default_value": true,
677
+ "type": "checkbox",
678
+ "display_name": "Adaptive Leveler",
679
+ "description": "Corrects level differences between speakers, music and speech, etc. to achieve a balanced overall loudness."
680
+ }
681
+ },
682
+ "file_endings": {
683
+ "alac": [
684
+ "m4a",
685
+ "mp4"
686
+ ],
687
+ "descr": [
688
+ "json",
689
+ "xml",
690
+ "yaml"
691
+ ],
692
+ "aac": [
693
+ "m4a",
694
+ "mp4",
695
+ "m4b"
696
+ ],
697
+ "opus": [
698
+ "opus"
699
+ ],
700
+ "psc": [
701
+ "psc",
702
+ "xml"
703
+ ],
704
+ "image": [
705
+ ""
706
+ ],
707
+ "mp3-vbr": [
708
+ "mp3"
709
+ ],
710
+ "vorbis": [
711
+ "ogg",
712
+ "oga"
713
+ ],
714
+ "waveform": [
715
+ "waveform.png"
716
+ ],
717
+ "video": [
718
+ ""
719
+ ],
720
+ "mp3": [
721
+ "mp3"
722
+ ],
723
+ "flac": [
724
+ "flac"
725
+ ],
726
+ "wav": [
727
+ "wav"
728
+ ],
729
+ "input": [
730
+ ""
731
+ ],
732
+ "chaps": [
733
+ "chapters.txt"
734
+ ]
735
+ }
736
+ }
737
+ }
738
+ http_version:
739
+ recorded_at: Fri, 18 Oct 2013 22:58:51 GMT
740
+ recorded_with: VCR 2.6.0