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,97 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://auphonic.com/api/presets.json
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"preset_name":"Test Preset"}'
9
+ headers:
10
+ User-Agent:
11
+ - Faraday v0.8.8
12
+ Authorization:
13
+ - Basic c2lybWFyY2VsOm5hYy1kaWQtY2lkLXlvZC1qYS1zaGxlai15dWwteQ==
14
+ Content-Type:
15
+ - application/json
16
+ response:
17
+ status:
18
+ code: 200
19
+ message:
20
+ headers:
21
+ server:
22
+ - nginx/1.2.0
23
+ date:
24
+ - Fri, 18 Oct 2013 22:58:45 GMT
25
+ content-type:
26
+ - application/json; charset=utf-8
27
+ transfer-encoding:
28
+ - chunked
29
+ connection:
30
+ - close
31
+ cache-control:
32
+ - max-age=0
33
+ vary:
34
+ - Authorization
35
+ expires:
36
+ - Fri, 18 Oct 2013 22:58:45 GMT
37
+ last-modified:
38
+ - Fri, 18 Oct 2013 22:58:45 GMT
39
+ access-control-allow-origin:
40
+ - '*'
41
+ access-control-allow-credentials:
42
+ - 'true'
43
+ access-control-allow-headers:
44
+ - Authorization,DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type
45
+ body:
46
+ encoding: UTF-8
47
+ string: |-
48
+ {
49
+ "status_code": 200,
50
+ "form_errors": {},
51
+ "error_code": null,
52
+ "error_message": "",
53
+ "data": {
54
+ "outgoing_services": [],
55
+ "uuid": "gAqurE7JpDkB858ZBysnER",
56
+ "output_files": [],
57
+ "preset_name": "Test Preset",
58
+ "creation_time": "2013-10-18T22:58:45.596Z",
59
+ "metadata": {
60
+ "album": "",
61
+ "publisher": "",
62
+ "subtitle": "",
63
+ "license": "",
64
+ "artist": "",
65
+ "track": "",
66
+ "title": "",
67
+ "summary": "",
68
+ "append_chapters": false,
69
+ "url": "",
70
+ "license_url": "",
71
+ "location": {
72
+ "latitude": null,
73
+ "longitude": null
74
+ },
75
+ "year": "",
76
+ "genre": "",
77
+ "tags": [
78
+ ""
79
+ ]
80
+ },
81
+ "algorithms": {
82
+ "normloudness": true,
83
+ "loudnesstarget": -16,
84
+ "denoise": false,
85
+ "denoiseamount": 0,
86
+ "hipfilter": true,
87
+ "leveler": true
88
+ },
89
+ "image": null,
90
+ "multi_input_files": [],
91
+ "thumbnail": null,
92
+ "output_basename": ""
93
+ }
94
+ }
95
+ http_version:
96
+ recorded_at: Fri, 18 Oct 2013 22:58:54 GMT
97
+ recorded_with: VCR 2.6.0
@@ -0,0 +1,142 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://auphonic.com/api/presets.json
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"preset_name":"To be deleted"}'
9
+ headers:
10
+ User-Agent:
11
+ - Faraday v0.8.8
12
+ Authorization:
13
+ - Basic c2lybWFyY2VsOm5hYy1kaWQtY2lkLXlvZC1qYS1zaGxlai15dWwteQ==
14
+ Content-Type:
15
+ - application/json
16
+ response:
17
+ status:
18
+ code: 200
19
+ message:
20
+ headers:
21
+ server:
22
+ - nginx/1.2.0
23
+ date:
24
+ - Fri, 18 Oct 2013 22:58:46 GMT
25
+ content-type:
26
+ - application/json; charset=utf-8
27
+ transfer-encoding:
28
+ - chunked
29
+ connection:
30
+ - close
31
+ cache-control:
32
+ - max-age=0
33
+ vary:
34
+ - Authorization
35
+ expires:
36
+ - Fri, 18 Oct 2013 22:58:46 GMT
37
+ last-modified:
38
+ - Fri, 18 Oct 2013 22:58:46 GMT
39
+ access-control-allow-origin:
40
+ - '*'
41
+ access-control-allow-credentials:
42
+ - 'true'
43
+ access-control-allow-headers:
44
+ - Authorization,DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type
45
+ body:
46
+ encoding: UTF-8
47
+ string: |-
48
+ {
49
+ "status_code": 200,
50
+ "form_errors": {},
51
+ "error_code": null,
52
+ "error_message": "",
53
+ "data": {
54
+ "outgoing_services": [],
55
+ "uuid": "zCojJJ8KQqM354hLFPU32o",
56
+ "output_files": [],
57
+ "preset_name": "To be deleted",
58
+ "creation_time": "2013-10-18T22:58:46.421Z",
59
+ "metadata": {
60
+ "album": "",
61
+ "publisher": "",
62
+ "subtitle": "",
63
+ "license": "",
64
+ "artist": "",
65
+ "track": "",
66
+ "title": "",
67
+ "summary": "",
68
+ "append_chapters": false,
69
+ "url": "",
70
+ "license_url": "",
71
+ "location": {
72
+ "latitude": null,
73
+ "longitude": null
74
+ },
75
+ "year": "",
76
+ "genre": "",
77
+ "tags": [
78
+ ""
79
+ ]
80
+ },
81
+ "algorithms": {
82
+ "normloudness": true,
83
+ "loudnesstarget": -16,
84
+ "denoise": false,
85
+ "denoiseamount": 0,
86
+ "hipfilter": true,
87
+ "leveler": true
88
+ },
89
+ "image": null,
90
+ "multi_input_files": [],
91
+ "thumbnail": null,
92
+ "output_basename": ""
93
+ }
94
+ }
95
+ http_version:
96
+ recorded_at: Fri, 18 Oct 2013 22:58:55 GMT
97
+ - request:
98
+ method: delete
99
+ uri: https://auphonic.com/api/preset/zCojJJ8KQqM354hLFPU32o.json
100
+ body:
101
+ encoding: US-ASCII
102
+ string: ''
103
+ headers:
104
+ User-Agent:
105
+ - Faraday v0.8.8
106
+ Authorization:
107
+ - Basic c2lybWFyY2VsOm5hYy1kaWQtY2lkLXlvZC1qYS1zaGxlai15dWwteQ==
108
+ response:
109
+ status:
110
+ code: 204
111
+ message:
112
+ headers:
113
+ server:
114
+ - nginx/1.2.0
115
+ date:
116
+ - Fri, 18 Oct 2013 22:58:47 GMT
117
+ content-type:
118
+ - application/json; charset=utf-8
119
+ content-length:
120
+ - '0'
121
+ connection:
122
+ - close
123
+ expires:
124
+ - Fri, 18 Oct 2013 22:58:47 GMT
125
+ vary:
126
+ - Authorization
127
+ last-modified:
128
+ - Fri, 18 Oct 2013 22:58:47 GMT
129
+ cache-control:
130
+ - max-age=0
131
+ access-control-allow-origin:
132
+ - '*'
133
+ access-control-allow-credentials:
134
+ - 'true'
135
+ access-control-allow-headers:
136
+ - Authorization,DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type
137
+ body:
138
+ encoding: US-ASCII
139
+ string: ''
140
+ http_version:
141
+ recorded_at: Fri, 18 Oct 2013 22:58:55 GMT
142
+ recorded_with: VCR 2.6.0