wsc_sdk 1.3.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 (265) hide show
  1. checksums.yaml +7 -0
  2. data/.circleci/config.yml +146 -0
  3. data/.circleci/docker/build/Dockerfile +3 -0
  4. data/.circleci/helpers/add_preamble.rb +29 -0
  5. data/.circleci/helpers/build_docs.sh +5 -0
  6. data/.circleci/helpers/build_gem.sh +5 -0
  7. data/.circleci/helpers/debundle-context.sh +14 -0
  8. data/.circleci/helpers/finalize_release.sh +24 -0
  9. data/.circleci/helpers/publish_docs.sh +10 -0
  10. data/.circleci/helpers/release_gem.sh +8 -0
  11. data/.circleci/helpers/setup.sh +11 -0
  12. data/.circleci/helpers/setup_aws.sh +13 -0
  13. data/.circleci/helpers/setup_gem.sh +2 -0
  14. data/.circleci/helpers/setup_git.sh +27 -0
  15. data/.circleci/helpers/setup_rubygems.sh +15 -0
  16. data/.circleci/helpers/test_integration.sh +12 -0
  17. data/.circleci/helpers/test_unit.sh +6 -0
  18. data/.circleci/jobs/publish-production.sh +17 -0
  19. data/.circleci/jobs/publish-staging.sh +17 -0
  20. data/.circleci/jobs/release-production.sh +21 -0
  21. data/.circleci/jobs/test-integration.sh +9 -0
  22. data/.circleci/jobs/test-unit.sh +9 -0
  23. data/.circleci/tag_repo.rb +46 -0
  24. data/.gitignore +28 -0
  25. data/.rspec +2 -0
  26. data/.yard/config +2 -0
  27. data/.yard/template/default/fulldoc/html/css/custom.css +151 -0
  28. data/.yard/template/default/layout/html/footer.erb +0 -0
  29. data/.yard/template/default/layout/html/headers.erb +10 -0
  30. data/.yard/template/default/layout/html/layout.erb +45 -0
  31. data/.yard/template/default/layout/html/setup.rb +24 -0
  32. data/.yardopts +1 -0
  33. data/CODE_OF_CONDUCT.md +74 -0
  34. data/Gemfile +6 -0
  35. data/Gemfile.lock +99 -0
  36. data/LICENSE.txt +28 -0
  37. data/README.md +397 -0
  38. data/Rakefile +2 -0
  39. data/bin/console +14 -0
  40. data/bin/setup +8 -0
  41. data/doc/Hash.html +291 -0
  42. data/doc/WscSdk.html +570 -0
  43. data/doc/WscSdk/ApiResponse.html +242 -0
  44. data/doc/WscSdk/Attributes.html +128 -0
  45. data/doc/WscSdk/Attributes/Mode.html +191 -0
  46. data/doc/WscSdk/Attributes/Type.html +389 -0
  47. data/doc/WscSdk/Client.html +2677 -0
  48. data/doc/WscSdk/Configuration.html +595 -0
  49. data/doc/WscSdk/Endpoint.html +2974 -0
  50. data/doc/WscSdk/Endpoints.html +141 -0
  51. data/doc/WscSdk/Endpoints/CustomStreamTargets.html +383 -0
  52. data/doc/WscSdk/Endpoints/LiveStreams.html +197 -0
  53. data/doc/WscSdk/Endpoints/OutputStreamTargets.html +180 -0
  54. data/doc/WscSdk/Endpoints/Outputs.html +180 -0
  55. data/doc/WscSdk/Endpoints/StreamTargets.html +446 -0
  56. data/doc/WscSdk/Endpoints/Transcoders.html +197 -0
  57. data/doc/WscSdk/Endpoints/UllStreamTargets.html +383 -0
  58. data/doc/WscSdk/Endpoints/WowzaStreamTargets.html +383 -0
  59. data/doc/WscSdk/Enum.html +225 -0
  60. data/doc/WscSdk/Enums.html +321 -0
  61. data/doc/WscSdk/Enums/BillingMode.html +188 -0
  62. data/doc/WscSdk/Enums/BroadcastLocation.html +396 -0
  63. data/doc/WscSdk/Enums/BufferSize.html +301 -0
  64. data/doc/WscSdk/Enums/ClosedCaptionType.html +221 -0
  65. data/doc/WscSdk/Enums/CustomProvider.html +252 -0
  66. data/doc/WscSdk/Enums/DeliveryMethod.html +188 -0
  67. data/doc/WscSdk/Enums/DeliveryType.html +188 -0
  68. data/doc/WscSdk/Enums/Encoder.html +460 -0
  69. data/doc/WscSdk/Enums/Errors.html +555 -0
  70. data/doc/WscSdk/Enums/IdleTimeout.html +398 -0
  71. data/doc/WscSdk/Enums/ImagePosition.html +220 -0
  72. data/doc/WscSdk/Enums/ModelMode.html +175 -0
  73. data/doc/WscSdk/Enums/ModelType.html +373 -0
  74. data/doc/WscSdk/Enums/PlayerType.html +188 -0
  75. data/doc/WscSdk/Enums/Protocol.html +204 -0
  76. data/doc/WscSdk/Enums/TargetDeliveryProtocol.html +188 -0
  77. data/doc/WscSdk/Enums/TranscoderType.html +188 -0
  78. data/doc/WscSdk/Enums/UserRegion.html +383 -0
  79. data/doc/WscSdk/Enums/WowzaProvider.html +188 -0
  80. data/doc/WscSdk/Errors.html +683 -0
  81. data/doc/WscSdk/Loggable.html +346 -0
  82. data/doc/WscSdk/Model.html +3316 -0
  83. data/doc/WscSdk/ModelList.html +442 -0
  84. data/doc/WscSdk/ModelTemplate.html +267 -0
  85. data/doc/WscSdk/Models.html +141 -0
  86. data/doc/WscSdk/Models/CustomStreamTarget.html +192 -0
  87. data/doc/WscSdk/Models/Error.html +351 -0
  88. data/doc/WscSdk/Models/LiveStream.html +601 -0
  89. data/doc/WscSdk/Models/LiveStreamConnectionCode.html +192 -0
  90. data/doc/WscSdk/Models/LiveStreamState.html +200 -0
  91. data/doc/WscSdk/Models/LiveStreamStats.html +200 -0
  92. data/doc/WscSdk/Models/LiveStreamThumbnailUrl.html +200 -0
  93. data/doc/WscSdk/Models/Output.html +294 -0
  94. data/doc/WscSdk/Models/OutputStreamTarget.html +274 -0
  95. data/doc/WscSdk/Models/StreamTarget.html +273 -0
  96. data/doc/WscSdk/Models/Transcoder.html +793 -0
  97. data/doc/WscSdk/Models/TranscoderBooleanStat.html +278 -0
  98. data/doc/WscSdk/Models/TranscoderConnectionCode.html +192 -0
  99. data/doc/WscSdk/Models/TranscoderFloatStat.html +278 -0
  100. data/doc/WscSdk/Models/TranscoderIntegerStat.html +278 -0
  101. data/doc/WscSdk/Models/TranscoderState.html +196 -0
  102. data/doc/WscSdk/Models/TranscoderStats.html +196 -0
  103. data/doc/WscSdk/Models/TranscoderStreamTargetState.html +192 -0
  104. data/doc/WscSdk/Models/TranscoderStringStat.html +278 -0
  105. data/doc/WscSdk/Models/TranscoderThumbnailUrl.html +196 -0
  106. data/doc/WscSdk/Models/UllStreamTarget.html +360 -0
  107. data/doc/WscSdk/Models/WowzaStreamTarget.html +380 -0
  108. data/doc/WscSdk/Pagination.html +1277 -0
  109. data/doc/WscSdk/Schema.html +861 -0
  110. data/doc/WscSdk/SchemaAttribute.html +2400 -0
  111. data/doc/WscSdk/Templates.html +141 -0
  112. data/doc/WscSdk/Templates/CustomStreamTarget.html +1045 -0
  113. data/doc/WscSdk/Templates/LiveStream.html +1432 -0
  114. data/doc/WscSdk/Templates/Output.html +829 -0
  115. data/doc/WscSdk/Templates/Transcoder.html +699 -0
  116. data/doc/WscSdk/Templates/UllStreamTarget.html +411 -0
  117. data/doc/WscSdk/Templates/WowzaStreamTarget.html +447 -0
  118. data/doc/WscSdk/TranscoderSharedMethods.html +1113 -0
  119. data/doc/_index.html +705 -0
  120. data/doc/class_list.html +51 -0
  121. data/doc/css/bootstrap.css +5 -0
  122. data/doc/css/common.css +1 -0
  123. data/doc/css/custom.css +151 -0
  124. data/doc/css/full_list.css +58 -0
  125. data/doc/css/style.css +496 -0
  126. data/doc/file.README.html +570 -0
  127. data/doc/file_list.html +56 -0
  128. data/doc/frames.html +17 -0
  129. data/doc/images/wsc-ruby-1800x400.png +0 -0
  130. data/doc/index.html +570 -0
  131. data/doc/js/app.js +292 -0
  132. data/doc/js/full_list.js +216 -0
  133. data/doc/js/jquery.js +4 -0
  134. data/doc/method_list.html +1731 -0
  135. data/doc/top-level-namespace.html +182 -0
  136. data/examples/client.rb +40 -0
  137. data/examples/helpers.rb +100 -0
  138. data/examples/live_streams/create.rb +39 -0
  139. data/examples/live_streams/delete.rb +32 -0
  140. data/examples/live_streams/find.rb +22 -0
  141. data/examples/live_streams/flood.rb +126 -0
  142. data/examples/live_streams/list.rb +24 -0
  143. data/examples/live_streams/regenerate_connection_code.rb +29 -0
  144. data/examples/live_streams/reset.rb +32 -0
  145. data/examples/live_streams/reset_and_wait.rb +51 -0
  146. data/examples/live_streams/start.rb +33 -0
  147. data/examples/live_streams/start_and_wait.rb +51 -0
  148. data/examples/live_streams/state.rb +33 -0
  149. data/examples/live_streams/stats.rb +43 -0
  150. data/examples/live_streams/stop.rb +33 -0
  151. data/examples/live_streams/stop_and_wait.rb +51 -0
  152. data/examples/live_streams/thumbnail_url.rb +46 -0
  153. data/examples/live_streams/update.rb +43 -0
  154. data/examples/live_streams/workflow.rb +165 -0
  155. data/examples/output_stream_targets/create.rb +56 -0
  156. data/examples/output_stream_targets/delete.rb +45 -0
  157. data/examples/output_stream_targets/find.rb +37 -0
  158. data/examples/output_stream_targets/list.rb +36 -0
  159. data/examples/output_stream_targets/update.rb +56 -0
  160. data/examples/outputs/create.rb +49 -0
  161. data/examples/outputs/delete.rb +39 -0
  162. data/examples/outputs/find.rb +31 -0
  163. data/examples/outputs/list.rb +29 -0
  164. data/examples/outputs/update.rb +50 -0
  165. data/examples/stream_targets/custom/create.rb +42 -0
  166. data/examples/stream_targets/custom/delete.rb +31 -0
  167. data/examples/stream_targets/custom/find.rb +23 -0
  168. data/examples/stream_targets/custom/list.rb +24 -0
  169. data/examples/stream_targets/custom/update.rb +43 -0
  170. data/examples/stream_targets/list.rb +24 -0
  171. data/examples/stream_targets/ull/create.rb +41 -0
  172. data/examples/stream_targets/ull/delete.rb +31 -0
  173. data/examples/stream_targets/ull/find.rb +23 -0
  174. data/examples/stream_targets/ull/list.rb +24 -0
  175. data/examples/stream_targets/ull/update.rb +43 -0
  176. data/examples/stream_targets/wowza/create.rb +42 -0
  177. data/examples/stream_targets/wowza/delete.rb +31 -0
  178. data/examples/stream_targets/wowza/find.rb +23 -0
  179. data/examples/stream_targets/wowza/list.rb +23 -0
  180. data/examples/stream_targets/wowza/update.rb +43 -0
  181. data/examples/transcoders/create.rb +39 -0
  182. data/examples/transcoders/delete.rb +31 -0
  183. data/examples/transcoders/find.rb +23 -0
  184. data/examples/transcoders/list.rb +24 -0
  185. data/examples/transcoders/reset.rb +32 -0
  186. data/examples/transcoders/reset_and_wait.rb +48 -0
  187. data/examples/transcoders/start.rb +33 -0
  188. data/examples/transcoders/start_and_wait.rb +50 -0
  189. data/examples/transcoders/state.rb +33 -0
  190. data/examples/transcoders/stats.rb +43 -0
  191. data/examples/transcoders/stop.rb +33 -0
  192. data/examples/transcoders/stop_and_wait.rb +50 -0
  193. data/examples/transcoders/thumbnail_url.rb +46 -0
  194. data/examples/transcoders/update.rb +43 -0
  195. data/images/wsc-ruby-1800x400.png +0 -0
  196. data/lib/wsc_sdk.rb +81 -0
  197. data/lib/wsc_sdk/client.rb +417 -0
  198. data/lib/wsc_sdk/configuration.rb +21 -0
  199. data/lib/wsc_sdk/constants.rb +29 -0
  200. data/lib/wsc_sdk/endpoint.rb +492 -0
  201. data/lib/wsc_sdk/endpoints/custom_stream_targets.rb +44 -0
  202. data/lib/wsc_sdk/endpoints/live_streams.rb +34 -0
  203. data/lib/wsc_sdk/endpoints/output_stream_targets.rb +17 -0
  204. data/lib/wsc_sdk/endpoints/outputs.rb +17 -0
  205. data/lib/wsc_sdk/endpoints/stream_targets.rb +45 -0
  206. data/lib/wsc_sdk/endpoints/transcoders.rb +38 -0
  207. data/lib/wsc_sdk/endpoints/ull_stream_targets.rb +44 -0
  208. data/lib/wsc_sdk/endpoints/wowza_stream_targets.rb +44 -0
  209. data/lib/wsc_sdk/enums.rb +31 -0
  210. data/lib/wsc_sdk/enums/billing_mode.rb +20 -0
  211. data/lib/wsc_sdk/enums/broadcast_location.rb +58 -0
  212. data/lib/wsc_sdk/enums/buffer_size.rb +41 -0
  213. data/lib/wsc_sdk/enums/closed_caption_type.rb +26 -0
  214. data/lib/wsc_sdk/enums/custom_provider.rb +32 -0
  215. data/lib/wsc_sdk/enums/delivery_method.rb +20 -0
  216. data/lib/wsc_sdk/enums/delivery_type.rb +20 -0
  217. data/lib/wsc_sdk/enums/encoder.rb +71 -0
  218. data/lib/wsc_sdk/enums/idle_timeout.rb +50 -0
  219. data/lib/wsc_sdk/enums/image_position.rb +26 -0
  220. data/lib/wsc_sdk/enums/player_type.rb +20 -0
  221. data/lib/wsc_sdk/enums/protocol.rb +23 -0
  222. data/lib/wsc_sdk/enums/target_delivery_protocol.rb +20 -0
  223. data/lib/wsc_sdk/enums/transcoder_type.rb +20 -0
  224. data/lib/wsc_sdk/enums/wowza_provider.rb +20 -0
  225. data/lib/wsc_sdk/errors.rb +115 -0
  226. data/lib/wsc_sdk/model.rb +515 -0
  227. data/lib/wsc_sdk/model_list.rb +42 -0
  228. data/lib/wsc_sdk/model_template.rb +27 -0
  229. data/lib/wsc_sdk/models/custom_stream_target.rb +34 -0
  230. data/lib/wsc_sdk/models/error.rb +53 -0
  231. data/lib/wsc_sdk/models/live_stream.rb +130 -0
  232. data/lib/wsc_sdk/models/live_stream_connection_code.rb +31 -0
  233. data/lib/wsc_sdk/models/live_stream_state.rb +20 -0
  234. data/lib/wsc_sdk/models/live_stream_stats.rb +20 -0
  235. data/lib/wsc_sdk/models/live_stream_thumbnail_url.rb +20 -0
  236. data/lib/wsc_sdk/models/output.rb +61 -0
  237. data/lib/wsc_sdk/models/output_stream_target.rb +37 -0
  238. data/lib/wsc_sdk/models/stream_target.rb +29 -0
  239. data/lib/wsc_sdk/models/transcoder.rb +135 -0
  240. data/lib/wsc_sdk/models/transcoder_boolean_stat.rb +41 -0
  241. data/lib/wsc_sdk/models/transcoder_connection_code.rb +29 -0
  242. data/lib/wsc_sdk/models/transcoder_float_stat.rb +40 -0
  243. data/lib/wsc_sdk/models/transcoder_integer_stat.rb +40 -0
  244. data/lib/wsc_sdk/models/transcoder_state.rb +31 -0
  245. data/lib/wsc_sdk/models/transcoder_stats.rb +51 -0
  246. data/lib/wsc_sdk/models/transcoder_stream_target_state.rb +29 -0
  247. data/lib/wsc_sdk/models/transcoder_string_stat.rb +40 -0
  248. data/lib/wsc_sdk/models/transcoder_thumbnail_url.rb +29 -0
  249. data/lib/wsc_sdk/models/ull_stream_target.rb +54 -0
  250. data/lib/wsc_sdk/models/wowza_stream_target.rb +60 -0
  251. data/lib/wsc_sdk/modules/api_response.rb +24 -0
  252. data/lib/wsc_sdk/modules/loggable.rb +44 -0
  253. data/lib/wsc_sdk/modules/transcoder_shared_methods.rb +221 -0
  254. data/lib/wsc_sdk/pagination.rb +89 -0
  255. data/lib/wsc_sdk/schema.rb +140 -0
  256. data/lib/wsc_sdk/schema_attribute.rb +349 -0
  257. data/lib/wsc_sdk/templates/custom_stream_target.rb +154 -0
  258. data/lib/wsc_sdk/templates/live_stream.rb +234 -0
  259. data/lib/wsc_sdk/templates/output.rb +133 -0
  260. data/lib/wsc_sdk/templates/transcoder.rb +97 -0
  261. data/lib/wsc_sdk/templates/ull_stream_target.rb +49 -0
  262. data/lib/wsc_sdk/templates/wowza_stream_target.rb +57 -0
  263. data/lib/wsc_sdk/version.rb +7 -0
  264. data/wsc_sdk.gemspec +48 -0
  265. metadata +460 -0
@@ -0,0 +1,56 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
5
+ <meta charset="utf-8" />
6
+
7
+ <link rel="stylesheet" href="css/full_list.css" type="text/css" media="screen" charset="utf-8" />
8
+
9
+ <link rel="stylesheet" href="css/common.css" type="text/css" media="screen" charset="utf-8" />
10
+
11
+
12
+
13
+ <script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
14
+
15
+ <script type="text/javascript" charset="utf-8" src="js/full_list.js"></script>
16
+
17
+
18
+ <title>File List</title>
19
+ <base id="base_target" target="_parent" />
20
+ </head>
21
+ <body>
22
+ <div id="content">
23
+ <div class="fixed_header">
24
+ <h1 id="full_list_header">File List</h1>
25
+ <div id="full_list_nav">
26
+
27
+ <span><a target="_self" href="class_list.html">
28
+ Classes
29
+ </a></span>
30
+
31
+ <span><a target="_self" href="method_list.html">
32
+ Methods
33
+ </a></span>
34
+
35
+ <span><a target="_self" href="file_list.html">
36
+ Files
37
+ </a></span>
38
+
39
+ </div>
40
+
41
+ <div id="search">Search: <input type="text" /></div>
42
+ </div>
43
+
44
+ <ul id="full_list" class="file">
45
+
46
+
47
+ <li id="object_README" class="odd">
48
+ <div class="item"><span class="object_link"><a href="index.html" title="README">README</a></span></div>
49
+ </li>
50
+
51
+
52
+
53
+ </ul>
54
+ </div>
55
+ </body>
56
+ </html>
@@ -0,0 +1,17 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <title>Documentation by YARD 0.9.18</title>
6
+ </head>
7
+ <script type="text/javascript" charset="utf-8">
8
+ var match = unescape(window.location.hash).match(/^#!(.+)/);
9
+ var name = match ? match[1] : 'index.html';
10
+ name = name.replace(/^(\w+):\/\//, '').replace(/^\/\//, '');
11
+ window.top.location = name;
12
+ </script>
13
+ <noscript>
14
+ <h1>Oops!</h1>
15
+ <h2>YARD requires JavaScript!</h2>
16
+ </noscript>
17
+ </html>
@@ -0,0 +1,570 @@
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>Wowza Streaming Cloud - SDK Code Documentation</title>
7
+
8
+ <link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
9
+
10
+ <link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
11
+
12
+ <link rel="stylesheet" href="css/custom.css" type="text/css" charset="utf-8" />
13
+
14
+ <script type="text/javascript" charset="utf-8">
15
+ pathId = "README";
16
+ relpath = '';
17
+ </script>
18
+
19
+
20
+ <script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
21
+
22
+ <script type="text/javascript" charset="utf-8" src="js/app.js"></script>
23
+
24
+
25
+ </head>
26
+ <body>
27
+ <div id="wowza-wrapper">
28
+ <header>
29
+ <div class="logo">
30
+ <a href="https://www.wowza.com">
31
+ <img src="https://cloud.wowza.com/apidocs/assets/logo.png" alt="Wowza Logo" />
32
+ </a>
33
+ <h1>Wowza Streaming Cloud<br/>SDK Code Documentation</h1>
34
+ <div class="clearfix"></div>
35
+ </div>
36
+ <div class="links">
37
+ <a href="https://www.wowza.com/">Wowza Home</a>
38
+ <a href="https://www.wowza.com/docs">Docs & APIS</a>
39
+ <a href="https://www.wowza.com/community/index.html">Forums</a>
40
+ <a href="https://www.wowza.com/support">Support</a>
41
+ </div>
42
+ <div class="clearfix"></div>
43
+ </header>
44
+
45
+ <div id="content">
46
+ <div class="nav_wrap">
47
+ <iframe id="nav" src="class_list.html?1"></iframe>
48
+ <div id="resizer"></div>
49
+ </div>
50
+
51
+ <div id="main" tabindex="-1">
52
+ <div id="header">
53
+ <div id="menu">
54
+
55
+ <a href="_index.html">Index</a> &raquo;
56
+ <span class="title">File: README</span>
57
+
58
+ </div>
59
+
60
+ <div id="search">
61
+
62
+ <a class="full_list_link" id="class_list_link"
63
+ href="class_list.html">
64
+
65
+ <svg width="24" height="24">
66
+ <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
67
+ <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
68
+ <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
69
+ </svg>
70
+ </a>
71
+
72
+ </div>
73
+ <div class="clear"></div>
74
+ </div>
75
+
76
+ <div id="content"><div id='filecontents'>
77
+ <p><img src="images/wsc-ruby-1800x400.png"></p>
78
+
79
+ <h1 id="Wowza+Streaming+Cloud+Ruby+SDK">Wowza Streaming Cloud Ruby SDK</h1>
80
+
81
+ <p>Welcome to the official Wowza Streaming Cloud Ruby SDK (WscSdk). We help
82
+ developers bring live streaming into their applications - for any size
83
+ audience, anywhere in the world. This SDK leverages the Wowza Streaming
84
+ Cloud REST API to programmatically control live streams, transcoders,
85
+ outputs, and stream targets.</p>
86
+
87
+ <p>Need the basics? Get to know <a
88
+ href="https://www.wowza.com/products/streaming-cloud">Wowza Streaming
89
+ Cloud</a>.</p>
90
+
91
+ <h3 id="SDK+version">SDK version</h3>
92
+
93
+ <p>v1.3.0 (references Wowza Streaming Cloud REST API version 1.3)</p>
94
+
95
+ <h2 id="Contents">Contents</h2>
96
+ <ul><li>
97
+ <p><a href="#Features">Features</a></p>
98
+ </li><li>
99
+ <p><a href="#Installation">Installation</a></p>
100
+ </li><li>
101
+ <p><a href="#Start_building">Start building</a></p>
102
+ <ul><li>
103
+ <p><a href="#Get_your_api_key_and_generate_an_access_key">Get your API key and
104
+ generate an access key</a></p>
105
+ </li><li>
106
+ <p><a href="#Create_a_client">Create a client</a></p>
107
+ </li><li>
108
+ <p><a href="#Access_endpoints">Access endpoints</a></p>
109
+ </li><li>
110
+ <p><a href="#Use_templates">Use templates</a></p>
111
+ </li><li>
112
+ <p><a href="#Managing_lists">Manage Lists</a></p>
113
+ </li><li>
114
+ <p><a href="#Error_handling">Error Handling</a></p>
115
+ </li></ul>
116
+ </li><li>
117
+ <p><a href="#Access_the_entire_wowza_streaming_cloud_rest_api">Access the
118
+ entire Wowza Streaming Cloud REST API</a></p>
119
+ </li><li>
120
+ <p><a href="#Sdk_examples">SDK examples</a></p>
121
+ </li><li>
122
+ <p><a href="#Documentation">Documentation</a></p>
123
+ </li><li>
124
+ <p><a href="#Contribute">Contribute</a></p>
125
+ </li><li>
126
+ <p><a href="#Feedback">Feedback</a></p>
127
+ </li><li>
128
+ <p><a href="#Support">Support</a></p>
129
+ </li><li>
130
+ <p><a href="#Code_of_conduct">Code of conduct</a></p>
131
+ </li><li>
132
+ <p><a href="#License">License</a></p>
133
+ </li></ul>
134
+
135
+ <h2 id="Features">Features</h2>
136
+
137
+ <p>This SDK represents a subset of the Features available in the Wowza
138
+ Streaming Cloud REST API.</p>
139
+ <ul><li>
140
+ <p>Live streams</p>
141
+ </li><li>
142
+ <p>Transcoders</p>
143
+ </li><li>
144
+ <p>Outputs</p>
145
+ </li><li>
146
+ <p>Stream targets</p>
147
+ </li></ul>
148
+
149
+ <p>To add functionality related to players, stream sources, recordings,
150
+ schedules, and usage metrics, see <a
151
+ href="#Access_the_entire_wowza_streaming_cloud_rest_api">Access the entire
152
+ Wowza Streaming Cloud REST API</a>.</p>
153
+
154
+ <h2 id="Installation">Installation</h2>
155
+
156
+ <h3 id="Prerequisites">Prerequisites</h3>
157
+ <ul><li>
158
+ <p>Ruby version 2.3 or higher</p>
159
+ </li><li>
160
+ <p>Access to the Wowza Streaming Cloud service. You can start with our <a
161
+ href="https://www.wowza.com/pricing/cloud-developer-free-trial">free
162
+ trial</a>.</p>
163
+ </li></ul>
164
+
165
+ <h3 id="Install+the+SDK">Install the SDK</h3>
166
+
167
+ <p>To use <a href="https://rubygems.org/">RubyGems</a> for Installation, add
168
+ this line to your application&#39;s Gemfile:</p>
169
+
170
+ <pre class="code ruby"><code class="ruby">gem <span style="background-color:hsla(0,100%,50%,0.05)"><span style="color:#710">'</span><span style="color:#D20">wsc_sdk</span><span style="color:#710">'</span></span>, <span style="background-color:hsla(0,100%,50%,0.05)"><span style="color:#710">'</span><span style="color:#D20">~&gt; 1.3.0</span><span style="color:#710">'</span></span>
171
+ </code></pre>
172
+
173
+ <p>And then execute:</p>
174
+
175
+ <pre class="code ruby"><code class="ruby"><span style="color:#F00;background-color:#FAA">$</span> bundle</code></pre>
176
+
177
+ <p>Or install it yourself using:</p>
178
+
179
+ <pre class="code ruby"><code class="ruby"><span style="color:#F00;background-color:#FAA">$</span> gem install wsc_sdk</code></pre>
180
+
181
+ <h2 id="Start+building">Start building</h2>
182
+
183
+ <h3 id="Get+your+API+key+and+generate+an+access+key">Get your API key and generate an access key</h3>
184
+
185
+ <p>Start by getting an API key and access key to authenticate requests.
186
+ You&#39;ll find them in the Wowza Streaming Cloud user interface.</p>
187
+ <ol><li>
188
+ <p>Sign in to <a href="https://cloud.wowza.com">Wowza Streaming Cloud</a>.</p>
189
+ </li><li>
190
+ <p>In the menu bar, click your user name and choose <strong>API
191
+ Access</strong>.</p>
192
+ </li></ol>
193
+
194
+ <p>See <a
195
+ href="https://www.wowza.com/docs/how-to-use-the-wowza-streaming-cloud-rest-api#keys">Locate
196
+ an API key and generate an access key</a> for more information.</p>
197
+
198
+ <h3 id="Create+a+client">Create a client</h3>
199
+
200
+ <p>To perform any SDK functions or API requests, start by creating an instance
201
+ of of the <code>WscSdk::Client</code> object. This object requires your API
202
+ key and access key. It handles all of the requirements for formulating a
203
+ valid API request, and it gives you access to functions for listing,
204
+ finding, creating, updating, and deleting models in the Wowza Streaming
205
+ Cloud REST API.</p>
206
+
207
+ <pre class="code ruby"><code class="ruby">require <span style="background-color:hsla(0,100%,50%,0.05)"><span style="color:#710">'</span><span style="color:#D20">wsc_sdk</span><span style="color:#710">'</span></span>
208
+
209
+ <span style="color:#036;font-weight:bold">WscSdk</span>.configure <span style="color:#080;font-weight:bold">do</span> |config|
210
+ config.api_key = <span style="background-color:hsla(0,100%,50%,0.05)"><span style="color:#710">&quot;</span><span style="color:#D20">[your API key]</span><span style="color:#710">&quot;</span></span>
211
+ config.access_key = <span style="background-color:hsla(0,100%,50%,0.05)"><span style="color:#710">&quot;</span><span style="color:#D20">[your access key]</span><span style="color:#710">&quot;</span></span>
212
+ config.logger = ::<span style="color:#036;font-weight:bold">Logger</span>.new(<span style="color:#069">STDOUT</span>)
213
+ <span style="color:#080;font-weight:bold">end</span>
214
+
215
+ client = <span style="color:#036;font-weight:bold">WscSdk</span>.client
216
+ </code></pre>
217
+
218
+ <h4 id="Set+up+environment+variables">Set up environment variables</h4>
219
+
220
+ <p>For higher levels of security, and to keep sensitive keys out of your
221
+ repositories, you can use environment variables to configure your clients.</p>
222
+
223
+ <p>In a terminal you can establish the environment variables like this:</p>
224
+
225
+ <pre class="code ruby"><code class="ruby">export <span style="color:#036;font-weight:bold">WSC_API_KEY</span>=[your-api-key]
226
+ export <span style="color:#036;font-weight:bold">WSC_API_ACCESS_KEY</span>=[your-api-access-key]
227
+ </code></pre>
228
+
229
+ <p>Then your configuration block can be setup like this:</p>
230
+
231
+ <pre class="code ruby"><code class="ruby">require <span style="background-color:hsla(0,100%,50%,0.05)"><span style="color:#710">'</span><span style="color:#D20">wsc_sdk</span><span style="color:#710">'</span></span>
232
+
233
+ <span style="color:#036;font-weight:bold">WscSdk</span>.configure <span style="color:#080;font-weight:bold">do</span> |config|
234
+ config.api_key = <span style="color:#069">ENV</span>[<span style="background-color:hsla(0,100%,50%,0.05)"><span style="color:#710">&quot;</span><span style="color:#D20">WSC_API_KEY</span><span style="color:#710">&quot;</span></span>]
235
+ config.access_key = <span style="color:#069">ENV</span>[<span style="background-color:hsla(0,100%,50%,0.05)"><span style="color:#710">&quot;</span><span style="color:#D20">WSC_API_ACCESS_KEY</span><span style="color:#710">&quot;</span></span>]
236
+ config.logger = ::<span style="color:#036;font-weight:bold">Logger</span>.new(<span style="color:#069">STDOUT</span>)
237
+ <span style="color:#080;font-weight:bold">end</span>
238
+
239
+ client = <span style="color:#036;font-weight:bold">WscSdk</span>.client
240
+ </code></pre>
241
+
242
+ <h4 id="Using+the+sandbox+for+testing">Using the sandbox for testing</h4>
243
+
244
+ <p>Wowza Streaming Cloud has a sandbox environment you can use for testing
245
+ your code without incurring charges on your account.</p>
246
+
247
+ <p>You can switch the hostname of the SDK to point the sandbox server for
248
+ testing using this configuration:</p>
249
+
250
+ <pre class="code ruby"><code class="ruby">require <span style="background-color:hsla(0,100%,50%,0.05)"><span style="color:#710">'</span><span style="color:#D20">wsc_sdk</span><span style="color:#710">'</span></span>
251
+
252
+ <span style="color:#036;font-weight:bold">WscSdk</span>.configure <span style="color:#080;font-weight:bold">do</span> |config|
253
+ config.api_key = <span style="background-color:hsla(0,100%,50%,0.05)"><span style="color:#710">&quot;</span><span style="color:#D20">[your sandbox API key]</span><span style="color:#710">&quot;</span></span>
254
+ config.access_key = <span style="background-color:hsla(0,100%,50%,0.05)"><span style="color:#710">&quot;</span><span style="color:#D20">[your sandbox access key]</span><span style="color:#710">&quot;</span></span>
255
+ config.logger = ::<span style="color:#036;font-weight:bold">Logger</span>.new(<span style="color:#069">STDOUT</span>)
256
+ conifg.hostname = <span style="color:#036;font-weight:bold">WscSdk</span>::<span style="color:#036;font-weight:bold">SANDBOX_HOSTNAME</span>
257
+ <span style="color:#080;font-weight:bold">end</span>
258
+
259
+ client = <span style="color:#036;font-weight:bold">WscSdk</span>.client
260
+ </code></pre>
261
+
262
+ <h3 id="Access+endpoints">Access endpoints</h3>
263
+
264
+ <p>You can access the controls for managing a model through endpoints. An
265
+ endpoint is typically named for the model you&#39;re managing, but in
266
+ plural form.</p>
267
+
268
+ <p>For example, you manage the <code>WscSdk::Models::Transcoder</code> model
269
+ through the <code>WscSdk::Endpoints::Transcoders</code> endpoint.</p>
270
+
271
+ <p>You can access endpoints through the <a href="#Create_a_client">client</a>
272
+ object.</p>
273
+
274
+ <p>Using the <code>transcoders</code> example, you can access functionality to
275
+ manage models like this:</p>
276
+
277
+ <pre class="code ruby"><code class="ruby"><span style="color:#777"># Assign the transcoders endpoint to a variable</span>
278
+ transcoders = client.transcoders
279
+
280
+ <span style="color:#777"># List all transcoders</span>
281
+ <span style="color:#777">#</span>
282
+ <span style="color:#777"># Returns a ModelList object which behaves like a Hash. The keys of the Hash</span>
283
+ <span style="color:#777"># are the primary keys of the model, and the values are the model themselves.</span>
284
+ <span style="color:#777">#</span>
285
+ list = transcoders.list
286
+
287
+ list.each <span style="color:#080;font-weight:bold">do</span> |id, transcoder|
288
+ <span style="color:#777"># Do something with the items in the list.</span>
289
+ <span style="color:#080;font-weight:bold">end</span>
290
+
291
+ <span style="color:#777"># Find a transcoder</span>
292
+ <span style="color:#777">#</span>
293
+ <span style="color:#777"># Returns the model that matches the primary key provided. If the primary</span>
294
+ <span style="color:#777"># key doesn't exist, a WscSdk::Models::Error object is returned.</span>
295
+ <span style="color:#777">#</span>
296
+ transcoders.find(<span style="background-color:hsla(0,100%,50%,0.05)"><span style="color:#710">'</span><span style="color:#D20">some_id</span><span style="color:#710">'</span></span>)
297
+
298
+ <span style="color:#777"># Create a transcoder</span>
299
+ <span style="color:#777">#</span>
300
+ <span style="color:#777"># Returns the model of the newly created object. If the validation failed,</span>
301
+ <span style="color:#777"># or there was an issue sending the data to the API, then a</span>
302
+ <span style="color:#777"># WscSdk::Models::Error object is returned.</span>
303
+ <span style="color:#777">#</span>
304
+ transcoders.create(some_transcoder_model)
305
+
306
+ <span style="color:#777"># Update a transcoder</span>
307
+ <span style="color:#777">#</span>
308
+ <span style="color:#777"># Returns the model of the updated object. If the validation failed,</span>
309
+ <span style="color:#777"># or there was an issue sending the data to the API, then a</span>
310
+ <span style="color:#777"># WscSdk::Models::Error object is returned.</span>
311
+ <span style="color:#777">#</span>
312
+ transcoders.update(some_transcoder_model)
313
+
314
+ <span style="color:#777"># Delete a transcoder</span>
315
+ <span style="color:#777">#</span>
316
+ <span style="color:#777"># Returns the model data of the deleted object, with the primary key value</span>
317
+ <span style="color:#777"># removed. If there was an issue sending the data to the API, then a</span>
318
+ <span style="color:#777"># WscSdk::Models::Error object is returned.</span>
319
+ <span style="color:#777">#</span>
320
+ transcoders.delete(some_transcoder_model)
321
+ </code></pre>
322
+
323
+ <p>The <code>Endpoint#list</code>, <code>Endpoint#find(id)</code>,
324
+ <code>Endpoint#create(model_object)</code>,
325
+ <code>Endpoint#update(model_object)</code>, and
326
+ <code>Endpoint#delete(model_object)</code> methods are the most common
327
+ methods inside of an endpoint, however these will change from
328
+ model-to-model, so check the code <a
329
+ href="#Documentation">Documentation</a> for specific details on the model
330
+ you&#39;re attempting to interact with.</p>
331
+
332
+ <h3 id="Use+templates">Use templates</h3>
333
+
334
+ <p>This SDK provides predefined templates to make it easier to configure a
335
+ model with common data values. Templates are available for live streams,
336
+ transcoders, outputs, custom stream targets, Wowza stream targets, and
337
+ ultra low latency stream targets.</p>
338
+
339
+ <p>You use a template when using an endpoint to create a model. For example,
340
+ to create a transcoder that uses the RTMP protocol to push a stream from
341
+ the source to Wowza Streaming Cloud, use a template like this:</p>
342
+
343
+ <pre class="code ruby"><code class="ruby"><span style="color:#777"># Build an RTMP/push transcoder using a predefined template</span>
344
+ name = <span style="background-color:hsla(0,100%,50%,0.05)"><span style="color:#710">&quot;</span><span style="color:#D20">My First SDK Transcoder</span><span style="color:#710">&quot;</span></span>
345
+ transcoder_data = <span style="color:#036;font-weight:bold">WscSdk</span>::<span style="color:#036;font-weight:bold">Templates</span>::<span style="color:#036;font-weight:bold">Transcoder</span>.rtmp_push(name)
346
+ </code></pre>
347
+
348
+ <p>Values for <em>transcoder_type</em>, <em>billing_mode</em>,
349
+ <em>broadcast_location</em>, <em>protocol</em>, <em>delivery_method</em>
350
+ and more are set by default.</p>
351
+
352
+ <p>To override a preset value, add a modifier key:value pair like this:</p>
353
+
354
+ <pre class="code ruby"><code class="ruby"><span style="color:#777"># Build an RTMP/push transcoder using a predefined template with a modifier</span>
355
+ name = <span style="background-color:hsla(0,100%,50%,0.05)"><span style="color:#710">&quot;</span><span style="color:#D20">My First SDK Transcoder</span><span style="color:#710">&quot;</span></span>
356
+ transcoder_data = <span style="color:#036;font-weight:bold">WscSdk</span>::<span style="color:#036;font-weight:bold">Templates</span>::<span style="color:#036;font-weight:bold">Transcoder</span>.rtmp_push(name, <span style="color:#606">broadcast_location</span>: <span style="background-color:hsla(0,100%,50%,0.05)"><span style="color:#710">&quot;</span><span style="color:#D20">eu_germany</span><span style="color:#710">&quot;</span></span>)
357
+ </code></pre>
358
+
359
+ <p>You can see the details for each available template in the <a
360
+ href="https://wowza.com/resources/wsc/sdk/ruby/WscSdk/Templates.html">Templates
361
+ Documentation</a>. Click <strong>View source</strong> to see the preset
362
+ values.</p>
363
+
364
+ <h3 id="Manage+lists">Manage lists</h3>
365
+
366
+ <p>All of the endpoints that return lists allow you to control how the data is
367
+ returned. You can configure the lists with following options:</p>
368
+ <ul><li>
369
+ <p><strong>Pagination</strong></p>
370
+ </li><li>
371
+ <p><strong>Filtering</strong></p>
372
+ </li></ul>
373
+
374
+ <h4 id="Paginate+lists">Paginate lists</h4>
375
+
376
+ <p>Most Wowza Streaming Cloud REST API endpoints allow you to paginate the
377
+ results of lists. The SDK fully Supports this functionality by passing
378
+ optional parameters to <code>client.[endpoint].list</code> requests.</p>
379
+
380
+ <h6 id="Pagination+parameters-3A">Pagination parameters:</h6>
381
+ <ul><li>
382
+ <p><strong>page</strong>: The page number of to request</p>
383
+ </li><li>
384
+ <p><strong>per_page</strong>: The number of items per page to request.</p>
385
+ </li></ul>
386
+
387
+ <p>Using your <a href="#Create_a_client">client</a> object, you can request a
388
+ paginated list like this:</p>
389
+
390
+ <pre class="code ruby"><code class="ruby">client.transcoders.list(<span style="color:#606">pagination</span>: { <span style="color:#606">page</span>: <span style="color:#00D">1</span>, <span style="color:#606">per_page</span>: <span style="color:#00D">20</span> })
391
+ </code></pre>
392
+
393
+ <p>The resulting list <code>Hash</code> will have a special key for the
394
+ pagination information called <code>:pagination</code>. If you access this
395
+ key, you&#39;ll get back information about the current pagination
396
+ information.</p>
397
+
398
+ <h4 id="Filter+lists">Filter lists</h4>
399
+
400
+ <p><strong>Note:</strong> Currently only the transcoders endpoint allows for
401
+ filtering items returned in the response.</p>
402
+
403
+ <p>To filter content returned in a list call, you can add the
404
+ <code>filter:</code> key to the <code>list</code> call.</p>
405
+
406
+ <p>The filter is a Hash of acceptable field names and filter values. Although
407
+ the API allows for more complex filtering, currently the SDK filter accepts
408
+ only direct equality filtering.</p>
409
+
410
+ <p>Using your <a href="#Create_a_client">client</a> object, you can request a
411
+ list of transcoders that are currently started, like this:</p>
412
+
413
+ <pre class="code ruby"><code class="ruby">client.transcoders.list(<span style="color:#606">filter</span>: { <span style="color:#606">state</span>: <span style="background-color:hsla(0,100%,50%,0.05)"><span style="color:#710">'</span><span style="color:#D20">started</span><span style="color:#710">'</span></span> })
414
+ </code></pre>
415
+
416
+ <h3 id="Error+handling">Error handling</h3>
417
+
418
+ <p>An SDK call that returns an unraised error will return it as a
419
+ <code>WscSdk::Models::Error</code> instance.</p>
420
+
421
+ <p>To determine if a model or model list generated an error during it&#39;s
422
+ request, you can call the <code>success?</code> method to determine the
423
+ outcome.</p>
424
+
425
+ <pre class="code ruby"><code class="ruby">transcoder_list = client.transcoders.list
426
+
427
+ <span style="color:#080;font-weight:bold">if</span> transcoder_list.success?
428
+ <span style="color:#777"># Do some stuff with your list.</span>
429
+ <span style="color:#080;font-weight:bold">else</span>
430
+ <span style="color:#777"># If it wasn't a success, then the returned model is an instance of WscSdk::Models::Error.</span>
431
+ puts <span style="background-color:hsla(0,100%,50%,0.05)"><span style="color:#710">&quot;</span><span style="color:#D20">Your request for the transcoder list generated an error: </span><span style="background-color:hsla(0,0%,0%,0.07);color:black"><span style="font-weight:bold;color:#666">#{</span>transcoder_list.code<span style="font-weight:bold;color:#666">}</span></span><span style="color:#D20">: </span><span style="background-color:hsla(0,0%,0%,0.07);color:black"><span style="font-weight:bold;color:#666">#{</span>transcoder_list.title<span style="font-weight:bold;color:#666">}</span></span><span style="color:#710">&quot;</span></span>
432
+ <span style="color:#080;font-weight:bold">end</span>
433
+ </code></pre>
434
+
435
+ <h2 id="Sending+files+through+the+SDK">Sending files through the SDK</h2>
436
+
437
+ <p>Some API endpoints allow you to send files for use in configuring a live
438
+ stream, transcoder, player or hosted page. These files must be converted
439
+ from their original format to a Base64-encoded string representation in
440
+ order to be processed by Wowza Streaming Cloud.</p>
441
+
442
+ <p>There is a static convenience method in the client that will load a file
443
+ from your local system and properly encode it for delivery to the API.</p>
444
+
445
+ <pre class="code ruby"><code class="ruby"><span style="color:#036;font-weight:bold">WscSdk</span>::<span style="color:#036;font-weight:bold">Client</span>.file_to_base64(<span style="background-color:hsla(0,100%,50%,0.05)"><span style="color:#710">&quot;</span><span style="color:#D20">/path/to/some/file</span><span style="color:#710">&quot;</span></span>)
446
+ </code></pre>
447
+
448
+ <p>For example, if you want to embed a watermark image into a transcoded
449
+ stream, your code might look like this:</p>
450
+
451
+ <pre class="code ruby"><code class="ruby">
452
+ transcoder = <span style="color:#d70">$client</span>.transcoders.build
453
+
454
+ transcoder.watermark_image = <span style="color:#036;font-weight:bold">WscSdk</span>::<span style="color:#036;font-weight:bold">Client</span>.file_to_base64(<span style="background-color:hsla(0,100%,50%,0.05)"><span style="color:#710">&quot;</span><span style="color:#D20">/path/to/some/file.jpg</span><span style="color:#710">&quot;</span></span>)
455
+
456
+ transcoder.save
457
+ </code></pre>
458
+
459
+ <h2 id="Access+the+entire+Wowza+Streaming+Cloud+REST+API">Access the entire Wowza Streaming Cloud REST API</h2>
460
+
461
+ <p>This SDK is still under active development, so many endpoints haven&#39;t
462
+ been built in just yet. To help with this, we&#39;ve exposed a low-level
463
+ method inside the client for handling any endpoint inside the API.</p>
464
+
465
+ <p>This method generates the necessary request headers, does some basic
466
+ interpretation of the request, and returns a Hash object of the response
467
+ data. It doesn&#39;t do any data validation or management. It&#39;s up to
468
+ you to handle the data going in and coming out of the request and make sure
469
+ it&#39;s structured according to the Documentation.</p>
470
+
471
+ <p>See the <a href="https://sandbox.cloud.wowza.com/api/current/docs">Wowza
472
+ Streaming Cloud API reference</a> and <a
473
+ href="https://www.wowza.com/docs/wowza-streaming-cloud-rest-api">API
474
+ Documentation</a> for more information.</p>
475
+
476
+ <h5 id="Examples">Examples</h5>
477
+
478
+ <pre class="code ruby"><code class="ruby">
479
+ <span style="color:#777"># Request a list of players</span>
480
+ players_list = client.request_endpoint(<span style="color:#A60">:get</span>, <span style="background-color:hsla(0,100%,50%,0.05)"><span style="color:#710">&quot;</span><span style="color:#D20">/players</span><span style="color:#710">&quot;</span></span>)
481
+
482
+ <span style="color:#777"># Display the list of players and their types</span>
483
+ players_list[<span style="background-color:hsla(0,100%,50%,0.05)"><span style="color:#710">&quot;</span><span style="color:#D20">players</span><span style="color:#710">&quot;</span></span>].each <span style="color:#080;font-weight:bold">do</span> |player|
484
+ puts <span style="background-color:hsla(0,100%,50%,0.05)"><span style="color:#710">&quot;</span><span style="background-color:hsla(0,0%,0%,0.07);color:black"><span style="font-weight:bold;color:#666">#{</span>player[<span style="background-color:hsla(0,100%,50%,0.05)"><span style="color:#710">&quot;</span><span style="color:#D20">id</span><span style="color:#710">&quot;</span></span>]<span style="font-weight:bold;color:#666">}</span></span><span style="color:#D20">: </span><span style="background-color:hsla(0,0%,0%,0.07);color:black"><span style="font-weight:bold;color:#666">#{</span>player[<span style="background-color:hsla(0,100%,50%,0.05)"><span style="color:#710">&quot;</span><span style="color:#D20">type</span><span style="color:#710">&quot;</span></span>]<span style="font-weight:bold;color:#666">}</span></span><span style="color:#710">&quot;</span></span>
485
+ <span style="color:#080;font-weight:bold">end</span>
486
+
487
+ <span style="color:#777"># Get the details for the first player in the list</span>
488
+ player_id = player_list[<span style="background-color:hsla(0,100%,50%,0.05)"><span style="color:#710">&quot;</span><span style="color:#D20">players</span><span style="color:#710">&quot;</span></span>].first[<span style="background-color:hsla(0,100%,50%,0.05)"><span style="color:#710">&quot;</span><span style="color:#D20">id</span><span style="color:#710">&quot;</span></span>]
489
+ player = client.request_endpoint(<span style="color:#A60">:get</span>, <span style="background-color:hsla(0,100%,50%,0.05)"><span style="color:#710">&quot;</span><span style="color:#D20">/players/</span><span style="background-color:hsla(0,0%,0%,0.07);color:black"><span style="font-weight:bold;color:#666">#{</span>player_id<span style="font-weight:bold;color:#666">}</span></span><span style="color:#710">&quot;</span></span>)
490
+
491
+ <span style="color:#777"># Display the player details</span>
492
+ puts <span style="background-color:hsla(0,100%,50%,0.05)"><span style="color:#710">&quot;</span><span style="color:#D20">Player:</span><span style="color:#710">&quot;</span></span>
493
+ player[<span style="background-color:hsla(0,100%,50%,0.05)"><span style="color:#710">&quot;</span><span style="color:#D20">player</span><span style="color:#710">&quot;</span></span>].each <span style="color:#080;font-weight:bold">do</span> |attribute, value|
494
+ puts <span style="background-color:hsla(0,100%,50%,0.05)"><span style="color:#710">&quot;</span><span style="color:#D20"> - </span><span style="background-color:hsla(0,0%,0%,0.07);color:black"><span style="font-weight:bold;color:#666">#{</span>attribute.to_s.ljust(<span style="color:#00D">25</span>)<span style="font-weight:bold;color:#666">}</span></span><span style="color:#D20"> : </span><span style="background-color:hsla(0,0%,0%,0.07);color:black"><span style="font-weight:bold;color:#666">#{</span>value<span style="font-weight:bold;color:#666">}</span></span><span style="color:#710">&quot;</span></span>
495
+ <span style="color:#080;font-weight:bold">end</span>
496
+
497
+ <span style="color:#777"># Update an existing player.</span>
498
+ updated_player_data = {
499
+ <span style="color:#606">player</span>: {
500
+ <span style="color:#606">hosted_page_title</span>: <span style="background-color:hsla(0,100%,50%,0.05)"><span style="color:#710">&quot;</span><span style="color:#D20">This is my updated Hosted Page with Player</span><span style="color:#710">&quot;</span></span>,
501
+ <span style="color:#606">hosted_page_description</span>: <span style="background-color:hsla(0,100%,50%,0.05)"><span style="color:#710">&quot;</span><span style="color:#D20">new description for my hosted page</span><span style="color:#710">&quot;</span></span>
502
+ }
503
+ }
504
+
505
+ updated_player = client.request_endpoint(<span style="color:#A60">:post</span>, <span style="background-color:hsla(0,100%,50%,0.05)"><span style="color:#710">&quot;</span><span style="color:#D20">/players/</span><span style="background-color:hsla(0,0%,0%,0.07);color:black"><span style="font-weight:bold;color:#666">#{</span>player_id<span style="font-weight:bold;color:#666">}</span></span><span style="color:#710">&quot;</span></span>, updated_player_data)
506
+ puts <span style="background-color:hsla(0,100%,50%,0.05)"><span style="color:#710">&quot;</span><span style="color:#D20">Player:</span><span style="color:#710">&quot;</span></span>
507
+ player[<span style="background-color:hsla(0,100%,50%,0.05)"><span style="color:#710">&quot;</span><span style="color:#D20">player</span><span style="color:#710">&quot;</span></span>].each <span style="color:#080;font-weight:bold">do</span> |attribute, value|
508
+ puts <span style="background-color:hsla(0,100%,50%,0.05)"><span style="color:#710">&quot;</span><span style="color:#D20"> - </span><span style="background-color:hsla(0,0%,0%,0.07);color:black"><span style="font-weight:bold;color:#666">#{</span>attribute.to_s.ljust(<span style="color:#00D">25</span>)<span style="font-weight:bold;color:#666">}</span></span><span style="color:#D20"> : </span><span style="background-color:hsla(0,0%,0%,0.07);color:black"><span style="font-weight:bold;color:#666">#{</span>value<span style="font-weight:bold;color:#666">}</span></span><span style="color:#710">&quot;</span></span>
509
+ <span style="color:#080;font-weight:bold">end</span>
510
+ </code></pre>
511
+
512
+ <h2 id="SDK+examples">SDK examples</h2>
513
+
514
+ <p>Check out the ruby example files in this repo to learn how to use SDK
515
+ functions to configure and manage models.</p>
516
+ <ul><li>
517
+ <p><a href="/examples/client.rb">Set up a client</a></p>
518
+ </li><li>
519
+ <p><a href="/examples/live_streams">Work with live streams</a></p>
520
+ </li><li>
521
+ <p><a href="/examples/transcoders">Work with transcoders</a></p>
522
+ </li><li>
523
+ <p><a href="/examples/outputs">Work with outputs</a></p>
524
+ </li><li>
525
+ <p><a href="/examples/stream_targets">Work with stream targets</a></p>
526
+ </li></ul>
527
+
528
+ <h2 id="Documentation">Documentation</h2>
529
+
530
+ <p>You can dig into the details in the <a
531
+ href="https://wowza.com/resources/wsc/sdk/ruby/index.html">Wowza Streaming
532
+ Cloud Ruby SDK reference Documentation</a>.</p>
533
+
534
+ <h2 id="Contribute">Contribute</h2>
535
+
536
+ <p>For the moment, we&#39;re not accepting public contributions for the Wowza
537
+ Streaming Cloud Ruby SDK. We may open the code up to contributions in the
538
+ future. For now, relay your concerns and things you&#39;d like to see added
539
+ by emailing us at <a
540
+ href="mailto:cloud-Feedback@wowza.com">cloud-Feedback@wowza.com</a>.</p>
541
+
542
+ <h2 id="Feedback">Feedback</h2>
543
+
544
+ <p>We welcome your Feedback on the SDK, its Documentation, and the experience
545
+ of using it. For now, we have disabled GitHub issues for this repo. To
546
+ provide Feedback, email us at <a
547
+ href="mailto:cloud-Feedback@wowza.com">cloud-Feedback@wowza.com</a>.</p>
548
+
549
+ <h2 id="Support">Support</h2>
550
+
551
+ <p>For now, we have disabled GitHub issues for this repo. To request
552
+ assistance with the SDK, open a Support ticket with <a
553
+ href="https://www.wowza.com/portal/help">Wowza Support</a>.</p>
554
+
555
+ <h2 id="Code+of+conduct">Code of conduct</h2>
556
+
557
+ <p>Please adhere to the guidelines described in the <a
558
+ href="#License">License</a> for this SDK.</p>
559
+
560
+ <h2 id="License">License</h2>
561
+
562
+ <p>This code is distributed under the <a href="LICENSE.txt">BSD-3 License</a>.</p>
563
+ </div></div>
564
+
565
+
566
+ </div>
567
+ </div>
568
+ </div>
569
+ </body>
570
+ </html>