telestream_cloud 1.1.0 → 2.0.0.1

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 (306) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +2 -0
  3. data/README.md +16 -354
  4. data/flip/.gitignore +39 -0
  5. data/flip/.rspec +2 -0
  6. data/flip/.swagger-codegen-ignore +23 -0
  7. data/flip/.swagger-codegen/VERSION +1 -0
  8. data/flip/Gemfile +7 -0
  9. data/flip/README.md +130 -0
  10. data/flip/Rakefile +8 -0
  11. data/flip/docs/CanceledResponse.md +8 -0
  12. data/flip/docs/CloudNotificationSettings.md +11 -0
  13. data/flip/docs/CloudNotificationSettingsEvents.md +11 -0
  14. data/flip/docs/CopyProfileBody.md +9 -0
  15. data/flip/docs/CountResponse.md +8 -0
  16. data/flip/docs/CreateEncodingBody.md +10 -0
  17. data/flip/docs/CreateVideoBody.md +12 -0
  18. data/flip/docs/DeletedResponse.md +8 -0
  19. data/flip/docs/Encoding.md +38 -0
  20. data/flip/docs/EncodingSignedUrl.md +8 -0
  21. data/flip/docs/EncodingSignedUrls.md +8 -0
  22. data/flip/docs/Error.md +9 -0
  23. data/flip/docs/ExtraFile.md +10 -0
  24. data/flip/docs/Factory.md +25 -0
  25. data/flip/docs/FactoryBody.md +23 -0
  26. data/flip/docs/FactoryBodyStorageCredentialAttributes.md +11 -0
  27. data/flip/docs/FactorySync.md +8 -0
  28. data/flip/docs/FactorySyncBody.md +8 -0
  29. data/flip/docs/FlipApi.md +2179 -0
  30. data/flip/docs/PaginatedEncodingsCollection.md +11 -0
  31. data/flip/docs/PaginatedFactoryCollection.md +11 -0
  32. data/flip/docs/PaginatedProfilesCollection.md +11 -0
  33. data/flip/docs/PaginatedVideoCollection.md +11 -0
  34. data/flip/docs/PaginatedWorkflowsCollection.md +11 -0
  35. data/flip/docs/Profile.md +135 -0
  36. data/flip/docs/ProfileBody.md +137 -0
  37. data/flip/docs/ResubmitVideoBody.md +8 -0
  38. data/flip/docs/RetriedResponse.md +8 -0
  39. data/flip/docs/SignedVideoUrl.md +8 -0
  40. data/flip/docs/UpdateEncodingBody.md +9 -0
  41. data/flip/docs/UploadSession.md +13 -0
  42. data/flip/docs/Video.md +31 -0
  43. data/flip/docs/VideoMetadata.md +7 -0
  44. data/flip/docs/VideoUploadBody.md +24 -0
  45. data/flip/git_push.sh +55 -0
  46. data/flip/lib/telestream_cloud_flip.rb +79 -0
  47. data/flip/lib/telestream_cloud_flip/api/flip_api.rb +2385 -0
  48. data/flip/lib/telestream_cloud_flip/api_client.rb +389 -0
  49. data/flip/lib/telestream_cloud_flip/api_error.rb +38 -0
  50. data/flip/lib/telestream_cloud_flip/configuration.rb +209 -0
  51. data/flip/lib/telestream_cloud_flip/models/canceled_response.rb +189 -0
  52. data/flip/lib/telestream_cloud_flip/models/cloud_notification_settings.rb +237 -0
  53. data/flip/lib/telestream_cloud_flip/models/cloud_notification_settings_events.rb +239 -0
  54. data/flip/lib/telestream_cloud_flip/models/copy_profile_body.rb +209 -0
  55. data/flip/lib/telestream_cloud_flip/models/count_response.rb +189 -0
  56. data/flip/lib/telestream_cloud_flip/models/create_encoding_body.rb +214 -0
  57. data/flip/lib/telestream_cloud_flip/models/create_video_body.rb +231 -0
  58. data/flip/lib/telestream_cloud_flip/models/deleted_response.rb +189 -0
  59. data/flip/lib/telestream_cloud_flip/models/encoding.rb +486 -0
  60. data/flip/lib/telestream_cloud_flip/models/encoding_signed_url.rb +189 -0
  61. data/flip/lib/telestream_cloud_flip/models/encoding_signed_urls.rb +191 -0
  62. data/flip/lib/telestream_cloud_flip/models/error.rb +199 -0
  63. data/flip/lib/telestream_cloud_flip/models/extra_file.rb +221 -0
  64. data/flip/lib/telestream_cloud_flip/models/factory.rb +388 -0
  65. data/flip/lib/telestream_cloud_flip/models/factory_body.rb +374 -0
  66. data/flip/lib/telestream_cloud_flip/models/factory_body_storage_credential_attributes.rb +215 -0
  67. data/flip/lib/telestream_cloud_flip/models/factory_sync.rb +222 -0
  68. data/flip/lib/telestream_cloud_flip/models/factory_sync_body.rb +227 -0
  69. data/flip/lib/telestream_cloud_flip/models/paginated_encodings_collection.rb +240 -0
  70. data/flip/lib/telestream_cloud_flip/models/paginated_factory_collection.rb +220 -0
  71. data/flip/lib/telestream_cloud_flip/models/paginated_profiles_collection.rb +220 -0
  72. data/flip/lib/telestream_cloud_flip/models/paginated_video_collection.rb +220 -0
  73. data/flip/lib/telestream_cloud_flip/models/paginated_workflows_collection.rb +220 -0
  74. data/flip/lib/telestream_cloud_flip/models/profile.rb +1777 -0
  75. data/flip/lib/telestream_cloud_flip/models/profile_body.rb +1762 -0
  76. data/flip/lib/telestream_cloud_flip/models/resubmit_video_body.rb +189 -0
  77. data/flip/lib/telestream_cloud_flip/models/retried_response.rb +189 -0
  78. data/flip/lib/telestream_cloud_flip/models/signed_video_url.rb +189 -0
  79. data/flip/lib/telestream_cloud_flip/models/update_encoding_body.rb +199 -0
  80. data/flip/lib/telestream_cloud_flip/models/upload_session.rb +249 -0
  81. data/flip/lib/telestream_cloud_flip/models/video.rb +418 -0
  82. data/flip/lib/telestream_cloud_flip/models/video_metadata.rb +179 -0
  83. data/flip/lib/telestream_cloud_flip/models/video_upload_body.rb +362 -0
  84. data/flip/lib/telestream_cloud_flip/uploader.rb +244 -0
  85. data/flip/lib/telestream_cloud_flip/version.rb +18 -0
  86. data/flip/spec/api/flip_api_spec.rb +550 -0
  87. data/flip/spec/api_client_spec.rb +226 -0
  88. data/flip/spec/configuration_spec.rb +42 -0
  89. data/flip/spec/models/canceled_response_spec.rb +42 -0
  90. data/flip/spec/models/cloud_notification_settings_events_spec.rb +60 -0
  91. data/flip/spec/models/cloud_notification_settings_spec.rb +60 -0
  92. data/flip/spec/models/copy_profile_body_spec.rb +48 -0
  93. data/flip/spec/models/count_response_spec.rb +42 -0
  94. data/flip/spec/models/create_encoding_body_spec.rb +54 -0
  95. data/flip/spec/models/create_video_body_spec.rb +66 -0
  96. data/flip/spec/models/deleted_response_spec.rb +42 -0
  97. data/flip/spec/models/encoding_signed_url_spec.rb +42 -0
  98. data/flip/spec/models/encoding_signed_urls_spec.rb +42 -0
  99. data/flip/spec/models/encoding_spec.rb +222 -0
  100. data/flip/spec/models/error_spec.rb +48 -0
  101. data/flip/spec/models/extra_file_spec.rb +54 -0
  102. data/flip/spec/models/factory_body_spec.rb +136 -0
  103. data/flip/spec/models/factory_body_storage_credential_attributes_spec.rb +60 -0
  104. data/flip/spec/models/factory_spec.rb +148 -0
  105. data/flip/spec/models/factory_sync_body_spec.rb +46 -0
  106. data/flip/spec/models/factory_sync_spec.rb +46 -0
  107. data/flip/spec/models/paginated_encodings_collection_spec.rb +60 -0
  108. data/flip/spec/models/paginated_factory_collection_spec.rb +60 -0
  109. data/flip/spec/models/paginated_profiles_collection_spec.rb +60 -0
  110. data/flip/spec/models/paginated_video_collection_spec.rb +60 -0
  111. data/flip/spec/models/paginated_workflows_collection_spec.rb +60 -0
  112. data/flip/spec/models/profile_body_spec.rb +916 -0
  113. data/flip/spec/models/profile_spec.rb +916 -0
  114. data/flip/spec/models/resubmit_video_body_spec.rb +42 -0
  115. data/flip/spec/models/retried_response_spec.rb +42 -0
  116. data/flip/spec/models/signed_video_url_spec.rb +42 -0
  117. data/flip/spec/models/update_encoding_body_spec.rb +48 -0
  118. data/flip/spec/models/upload_session_spec.rb +72 -0
  119. data/flip/spec/models/video_metadata_spec.rb +36 -0
  120. data/flip/spec/models/video_spec.rb +180 -0
  121. data/flip/spec/models/video_upload_body_spec.rb +138 -0
  122. data/flip/spec/spec_helper.rb +111 -0
  123. data/flip/telestream_cloud_flip.gemspec +47 -0
  124. data/lib/telestream_cloud.rb +0 -31
  125. data/lib/telestream_cloud/flip.rb +1 -9
  126. data/lib/telestream_cloud/qc.rb +1 -0
  127. data/lib/telestream_cloud/tts.rb +1 -0
  128. data/lib/telestream_cloud/version.rb +1 -1
  129. data/qc/.gitignore +39 -0
  130. data/qc/.rspec +2 -0
  131. data/qc/.swagger-codegen-ignore +23 -0
  132. data/qc/.swagger-codegen/VERSION +1 -0
  133. data/qc/Gemfile +7 -0
  134. data/qc/README.md +58 -0
  135. data/qc/Rakefile +8 -0
  136. data/qc/docs/Alert.md +13 -0
  137. data/qc/docs/AudioStream.md +13 -0
  138. data/qc/docs/Container.md +9 -0
  139. data/qc/docs/Data.md +10 -0
  140. data/qc/docs/Data1.md +9 -0
  141. data/qc/docs/ExtraFile.md +10 -0
  142. data/qc/docs/Job.md +12 -0
  143. data/qc/docs/JobData.md +9 -0
  144. data/qc/docs/JobDetails.md +9 -0
  145. data/qc/docs/JobDetailsResult.md +8 -0
  146. data/qc/docs/JobsCollection.md +12 -0
  147. data/qc/docs/Media.md +10 -0
  148. data/qc/docs/Options.md +7 -0
  149. data/qc/docs/Project.md +12 -0
  150. data/qc/docs/Proxy.md +12 -0
  151. data/qc/docs/QcApi.md +719 -0
  152. data/qc/docs/UploadSession.md +13 -0
  153. data/qc/docs/VideoStream.md +13 -0
  154. data/qc/docs/VideoUploadBody.md +12 -0
  155. data/qc/git_push.sh +55 -0
  156. data/qc/lib/telestream_cloud_qc.rb +64 -0
  157. data/qc/lib/telestream_cloud_qc/api/qc_api.rb +781 -0
  158. data/qc/lib/telestream_cloud_qc/api_client.rb +389 -0
  159. data/qc/lib/telestream_cloud_qc/api_error.rb +38 -0
  160. data/qc/lib/telestream_cloud_qc/configuration.rb +209 -0
  161. data/qc/lib/telestream_cloud_qc/models/alert.rb +236 -0
  162. data/qc/lib/telestream_cloud_qc/models/audio_stream.rb +238 -0
  163. data/qc/lib/telestream_cloud_qc/models/container.rb +198 -0
  164. data/qc/lib/telestream_cloud_qc/models/data.rb +208 -0
  165. data/qc/lib/telestream_cloud_qc/models/data_1.rb +197 -0
  166. data/qc/lib/telestream_cloud_qc/models/extra_file.rb +221 -0
  167. data/qc/lib/telestream_cloud_qc/models/job.rb +269 -0
  168. data/qc/lib/telestream_cloud_qc/models/job_data.rb +197 -0
  169. data/qc/lib/telestream_cloud_qc/models/job_details.rb +199 -0
  170. data/qc/lib/telestream_cloud_qc/models/job_details_result.rb +190 -0
  171. data/qc/lib/telestream_cloud_qc/models/jobs_collection.rb +230 -0
  172. data/qc/lib/telestream_cloud_qc/models/media.rb +210 -0
  173. data/qc/lib/telestream_cloud_qc/models/options.rb +179 -0
  174. data/qc/lib/telestream_cloud_qc/models/project.rb +262 -0
  175. data/qc/lib/telestream_cloud_qc/models/proxy.rb +224 -0
  176. data/qc/lib/telestream_cloud_qc/models/upload_session.rb +249 -0
  177. data/qc/lib/telestream_cloud_qc/models/video_stream.rb +235 -0
  178. data/qc/lib/telestream_cloud_qc/models/video_upload_body.rb +242 -0
  179. data/qc/lib/telestream_cloud_qc/uploader.rb +244 -0
  180. data/qc/lib/telestream_cloud_qc/version.rb +18 -0
  181. data/qc/spec/api/qc_api_spec.rb +202 -0
  182. data/qc/spec/api_client_spec.rb +226 -0
  183. data/qc/spec/configuration_spec.rb +42 -0
  184. data/qc/spec/models/alert_spec.rb +72 -0
  185. data/qc/spec/models/audio_stream_spec.rb +72 -0
  186. data/qc/spec/models/container_spec.rb +48 -0
  187. data/qc/spec/models/data_1_spec.rb +48 -0
  188. data/qc/spec/models/data_spec.rb +54 -0
  189. data/qc/spec/models/extra_file_spec.rb +54 -0
  190. data/qc/spec/models/job_data_spec.rb +48 -0
  191. data/qc/spec/models/job_details_result_spec.rb +42 -0
  192. data/qc/spec/models/job_details_spec.rb +48 -0
  193. data/qc/spec/models/job_spec.rb +74 -0
  194. data/qc/spec/models/jobs_collection_spec.rb +66 -0
  195. data/qc/spec/models/media_spec.rb +54 -0
  196. data/qc/spec/models/options_spec.rb +36 -0
  197. data/qc/spec/models/project_spec.rb +70 -0
  198. data/qc/spec/models/proxy_spec.rb +66 -0
  199. data/qc/spec/models/upload_session_spec.rb +72 -0
  200. data/qc/spec/models/video_stream_spec.rb +72 -0
  201. data/qc/spec/models/video_upload_body_spec.rb +66 -0
  202. data/qc/spec/spec_helper.rb +111 -0
  203. data/qc/telestream_cloud_qc.gemspec +47 -0
  204. data/telestream_cloud.gemspec +7 -12
  205. data/tts/.gitignore +39 -0
  206. data/tts/.rspec +2 -0
  207. data/tts/.swagger-codegen-ignore +23 -0
  208. data/tts/.swagger-codegen/VERSION +1 -0
  209. data/tts/Gemfile +7 -0
  210. data/tts/README.md +92 -0
  211. data/tts/Rakefile +8 -0
  212. data/tts/docs/CorporaCollection.md +8 -0
  213. data/tts/docs/Corpus.md +9 -0
  214. data/tts/docs/ErrorResponse.md +7 -0
  215. data/tts/docs/ExtraFile.md +10 -0
  216. data/tts/docs/Fragment.md +10 -0
  217. data/tts/docs/FragmentVariant.md +9 -0
  218. data/tts/docs/Job.md +23 -0
  219. data/tts/docs/JobResult.md +8 -0
  220. data/tts/docs/JobsCollection.md +12 -0
  221. data/tts/docs/Project.md +18 -0
  222. data/tts/docs/ProjectsCollection.md +12 -0
  223. data/tts/docs/Result.md +12 -0
  224. data/tts/docs/TtsApi.md +902 -0
  225. data/tts/docs/UploadSession.md +13 -0
  226. data/tts/docs/VideoUploadBody.md +12 -0
  227. data/tts/git_push.sh +55 -0
  228. data/tts/lib/telestream_cloud_tts.rb +60 -0
  229. data/tts/lib/telestream_cloud_tts/api/tts_api.rb +946 -0
  230. data/tts/lib/telestream_cloud_tts/api_client.rb +389 -0
  231. data/tts/lib/telestream_cloud_tts/api_error.rb +38 -0
  232. data/tts/lib/telestream_cloud_tts/configuration.rb +209 -0
  233. data/tts/lib/telestream_cloud_tts/models/corpora_collection.rb +191 -0
  234. data/tts/lib/telestream_cloud_tts/models/corpus.rb +199 -0
  235. data/tts/lib/telestream_cloud_tts/models/error_response.rb +179 -0
  236. data/tts/lib/telestream_cloud_tts/models/extra_file.rb +221 -0
  237. data/tts/lib/telestream_cloud_tts/models/fragment.rb +211 -0
  238. data/tts/lib/telestream_cloud_tts/models/fragment_variant.rb +199 -0
  239. data/tts/lib/telestream_cloud_tts/models/job.rb +372 -0
  240. data/tts/lib/telestream_cloud_tts/models/job_result.rb +191 -0
  241. data/tts/lib/telestream_cloud_tts/models/jobs_collection.rb +230 -0
  242. data/tts/lib/telestream_cloud_tts/models/project.rb +322 -0
  243. data/tts/lib/telestream_cloud_tts/models/projects_collection.rb +230 -0
  244. data/tts/lib/telestream_cloud_tts/models/result.rb +230 -0
  245. data/tts/lib/telestream_cloud_tts/models/upload_session.rb +249 -0
  246. data/tts/lib/telestream_cloud_tts/models/video_upload_body.rb +241 -0
  247. data/tts/lib/telestream_cloud_tts/uploader.rb +244 -0
  248. data/tts/lib/telestream_cloud_tts/version.rb +18 -0
  249. data/tts/spec/api/tts_api_spec.rb +236 -0
  250. data/tts/spec/api_client_spec.rb +226 -0
  251. data/tts/spec/configuration_spec.rb +42 -0
  252. data/tts/spec/models/corpora_collection_spec.rb +42 -0
  253. data/tts/spec/models/corpus_spec.rb +48 -0
  254. data/tts/spec/models/error_response_spec.rb +36 -0
  255. data/tts/spec/models/extra_file_spec.rb +54 -0
  256. data/tts/spec/models/fragment_spec.rb +54 -0
  257. data/tts/spec/models/fragment_variant_spec.rb +48 -0
  258. data/tts/spec/models/job_result_spec.rb +42 -0
  259. data/tts/spec/models/job_spec.rb +136 -0
  260. data/tts/spec/models/jobs_collection_spec.rb +66 -0
  261. data/tts/spec/models/project_spec.rb +106 -0
  262. data/tts/spec/models/projects_collection_spec.rb +66 -0
  263. data/tts/spec/models/result_spec.rb +66 -0
  264. data/tts/spec/models/upload_session_spec.rb +72 -0
  265. data/tts/spec/models/video_upload_body_spec.rb +66 -0
  266. data/tts/spec/spec_helper.rb +111 -0
  267. data/tts/telestream_cloud_tts.gemspec +47 -0
  268. metadata +281 -123
  269. data/Gemfile +0 -2
  270. data/lib/telestream_cloud/api_authentication.rb +0 -66
  271. data/lib/telestream_cloud/base.rb +0 -111
  272. data/lib/telestream_cloud/config.rb +0 -87
  273. data/lib/telestream_cloud/connection.rb +0 -101
  274. data/lib/telestream_cloud/errors.rb +0 -17
  275. data/lib/telestream_cloud/faraday.rb +0 -84
  276. data/lib/telestream_cloud/modules/associations.rb +0 -55
  277. data/lib/telestream_cloud/modules/builders.rb +0 -45
  278. data/lib/telestream_cloud/modules/destroyers.rb +0 -25
  279. data/lib/telestream_cloud/modules/factory_connection.rb +0 -7
  280. data/lib/telestream_cloud/modules/finders.rb +0 -68
  281. data/lib/telestream_cloud/modules/router.rb +0 -62
  282. data/lib/telestream_cloud/modules/updatable.rb +0 -31
  283. data/lib/telestream_cloud/modules/video_state.rb +0 -16
  284. data/lib/telestream_cloud/parallel_uploader.rb +0 -52
  285. data/lib/telestream_cloud/proxies/encoding_scope.rb +0 -56
  286. data/lib/telestream_cloud/proxies/profile_scope.rb +0 -7
  287. data/lib/telestream_cloud/proxies/proxy.rb +0 -27
  288. data/lib/telestream_cloud/proxies/scope.rb +0 -94
  289. data/lib/telestream_cloud/proxies/video_scope.rb +0 -28
  290. data/lib/telestream_cloud/resources/encoding.rb +0 -47
  291. data/lib/telestream_cloud/resources/factory.rb +0 -72
  292. data/lib/telestream_cloud/resources/profile.rb +0 -22
  293. data/lib/telestream_cloud/resources/resource.rb +0 -48
  294. data/lib/telestream_cloud/resources/video.rb +0 -39
  295. data/lib/telestream_cloud/telestream_cloud.rb +0 -69
  296. data/lib/telestream_cloud/upload_session.rb +0 -40
  297. data/lib/telestream_cloud/uploader.rb +0 -123
  298. data/lib/telestream_cloud/uploader/file_reader.rb +0 -27
  299. data/spec/cloud_spec.rb +0 -132
  300. data/spec/encoding_spec.rb +0 -260
  301. data/spec/heroku_spec.rb +0 -32
  302. data/spec/panda_spec.rb +0 -206
  303. data/spec/profile_spec.rb +0 -117
  304. data/spec/spec_helper.rb +0 -18
  305. data/spec/uploader_spec.rb +0 -143
  306. data/spec/video_spec.rb +0 -399
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bcd0c04f728a476514ec1af7312b4d3e27babfde
4
- data.tar.gz: 253b327eea8a868994a8819b8bbd4b816061b182
3
+ metadata.gz: 183328f6349a6bde6676a5a493eaa0699be6c60b
4
+ data.tar.gz: 1006a618c4c0172c6a1a5a72e4b5c22034ab3efd
5
5
  SHA512:
6
- metadata.gz: b71fa00a53c0b687bad6ae0ec2ce23b56a7ce8ef510211688985684321827f089cd76352c372b86a841a7999d57889c9f8479e71fae6e336b3a106eae46959aa
7
- data.tar.gz: 1b0d873ec086449daa6057faf2b3b805b32bfa8c708fd76c08237718673db1cfd568b4074c201df123b283cd77dd91ec62106d3f6e8c6741652af294211293cd
6
+ metadata.gz: a8f22862b5b4c259678f346c7dc00cf290178970f2b502b1433cc5966898cb6517817768beaabea556c3cbd8c6d3ba9d318478ac155c60a3d02846b3f92683ab
7
+ data.tar.gz: a4f1047a379d285331fc989a53e9b6d8390637797c3d735d6eacba4c4b359861c396ab2adc830efb871b9b33be0c1745cd5c6fa1ad1e96b63569846e8fe5ebe2
data/.gitignore CHANGED
@@ -19,4 +19,6 @@ rdoc
19
19
  pkg
20
20
  Gemfile.lock
21
21
 
22
+ *.gem
23
+
22
24
  ## PROJECT::SPECIFIC
data/README.md CHANGED
@@ -1,366 +1,28 @@
1
- # TelestreamCloud
1
+ # Telestream Cloud API client
2
2
 
3
- TelestreamCloud gem provides an interface to access the [TelestreamCloud](http://cloud.telestream.net) API from Ruby.
3
+ ## Getting Started
4
+ ### Obtain address for TCS api
5
+ In order to use TCS api client first you need to get `ApiKey`. Login to [website](https://cloud.telestream.net/console), go to *Flip* service and open *API Access* tab.
6
+ You account will be identified by unique *Api Key*, if it is unavailable click *Reset* button.
4
7
 
8
+ ### Install
5
9
 
6
- ## Installation
10
+ Add the following line to Gemfile:
7
11
 
8
- gem install telestream_cloud
9
-
10
- ## How to use it
11
-
12
- require 'rubygems'
13
- require 'telestream_cloud'
14
-
15
- ## Faraday Adapter
16
- The gem automatically detects http libraries and sets the default adapter
17
- You can just set the default Panda adapter if you are not happy with the current one.
18
-
19
- TelestreamCloud.default_adapter = :excon
20
-
21
- For rails 4, try the net_http adapter. This fixes disable_ssl_peer_verification related errors caused by the default adapter.
22
-
23
- TelestreamCloud.default_adapter = :net_http
24
-
25
- ### Creating an instance of the client
26
- ```ruby
27
- TelestreamCloud.configure do
28
- access_key "your_access_key"
29
- secret_key "your_secret_key"
30
- # api_host "api.cloud.telestream.net" # this will be set by default
31
- end
32
- ```
33
- or
34
- ```ruby
35
- TelestreamCloud.configure({:access_key => ....})
36
- ```
37
-
38
- If your account uses a different region, set your `api_host` accordingly:
39
-
40
- | Region | api_host |
41
- |---|---|
42
- | gce-us | api.cloud.pandastream.net |
43
- | us | api-us-east.cloud.telestream.net|
44
- | eu | api-eu-west.cloud.telestream.net |
45
-
46
- ### Inside a Rails app with a main account or using Heroku Addon
47
-
48
- Heroku will store your credentials as an environment variable called PANDASTREAM_URL. You can find more information on [Heroku config variable docs](http://docs.heroku.com/config-vars)
49
-
50
- If you use a config file like `config/panda.yml` to support multiple environments, do the following in your `config/initializers/panda.rb` :
51
-
52
- TelestreamCloud.configure((ENV['PANDASTREAM_URL'] || YAML::load_file(File.join(File.dirname(__FILE__),"..", "panda.yml"))[Rails.env]))
53
-
54
- See the [Rails How-to](https://cloud.telestream.net/docs#rails) for more details.
55
-
56
- ### Creating an instance using ONLY with Heroku Addon
57
-
58
- If you don't use a config file and want to simply be setup, do the following (works only on heroku):
59
-
60
- TelestreamCloud.configure_heroku
61
-
62
- ### Typical usage
63
- After initializing your client, you can now select resouce that you want to use. Currently supported resources are:
64
- * `:flip`
65
- * additional resources will be available soon, stay tuned ;)
66
-
67
- ```ruby
68
- flip = TelestreamCloud.resources :flip
69
12
  ```
70
-
71
- ### Factories
72
-
73
- ```ruby
74
- # Accessing Factories
75
- factories = flip.factories.all
76
-
77
- factories.each do |f|
78
- puts "Id: #{f.id}, name: #{f.name}"
79
- end
80
-
81
- # Accessing specific Factory
82
- f1 = flip.factories.all[0]
83
- # or
84
- f2 = flip.factories.find('factory_id')
13
+ gem 'telestream_cloud'
85
14
  ```
86
15
 
87
- ### Videos
88
-
89
- ```ruby
90
- # Retrieving videos
91
- videos = factory.videos.all
92
- videos.first.id
93
- => "abcde"
94
-
95
- videos = factory.videos.all(:page => 2, :per_page => 20)
96
- # or
97
- videos = factory.videos.page(1).per_page(20)
98
- videos.size
99
- => 20
100
-
101
- # Note: maximum :per_page is 100. That's also the default value
16
+ and run bundle install from your shell.
102
17
 
103
- # Get attributes
104
- video.attributes
105
- => {
106
- "id"=>"1234",
107
- "original_filename"=>"panda.mp4",
108
- "source_url"=>"http://www.example.com/original_video.mp4",
109
- "extname"=>".mp4",
110
- "duration"=>14010,
111
- "audio_codec"=>"aac",
112
- "video_codec"=>"h264",
113
- "file_size" => "44000",
114
- "width"=>300,
115
- "height"=>240,
116
- "fps"=>29,
117
- "status"=>"success",
118
- "created_at"=>"2010/01/13 16:45:29 +0000",
119
- "updated_at"=>"2010/01/13 16:45:35 +0000"
120
- }
18
+ To install the gem manually from your shell, run:
121
19
 
122
- # Creating videos from source_url
123
- video = factory.videos.create(:source_url => "http://mywebsite.com/myvideo.mp4")
124
-
125
- # Creating videos from local file
126
- video = factory.videos.create(:file => File.new("/path/to/my/movie.mp4"))
127
-
128
- # Encode video with selected profiles only
129
- video = factory.videos.create(:file => File.new("/path/to/my/movie.mp4"),
130
- :profiles => "h264,webm")
131
-
132
- # Deleting videos
133
- video = factory.videos.find('video-id')
134
- video.delete
135
- => true
136
20
  ```
137
-
138
- ### Parallel and fail-safe upload
139
-
140
- ```ruby
141
- # Create video using parallel uploader
142
-
143
- video = TelestreamCloud::ParallelUploader.upload(
144
- file: File.new('movie.mp4'),
145
- concurrency: 8,
146
- profiles: 'webm'
147
- )
148
-
149
- # Create video using standard uploader
150
- video = TelestreamCloud::Uploader.upload(
151
- file: File.new("/path/to/my/movie.mp4"),
152
- profiles: "h264,webm",
153
- retries: 3
154
- )
155
-
156
- # You can also upload video manually
157
- uploader = TelestreamCloud::Uploader.new(
158
- file: File.new("/path/to/my/movie.mp4"),
159
- profiles: "h264,webm",
160
- )
161
-
162
- uploader.upload(3)
163
- uploader.status # => :success
164
- video = uploader.video
21
+ gem install telestream_cloud
165
22
  ```
166
23
 
167
- ### Encodings
168
-
169
- ```ruby
170
- # Find one encoding
171
- encoding = factory.encodings.find('encoding-id')
172
-
173
- # Find all encodings for one video
174
- video = factory.videos.find('video-id')
175
- encodings = video.encodings.all
176
-
177
- # Find all encodings in one Factory
178
- encodings = factory.encodings.all
179
-
180
- # Using page/per_page
181
- encodings = factory.encodings.page(1).per_page(5)
182
-
183
- # Get only successful encodings
184
- encodings = factory.encodings.all(:status => "success")
185
-
186
- # Access encoding attributes
187
- encoding.attributes
188
- => { ... }
189
-
190
- encoding.encoding_progress
191
- => 60
192
-
193
- encoding.success?
194
- => true
195
-
196
- encoding.processing?
197
- => false
198
-
199
- encoding.fail?
200
- => false
201
-
202
- # Get screenshot url
203
- encoding.screenshots[0]
204
- => http://s3.amazonaws.com/bucket/abcde.jpg
205
-
206
- # Create new encoding for a video that already exists
207
- encoding = factory.encodings.create(:video_id => 1234, :profile_id => 6789)
208
- # or
209
- video.encodings.create(:profile_id => 6789)
210
-
211
- # Delete encoding
212
- encoding = factory.encodings.find('encoding-id')
213
- encoding.delete
214
- => true
215
- ```
216
- ### Profiles
217
-
218
- ```ruby
219
- # Find a profile
220
- profile = factory.profiles.find("profile-id")
221
-
222
- # Get all profiles
223
- profiles = factory.profiles.all
224
-
225
- # Create new profile
226
- profile = factory.profiles.create(:preset_name => "h264")
227
- profile = factory.profiles.create(:command => "ffmpeg -i $input_file$ -y $output_file$", ....)
228
-
229
- # Update a profile
230
- profile = factory.profiles.find("profile-id")
231
- profile.width = 800
232
- profile.height = 600
233
- profile.save
234
- => true
235
-
236
- # Delete a profile
237
- profile = factory.profiles.find("profile-id")
238
- profile.delete
239
- => true
240
- ```
241
-
242
- ## Binding the client to one Factory only
243
-
244
- You can also initialize the client with a specific factory_id. This way you can work with Videos, Encodings and Profiles directly (within the Factory you selected)
245
-
246
- ```ruby
247
- TelestreamCloud.configure do
248
- access_key "your_access_key"
249
- secret_key "your_secret_key"
250
- factory_id "factory_id"
251
- end
252
-
253
- # Get all videos in your factory
254
- videos = TelestreamCloud::Video.all
255
-
256
- # Find Video by id
257
- factory = TelestreamCloud::Video.find('video-id')
258
-
259
- # Create new Video
260
- video = TelestreamCloud::Video.create(:source_url => "http://mywebsite.com/myvideo.mp4")
261
-
262
- # Create new encoding
263
- encoding = TelestreamCloud::Encoding.create(:video_id => 1234, :profile_id => 6789)
264
-
265
- # Delete Profile (the same can be done for Videos and Encodings)
266
- TelestreamCloud::Profile.delete('profile-id')
267
-
268
- ```
269
-
270
-
271
- ## Generating signatures
272
-
273
- All requests to TelestreamCloud are signed using HMAC-SHA256, based on a timestamp and your secret key. This is handled transparently. However, sometimes you will want to generate only this signature, in order to make a request by means other than this library. This is the case when using the [JavaScript panda_uploader](http://github.com/pandastream/panda_uploader).
274
-
275
- To do this, a method `signed_params()` is supported:
276
- ```ruby
277
- TelestreamCloud.signed_params('POST', '/videos.json')
278
- # => {'access_key' => '8df50af4-074f-11df-b278-1231350015b1',
279
- # 'factory_id' => 'your-factory-id',
280
- # 'signature' => 'yRUZhcsYgnG+8jV5yrnWjLoRwzeJShdcdUoejjaRp6I=',
281
- # 'timestamp' => '2016-01-28T11:42:46.262935Z'}
282
-
283
- TelestreamCloud.signed_params('GET', '/videos.json', {'some_params' => 'some_value'})
284
- # => {'access_key' => '8df50af4-074f-11df-b278-1231350015b1',
285
- # 'factory_id' => 'your-factory-id',
286
- # 'signature' => '7glFUWlcSgvBm5BmOLghRNeqLNbof20jYCRgk9cJOi8=',
287
- # 'some_param' => 'some_value',
288
- # 'timestamp' => '2016-01-28T11:43:20.066141Z'}
289
- ```
290
- ## Low level API calls
291
-
292
- You can also make direct calls to TelestreamCloud REST API.
293
-
294
- For calls to endpoints other than `/factories.json`, you need to provide `factory_id` when initializing the client.
295
-
296
-
297
-
298
- ```ruby
299
- # Posting a video
300
- TelestreamCloud.post('/videos.json', {:file => File.new("/path/to/your/movie.mp4")})
301
-
302
- TelestreamCloud.post('/videos.json', {:source_url => 'http://www.example.com/original_video.mp4'})
303
- =>{"duration"=>nil,
304
- "created_at"=>"2010/01/15 14:48:42 +0000",
305
- "original_filename"=>"panda.mp4",
306
- "updated_at"=>"2010/01/15 14:48:42 +0000",
307
- "source_url"=>"http://www.example.com/original_video.mp4",
308
- "id"=>"12fce296-01e5-11df-ae37-12313902cc92",
309
- "extname"=>".mp4",
310
- "audio_codec"=>nil,
311
- "height"=>nil,
312
- "upload_redirect_url"=>nil,
313
- "fps"=>nil,
314
- "video_codec"=>nil,
315
- "status"=>"processing",
316
- "width"=>nil}
317
-
318
- # Getting all videos
319
- TelestreamCloud.get('/videos.json')
320
- => [{"duration"=>14010,
321
- "created_at"=>"2010/01/13 16:45:29 +0000",
322
- "original_filename"=>"panda.mp4",
323
- "updated_at"=>"2010/01/13 16:45:35 +0000",
324
- "source_url"=>"http://www.example.com/original_video.mp4",
325
- "id"=>"0ee6b656-0063-11df-a433-1231390041c1",
326
- "extname"=>".mp4",
327
- "audio_codec"=>"aac",
328
- "height"=>240,
329
- "upload_redirect_url"=>nil,
330
- "fps"=>29,
331
- "video_codec"=>"h264",
332
- "status"=>"success",
333
- "width"=>300}]
334
-
335
- # Getting video encodings
336
- TelestreamCloud.get('/videos/0ee6b656-0063-11df-a433-1231390041c1/encodings.json')
337
- => [{"encoder_id"=>nil,
338
- "created_at"=>"2010/01/13 16:45:30 +0000",
339
- "video_id"=>"0ee6b656-0063-11df-a433-1231390041c1",
340
- "video_url"=>
341
- "http://s3.amazonaws.com/panda-videos/0f815986-0063-11df-a433-1231390041c1.flv",
342
- "started_encoding_at"=>"2010/01/13 16:47:35 +0000",
343
- "updated_at"=>"2010/01/13 16:47:40 +0000",
344
- "extname"=>".flv",
345
- "encoding_progress"=>87,
346
- "encoding_time"=>3,
347
- "id"=>"0f815986-0063-11df-a433-1231390041c1",
348
- "height"=>240,
349
- "status"=>"success",
350
- "profile_id"=>"00182830-0063-11df-8c8a-1231390041c1",
351
- "width"=>300}]
352
-
353
- # Deleting an encoding
354
- TelestreamCloud.delete('/encodings/0f815986-0063-11df-a433-1231390041c1.json')
355
-
356
- # Deleting a video
357
- TelestreamCloud.delete('/videos/0ee6b656-0063-11df-a433-1231390041c1.json')
358
- ```
359
- ## Use bundler to setup the test environment
360
- ```ruby
361
- bundler install
362
- rake spec
363
- ```
364
-
365
-
366
- Copyright (c) 2016 Telestream Cloud. See LICENSE for details.
24
+ ## Services
25
+ Api client is divided into parts corresponding to services provided. Currently supported services include:
26
+ - [Flip](flip/README.md) - high-volume media transcoding to multiple formats
27
+ - [Timed Text Speech](tts/README.md) - automated captions and subtitles creation
28
+ - [Quality Control](qc/README.md) - automated quality control for file base media
@@ -0,0 +1,39 @@
1
+ # Generated by: https://github.com/swagger-api/swagger-codegen.git
2
+ #
3
+
4
+ *.gem
5
+ *.rbc
6
+ /.config
7
+ /coverage/
8
+ /InstalledFiles
9
+ /pkg/
10
+ /spec/reports/
11
+ /spec/examples.txt
12
+ /test/tmp/
13
+ /test/version_tmp/
14
+ /tmp/
15
+
16
+ ## Specific to RubyMotion:
17
+ .dat*
18
+ .repl_history
19
+ build/
20
+
21
+ ## Documentation cache and generated files:
22
+ /.yardoc/
23
+ /_yardoc/
24
+ /doc/
25
+ /rdoc/
26
+
27
+ ## Environment normalization:
28
+ /.bundle/
29
+ /vendor/bundle
30
+ /lib/bundler/man/
31
+
32
+ # for a library or gem, you might want to ignore these files since the code is
33
+ # intended to run in multiple environments; otherwise, check them in:
34
+ # Gemfile.lock
35
+ # .ruby-version
36
+ # .ruby-gemset
37
+
38
+ # unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
39
+ .rvmrc
@@ -0,0 +1,2 @@
1
+ --color
2
+ --require spec_helper
@@ -0,0 +1,23 @@
1
+ # Swagger Codegen Ignore
2
+ # Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen
3
+
4
+ # Use this file to prevent files from being overwritten by the generator.
5
+ # The patterns follow closely to .gitignore or .dockerignore.
6
+
7
+ # As an example, the C# client generator defines ApiClient.cs.
8
+ # You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line:
9
+ #ApiClient.cs
10
+
11
+ # You can match any string of characters against a directory, file or extension with a single asterisk (*):
12
+ #foo/*/qux
13
+ # The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
14
+
15
+ # You can recursively match patterns against a directory, file or extension with a double asterisk (**):
16
+ #foo/**/qux
17
+ # This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
18
+
19
+ # You can also negate patterns with an exclamation (!).
20
+ # For example, you can ignore all files in a docs folder with the file extension .md:
21
+ #docs/*.md
22
+ # Then explicitly reverse the ignore rule for a single file:
23
+ #!docs/README.md