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.
- checksums.yaml +7 -0
- data/.circleci/config.yml +146 -0
- data/.circleci/docker/build/Dockerfile +3 -0
- data/.circleci/helpers/add_preamble.rb +29 -0
- data/.circleci/helpers/build_docs.sh +5 -0
- data/.circleci/helpers/build_gem.sh +5 -0
- data/.circleci/helpers/debundle-context.sh +14 -0
- data/.circleci/helpers/finalize_release.sh +24 -0
- data/.circleci/helpers/publish_docs.sh +10 -0
- data/.circleci/helpers/release_gem.sh +8 -0
- data/.circleci/helpers/setup.sh +11 -0
- data/.circleci/helpers/setup_aws.sh +13 -0
- data/.circleci/helpers/setup_gem.sh +2 -0
- data/.circleci/helpers/setup_git.sh +27 -0
- data/.circleci/helpers/setup_rubygems.sh +15 -0
- data/.circleci/helpers/test_integration.sh +12 -0
- data/.circleci/helpers/test_unit.sh +6 -0
- data/.circleci/jobs/publish-production.sh +17 -0
- data/.circleci/jobs/publish-staging.sh +17 -0
- data/.circleci/jobs/release-production.sh +21 -0
- data/.circleci/jobs/test-integration.sh +9 -0
- data/.circleci/jobs/test-unit.sh +9 -0
- data/.circleci/tag_repo.rb +46 -0
- data/.gitignore +28 -0
- data/.rspec +2 -0
- data/.yard/config +2 -0
- data/.yard/template/default/fulldoc/html/css/custom.css +151 -0
- data/.yard/template/default/layout/html/footer.erb +0 -0
- data/.yard/template/default/layout/html/headers.erb +10 -0
- data/.yard/template/default/layout/html/layout.erb +45 -0
- data/.yard/template/default/layout/html/setup.rb +24 -0
- data/.yardopts +1 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +6 -0
- data/Gemfile.lock +99 -0
- data/LICENSE.txt +28 -0
- data/README.md +397 -0
- data/Rakefile +2 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/doc/Hash.html +291 -0
- data/doc/WscSdk.html +570 -0
- data/doc/WscSdk/ApiResponse.html +242 -0
- data/doc/WscSdk/Attributes.html +128 -0
- data/doc/WscSdk/Attributes/Mode.html +191 -0
- data/doc/WscSdk/Attributes/Type.html +389 -0
- data/doc/WscSdk/Client.html +2677 -0
- data/doc/WscSdk/Configuration.html +595 -0
- data/doc/WscSdk/Endpoint.html +2974 -0
- data/doc/WscSdk/Endpoints.html +141 -0
- data/doc/WscSdk/Endpoints/CustomStreamTargets.html +383 -0
- data/doc/WscSdk/Endpoints/LiveStreams.html +197 -0
- data/doc/WscSdk/Endpoints/OutputStreamTargets.html +180 -0
- data/doc/WscSdk/Endpoints/Outputs.html +180 -0
- data/doc/WscSdk/Endpoints/StreamTargets.html +446 -0
- data/doc/WscSdk/Endpoints/Transcoders.html +197 -0
- data/doc/WscSdk/Endpoints/UllStreamTargets.html +383 -0
- data/doc/WscSdk/Endpoints/WowzaStreamTargets.html +383 -0
- data/doc/WscSdk/Enum.html +225 -0
- data/doc/WscSdk/Enums.html +321 -0
- data/doc/WscSdk/Enums/BillingMode.html +188 -0
- data/doc/WscSdk/Enums/BroadcastLocation.html +396 -0
- data/doc/WscSdk/Enums/BufferSize.html +301 -0
- data/doc/WscSdk/Enums/ClosedCaptionType.html +221 -0
- data/doc/WscSdk/Enums/CustomProvider.html +252 -0
- data/doc/WscSdk/Enums/DeliveryMethod.html +188 -0
- data/doc/WscSdk/Enums/DeliveryType.html +188 -0
- data/doc/WscSdk/Enums/Encoder.html +460 -0
- data/doc/WscSdk/Enums/Errors.html +555 -0
- data/doc/WscSdk/Enums/IdleTimeout.html +398 -0
- data/doc/WscSdk/Enums/ImagePosition.html +220 -0
- data/doc/WscSdk/Enums/ModelMode.html +175 -0
- data/doc/WscSdk/Enums/ModelType.html +373 -0
- data/doc/WscSdk/Enums/PlayerType.html +188 -0
- data/doc/WscSdk/Enums/Protocol.html +204 -0
- data/doc/WscSdk/Enums/TargetDeliveryProtocol.html +188 -0
- data/doc/WscSdk/Enums/TranscoderType.html +188 -0
- data/doc/WscSdk/Enums/UserRegion.html +383 -0
- data/doc/WscSdk/Enums/WowzaProvider.html +188 -0
- data/doc/WscSdk/Errors.html +683 -0
- data/doc/WscSdk/Loggable.html +346 -0
- data/doc/WscSdk/Model.html +3316 -0
- data/doc/WscSdk/ModelList.html +442 -0
- data/doc/WscSdk/ModelTemplate.html +267 -0
- data/doc/WscSdk/Models.html +141 -0
- data/doc/WscSdk/Models/CustomStreamTarget.html +192 -0
- data/doc/WscSdk/Models/Error.html +351 -0
- data/doc/WscSdk/Models/LiveStream.html +601 -0
- data/doc/WscSdk/Models/LiveStreamConnectionCode.html +192 -0
- data/doc/WscSdk/Models/LiveStreamState.html +200 -0
- data/doc/WscSdk/Models/LiveStreamStats.html +200 -0
- data/doc/WscSdk/Models/LiveStreamThumbnailUrl.html +200 -0
- data/doc/WscSdk/Models/Output.html +294 -0
- data/doc/WscSdk/Models/OutputStreamTarget.html +274 -0
- data/doc/WscSdk/Models/StreamTarget.html +273 -0
- data/doc/WscSdk/Models/Transcoder.html +793 -0
- data/doc/WscSdk/Models/TranscoderBooleanStat.html +278 -0
- data/doc/WscSdk/Models/TranscoderConnectionCode.html +192 -0
- data/doc/WscSdk/Models/TranscoderFloatStat.html +278 -0
- data/doc/WscSdk/Models/TranscoderIntegerStat.html +278 -0
- data/doc/WscSdk/Models/TranscoderState.html +196 -0
- data/doc/WscSdk/Models/TranscoderStats.html +196 -0
- data/doc/WscSdk/Models/TranscoderStreamTargetState.html +192 -0
- data/doc/WscSdk/Models/TranscoderStringStat.html +278 -0
- data/doc/WscSdk/Models/TranscoderThumbnailUrl.html +196 -0
- data/doc/WscSdk/Models/UllStreamTarget.html +360 -0
- data/doc/WscSdk/Models/WowzaStreamTarget.html +380 -0
- data/doc/WscSdk/Pagination.html +1277 -0
- data/doc/WscSdk/Schema.html +861 -0
- data/doc/WscSdk/SchemaAttribute.html +2400 -0
- data/doc/WscSdk/Templates.html +141 -0
- data/doc/WscSdk/Templates/CustomStreamTarget.html +1045 -0
- data/doc/WscSdk/Templates/LiveStream.html +1432 -0
- data/doc/WscSdk/Templates/Output.html +829 -0
- data/doc/WscSdk/Templates/Transcoder.html +699 -0
- data/doc/WscSdk/Templates/UllStreamTarget.html +411 -0
- data/doc/WscSdk/Templates/WowzaStreamTarget.html +447 -0
- data/doc/WscSdk/TranscoderSharedMethods.html +1113 -0
- data/doc/_index.html +705 -0
- data/doc/class_list.html +51 -0
- data/doc/css/bootstrap.css +5 -0
- data/doc/css/common.css +1 -0
- data/doc/css/custom.css +151 -0
- data/doc/css/full_list.css +58 -0
- data/doc/css/style.css +496 -0
- data/doc/file.README.html +570 -0
- data/doc/file_list.html +56 -0
- data/doc/frames.html +17 -0
- data/doc/images/wsc-ruby-1800x400.png +0 -0
- data/doc/index.html +570 -0
- data/doc/js/app.js +292 -0
- data/doc/js/full_list.js +216 -0
- data/doc/js/jquery.js +4 -0
- data/doc/method_list.html +1731 -0
- data/doc/top-level-namespace.html +182 -0
- data/examples/client.rb +40 -0
- data/examples/helpers.rb +100 -0
- data/examples/live_streams/create.rb +39 -0
- data/examples/live_streams/delete.rb +32 -0
- data/examples/live_streams/find.rb +22 -0
- data/examples/live_streams/flood.rb +126 -0
- data/examples/live_streams/list.rb +24 -0
- data/examples/live_streams/regenerate_connection_code.rb +29 -0
- data/examples/live_streams/reset.rb +32 -0
- data/examples/live_streams/reset_and_wait.rb +51 -0
- data/examples/live_streams/start.rb +33 -0
- data/examples/live_streams/start_and_wait.rb +51 -0
- data/examples/live_streams/state.rb +33 -0
- data/examples/live_streams/stats.rb +43 -0
- data/examples/live_streams/stop.rb +33 -0
- data/examples/live_streams/stop_and_wait.rb +51 -0
- data/examples/live_streams/thumbnail_url.rb +46 -0
- data/examples/live_streams/update.rb +43 -0
- data/examples/live_streams/workflow.rb +165 -0
- data/examples/output_stream_targets/create.rb +56 -0
- data/examples/output_stream_targets/delete.rb +45 -0
- data/examples/output_stream_targets/find.rb +37 -0
- data/examples/output_stream_targets/list.rb +36 -0
- data/examples/output_stream_targets/update.rb +56 -0
- data/examples/outputs/create.rb +49 -0
- data/examples/outputs/delete.rb +39 -0
- data/examples/outputs/find.rb +31 -0
- data/examples/outputs/list.rb +29 -0
- data/examples/outputs/update.rb +50 -0
- data/examples/stream_targets/custom/create.rb +42 -0
- data/examples/stream_targets/custom/delete.rb +31 -0
- data/examples/stream_targets/custom/find.rb +23 -0
- data/examples/stream_targets/custom/list.rb +24 -0
- data/examples/stream_targets/custom/update.rb +43 -0
- data/examples/stream_targets/list.rb +24 -0
- data/examples/stream_targets/ull/create.rb +41 -0
- data/examples/stream_targets/ull/delete.rb +31 -0
- data/examples/stream_targets/ull/find.rb +23 -0
- data/examples/stream_targets/ull/list.rb +24 -0
- data/examples/stream_targets/ull/update.rb +43 -0
- data/examples/stream_targets/wowza/create.rb +42 -0
- data/examples/stream_targets/wowza/delete.rb +31 -0
- data/examples/stream_targets/wowza/find.rb +23 -0
- data/examples/stream_targets/wowza/list.rb +23 -0
- data/examples/stream_targets/wowza/update.rb +43 -0
- data/examples/transcoders/create.rb +39 -0
- data/examples/transcoders/delete.rb +31 -0
- data/examples/transcoders/find.rb +23 -0
- data/examples/transcoders/list.rb +24 -0
- data/examples/transcoders/reset.rb +32 -0
- data/examples/transcoders/reset_and_wait.rb +48 -0
- data/examples/transcoders/start.rb +33 -0
- data/examples/transcoders/start_and_wait.rb +50 -0
- data/examples/transcoders/state.rb +33 -0
- data/examples/transcoders/stats.rb +43 -0
- data/examples/transcoders/stop.rb +33 -0
- data/examples/transcoders/stop_and_wait.rb +50 -0
- data/examples/transcoders/thumbnail_url.rb +46 -0
- data/examples/transcoders/update.rb +43 -0
- data/images/wsc-ruby-1800x400.png +0 -0
- data/lib/wsc_sdk.rb +81 -0
- data/lib/wsc_sdk/client.rb +417 -0
- data/lib/wsc_sdk/configuration.rb +21 -0
- data/lib/wsc_sdk/constants.rb +29 -0
- data/lib/wsc_sdk/endpoint.rb +492 -0
- data/lib/wsc_sdk/endpoints/custom_stream_targets.rb +44 -0
- data/lib/wsc_sdk/endpoints/live_streams.rb +34 -0
- data/lib/wsc_sdk/endpoints/output_stream_targets.rb +17 -0
- data/lib/wsc_sdk/endpoints/outputs.rb +17 -0
- data/lib/wsc_sdk/endpoints/stream_targets.rb +45 -0
- data/lib/wsc_sdk/endpoints/transcoders.rb +38 -0
- data/lib/wsc_sdk/endpoints/ull_stream_targets.rb +44 -0
- data/lib/wsc_sdk/endpoints/wowza_stream_targets.rb +44 -0
- data/lib/wsc_sdk/enums.rb +31 -0
- data/lib/wsc_sdk/enums/billing_mode.rb +20 -0
- data/lib/wsc_sdk/enums/broadcast_location.rb +58 -0
- data/lib/wsc_sdk/enums/buffer_size.rb +41 -0
- data/lib/wsc_sdk/enums/closed_caption_type.rb +26 -0
- data/lib/wsc_sdk/enums/custom_provider.rb +32 -0
- data/lib/wsc_sdk/enums/delivery_method.rb +20 -0
- data/lib/wsc_sdk/enums/delivery_type.rb +20 -0
- data/lib/wsc_sdk/enums/encoder.rb +71 -0
- data/lib/wsc_sdk/enums/idle_timeout.rb +50 -0
- data/lib/wsc_sdk/enums/image_position.rb +26 -0
- data/lib/wsc_sdk/enums/player_type.rb +20 -0
- data/lib/wsc_sdk/enums/protocol.rb +23 -0
- data/lib/wsc_sdk/enums/target_delivery_protocol.rb +20 -0
- data/lib/wsc_sdk/enums/transcoder_type.rb +20 -0
- data/lib/wsc_sdk/enums/wowza_provider.rb +20 -0
- data/lib/wsc_sdk/errors.rb +115 -0
- data/lib/wsc_sdk/model.rb +515 -0
- data/lib/wsc_sdk/model_list.rb +42 -0
- data/lib/wsc_sdk/model_template.rb +27 -0
- data/lib/wsc_sdk/models/custom_stream_target.rb +34 -0
- data/lib/wsc_sdk/models/error.rb +53 -0
- data/lib/wsc_sdk/models/live_stream.rb +130 -0
- data/lib/wsc_sdk/models/live_stream_connection_code.rb +31 -0
- data/lib/wsc_sdk/models/live_stream_state.rb +20 -0
- data/lib/wsc_sdk/models/live_stream_stats.rb +20 -0
- data/lib/wsc_sdk/models/live_stream_thumbnail_url.rb +20 -0
- data/lib/wsc_sdk/models/output.rb +61 -0
- data/lib/wsc_sdk/models/output_stream_target.rb +37 -0
- data/lib/wsc_sdk/models/stream_target.rb +29 -0
- data/lib/wsc_sdk/models/transcoder.rb +135 -0
- data/lib/wsc_sdk/models/transcoder_boolean_stat.rb +41 -0
- data/lib/wsc_sdk/models/transcoder_connection_code.rb +29 -0
- data/lib/wsc_sdk/models/transcoder_float_stat.rb +40 -0
- data/lib/wsc_sdk/models/transcoder_integer_stat.rb +40 -0
- data/lib/wsc_sdk/models/transcoder_state.rb +31 -0
- data/lib/wsc_sdk/models/transcoder_stats.rb +51 -0
- data/lib/wsc_sdk/models/transcoder_stream_target_state.rb +29 -0
- data/lib/wsc_sdk/models/transcoder_string_stat.rb +40 -0
- data/lib/wsc_sdk/models/transcoder_thumbnail_url.rb +29 -0
- data/lib/wsc_sdk/models/ull_stream_target.rb +54 -0
- data/lib/wsc_sdk/models/wowza_stream_target.rb +60 -0
- data/lib/wsc_sdk/modules/api_response.rb +24 -0
- data/lib/wsc_sdk/modules/loggable.rb +44 -0
- data/lib/wsc_sdk/modules/transcoder_shared_methods.rb +221 -0
- data/lib/wsc_sdk/pagination.rb +89 -0
- data/lib/wsc_sdk/schema.rb +140 -0
- data/lib/wsc_sdk/schema_attribute.rb +349 -0
- data/lib/wsc_sdk/templates/custom_stream_target.rb +154 -0
- data/lib/wsc_sdk/templates/live_stream.rb +234 -0
- data/lib/wsc_sdk/templates/output.rb +133 -0
- data/lib/wsc_sdk/templates/transcoder.rb +97 -0
- data/lib/wsc_sdk/templates/ull_stream_target.rb +49 -0
- data/lib/wsc_sdk/templates/wowza_stream_target.rb +57 -0
- data/lib/wsc_sdk/version.rb +7 -0
- data/wsc_sdk.gemspec +48 -0
- metadata +460 -0
|
@@ -0,0 +1,389 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
+
<title>
|
|
7
|
+
Module: WscSdk::Attributes::Type
|
|
8
|
+
|
|
9
|
+
— Documentation by YARD 0.9.18
|
|
10
|
+
|
|
11
|
+
</title>
|
|
12
|
+
|
|
13
|
+
<link rel="stylesheet" href="../../css/style.css" type="text/css" charset="utf-8" />
|
|
14
|
+
|
|
15
|
+
<link rel="stylesheet" href="../../css/common.css" type="text/css" charset="utf-8" />
|
|
16
|
+
|
|
17
|
+
<script type="text/javascript" charset="utf-8">
|
|
18
|
+
pathId = "WscSdk::Attributes::Type";
|
|
19
|
+
relpath = '../../';
|
|
20
|
+
</script>
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
<script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
|
|
24
|
+
|
|
25
|
+
<script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
</head>
|
|
29
|
+
<body>
|
|
30
|
+
<div class="nav_wrap">
|
|
31
|
+
<iframe id="nav" src="../../class_list.html?1"></iframe>
|
|
32
|
+
<div id="resizer"></div>
|
|
33
|
+
</div>
|
|
34
|
+
|
|
35
|
+
<div id="main" tabindex="-1">
|
|
36
|
+
<div id="header">
|
|
37
|
+
<div id="menu">
|
|
38
|
+
|
|
39
|
+
<a href="../../_index.html">Index (T)</a> »
|
|
40
|
+
<span class='title'><span class='object_link'><a href="../../WscSdk.html" title="WscSdk (module)">WscSdk</a></span></span> » <span class='title'><span class='object_link'><a href="../Attributes.html" title="WscSdk::Attributes (module)">Attributes</a></span></span>
|
|
41
|
+
»
|
|
42
|
+
<span class="title">Type</span>
|
|
43
|
+
|
|
44
|
+
</div>
|
|
45
|
+
|
|
46
|
+
<div id="search">
|
|
47
|
+
|
|
48
|
+
<a class="full_list_link" id="class_list_link"
|
|
49
|
+
href="../../class_list.html">
|
|
50
|
+
|
|
51
|
+
<svg width="24" height="24">
|
|
52
|
+
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
|
53
|
+
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
|
54
|
+
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
|
55
|
+
</svg>
|
|
56
|
+
</a>
|
|
57
|
+
|
|
58
|
+
</div>
|
|
59
|
+
<div class="clear"></div>
|
|
60
|
+
</div>
|
|
61
|
+
|
|
62
|
+
<div id="content"><h1>Module: WscSdk::Attributes::Type
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
</h1>
|
|
67
|
+
<div class="box_info">
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
<dl>
|
|
73
|
+
<dt>Extended by:</dt>
|
|
74
|
+
<dd><span class='object_link'><a href="../Enums.html" title="WscSdk::Enums (module)">Enums</a></span></dd>
|
|
75
|
+
</dl>
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
<dl>
|
|
85
|
+
<dt>Defined in:</dt>
|
|
86
|
+
<dd>lib/wsc_sdk/attributes/type.rb</dd>
|
|
87
|
+
</dl>
|
|
88
|
+
|
|
89
|
+
</div>
|
|
90
|
+
|
|
91
|
+
<h2>Overview</h2><div class="docstring">
|
|
92
|
+
<div class="discussion">
|
|
93
|
+
|
|
94
|
+
<p>Enumerate the valid types for the model schema.</p>
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
</div>
|
|
98
|
+
</div>
|
|
99
|
+
<div class="tags">
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
</div>
|
|
103
|
+
|
|
104
|
+
<h2>
|
|
105
|
+
Constant Summary
|
|
106
|
+
<small><a href="#" class="constants_summary_toggle">collapse</a></small>
|
|
107
|
+
</h2>
|
|
108
|
+
|
|
109
|
+
<dl class="constants">
|
|
110
|
+
|
|
111
|
+
<dt id="STRING-constant" class="">STRING =
|
|
112
|
+
<div class="docstring">
|
|
113
|
+
<div class="discussion">
|
|
114
|
+
|
|
115
|
+
<p>A string attribute</p>
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
</div>
|
|
119
|
+
</div>
|
|
120
|
+
<div class="tags">
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
</div>
|
|
124
|
+
</dt>
|
|
125
|
+
<dd><pre class="code"><span class='symbol'>:string</span></pre></dd>
|
|
126
|
+
|
|
127
|
+
<dt id="INTEGER-constant" class="">INTEGER =
|
|
128
|
+
<div class="docstring">
|
|
129
|
+
<div class="discussion">
|
|
130
|
+
|
|
131
|
+
<p>An integer attribute</p>
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
</div>
|
|
135
|
+
</div>
|
|
136
|
+
<div class="tags">
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
</div>
|
|
140
|
+
</dt>
|
|
141
|
+
<dd><pre class="code"><span class='symbol'>:integer</span></pre></dd>
|
|
142
|
+
|
|
143
|
+
<dt id="BOOLEAN-constant" class="">BOOLEAN =
|
|
144
|
+
<div class="docstring">
|
|
145
|
+
<div class="discussion">
|
|
146
|
+
|
|
147
|
+
<p>A boolean attribute</p>
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
</div>
|
|
151
|
+
</div>
|
|
152
|
+
<div class="tags">
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
</div>
|
|
156
|
+
</dt>
|
|
157
|
+
<dd><pre class="code"><span class='symbol'>:boolean</span></pre></dd>
|
|
158
|
+
|
|
159
|
+
<dt id="ARRAY-constant" class="">ARRAY =
|
|
160
|
+
<div class="docstring">
|
|
161
|
+
<div class="discussion">
|
|
162
|
+
|
|
163
|
+
<p>An array attribute</p>
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
</div>
|
|
167
|
+
</div>
|
|
168
|
+
<div class="tags">
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
</div>
|
|
172
|
+
</dt>
|
|
173
|
+
<dd><pre class="code"><span class='symbol'>:array</span></pre></dd>
|
|
174
|
+
|
|
175
|
+
<dt id="DATETIME-constant" class="">DATETIME =
|
|
176
|
+
<div class="docstring">
|
|
177
|
+
<div class="discussion">
|
|
178
|
+
|
|
179
|
+
<p>A date/time attribute</p>
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
</div>
|
|
183
|
+
</div>
|
|
184
|
+
<div class="tags">
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
</div>
|
|
188
|
+
</dt>
|
|
189
|
+
<dd><pre class="code"><span class='symbol'>:datetime</span></pre></dd>
|
|
190
|
+
|
|
191
|
+
</dl>
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
<h2>
|
|
202
|
+
Class Method Summary
|
|
203
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
|
204
|
+
</h2>
|
|
205
|
+
|
|
206
|
+
<ul class="summary">
|
|
207
|
+
|
|
208
|
+
<li class="public ">
|
|
209
|
+
<span class="summary_signature">
|
|
210
|
+
|
|
211
|
+
<a href="#validate-class_method" title="validate (class method)">.<strong>validate</strong>(model_type, value) ⇒ Boolean </a>
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
</span>
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
<span class="summary_desc"><div class='inline'>
|
|
226
|
+
<p>Validate an model type against the value provided.</p>
|
|
227
|
+
</div></span>
|
|
228
|
+
|
|
229
|
+
</li>
|
|
230
|
+
|
|
231
|
+
|
|
232
|
+
</ul>
|
|
233
|
+
|
|
234
|
+
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
<h3 class="inherited">Methods included from <span class='object_link'><a href="../Enums.html" title="WscSdk::Enums (module)">Enums</a></span></h3>
|
|
245
|
+
<p class="inherited"><span class='object_link'><a href="../Enums.html#to_constant-instance_method" title="WscSdk::Enums#to_constant (method)">to_constant</a></span>, <span class='object_link'><a href="../Enums.html#values-instance_method" title="WscSdk::Enums#values (method)">values</a></span></p>
|
|
246
|
+
|
|
247
|
+
|
|
248
|
+
<div id="class_method_details" class="method_details_list">
|
|
249
|
+
<h2>Class Method Details</h2>
|
|
250
|
+
|
|
251
|
+
|
|
252
|
+
<div class="method_details first">
|
|
253
|
+
<h3 class="signature first" id="validate-class_method">
|
|
254
|
+
|
|
255
|
+
.<strong>validate</strong>(model_type, value) ⇒ <tt>Boolean</tt>
|
|
256
|
+
|
|
257
|
+
|
|
258
|
+
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
</h3><div class="docstring">
|
|
262
|
+
<div class="discussion">
|
|
263
|
+
|
|
264
|
+
<p>Validate an model type against the value provided.</p>
|
|
265
|
+
|
|
266
|
+
|
|
267
|
+
</div>
|
|
268
|
+
</div>
|
|
269
|
+
<div class="tags">
|
|
270
|
+
<p class="tag_title">Parameters:</p>
|
|
271
|
+
<ul class="param">
|
|
272
|
+
|
|
273
|
+
<li>
|
|
274
|
+
|
|
275
|
+
<span class='name'>model_type</span>
|
|
276
|
+
|
|
277
|
+
|
|
278
|
+
<span class='type'>(<tt><span class='object_link'><a href="" title="WscSdk::Attributes::Type (module)">WscSdk::Attributes::Type</a></span></tt>)</span>
|
|
279
|
+
|
|
280
|
+
|
|
281
|
+
|
|
282
|
+
—
|
|
283
|
+
<div class='inline'>
|
|
284
|
+
<p>The model type to validate the value against.</p>
|
|
285
|
+
</div>
|
|
286
|
+
|
|
287
|
+
</li>
|
|
288
|
+
|
|
289
|
+
<li>
|
|
290
|
+
|
|
291
|
+
<span class='name'>value</span>
|
|
292
|
+
|
|
293
|
+
|
|
294
|
+
<span class='type'>(<tt>Any</tt>)</span>
|
|
295
|
+
|
|
296
|
+
|
|
297
|
+
|
|
298
|
+
—
|
|
299
|
+
<div class='inline'>
|
|
300
|
+
<p>The value to validate</p>
|
|
301
|
+
</div>
|
|
302
|
+
|
|
303
|
+
</li>
|
|
304
|
+
|
|
305
|
+
</ul>
|
|
306
|
+
|
|
307
|
+
<p class="tag_title">Returns:</p>
|
|
308
|
+
<ul class="return">
|
|
309
|
+
|
|
310
|
+
<li>
|
|
311
|
+
|
|
312
|
+
|
|
313
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
|
314
|
+
|
|
315
|
+
|
|
316
|
+
|
|
317
|
+
—
|
|
318
|
+
<div class='inline'>
|
|
319
|
+
<p>An indication if the value is valid or not.</p>
|
|
320
|
+
</div>
|
|
321
|
+
|
|
322
|
+
</li>
|
|
323
|
+
|
|
324
|
+
</ul>
|
|
325
|
+
|
|
326
|
+
</div><table class="source_code">
|
|
327
|
+
<tr>
|
|
328
|
+
<td>
|
|
329
|
+
<pre class="lines">
|
|
330
|
+
|
|
331
|
+
|
|
332
|
+
31
|
|
333
|
+
32
|
|
334
|
+
33
|
|
335
|
+
34
|
|
336
|
+
35
|
|
337
|
+
36
|
|
338
|
+
37
|
|
339
|
+
38
|
|
340
|
+
39
|
|
341
|
+
40
|
|
342
|
+
41
|
|
343
|
+
42
|
|
344
|
+
43
|
|
345
|
+
44
|
|
346
|
+
45
|
|
347
|
+
46
|
|
348
|
+
47
|
|
349
|
+
48</pre>
|
|
350
|
+
</td>
|
|
351
|
+
<td>
|
|
352
|
+
<pre class="code"><span class="info file"># File 'lib/wsc_sdk/attributes/type.rb', line 31</span>
|
|
353
|
+
|
|
354
|
+
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_validate'>validate</span><span class='lparen'>(</span><span class='id identifier rubyid_model_type'>model_type</span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span>
|
|
355
|
+
<span class='kw'>return</span> <span class='kw'>true</span> <span class='kw'>if</span> <span class='id identifier rubyid_value'>value</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
|
356
|
+
|
|
357
|
+
<span class='id identifier rubyid_valid'>valid</span> <span class='op'>=</span> <span class='kw'>case</span> <span class='lparen'>(</span><span class='id identifier rubyid_model_type'>model_type</span><span class='rparen'>)</span>
|
|
358
|
+
<span class='kw'>when</span> <span class='const'><span class='object_link'><a href="#STRING-constant" title="WscSdk::Attributes::Type::STRING (constant)">STRING</a></span></span>
|
|
359
|
+
<span class='id identifier rubyid_value'>value</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>String</span><span class='rparen'>)</span>
|
|
360
|
+
<span class='kw'>when</span> <span class='const'><span class='object_link'><a href="#INTEGER-constant" title="WscSdk::Attributes::Type::INTEGER (constant)">INTEGER</a></span></span>
|
|
361
|
+
<span class='id identifier rubyid_value'>value</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>Integer</span><span class='rparen'>)</span> <span class='kw'>or</span> <span class='lparen'>(</span><span class='id identifier rubyid_value'>value</span><span class='period'>.</span><span class='id identifier rubyid_to_i'>to_i</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span> <span class='op'>==</span> <span class='id identifier rubyid_value'>value</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='rparen'>)</span>
|
|
362
|
+
<span class='kw'>when</span> <span class='const'><span class='object_link'><a href="#BOOLEAN-constant" title="WscSdk::Attributes::Type::BOOLEAN (constant)">BOOLEAN</a></span></span>
|
|
363
|
+
<span class='id identifier rubyid_value'>value</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>TrueClass</span><span class='rparen'>)</span> <span class='kw'>or</span> <span class='id identifier rubyid_value'>value</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>FalseClass</span><span class='rparen'>)</span> <span class='kw'>or</span> <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>0</span><span class='tstring_end'>'</span></span><span class='comma'>,</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>1</span><span class='tstring_end'>'</span></span><span class='comma'>,</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>y</span><span class='tstring_end'>'</span></span><span class='comma'>,</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>n</span><span class='tstring_end'>'</span></span><span class='comma'>,</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>t</span><span class='tstring_end'>'</span></span><span class='comma'>,</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>f</span><span class='tstring_end'>'</span></span><span class='comma'>,</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>true</span><span class='tstring_end'>'</span></span><span class='comma'>,</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>false</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='id identifier rubyid_value'>value</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='period'>.</span><span class='id identifier rubyid_downcase'>downcase</span><span class='rparen'>)</span>
|
|
364
|
+
<span class='kw'>when</span> <span class='const'><span class='object_link'><a href="#ARRAY-constant" title="WscSdk::Attributes::Type::ARRAY (constant)">ARRAY</a></span></span>
|
|
365
|
+
<span class='id identifier rubyid_value'>value</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>Array</span><span class='rparen'>)</span>
|
|
366
|
+
<span class='kw'>when</span> <span class='const'><span class='object_link'><a href="#DATETIME-constant" title="WscSdk::Attributes::Type::DATETIME (constant)">DATETIME</a></span></span>
|
|
367
|
+
<span class='id identifier rubyid_value'>value</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>Date</span><span class='rparen'>)</span> <span class='kw'>or</span> <span class='id identifier rubyid_value'>value</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>Time</span><span class='rparen'>)</span> <span class='kw'>or</span> <span class='lparen'>(</span><span class='op'>!</span><span class='lparen'>(</span><span class='const'>Date</span><span class='period'>.</span><span class='id identifier rubyid_parse'>parse</span><span class='lparen'>(</span><span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span> <span class='kw'>rescue</span> <span class='kw'>nil</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span><span class='rparen'>)</span>
|
|
368
|
+
<span class='kw'>else</span>
|
|
369
|
+
<span class='kw'>true</span>
|
|
370
|
+
<span class='kw'>end</span>
|
|
371
|
+
<span class='kw'>end</span></pre>
|
|
372
|
+
</td>
|
|
373
|
+
</tr>
|
|
374
|
+
</table>
|
|
375
|
+
</div>
|
|
376
|
+
|
|
377
|
+
</div>
|
|
378
|
+
|
|
379
|
+
</div>
|
|
380
|
+
|
|
381
|
+
<div id="footer">
|
|
382
|
+
Generated on Tue Feb 26 17:34:58 2019 by
|
|
383
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
384
|
+
0.9.18 (ruby-2.3.1).
|
|
385
|
+
</div>
|
|
386
|
+
|
|
387
|
+
</div>
|
|
388
|
+
</body>
|
|
389
|
+
</html>
|
|
@@ -0,0 +1,2677 @@
|
|
|
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 = "WscSdk::Client";
|
|
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 (C)</a> »
|
|
56
|
+
<span class='title'><span class='object_link'><a href="../WscSdk.html" title="WscSdk (module)">WscSdk</a></span></span>
|
|
57
|
+
»
|
|
58
|
+
<span class="title">Client</span>
|
|
59
|
+
|
|
60
|
+
</div>
|
|
61
|
+
|
|
62
|
+
<div id="search">
|
|
63
|
+
|
|
64
|
+
<a class="full_list_link" id="class_list_link"
|
|
65
|
+
href="../class_list.html">
|
|
66
|
+
|
|
67
|
+
<svg width="24" height="24">
|
|
68
|
+
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
|
69
|
+
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
|
70
|
+
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
|
71
|
+
</svg>
|
|
72
|
+
</a>
|
|
73
|
+
|
|
74
|
+
</div>
|
|
75
|
+
<div class="clear"></div>
|
|
76
|
+
</div>
|
|
77
|
+
|
|
78
|
+
<div id="content"><h1>Class: WscSdk::Client
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
</h1>
|
|
83
|
+
<div class="box_info">
|
|
84
|
+
|
|
85
|
+
<dl>
|
|
86
|
+
<dt>Inherits:</dt>
|
|
87
|
+
<dd>
|
|
88
|
+
<span class="inheritName">Object</span>
|
|
89
|
+
|
|
90
|
+
<ul class="fullTree">
|
|
91
|
+
<li>Object</li>
|
|
92
|
+
|
|
93
|
+
<li class="next">WscSdk::Client</li>
|
|
94
|
+
|
|
95
|
+
</ul>
|
|
96
|
+
<a href="#" class="inheritanceTree">show all</a>
|
|
97
|
+
|
|
98
|
+
</dd>
|
|
99
|
+
</dl>
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
<dl>
|
|
107
|
+
<dt>Includes:</dt>
|
|
108
|
+
<dd>HTTParty</dd>
|
|
109
|
+
</dl>
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
<dl>
|
|
117
|
+
<dt>Defined in:</dt>
|
|
118
|
+
<dd>lib/wsc_sdk/client.rb</dd>
|
|
119
|
+
</dl>
|
|
120
|
+
|
|
121
|
+
</div>
|
|
122
|
+
|
|
123
|
+
<h2>Overview</h2><div class="docstring">
|
|
124
|
+
<div class="discussion">
|
|
125
|
+
|
|
126
|
+
<p>A client to manage credentials and act as an entrypoint for the SDK and all
|
|
127
|
+
API interactions.</p>
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
</div>
|
|
131
|
+
</div>
|
|
132
|
+
<div class="tags">
|
|
133
|
+
|
|
134
|
+
<div class="examples">
|
|
135
|
+
<p class="tag_title">Examples:</p>
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
<p class="example_title"><div class='inline'>
|
|
139
|
+
<p>Usage</p>
|
|
140
|
+
</div></p>
|
|
141
|
+
|
|
142
|
+
<pre class="example code"><code>api_key = <span style="background-color:hsla(0,100%,50%,0.05)"><span style="color:#710">"</span><span style="color:#D20">[your-api-key]</span><span style="color:#710">"</span></span>
|
|
143
|
+
access_key = <span style="background-color:hsla(0,100%,50%,0.05)"><span style="color:#710">"</span><span style="color:#D20">[your-api-access-key]</span><span style="color:#710">"</span></span>
|
|
144
|
+
client = <span style="color:#036;font-weight:bold">WscSdk</span>::<span style="color:#036;font-weight:bold">Client</span>.new(api_key, access_key)</code></pre>
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
<p class="example_title"><div class='inline'>
|
|
148
|
+
<p>Usage with Environment Variables: Shell Config</p>
|
|
149
|
+
</div></p>
|
|
150
|
+
|
|
151
|
+
<pre class="example code"><code>export WSC_API_KEY=[your-api-key]
|
|
152
|
+
export WSC_API_ACCESS_KEY=[your-api-access-key]</code></pre>
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
<p class="example_title"><div class='inline'>
|
|
156
|
+
<p>Usage with Environment Variables: Client Config</p>
|
|
157
|
+
</div></p>
|
|
158
|
+
|
|
159
|
+
<pre class="example code"><code>client = <span style="color:#036;font-weight:bold">WscSdk</span>::<span style="color:#036;font-weight:bold">Client</span>.new()</code></pre>
|
|
160
|
+
|
|
161
|
+
</div>
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
</div>
|
|
165
|
+
|
|
166
|
+
<h2>
|
|
167
|
+
Constant Summary
|
|
168
|
+
<small><a href="#" class="constants_summary_toggle">collapse</a></small>
|
|
169
|
+
</h2>
|
|
170
|
+
|
|
171
|
+
<dl class="constants">
|
|
172
|
+
|
|
173
|
+
<dt id="MAX_REQUESTS_PER_SECOND-constant" class="">MAX_REQUESTS_PER_SECOND =
|
|
174
|
+
<div class="docstring">
|
|
175
|
+
<div class="discussion">
|
|
176
|
+
|
|
177
|
+
<p>Maximum number of requests to execute per second.</p>
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
</div>
|
|
181
|
+
</div>
|
|
182
|
+
<div class="tags">
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
</div>
|
|
186
|
+
</dt>
|
|
187
|
+
<dd><pre class="code"><span style="color:#00D">5</span></pre></dd>
|
|
188
|
+
|
|
189
|
+
</dl>
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
<h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
|
|
196
|
+
<ul class="summary">
|
|
197
|
+
|
|
198
|
+
<li class="public ">
|
|
199
|
+
<span class="summary_signature">
|
|
200
|
+
|
|
201
|
+
<a href="#access_key-instance_method" title="#access_key (instance method)">#<strong>access_key</strong> ⇒ Object </a>
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
</span>
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
<span class="summary_desc"><div class='inline'>
|
|
219
|
+
<p>Returns the value of attribute access_key.</p>
|
|
220
|
+
</div></span>
|
|
221
|
+
|
|
222
|
+
</li>
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
<li class="public ">
|
|
226
|
+
<span class="summary_signature">
|
|
227
|
+
|
|
228
|
+
<a href="#api_key-instance_method" title="#api_key (instance method)">#<strong>api_key</strong> ⇒ Object </a>
|
|
229
|
+
|
|
230
|
+
|
|
231
|
+
|
|
232
|
+
</span>
|
|
233
|
+
|
|
234
|
+
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
|
|
245
|
+
<span class="summary_desc"><div class='inline'>
|
|
246
|
+
<p>Returns the value of attribute api_key.</p>
|
|
247
|
+
</div></span>
|
|
248
|
+
|
|
249
|
+
</li>
|
|
250
|
+
|
|
251
|
+
|
|
252
|
+
<li class="public ">
|
|
253
|
+
<span class="summary_signature">
|
|
254
|
+
|
|
255
|
+
<a href="#base_path-instance_method" title="#base_path (instance method)">#<strong>base_path</strong> ⇒ Object </a>
|
|
256
|
+
|
|
257
|
+
|
|
258
|
+
|
|
259
|
+
</span>
|
|
260
|
+
|
|
261
|
+
|
|
262
|
+
|
|
263
|
+
|
|
264
|
+
|
|
265
|
+
|
|
266
|
+
|
|
267
|
+
|
|
268
|
+
|
|
269
|
+
|
|
270
|
+
|
|
271
|
+
|
|
272
|
+
<span class="summary_desc"><div class='inline'>
|
|
273
|
+
<p>Returns the value of attribute base_path.</p>
|
|
274
|
+
</div></span>
|
|
275
|
+
|
|
276
|
+
</li>
|
|
277
|
+
|
|
278
|
+
|
|
279
|
+
<li class="public ">
|
|
280
|
+
<span class="summary_signature">
|
|
281
|
+
|
|
282
|
+
<a href="#hostname-instance_method" title="#hostname (instance method)">#<strong>hostname</strong> ⇒ Object </a>
|
|
283
|
+
|
|
284
|
+
|
|
285
|
+
|
|
286
|
+
</span>
|
|
287
|
+
|
|
288
|
+
|
|
289
|
+
|
|
290
|
+
|
|
291
|
+
|
|
292
|
+
|
|
293
|
+
|
|
294
|
+
|
|
295
|
+
|
|
296
|
+
|
|
297
|
+
|
|
298
|
+
|
|
299
|
+
<span class="summary_desc"><div class='inline'>
|
|
300
|
+
<p>Returns the value of attribute hostname.</p>
|
|
301
|
+
</div></span>
|
|
302
|
+
|
|
303
|
+
</li>
|
|
304
|
+
|
|
305
|
+
|
|
306
|
+
<li class="public ">
|
|
307
|
+
<span class="summary_signature">
|
|
308
|
+
|
|
309
|
+
<a href="#last_request_time-instance_method" title="#last_request_time (instance method)">#<strong>last_request_time</strong> ⇒ Object </a>
|
|
310
|
+
|
|
311
|
+
|
|
312
|
+
|
|
313
|
+
</span>
|
|
314
|
+
|
|
315
|
+
|
|
316
|
+
|
|
317
|
+
|
|
318
|
+
<span class="note title readonly">readonly</span>
|
|
319
|
+
|
|
320
|
+
|
|
321
|
+
|
|
322
|
+
|
|
323
|
+
|
|
324
|
+
|
|
325
|
+
|
|
326
|
+
|
|
327
|
+
|
|
328
|
+
<span class="summary_desc"><div class='inline'>
|
|
329
|
+
<p>Returns the value of attribute last_request_time.</p>
|
|
330
|
+
</div></span>
|
|
331
|
+
|
|
332
|
+
</li>
|
|
333
|
+
|
|
334
|
+
|
|
335
|
+
<li class="public ">
|
|
336
|
+
<span class="summary_signature">
|
|
337
|
+
|
|
338
|
+
<a href="#logger-instance_method" title="#logger (instance method)">#<strong>logger</strong> ⇒ Object </a>
|
|
339
|
+
|
|
340
|
+
|
|
341
|
+
|
|
342
|
+
</span>
|
|
343
|
+
|
|
344
|
+
|
|
345
|
+
|
|
346
|
+
|
|
347
|
+
|
|
348
|
+
|
|
349
|
+
|
|
350
|
+
|
|
351
|
+
|
|
352
|
+
|
|
353
|
+
|
|
354
|
+
|
|
355
|
+
<span class="summary_desc"><div class='inline'>
|
|
356
|
+
<p>Returns the value of attribute logger.</p>
|
|
357
|
+
</div></span>
|
|
358
|
+
|
|
359
|
+
</li>
|
|
360
|
+
|
|
361
|
+
|
|
362
|
+
<li class="public ">
|
|
363
|
+
<span class="summary_signature">
|
|
364
|
+
|
|
365
|
+
<a href="#path_version-instance_method" title="#path_version (instance method)">#<strong>path_version</strong> ⇒ Object </a>
|
|
366
|
+
|
|
367
|
+
|
|
368
|
+
|
|
369
|
+
</span>
|
|
370
|
+
|
|
371
|
+
|
|
372
|
+
|
|
373
|
+
|
|
374
|
+
|
|
375
|
+
|
|
376
|
+
|
|
377
|
+
|
|
378
|
+
|
|
379
|
+
|
|
380
|
+
|
|
381
|
+
|
|
382
|
+
<span class="summary_desc"><div class='inline'>
|
|
383
|
+
<p>Returns the value of attribute path_version.</p>
|
|
384
|
+
</div></span>
|
|
385
|
+
|
|
386
|
+
</li>
|
|
387
|
+
|
|
388
|
+
|
|
389
|
+
</ul>
|
|
390
|
+
|
|
391
|
+
|
|
392
|
+
|
|
393
|
+
|
|
394
|
+
|
|
395
|
+
<h2>
|
|
396
|
+
Class Method Summary
|
|
397
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
|
398
|
+
</h2>
|
|
399
|
+
|
|
400
|
+
<ul class="summary">
|
|
401
|
+
|
|
402
|
+
<li class="public ">
|
|
403
|
+
<span class="summary_signature">
|
|
404
|
+
|
|
405
|
+
<a href="#configured_instance-class_method" title="configured_instance (class method)">.<strong>configured_instance</strong> ⇒ WscSdk::Client </a>
|
|
406
|
+
|
|
407
|
+
|
|
408
|
+
|
|
409
|
+
</span>
|
|
410
|
+
|
|
411
|
+
|
|
412
|
+
|
|
413
|
+
|
|
414
|
+
|
|
415
|
+
|
|
416
|
+
|
|
417
|
+
|
|
418
|
+
|
|
419
|
+
<span class="summary_desc"><div class='inline'>
|
|
420
|
+
<p>Get an instance of the Client built using the SDK configuration object.</p>
|
|
421
|
+
</div></span>
|
|
422
|
+
|
|
423
|
+
</li>
|
|
424
|
+
|
|
425
|
+
|
|
426
|
+
<li class="public ">
|
|
427
|
+
<span class="summary_signature">
|
|
428
|
+
|
|
429
|
+
<a href="#file_to_base64-class_method" title="file_to_base64 (class method)">.<strong>file_to_base64</strong>(file_path) ⇒ String </a>
|
|
430
|
+
|
|
431
|
+
|
|
432
|
+
|
|
433
|
+
</span>
|
|
434
|
+
|
|
435
|
+
|
|
436
|
+
|
|
437
|
+
|
|
438
|
+
|
|
439
|
+
|
|
440
|
+
|
|
441
|
+
|
|
442
|
+
|
|
443
|
+
<span class="summary_desc"><div class='inline'>
|
|
444
|
+
<p>Convert a file to a base64 encoded string.</p>
|
|
445
|
+
</div></span>
|
|
446
|
+
|
|
447
|
+
</li>
|
|
448
|
+
|
|
449
|
+
|
|
450
|
+
</ul>
|
|
451
|
+
|
|
452
|
+
<h2>
|
|
453
|
+
Instance Method Summary
|
|
454
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
|
455
|
+
</h2>
|
|
456
|
+
|
|
457
|
+
<ul class="summary">
|
|
458
|
+
|
|
459
|
+
<li class="public ">
|
|
460
|
+
<span class="summary_signature">
|
|
461
|
+
|
|
462
|
+
<a href="#delete-instance_method" title="#delete (instance method)">#<strong>delete</strong>(path, options = {}) ⇒ Object </a>
|
|
463
|
+
|
|
464
|
+
|
|
465
|
+
|
|
466
|
+
</span>
|
|
467
|
+
|
|
468
|
+
|
|
469
|
+
|
|
470
|
+
|
|
471
|
+
|
|
472
|
+
|
|
473
|
+
|
|
474
|
+
|
|
475
|
+
|
|
476
|
+
<span class="summary_desc"><div class='inline'>
|
|
477
|
+
<p>Make a GET request against the API.</p>
|
|
478
|
+
</div></span>
|
|
479
|
+
|
|
480
|
+
</li>
|
|
481
|
+
|
|
482
|
+
|
|
483
|
+
<li class="public ">
|
|
484
|
+
<span class="summary_signature">
|
|
485
|
+
|
|
486
|
+
<a href="#full_request_path-instance_method" title="#full_request_path (instance method)">#<strong>full_request_path</strong>(path) ⇒ String </a>
|
|
487
|
+
|
|
488
|
+
|
|
489
|
+
|
|
490
|
+
</span>
|
|
491
|
+
|
|
492
|
+
|
|
493
|
+
|
|
494
|
+
|
|
495
|
+
|
|
496
|
+
|
|
497
|
+
|
|
498
|
+
|
|
499
|
+
|
|
500
|
+
<span class="summary_desc"><div class='inline'>
|
|
501
|
+
<p>Get the fully qualified request path for an API request.</p>
|
|
502
|
+
</div></span>
|
|
503
|
+
|
|
504
|
+
</li>
|
|
505
|
+
|
|
506
|
+
|
|
507
|
+
<li class="public ">
|
|
508
|
+
<span class="summary_signature">
|
|
509
|
+
|
|
510
|
+
<a href="#generate_headers-instance_method" title="#generate_headers (instance method)">#<strong>generate_headers</strong>(request_path, options = {}) ⇒ Hash </a>
|
|
511
|
+
|
|
512
|
+
|
|
513
|
+
|
|
514
|
+
</span>
|
|
515
|
+
|
|
516
|
+
|
|
517
|
+
|
|
518
|
+
|
|
519
|
+
|
|
520
|
+
|
|
521
|
+
|
|
522
|
+
|
|
523
|
+
|
|
524
|
+
<span class="summary_desc"><div class='inline'>
|
|
525
|
+
<p>Get the correct headers for an API request, including the properly formed
|
|
526
|
+
signed authentication headers.</p>
|
|
527
|
+
</div></span>
|
|
528
|
+
|
|
529
|
+
</li>
|
|
530
|
+
|
|
531
|
+
|
|
532
|
+
<li class="public ">
|
|
533
|
+
<span class="summary_signature">
|
|
534
|
+
|
|
535
|
+
<a href="#get-instance_method" title="#get (instance method)">#<strong>get</strong>(path, options = {}) ⇒ Object </a>
|
|
536
|
+
|
|
537
|
+
|
|
538
|
+
|
|
539
|
+
</span>
|
|
540
|
+
|
|
541
|
+
|
|
542
|
+
|
|
543
|
+
|
|
544
|
+
|
|
545
|
+
|
|
546
|
+
|
|
547
|
+
|
|
548
|
+
|
|
549
|
+
<span class="summary_desc"><div class='inline'>
|
|
550
|
+
<p>Make a GET request against the API.</p>
|
|
551
|
+
</div></span>
|
|
552
|
+
|
|
553
|
+
</li>
|
|
554
|
+
|
|
555
|
+
|
|
556
|
+
<li class="public ">
|
|
557
|
+
<span class="summary_signature">
|
|
558
|
+
|
|
559
|
+
<a href="#info-instance_method" title="#info (instance method)">#<strong>info</strong> ⇒ Object </a>
|
|
560
|
+
|
|
561
|
+
|
|
562
|
+
|
|
563
|
+
</span>
|
|
564
|
+
|
|
565
|
+
|
|
566
|
+
|
|
567
|
+
|
|
568
|
+
|
|
569
|
+
|
|
570
|
+
|
|
571
|
+
|
|
572
|
+
|
|
573
|
+
<span class="summary_desc"><div class='inline'>
|
|
574
|
+
<p>Get debug information about the client configuration.</p>
|
|
575
|
+
</div></span>
|
|
576
|
+
|
|
577
|
+
</li>
|
|
578
|
+
|
|
579
|
+
|
|
580
|
+
<li class="public ">
|
|
581
|
+
<span class="summary_signature">
|
|
582
|
+
|
|
583
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(options = {}) ⇒ Client </a>
|
|
584
|
+
|
|
585
|
+
|
|
586
|
+
|
|
587
|
+
</span>
|
|
588
|
+
|
|
589
|
+
|
|
590
|
+
<span class="note title constructor">constructor</span>
|
|
591
|
+
|
|
592
|
+
|
|
593
|
+
|
|
594
|
+
|
|
595
|
+
|
|
596
|
+
|
|
597
|
+
|
|
598
|
+
|
|
599
|
+
<span class="summary_desc"><div class='inline'>
|
|
600
|
+
<p>Create a new instance of the client.</p>
|
|
601
|
+
</div></span>
|
|
602
|
+
|
|
603
|
+
</li>
|
|
604
|
+
|
|
605
|
+
|
|
606
|
+
<li class="public ">
|
|
607
|
+
<span class="summary_signature">
|
|
608
|
+
|
|
609
|
+
<a href="#live_streams-instance_method" title="#live_streams (instance method)">#<strong>live_streams</strong> ⇒ Wsc::Endpoints::Transcoders </a>
|
|
610
|
+
|
|
611
|
+
|
|
612
|
+
|
|
613
|
+
</span>
|
|
614
|
+
|
|
615
|
+
|
|
616
|
+
|
|
617
|
+
|
|
618
|
+
|
|
619
|
+
|
|
620
|
+
|
|
621
|
+
|
|
622
|
+
|
|
623
|
+
<span class="summary_desc"><div class='inline'>
|
|
624
|
+
<p>Access the /transcoders endpoints.</p>
|
|
625
|
+
</div></span>
|
|
626
|
+
|
|
627
|
+
</li>
|
|
628
|
+
|
|
629
|
+
|
|
630
|
+
<li class="public ">
|
|
631
|
+
<span class="summary_signature">
|
|
632
|
+
|
|
633
|
+
<a href="#patch-instance_method" title="#patch (instance method)">#<strong>patch</strong>(path, options = {}) ⇒ Object </a>
|
|
634
|
+
|
|
635
|
+
|
|
636
|
+
|
|
637
|
+
</span>
|
|
638
|
+
|
|
639
|
+
|
|
640
|
+
|
|
641
|
+
|
|
642
|
+
|
|
643
|
+
|
|
644
|
+
|
|
645
|
+
|
|
646
|
+
|
|
647
|
+
<span class="summary_desc"><div class='inline'>
|
|
648
|
+
<p>Make a GET request against the API.</p>
|
|
649
|
+
</div></span>
|
|
650
|
+
|
|
651
|
+
</li>
|
|
652
|
+
|
|
653
|
+
|
|
654
|
+
<li class="public ">
|
|
655
|
+
<span class="summary_signature">
|
|
656
|
+
|
|
657
|
+
<a href="#post-instance_method" title="#post (instance method)">#<strong>post</strong>(path, options = {}) ⇒ Object </a>
|
|
658
|
+
|
|
659
|
+
|
|
660
|
+
|
|
661
|
+
</span>
|
|
662
|
+
|
|
663
|
+
|
|
664
|
+
|
|
665
|
+
|
|
666
|
+
|
|
667
|
+
|
|
668
|
+
|
|
669
|
+
|
|
670
|
+
|
|
671
|
+
<span class="summary_desc"><div class='inline'>
|
|
672
|
+
<p>Make a POST request against the API.</p>
|
|
673
|
+
</div></span>
|
|
674
|
+
|
|
675
|
+
</li>
|
|
676
|
+
|
|
677
|
+
|
|
678
|
+
<li class="public ">
|
|
679
|
+
<span class="summary_signature">
|
|
680
|
+
|
|
681
|
+
<a href="#put-instance_method" title="#put (instance method)">#<strong>put</strong>(path, options = {}) ⇒ Object </a>
|
|
682
|
+
|
|
683
|
+
|
|
684
|
+
|
|
685
|
+
</span>
|
|
686
|
+
|
|
687
|
+
|
|
688
|
+
|
|
689
|
+
|
|
690
|
+
|
|
691
|
+
|
|
692
|
+
|
|
693
|
+
|
|
694
|
+
|
|
695
|
+
<span class="summary_desc"><div class='inline'>
|
|
696
|
+
<p>Make a GET request against the API.</p>
|
|
697
|
+
</div></span>
|
|
698
|
+
|
|
699
|
+
</li>
|
|
700
|
+
|
|
701
|
+
|
|
702
|
+
<li class="public ">
|
|
703
|
+
<span class="summary_signature">
|
|
704
|
+
|
|
705
|
+
<a href="#request_endpoint-instance_method" title="#request_endpoint (instance method)">#<strong>request_endpoint</strong>(method, path, body = {}) ⇒ Object </a>
|
|
706
|
+
|
|
707
|
+
|
|
708
|
+
|
|
709
|
+
</span>
|
|
710
|
+
|
|
711
|
+
|
|
712
|
+
|
|
713
|
+
|
|
714
|
+
|
|
715
|
+
|
|
716
|
+
|
|
717
|
+
|
|
718
|
+
|
|
719
|
+
<span class="summary_desc"><div class='inline'>
|
|
720
|
+
<p>A generic way to request against an endpoint in the API.</p>
|
|
721
|
+
</div></span>
|
|
722
|
+
|
|
723
|
+
</li>
|
|
724
|
+
|
|
725
|
+
|
|
726
|
+
<li class="public ">
|
|
727
|
+
<span class="summary_signature">
|
|
728
|
+
|
|
729
|
+
<a href="#request_params-instance_method" title="#request_params (instance method)">#<strong>request_params</strong>(options = {}) ⇒ Object </a>
|
|
730
|
+
|
|
731
|
+
|
|
732
|
+
|
|
733
|
+
</span>
|
|
734
|
+
|
|
735
|
+
|
|
736
|
+
|
|
737
|
+
|
|
738
|
+
|
|
739
|
+
|
|
740
|
+
|
|
741
|
+
|
|
742
|
+
|
|
743
|
+
<span class="summary_desc"><div class='inline'>
|
|
744
|
+
<p>Generate a set of request params for an API request.</p>
|
|
745
|
+
</div></span>
|
|
746
|
+
|
|
747
|
+
</li>
|
|
748
|
+
|
|
749
|
+
|
|
750
|
+
<li class="public ">
|
|
751
|
+
<span class="summary_signature">
|
|
752
|
+
|
|
753
|
+
<a href="#stream_targets-instance_method" title="#stream_targets (instance method)">#<strong>stream_targets</strong> ⇒ Wsc::Endpoints::StreamTargets </a>
|
|
754
|
+
|
|
755
|
+
|
|
756
|
+
|
|
757
|
+
</span>
|
|
758
|
+
|
|
759
|
+
|
|
760
|
+
|
|
761
|
+
|
|
762
|
+
|
|
763
|
+
|
|
764
|
+
|
|
765
|
+
|
|
766
|
+
|
|
767
|
+
<span class="summary_desc"><div class='inline'>
|
|
768
|
+
<p>Access the /stream_targets endpoints.</p>
|
|
769
|
+
</div></span>
|
|
770
|
+
|
|
771
|
+
</li>
|
|
772
|
+
|
|
773
|
+
|
|
774
|
+
<li class="public ">
|
|
775
|
+
<span class="summary_signature">
|
|
776
|
+
|
|
777
|
+
<a href="#to_s-instance_method" title="#to_s (instance method)">#<strong>to_s</strong> ⇒ String </a>
|
|
778
|
+
|
|
779
|
+
|
|
780
|
+
|
|
781
|
+
</span>
|
|
782
|
+
|
|
783
|
+
|
|
784
|
+
|
|
785
|
+
|
|
786
|
+
|
|
787
|
+
|
|
788
|
+
|
|
789
|
+
|
|
790
|
+
|
|
791
|
+
<span class="summary_desc"><div class='inline'>
|
|
792
|
+
<p>Outputs the details of the client as a string.</p>
|
|
793
|
+
</div></span>
|
|
794
|
+
|
|
795
|
+
</li>
|
|
796
|
+
|
|
797
|
+
|
|
798
|
+
<li class="public ">
|
|
799
|
+
<span class="summary_signature">
|
|
800
|
+
|
|
801
|
+
<a href="#transcoders-instance_method" title="#transcoders (instance method)">#<strong>transcoders</strong> ⇒ Wsc::Endpoints::Transcoders </a>
|
|
802
|
+
|
|
803
|
+
|
|
804
|
+
|
|
805
|
+
</span>
|
|
806
|
+
|
|
807
|
+
|
|
808
|
+
|
|
809
|
+
|
|
810
|
+
|
|
811
|
+
|
|
812
|
+
|
|
813
|
+
|
|
814
|
+
|
|
815
|
+
<span class="summary_desc"><div class='inline'>
|
|
816
|
+
<p>Access the /transcoders endpoints.</p>
|
|
817
|
+
</div></span>
|
|
818
|
+
|
|
819
|
+
</li>
|
|
820
|
+
|
|
821
|
+
|
|
822
|
+
</ul>
|
|
823
|
+
|
|
824
|
+
|
|
825
|
+
|
|
826
|
+
<div id="constructor_details" class="method_details_list">
|
|
827
|
+
<h2>Constructor Details</h2>
|
|
828
|
+
|
|
829
|
+
<div class="method_details first">
|
|
830
|
+
<h3 class="signature first" id="initialize-instance_method">
|
|
831
|
+
|
|
832
|
+
#<strong>initialize</strong>(options = {}) ⇒ <tt><span class='object_link'><a href="" title="WscSdk::Client (class)">Client</a></span></tt>
|
|
833
|
+
|
|
834
|
+
|
|
835
|
+
|
|
836
|
+
|
|
837
|
+
|
|
838
|
+
</h3><div class="docstring">
|
|
839
|
+
<div class="discussion">
|
|
840
|
+
|
|
841
|
+
<p>Create a new instance of the client.</p>
|
|
842
|
+
|
|
843
|
+
|
|
844
|
+
</div>
|
|
845
|
+
</div>
|
|
846
|
+
<div class="tags">
|
|
847
|
+
<p class="tag_title">Parameters:</p>
|
|
848
|
+
<ul class="param">
|
|
849
|
+
|
|
850
|
+
<li>
|
|
851
|
+
|
|
852
|
+
<span class='name'>options</span>
|
|
853
|
+
|
|
854
|
+
|
|
855
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
|
856
|
+
|
|
857
|
+
|
|
858
|
+
<em class="default">(defaults to: <tt>{}</tt>)</em>
|
|
859
|
+
|
|
860
|
+
|
|
861
|
+
—
|
|
862
|
+
<div class='inline'>
|
|
863
|
+
<p>A hash of options.</p>
|
|
864
|
+
</div>
|
|
865
|
+
|
|
866
|
+
</li>
|
|
867
|
+
|
|
868
|
+
</ul>
|
|
869
|
+
|
|
870
|
+
|
|
871
|
+
|
|
872
|
+
|
|
873
|
+
<p class="tag_title">Options Hash (<tt>options</tt>):</p>
|
|
874
|
+
<ul class="option">
|
|
875
|
+
|
|
876
|
+
<li>
|
|
877
|
+
<span class="name">:api_key</span>
|
|
878
|
+
<span class="type">(<tt>String</tt>)</span>
|
|
879
|
+
<span class="default">
|
|
880
|
+
|
|
881
|
+
</span>
|
|
882
|
+
|
|
883
|
+
— <div class='inline'>
|
|
884
|
+
<p>The account's API key. Used to generated signatures for the API
|
|
885
|
+
request headers.</p>
|
|
886
|
+
</div>
|
|
887
|
+
|
|
888
|
+
</li>
|
|
889
|
+
|
|
890
|
+
<li>
|
|
891
|
+
<span class="name">:access_key</span>
|
|
892
|
+
<span class="type">(<tt>String</tt>)</span>
|
|
893
|
+
<span class="default">
|
|
894
|
+
|
|
895
|
+
</span>
|
|
896
|
+
|
|
897
|
+
— <div class='inline'>
|
|
898
|
+
<p>The account's access key. Used to identify the profile making the API
|
|
899
|
+
requests.</p>
|
|
900
|
+
</div>
|
|
901
|
+
|
|
902
|
+
</li>
|
|
903
|
+
|
|
904
|
+
<li>
|
|
905
|
+
<span class="name">:hostname</span>
|
|
906
|
+
<span class="type">(<tt>String</tt>)</span>
|
|
907
|
+
<span class="default">
|
|
908
|
+
|
|
909
|
+
</span>
|
|
910
|
+
|
|
911
|
+
— <div class='inline'>
|
|
912
|
+
<p>The hostname to use when generating requests to the API.</p>
|
|
913
|
+
</div>
|
|
914
|
+
|
|
915
|
+
</li>
|
|
916
|
+
|
|
917
|
+
<li>
|
|
918
|
+
<span class="name">:logger</span>
|
|
919
|
+
<span class="type">(<tt>Logger</tt>)</span>
|
|
920
|
+
<span class="default">
|
|
921
|
+
|
|
922
|
+
</span>
|
|
923
|
+
|
|
924
|
+
— <div class='inline'>
|
|
925
|
+
<p>The logger to use when generating log output in the SDK.</p>
|
|
926
|
+
</div>
|
|
927
|
+
|
|
928
|
+
</li>
|
|
929
|
+
|
|
930
|
+
<li>
|
|
931
|
+
<span class="name">:version</span>
|
|
932
|
+
<span class="type">(<tt>String</tt>)</span>
|
|
933
|
+
<span class="default">
|
|
934
|
+
|
|
935
|
+
</span>
|
|
936
|
+
|
|
937
|
+
— <div class='inline'>
|
|
938
|
+
<p>The version of the API to use when generating requests to the API.</p>
|
|
939
|
+
</div>
|
|
940
|
+
|
|
941
|
+
</li>
|
|
942
|
+
|
|
943
|
+
</ul>
|
|
944
|
+
|
|
945
|
+
|
|
946
|
+
|
|
947
|
+
</div><table class="source_code">
|
|
948
|
+
<tr>
|
|
949
|
+
<td>
|
|
950
|
+
<pre class="lines">
|
|
951
|
+
|
|
952
|
+
|
|
953
|
+
61
|
|
954
|
+
62
|
|
955
|
+
63
|
|
956
|
+
64
|
|
957
|
+
65
|
|
958
|
+
66
|
|
959
|
+
67
|
|
960
|
+
68
|
|
961
|
+
69</pre>
|
|
962
|
+
</td>
|
|
963
|
+
<td>
|
|
964
|
+
<pre class="code"><span class="info file"># File 'lib/wsc_sdk/client.rb', line 61</span>
|
|
965
|
+
|
|
966
|
+
<span style="color:#080;font-weight:bold">def</span> <span style="color:#06B;font-weight:bold">initialize</span>(options={})
|
|
967
|
+
<span style="color:#33B">@api_key</span> = options.fetch(<span style="color:#A60">:api_key</span>, <span style="color:#036;font-weight:bold">WscSdk</span>.configuration.api_key)
|
|
968
|
+
<span style="color:#33B">@access_key</span> = options.fetch(<span style="color:#A60">:access_key</span>, <span style="color:#036;font-weight:bold">WscSdk</span>.configuration.access_key)
|
|
969
|
+
<span style="color:#33B">@hostname</span> = options.fetch(<span style="color:#A60">:hostname</span>, <span style="color:#036;font-weight:bold">WscSdk</span>.configuration.hostname)
|
|
970
|
+
<span style="color:#33B">@path_version</span> = options.fetch(<span style="color:#A60">:version</span>, <span style="color:#036;font-weight:bold">WscSdk</span>.configuration.version)
|
|
971
|
+
<span style="color:#33B">@base_path</span> = [<span style="background-color:hsla(0,100%,50%,0.05)"><span style="color:#710">"</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">api</span><span style="color:#710">"</span></span>, <span style="color:#33B">@path_version</span>].join(<span style="background-color:hsla(0,100%,50%,0.05)"><span style="color:#710">"</span><span style="color:#D20">/</span><span style="color:#710">"</span></span>)
|
|
972
|
+
<span style="color:#33B">@logger</span> = options.fetch(<span style="color:#A60">:logger</span>, <span style="color:#036;font-weight:bold">WscSdk</span>.configuration.logger)
|
|
973
|
+
<span style="color:#069">self</span>.class.base_uri(<span style="color:#33B">@hostname</span>)
|
|
974
|
+
<span style="color:#080;font-weight:bold">end</span></pre>
|
|
975
|
+
</td>
|
|
976
|
+
</tr>
|
|
977
|
+
</table>
|
|
978
|
+
</div>
|
|
979
|
+
|
|
980
|
+
</div>
|
|
981
|
+
|
|
982
|
+
<div id="instance_attr_details" class="attr_details">
|
|
983
|
+
<h2>Instance Attribute Details</h2>
|
|
984
|
+
|
|
985
|
+
|
|
986
|
+
<span id="access_key=-instance_method"></span>
|
|
987
|
+
<div class="method_details first">
|
|
988
|
+
<h3 class="signature first" id="access_key-instance_method">
|
|
989
|
+
|
|
990
|
+
#<strong>access_key</strong> ⇒ <tt>Object</tt>
|
|
991
|
+
|
|
992
|
+
|
|
993
|
+
|
|
994
|
+
|
|
995
|
+
|
|
996
|
+
</h3><div class="docstring">
|
|
997
|
+
<div class="discussion">
|
|
998
|
+
|
|
999
|
+
<p>Returns the value of attribute access_key</p>
|
|
1000
|
+
|
|
1001
|
+
|
|
1002
|
+
</div>
|
|
1003
|
+
</div>
|
|
1004
|
+
<div class="tags">
|
|
1005
|
+
|
|
1006
|
+
|
|
1007
|
+
</div><table class="source_code">
|
|
1008
|
+
<tr>
|
|
1009
|
+
<td>
|
|
1010
|
+
<pre class="lines">
|
|
1011
|
+
|
|
1012
|
+
|
|
1013
|
+
35
|
|
1014
|
+
36
|
|
1015
|
+
37</pre>
|
|
1016
|
+
</td>
|
|
1017
|
+
<td>
|
|
1018
|
+
<pre class="code"><span class="info file"># File 'lib/wsc_sdk/client.rb', line 35</span>
|
|
1019
|
+
|
|
1020
|
+
<span style="color:#080;font-weight:bold">def</span> <span style="color:#06B;font-weight:bold">access_key</span>
|
|
1021
|
+
<span style="color:#33B">@access_key</span>
|
|
1022
|
+
<span style="color:#080;font-weight:bold">end</span></pre>
|
|
1023
|
+
</td>
|
|
1024
|
+
</tr>
|
|
1025
|
+
</table>
|
|
1026
|
+
</div>
|
|
1027
|
+
|
|
1028
|
+
|
|
1029
|
+
<span id="api_key=-instance_method"></span>
|
|
1030
|
+
<div class="method_details ">
|
|
1031
|
+
<h3 class="signature " id="api_key-instance_method">
|
|
1032
|
+
|
|
1033
|
+
#<strong>api_key</strong> ⇒ <tt>Object</tt>
|
|
1034
|
+
|
|
1035
|
+
|
|
1036
|
+
|
|
1037
|
+
|
|
1038
|
+
|
|
1039
|
+
</h3><div class="docstring">
|
|
1040
|
+
<div class="discussion">
|
|
1041
|
+
|
|
1042
|
+
<p>Returns the value of attribute api_key</p>
|
|
1043
|
+
|
|
1044
|
+
|
|
1045
|
+
</div>
|
|
1046
|
+
</div>
|
|
1047
|
+
<div class="tags">
|
|
1048
|
+
|
|
1049
|
+
|
|
1050
|
+
</div><table class="source_code">
|
|
1051
|
+
<tr>
|
|
1052
|
+
<td>
|
|
1053
|
+
<pre class="lines">
|
|
1054
|
+
|
|
1055
|
+
|
|
1056
|
+
35
|
|
1057
|
+
36
|
|
1058
|
+
37</pre>
|
|
1059
|
+
</td>
|
|
1060
|
+
<td>
|
|
1061
|
+
<pre class="code"><span class="info file"># File 'lib/wsc_sdk/client.rb', line 35</span>
|
|
1062
|
+
|
|
1063
|
+
<span style="color:#080;font-weight:bold">def</span> <span style="color:#06B;font-weight:bold">api_key</span>
|
|
1064
|
+
<span style="color:#33B">@api_key</span>
|
|
1065
|
+
<span style="color:#080;font-weight:bold">end</span></pre>
|
|
1066
|
+
</td>
|
|
1067
|
+
</tr>
|
|
1068
|
+
</table>
|
|
1069
|
+
</div>
|
|
1070
|
+
|
|
1071
|
+
|
|
1072
|
+
<span id="base_path=-instance_method"></span>
|
|
1073
|
+
<div class="method_details ">
|
|
1074
|
+
<h3 class="signature " id="base_path-instance_method">
|
|
1075
|
+
|
|
1076
|
+
#<strong>base_path</strong> ⇒ <tt>Object</tt>
|
|
1077
|
+
|
|
1078
|
+
|
|
1079
|
+
|
|
1080
|
+
|
|
1081
|
+
|
|
1082
|
+
</h3><div class="docstring">
|
|
1083
|
+
<div class="discussion">
|
|
1084
|
+
|
|
1085
|
+
<p>Returns the value of attribute base_path</p>
|
|
1086
|
+
|
|
1087
|
+
|
|
1088
|
+
</div>
|
|
1089
|
+
</div>
|
|
1090
|
+
<div class="tags">
|
|
1091
|
+
|
|
1092
|
+
|
|
1093
|
+
</div><table class="source_code">
|
|
1094
|
+
<tr>
|
|
1095
|
+
<td>
|
|
1096
|
+
<pre class="lines">
|
|
1097
|
+
|
|
1098
|
+
|
|
1099
|
+
35
|
|
1100
|
+
36
|
|
1101
|
+
37</pre>
|
|
1102
|
+
</td>
|
|
1103
|
+
<td>
|
|
1104
|
+
<pre class="code"><span class="info file"># File 'lib/wsc_sdk/client.rb', line 35</span>
|
|
1105
|
+
|
|
1106
|
+
<span style="color:#080;font-weight:bold">def</span> <span style="color:#06B;font-weight:bold">base_path</span>
|
|
1107
|
+
<span style="color:#33B">@base_path</span>
|
|
1108
|
+
<span style="color:#080;font-weight:bold">end</span></pre>
|
|
1109
|
+
</td>
|
|
1110
|
+
</tr>
|
|
1111
|
+
</table>
|
|
1112
|
+
</div>
|
|
1113
|
+
|
|
1114
|
+
|
|
1115
|
+
<span id="hostname=-instance_method"></span>
|
|
1116
|
+
<div class="method_details ">
|
|
1117
|
+
<h3 class="signature " id="hostname-instance_method">
|
|
1118
|
+
|
|
1119
|
+
#<strong>hostname</strong> ⇒ <tt>Object</tt>
|
|
1120
|
+
|
|
1121
|
+
|
|
1122
|
+
|
|
1123
|
+
|
|
1124
|
+
|
|
1125
|
+
</h3><div class="docstring">
|
|
1126
|
+
<div class="discussion">
|
|
1127
|
+
|
|
1128
|
+
<p>Returns the value of attribute hostname</p>
|
|
1129
|
+
|
|
1130
|
+
|
|
1131
|
+
</div>
|
|
1132
|
+
</div>
|
|
1133
|
+
<div class="tags">
|
|
1134
|
+
|
|
1135
|
+
|
|
1136
|
+
</div><table class="source_code">
|
|
1137
|
+
<tr>
|
|
1138
|
+
<td>
|
|
1139
|
+
<pre class="lines">
|
|
1140
|
+
|
|
1141
|
+
|
|
1142
|
+
35
|
|
1143
|
+
36
|
|
1144
|
+
37</pre>
|
|
1145
|
+
</td>
|
|
1146
|
+
<td>
|
|
1147
|
+
<pre class="code"><span class="info file"># File 'lib/wsc_sdk/client.rb', line 35</span>
|
|
1148
|
+
|
|
1149
|
+
<span style="color:#080;font-weight:bold">def</span> <span style="color:#06B;font-weight:bold">hostname</span>
|
|
1150
|
+
<span style="color:#33B">@hostname</span>
|
|
1151
|
+
<span style="color:#080;font-weight:bold">end</span></pre>
|
|
1152
|
+
</td>
|
|
1153
|
+
</tr>
|
|
1154
|
+
</table>
|
|
1155
|
+
</div>
|
|
1156
|
+
|
|
1157
|
+
|
|
1158
|
+
<span id=""></span>
|
|
1159
|
+
<div class="method_details ">
|
|
1160
|
+
<h3 class="signature " id="last_request_time-instance_method">
|
|
1161
|
+
|
|
1162
|
+
#<strong>last_request_time</strong> ⇒ <tt>Object</tt> <span class="extras">(readonly)</span>
|
|
1163
|
+
|
|
1164
|
+
|
|
1165
|
+
|
|
1166
|
+
|
|
1167
|
+
|
|
1168
|
+
</h3><div class="docstring">
|
|
1169
|
+
<div class="discussion">
|
|
1170
|
+
|
|
1171
|
+
<p>Returns the value of attribute last_request_time</p>
|
|
1172
|
+
|
|
1173
|
+
|
|
1174
|
+
</div>
|
|
1175
|
+
</div>
|
|
1176
|
+
<div class="tags">
|
|
1177
|
+
|
|
1178
|
+
|
|
1179
|
+
</div><table class="source_code">
|
|
1180
|
+
<tr>
|
|
1181
|
+
<td>
|
|
1182
|
+
<pre class="lines">
|
|
1183
|
+
|
|
1184
|
+
|
|
1185
|
+
37
|
|
1186
|
+
38
|
|
1187
|
+
39</pre>
|
|
1188
|
+
</td>
|
|
1189
|
+
<td>
|
|
1190
|
+
<pre class="code"><span class="info file"># File 'lib/wsc_sdk/client.rb', line 37</span>
|
|
1191
|
+
|
|
1192
|
+
<span style="color:#080;font-weight:bold">def</span> <span style="color:#06B;font-weight:bold">last_request_time</span>
|
|
1193
|
+
<span style="color:#33B">@last_request_time</span>
|
|
1194
|
+
<span style="color:#080;font-weight:bold">end</span></pre>
|
|
1195
|
+
</td>
|
|
1196
|
+
</tr>
|
|
1197
|
+
</table>
|
|
1198
|
+
</div>
|
|
1199
|
+
|
|
1200
|
+
|
|
1201
|
+
<span id="logger=-instance_method"></span>
|
|
1202
|
+
<div class="method_details ">
|
|
1203
|
+
<h3 class="signature " id="logger-instance_method">
|
|
1204
|
+
|
|
1205
|
+
#<strong>logger</strong> ⇒ <tt>Object</tt>
|
|
1206
|
+
|
|
1207
|
+
|
|
1208
|
+
|
|
1209
|
+
|
|
1210
|
+
|
|
1211
|
+
</h3><div class="docstring">
|
|
1212
|
+
<div class="discussion">
|
|
1213
|
+
|
|
1214
|
+
<p>Returns the value of attribute logger</p>
|
|
1215
|
+
|
|
1216
|
+
|
|
1217
|
+
</div>
|
|
1218
|
+
</div>
|
|
1219
|
+
<div class="tags">
|
|
1220
|
+
|
|
1221
|
+
|
|
1222
|
+
</div><table class="source_code">
|
|
1223
|
+
<tr>
|
|
1224
|
+
<td>
|
|
1225
|
+
<pre class="lines">
|
|
1226
|
+
|
|
1227
|
+
|
|
1228
|
+
35
|
|
1229
|
+
36
|
|
1230
|
+
37</pre>
|
|
1231
|
+
</td>
|
|
1232
|
+
<td>
|
|
1233
|
+
<pre class="code"><span class="info file"># File 'lib/wsc_sdk/client.rb', line 35</span>
|
|
1234
|
+
|
|
1235
|
+
<span style="color:#080;font-weight:bold">def</span> <span style="color:#06B;font-weight:bold">logger</span>
|
|
1236
|
+
<span style="color:#33B">@logger</span>
|
|
1237
|
+
<span style="color:#080;font-weight:bold">end</span></pre>
|
|
1238
|
+
</td>
|
|
1239
|
+
</tr>
|
|
1240
|
+
</table>
|
|
1241
|
+
</div>
|
|
1242
|
+
|
|
1243
|
+
|
|
1244
|
+
<span id="path_version=-instance_method"></span>
|
|
1245
|
+
<div class="method_details ">
|
|
1246
|
+
<h3 class="signature " id="path_version-instance_method">
|
|
1247
|
+
|
|
1248
|
+
#<strong>path_version</strong> ⇒ <tt>Object</tt>
|
|
1249
|
+
|
|
1250
|
+
|
|
1251
|
+
|
|
1252
|
+
|
|
1253
|
+
|
|
1254
|
+
</h3><div class="docstring">
|
|
1255
|
+
<div class="discussion">
|
|
1256
|
+
|
|
1257
|
+
<p>Returns the value of attribute path_version</p>
|
|
1258
|
+
|
|
1259
|
+
|
|
1260
|
+
</div>
|
|
1261
|
+
</div>
|
|
1262
|
+
<div class="tags">
|
|
1263
|
+
|
|
1264
|
+
|
|
1265
|
+
</div><table class="source_code">
|
|
1266
|
+
<tr>
|
|
1267
|
+
<td>
|
|
1268
|
+
<pre class="lines">
|
|
1269
|
+
|
|
1270
|
+
|
|
1271
|
+
35
|
|
1272
|
+
36
|
|
1273
|
+
37</pre>
|
|
1274
|
+
</td>
|
|
1275
|
+
<td>
|
|
1276
|
+
<pre class="code"><span class="info file"># File 'lib/wsc_sdk/client.rb', line 35</span>
|
|
1277
|
+
|
|
1278
|
+
<span style="color:#080;font-weight:bold">def</span> <span style="color:#06B;font-weight:bold">path_version</span>
|
|
1279
|
+
<span style="color:#33B">@path_version</span>
|
|
1280
|
+
<span style="color:#080;font-weight:bold">end</span></pre>
|
|
1281
|
+
</td>
|
|
1282
|
+
</tr>
|
|
1283
|
+
</table>
|
|
1284
|
+
</div>
|
|
1285
|
+
|
|
1286
|
+
</div>
|
|
1287
|
+
|
|
1288
|
+
|
|
1289
|
+
<div id="class_method_details" class="method_details_list">
|
|
1290
|
+
<h2>Class Method Details</h2>
|
|
1291
|
+
|
|
1292
|
+
|
|
1293
|
+
<div class="method_details first">
|
|
1294
|
+
<h3 class="signature first" id="configured_instance-class_method">
|
|
1295
|
+
|
|
1296
|
+
.<strong>configured_instance</strong> ⇒ <tt><span class='object_link'><a href="" title="WscSdk::Client (class)">WscSdk::Client</a></span></tt>
|
|
1297
|
+
|
|
1298
|
+
|
|
1299
|
+
|
|
1300
|
+
|
|
1301
|
+
|
|
1302
|
+
</h3><div class="docstring">
|
|
1303
|
+
<div class="discussion">
|
|
1304
|
+
|
|
1305
|
+
<p>Get an instance of the Client built using the SDK configuration object.</p>
|
|
1306
|
+
|
|
1307
|
+
|
|
1308
|
+
</div>
|
|
1309
|
+
</div>
|
|
1310
|
+
<div class="tags">
|
|
1311
|
+
|
|
1312
|
+
<p class="tag_title">Returns:</p>
|
|
1313
|
+
<ul class="return">
|
|
1314
|
+
|
|
1315
|
+
<li>
|
|
1316
|
+
|
|
1317
|
+
|
|
1318
|
+
<span class='type'>(<tt><span class='object_link'><a href="" title="WscSdk::Client (class)">WscSdk::Client</a></span></tt>)</span>
|
|
1319
|
+
|
|
1320
|
+
|
|
1321
|
+
|
|
1322
|
+
—
|
|
1323
|
+
<div class='inline'>
|
|
1324
|
+
<p>The configured instance of the client.</p>
|
|
1325
|
+
</div>
|
|
1326
|
+
|
|
1327
|
+
</li>
|
|
1328
|
+
|
|
1329
|
+
</ul>
|
|
1330
|
+
|
|
1331
|
+
</div><table class="source_code">
|
|
1332
|
+
<tr>
|
|
1333
|
+
<td>
|
|
1334
|
+
<pre class="lines">
|
|
1335
|
+
|
|
1336
|
+
|
|
1337
|
+
399
|
|
1338
|
+
400
|
|
1339
|
+
401</pre>
|
|
1340
|
+
</td>
|
|
1341
|
+
<td>
|
|
1342
|
+
<pre class="code"><span class="info file"># File 'lib/wsc_sdk/client.rb', line 399</span>
|
|
1343
|
+
|
|
1344
|
+
<span style="color:#080;font-weight:bold">def</span> <span style="color:#069">self</span>.<span style="color:#06B;font-weight:bold">configured_instance</span>
|
|
1345
|
+
<span style="color:#369">@@client_instance</span> ||= <span style="color:#036;font-weight:bold">WscSdk</span>::<span style="color:#036;font-weight:bold">Client</span>.new
|
|
1346
|
+
<span style="color:#080;font-weight:bold">end</span></pre>
|
|
1347
|
+
</td>
|
|
1348
|
+
</tr>
|
|
1349
|
+
</table>
|
|
1350
|
+
</div>
|
|
1351
|
+
|
|
1352
|
+
<div class="method_details ">
|
|
1353
|
+
<h3 class="signature " id="file_to_base64-class_method">
|
|
1354
|
+
|
|
1355
|
+
.<strong>file_to_base64</strong>(file_path) ⇒ <tt>String</tt>
|
|
1356
|
+
|
|
1357
|
+
|
|
1358
|
+
|
|
1359
|
+
|
|
1360
|
+
|
|
1361
|
+
</h3><div class="docstring">
|
|
1362
|
+
<div class="discussion">
|
|
1363
|
+
|
|
1364
|
+
<p>Convert a file to a base64 encoded string.</p>
|
|
1365
|
+
|
|
1366
|
+
|
|
1367
|
+
</div>
|
|
1368
|
+
</div>
|
|
1369
|
+
<div class="tags">
|
|
1370
|
+
<p class="tag_title">Parameters:</p>
|
|
1371
|
+
<ul class="param">
|
|
1372
|
+
|
|
1373
|
+
<li>
|
|
1374
|
+
|
|
1375
|
+
<span class='name'>file_path</span>
|
|
1376
|
+
|
|
1377
|
+
|
|
1378
|
+
<span class='type'>(<tt>String</tt>)</span>
|
|
1379
|
+
|
|
1380
|
+
|
|
1381
|
+
|
|
1382
|
+
—
|
|
1383
|
+
<div class='inline'>
|
|
1384
|
+
<p>A valid path to a file that should be converted to base64 encoding</p>
|
|
1385
|
+
</div>
|
|
1386
|
+
|
|
1387
|
+
</li>
|
|
1388
|
+
|
|
1389
|
+
</ul>
|
|
1390
|
+
|
|
1391
|
+
<p class="tag_title">Returns:</p>
|
|
1392
|
+
<ul class="return">
|
|
1393
|
+
|
|
1394
|
+
<li>
|
|
1395
|
+
|
|
1396
|
+
|
|
1397
|
+
<span class='type'>(<tt>String</tt>)</span>
|
|
1398
|
+
|
|
1399
|
+
|
|
1400
|
+
|
|
1401
|
+
—
|
|
1402
|
+
<div class='inline'>
|
|
1403
|
+
<p>The base64 encoded string that represents the file.</p>
|
|
1404
|
+
</div>
|
|
1405
|
+
|
|
1406
|
+
</li>
|
|
1407
|
+
|
|
1408
|
+
</ul>
|
|
1409
|
+
<p class="tag_title">Raises:</p>
|
|
1410
|
+
<ul class="raise">
|
|
1411
|
+
|
|
1412
|
+
<li>
|
|
1413
|
+
|
|
1414
|
+
|
|
1415
|
+
<span class='type'></span>
|
|
1416
|
+
|
|
1417
|
+
|
|
1418
|
+
|
|
1419
|
+
|
|
1420
|
+
<div class='inline'><dl class="rdoc-list label-list"><dt>
|
|
1421
|
+
<dd></dd></dl>
|
|
1422
|
+
</div>
|
|
1423
|
+
|
|
1424
|
+
</li>
|
|
1425
|
+
|
|
1426
|
+
</ul>
|
|
1427
|
+
|
|
1428
|
+
</div><table class="source_code">
|
|
1429
|
+
<tr>
|
|
1430
|
+
<td>
|
|
1431
|
+
<pre class="lines">
|
|
1432
|
+
|
|
1433
|
+
|
|
1434
|
+
412
|
|
1435
|
+
413
|
|
1436
|
+
414
|
|
1437
|
+
415</pre>
|
|
1438
|
+
</td>
|
|
1439
|
+
<td>
|
|
1440
|
+
<pre class="code"><span class="info file"># File 'lib/wsc_sdk/client.rb', line 412</span>
|
|
1441
|
+
|
|
1442
|
+
<span style="color:#080;font-weight:bold">def</span> <span style="color:#069">self</span>.<span style="color:#06B;font-weight:bold">file_to_base64</span>(file_path)
|
|
1443
|
+
raise <span style="color:#036;font-weight:bold">ArgumentError</span>.new(<span style="background-color:hsla(0,100%,50%,0.05)"><span style="color:#710">"</span><span style="color:#D20">Could not convert the specified file to Base64, the file couldn't be found: </span><span style="background-color:hsla(0,0%,0%,0.07);color:black"><span style="font-weight:bold;color:#666">#{</span>file_path<span style="font-weight:bold;color:#666">}</span></span><span style="color:#710">"</span></span>) <span style="color:#080;font-weight:bold">unless</span> <span style="color:#036;font-weight:bold">File</span>.exists?(file_path)
|
|
1444
|
+
<span style="color:#036;font-weight:bold">Base64</span>.encode64(<span style="color:#036;font-weight:bold">File</span>.open(file_path, <span style="background-color:hsla(0,100%,50%,0.05)"><span style="color:#710">"</span><span style="color:#D20">rb</span><span style="color:#710">"</span></span>).read)
|
|
1445
|
+
<span style="color:#080;font-weight:bold">end</span></pre>
|
|
1446
|
+
</td>
|
|
1447
|
+
</tr>
|
|
1448
|
+
</table>
|
|
1449
|
+
</div>
|
|
1450
|
+
|
|
1451
|
+
</div>
|
|
1452
|
+
|
|
1453
|
+
<div id="instance_method_details" class="method_details_list">
|
|
1454
|
+
<h2>Instance Method Details</h2>
|
|
1455
|
+
|
|
1456
|
+
|
|
1457
|
+
<div class="method_details first">
|
|
1458
|
+
<h3 class="signature first" id="delete-instance_method">
|
|
1459
|
+
|
|
1460
|
+
#<strong>delete</strong>(path, options = {}) ⇒ <tt>Object</tt>
|
|
1461
|
+
|
|
1462
|
+
|
|
1463
|
+
|
|
1464
|
+
|
|
1465
|
+
|
|
1466
|
+
</h3><div class="docstring">
|
|
1467
|
+
<div class="discussion">
|
|
1468
|
+
|
|
1469
|
+
<p>Make a GET request against the API.</p>
|
|
1470
|
+
|
|
1471
|
+
|
|
1472
|
+
</div>
|
|
1473
|
+
</div>
|
|
1474
|
+
<div class="tags">
|
|
1475
|
+
<p class="tag_title">Parameters:</p>
|
|
1476
|
+
<ul class="param">
|
|
1477
|
+
|
|
1478
|
+
<li>
|
|
1479
|
+
|
|
1480
|
+
<span class='name'>path</span>
|
|
1481
|
+
|
|
1482
|
+
|
|
1483
|
+
<span class='type'>(<tt>String</tt>)</span>
|
|
1484
|
+
|
|
1485
|
+
|
|
1486
|
+
|
|
1487
|
+
—
|
|
1488
|
+
<div class='inline'>
|
|
1489
|
+
<p>The path to request.</p>
|
|
1490
|
+
</div>
|
|
1491
|
+
|
|
1492
|
+
</li>
|
|
1493
|
+
|
|
1494
|
+
<li>
|
|
1495
|
+
|
|
1496
|
+
<span class='name'>options</span>
|
|
1497
|
+
|
|
1498
|
+
|
|
1499
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
|
1500
|
+
|
|
1501
|
+
|
|
1502
|
+
<em class="default">(defaults to: <tt>{}</tt>)</em>
|
|
1503
|
+
|
|
1504
|
+
|
|
1505
|
+
—
|
|
1506
|
+
<div class='inline'>
|
|
1507
|
+
<p>A hash of options.</p>
|
|
1508
|
+
</div>
|
|
1509
|
+
|
|
1510
|
+
</li>
|
|
1511
|
+
|
|
1512
|
+
</ul>
|
|
1513
|
+
|
|
1514
|
+
|
|
1515
|
+
</div><table class="source_code">
|
|
1516
|
+
<tr>
|
|
1517
|
+
<td>
|
|
1518
|
+
<pre class="lines">
|
|
1519
|
+
|
|
1520
|
+
|
|
1521
|
+
192
|
|
1522
|
+
193
|
|
1523
|
+
194</pre>
|
|
1524
|
+
</td>
|
|
1525
|
+
<td>
|
|
1526
|
+
<pre class="code"><span class="info file"># File 'lib/wsc_sdk/client.rb', line 192</span>
|
|
1527
|
+
|
|
1528
|
+
<span style="color:#080;font-weight:bold">def</span> <span style="color:#06B;font-weight:bold">delete</span>(path, options={})
|
|
1529
|
+
send_request(<span style="color:#A60">:delete</span>, path, options)
|
|
1530
|
+
<span style="color:#080;font-weight:bold">end</span></pre>
|
|
1531
|
+
</td>
|
|
1532
|
+
</tr>
|
|
1533
|
+
</table>
|
|
1534
|
+
</div>
|
|
1535
|
+
|
|
1536
|
+
<div class="method_details ">
|
|
1537
|
+
<h3 class="signature " id="full_request_path-instance_method">
|
|
1538
|
+
|
|
1539
|
+
#<strong>full_request_path</strong>(path) ⇒ <tt>String</tt>
|
|
1540
|
+
|
|
1541
|
+
|
|
1542
|
+
|
|
1543
|
+
|
|
1544
|
+
|
|
1545
|
+
</h3><div class="docstring">
|
|
1546
|
+
<div class="discussion">
|
|
1547
|
+
|
|
1548
|
+
<p>Get the fully qualified request path for an API request.</p>
|
|
1549
|
+
|
|
1550
|
+
|
|
1551
|
+
</div>
|
|
1552
|
+
</div>
|
|
1553
|
+
<div class="tags">
|
|
1554
|
+
<p class="tag_title">Parameters:</p>
|
|
1555
|
+
<ul class="param">
|
|
1556
|
+
|
|
1557
|
+
<li>
|
|
1558
|
+
|
|
1559
|
+
<span class='name'>path</span>
|
|
1560
|
+
|
|
1561
|
+
|
|
1562
|
+
<span class='type'>(<tt>String</tt>)</span>
|
|
1563
|
+
|
|
1564
|
+
|
|
1565
|
+
|
|
1566
|
+
—
|
|
1567
|
+
<div class='inline'>
|
|
1568
|
+
<p>The path of the API request.</p>
|
|
1569
|
+
</div>
|
|
1570
|
+
|
|
1571
|
+
</li>
|
|
1572
|
+
|
|
1573
|
+
</ul>
|
|
1574
|
+
|
|
1575
|
+
<p class="tag_title">Returns:</p>
|
|
1576
|
+
<ul class="return">
|
|
1577
|
+
|
|
1578
|
+
<li>
|
|
1579
|
+
|
|
1580
|
+
|
|
1581
|
+
<span class='type'>(<tt>String</tt>)</span>
|
|
1582
|
+
|
|
1583
|
+
|
|
1584
|
+
|
|
1585
|
+
—
|
|
1586
|
+
<div class='inline'>
|
|
1587
|
+
<p>The fully qualified request path.</p>
|
|
1588
|
+
</div>
|
|
1589
|
+
|
|
1590
|
+
</li>
|
|
1591
|
+
|
|
1592
|
+
</ul>
|
|
1593
|
+
|
|
1594
|
+
</div><table class="source_code">
|
|
1595
|
+
<tr>
|
|
1596
|
+
<td>
|
|
1597
|
+
<pre class="lines">
|
|
1598
|
+
|
|
1599
|
+
|
|
1600
|
+
80
|
|
1601
|
+
81
|
|
1602
|
+
82</pre>
|
|
1603
|
+
</td>
|
|
1604
|
+
<td>
|
|
1605
|
+
<pre class="code"><span class="info file"># File 'lib/wsc_sdk/client.rb', line 80</span>
|
|
1606
|
+
|
|
1607
|
+
<span style="color:#080;font-weight:bold">def</span> <span style="color:#06B;font-weight:bold">full_request_path</span>(path)
|
|
1608
|
+
[ base_path, path ].join(<span style="background-color:hsla(0,100%,50%,0.05)"><span style="color:#710">"</span><span style="color:#D20">/</span><span style="color:#710">"</span></span>)
|
|
1609
|
+
<span style="color:#080;font-weight:bold">end</span></pre>
|
|
1610
|
+
</td>
|
|
1611
|
+
</tr>
|
|
1612
|
+
</table>
|
|
1613
|
+
</div>
|
|
1614
|
+
|
|
1615
|
+
<div class="method_details ">
|
|
1616
|
+
<h3 class="signature " id="generate_headers-instance_method">
|
|
1617
|
+
|
|
1618
|
+
#<strong>generate_headers</strong>(request_path, options = {}) ⇒ <tt>Hash</tt>
|
|
1619
|
+
|
|
1620
|
+
|
|
1621
|
+
|
|
1622
|
+
|
|
1623
|
+
|
|
1624
|
+
</h3><div class="docstring">
|
|
1625
|
+
<div class="discussion">
|
|
1626
|
+
|
|
1627
|
+
<p>Get the correct headers for an API request, including the properly formed
|
|
1628
|
+
signed authentication headers.</p>
|
|
1629
|
+
|
|
1630
|
+
|
|
1631
|
+
</div>
|
|
1632
|
+
</div>
|
|
1633
|
+
<div class="tags">
|
|
1634
|
+
<p class="tag_title">Parameters:</p>
|
|
1635
|
+
<ul class="param">
|
|
1636
|
+
|
|
1637
|
+
<li>
|
|
1638
|
+
|
|
1639
|
+
<span class='name'>request_path</span>
|
|
1640
|
+
|
|
1641
|
+
|
|
1642
|
+
<span class='type'>(<tt>String</tt>)</span>
|
|
1643
|
+
|
|
1644
|
+
|
|
1645
|
+
|
|
1646
|
+
—
|
|
1647
|
+
<div class='inline'>
|
|
1648
|
+
<p>The request path to generate the headers for.</p>
|
|
1649
|
+
</div>
|
|
1650
|
+
|
|
1651
|
+
</li>
|
|
1652
|
+
|
|
1653
|
+
<li>
|
|
1654
|
+
|
|
1655
|
+
<span class='name'>options</span>
|
|
1656
|
+
|
|
1657
|
+
|
|
1658
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
|
1659
|
+
|
|
1660
|
+
|
|
1661
|
+
<em class="default">(defaults to: <tt>{}</tt>)</em>
|
|
1662
|
+
|
|
1663
|
+
|
|
1664
|
+
—
|
|
1665
|
+
<div class='inline'>
|
|
1666
|
+
<p>A hash of options</p>
|
|
1667
|
+
</div>
|
|
1668
|
+
|
|
1669
|
+
</li>
|
|
1670
|
+
|
|
1671
|
+
</ul>
|
|
1672
|
+
|
|
1673
|
+
|
|
1674
|
+
|
|
1675
|
+
|
|
1676
|
+
|
|
1677
|
+
|
|
1678
|
+
<p class="tag_title">Options Hash (<tt>options</tt>):</p>
|
|
1679
|
+
<ul class="option">
|
|
1680
|
+
|
|
1681
|
+
<li>
|
|
1682
|
+
<span class="name">:timestamp</span>
|
|
1683
|
+
<span class="type">(<tt>Time</tt>)</span>
|
|
1684
|
+
<span class="default">
|
|
1685
|
+
|
|
1686
|
+
</span>
|
|
1687
|
+
|
|
1688
|
+
— <div class='inline'>
|
|
1689
|
+
<p>The timestamp of the request.</p>
|
|
1690
|
+
</div>
|
|
1691
|
+
|
|
1692
|
+
</li>
|
|
1693
|
+
|
|
1694
|
+
<li>
|
|
1695
|
+
<span class="name">:content_type</span>
|
|
1696
|
+
<span class="type">(<tt>String</tt>)</span>
|
|
1697
|
+
<span class="default">
|
|
1698
|
+
|
|
1699
|
+
— default:
|
|
1700
|
+
<tt>"multipart/form-data"</tt>
|
|
1701
|
+
|
|
1702
|
+
</span>
|
|
1703
|
+
|
|
1704
|
+
— <div class='inline'>
|
|
1705
|
+
<p>The content type to return in the headers.</p>
|
|
1706
|
+
</div>
|
|
1707
|
+
|
|
1708
|
+
</li>
|
|
1709
|
+
|
|
1710
|
+
</ul>
|
|
1711
|
+
|
|
1712
|
+
|
|
1713
|
+
<p class="tag_title">Returns:</p>
|
|
1714
|
+
<ul class="return">
|
|
1715
|
+
|
|
1716
|
+
<li>
|
|
1717
|
+
|
|
1718
|
+
|
|
1719
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
|
1720
|
+
|
|
1721
|
+
|
|
1722
|
+
|
|
1723
|
+
—
|
|
1724
|
+
<div class='inline'>
|
|
1725
|
+
<p>A hash of request headers.</p>
|
|
1726
|
+
</div>
|
|
1727
|
+
|
|
1728
|
+
</li>
|
|
1729
|
+
|
|
1730
|
+
</ul>
|
|
1731
|
+
|
|
1732
|
+
</div><table class="source_code">
|
|
1733
|
+
<tr>
|
|
1734
|
+
<td>
|
|
1735
|
+
<pre class="lines">
|
|
1736
|
+
|
|
1737
|
+
|
|
1738
|
+
270
|
|
1739
|
+
271
|
|
1740
|
+
272
|
|
1741
|
+
273
|
|
1742
|
+
274
|
|
1743
|
+
275
|
|
1744
|
+
276
|
|
1745
|
+
277
|
|
1746
|
+
278
|
|
1747
|
+
279
|
|
1748
|
+
280
|
|
1749
|
+
281
|
|
1750
|
+
282
|
|
1751
|
+
283
|
|
1752
|
+
284</pre>
|
|
1753
|
+
</td>
|
|
1754
|
+
<td>
|
|
1755
|
+
<pre class="code"><span class="info file"># File 'lib/wsc_sdk/client.rb', line 270</span>
|
|
1756
|
+
|
|
1757
|
+
<span style="color:#080;font-weight:bold">def</span> <span style="color:#06B;font-weight:bold">generate_headers</span>(request_path, options={})
|
|
1758
|
+
timestamp = options.fetch(<span style="color:#A60">:timestamp</span>, <span style="color:#036;font-weight:bold">Time</span>.now.to_i)
|
|
1759
|
+
request_path = request_path.split(<span style="background-color:hsla(0,100%,50%,0.05)"><span style="color:#710">"</span><span style="color:#D20">?</span><span style="color:#710">"</span></span>).first.chomp(<span style="background-color:hsla(0,100%,50%,0.05)"><span style="color:#710">"</span><span style="color:#D20">/</span><span style="color:#710">"</span></span>)
|
|
1760
|
+
data = <span style="background-color:hsla(0,100%,50%,0.05)"><span style="color:#710">"</span><span style="background-color:hsla(0,0%,0%,0.07);color:black"><span style="font-weight:bold;color:#666">#{</span>timestamp<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>request_path<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>api_key<span style="font-weight:bold;color:#666">}</span></span><span style="color:#710">"</span></span>
|
|
1761
|
+
signature = <span style="color:#036;font-weight:bold">OpenSSL</span>::<span style="color:#036;font-weight:bold">HMAC</span>.hexdigest(<span style="background-color:hsla(0,100%,50%,0.05)"><span style="color:#710">"</span><span style="color:#D20">SHA256</span><span style="color:#710">"</span></span>, api_key, data)
|
|
1762
|
+
content_type = options.fetch(<span style="color:#A60">:content_type</span>, <span style="background-color:hsla(0,100%,50%,0.05)"><span style="color:#710">"</span><span style="color:#D20">multipart/form-data</span><span style="color:#710">"</span></span>)
|
|
1763
|
+
|
|
1764
|
+
{
|
|
1765
|
+
<span style="background-color:hsla(0,100%,50%,0.05)"><span style="color:#710">'</span><span style="color:#D20">User-Agent</span><span style="color:#710">'</span></span> => <span style="color:#036;font-weight:bold">WscSdk</span>::<span style="color:#036;font-weight:bold">USER_AGENT</span>,
|
|
1766
|
+
<span style="background-color:hsla(0,100%,50%,0.05)"><span style="color:#710">'</span><span style="color:#D20">Wsc-Access-Key</span><span style="color:#710">'</span></span> => access_key,
|
|
1767
|
+
<span style="background-color:hsla(0,100%,50%,0.05)"><span style="color:#710">'</span><span style="color:#D20">Wsc-Timestamp</span><span style="color:#710">'</span></span> => timestamp.to_s,
|
|
1768
|
+
<span style="background-color:hsla(0,100%,50%,0.05)"><span style="color:#710">'</span><span style="color:#D20">Wsc-Signature</span><span style="color:#710">'</span></span> => signature,
|
|
1769
|
+
<span style="background-color:hsla(0,100%,50%,0.05)"><span style="color:#710">'</span><span style="color:#D20">Content-Type</span><span style="color:#710">'</span></span> => content_type
|
|
1770
|
+
}
|
|
1771
|
+
<span style="color:#080;font-weight:bold">end</span></pre>
|
|
1772
|
+
</td>
|
|
1773
|
+
</tr>
|
|
1774
|
+
</table>
|
|
1775
|
+
</div>
|
|
1776
|
+
|
|
1777
|
+
<div class="method_details ">
|
|
1778
|
+
<h3 class="signature " id="get-instance_method">
|
|
1779
|
+
|
|
1780
|
+
#<strong>get</strong>(path, options = {}) ⇒ <tt>Object</tt>
|
|
1781
|
+
|
|
1782
|
+
|
|
1783
|
+
|
|
1784
|
+
|
|
1785
|
+
|
|
1786
|
+
</h3><div class="docstring">
|
|
1787
|
+
<div class="discussion">
|
|
1788
|
+
|
|
1789
|
+
<p>Make a GET request against the API.</p>
|
|
1790
|
+
|
|
1791
|
+
|
|
1792
|
+
</div>
|
|
1793
|
+
</div>
|
|
1794
|
+
<div class="tags">
|
|
1795
|
+
<p class="tag_title">Parameters:</p>
|
|
1796
|
+
<ul class="param">
|
|
1797
|
+
|
|
1798
|
+
<li>
|
|
1799
|
+
|
|
1800
|
+
<span class='name'>path</span>
|
|
1801
|
+
|
|
1802
|
+
|
|
1803
|
+
<span class='type'>(<tt>String</tt>)</span>
|
|
1804
|
+
|
|
1805
|
+
|
|
1806
|
+
|
|
1807
|
+
—
|
|
1808
|
+
<div class='inline'>
|
|
1809
|
+
<p>The path to request.</p>
|
|
1810
|
+
</div>
|
|
1811
|
+
|
|
1812
|
+
</li>
|
|
1813
|
+
|
|
1814
|
+
<li>
|
|
1815
|
+
|
|
1816
|
+
<span class='name'>options</span>
|
|
1817
|
+
|
|
1818
|
+
|
|
1819
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
|
1820
|
+
|
|
1821
|
+
|
|
1822
|
+
<em class="default">(defaults to: <tt>{}</tt>)</em>
|
|
1823
|
+
|
|
1824
|
+
|
|
1825
|
+
—
|
|
1826
|
+
<div class='inline'>
|
|
1827
|
+
<p>A hash of options.</p>
|
|
1828
|
+
</div>
|
|
1829
|
+
|
|
1830
|
+
</li>
|
|
1831
|
+
|
|
1832
|
+
</ul>
|
|
1833
|
+
|
|
1834
|
+
|
|
1835
|
+
</div><table class="source_code">
|
|
1836
|
+
<tr>
|
|
1837
|
+
<td>
|
|
1838
|
+
<pre class="lines">
|
|
1839
|
+
|
|
1840
|
+
|
|
1841
|
+
144
|
|
1842
|
+
145
|
|
1843
|
+
146</pre>
|
|
1844
|
+
</td>
|
|
1845
|
+
<td>
|
|
1846
|
+
<pre class="code"><span class="info file"># File 'lib/wsc_sdk/client.rb', line 144</span>
|
|
1847
|
+
|
|
1848
|
+
<span style="color:#080;font-weight:bold">def</span> <span style="color:#06B;font-weight:bold">get</span>(path, options={})
|
|
1849
|
+
send_request(<span style="color:#A60">:get</span>, path, options)
|
|
1850
|
+
<span style="color:#080;font-weight:bold">end</span></pre>
|
|
1851
|
+
</td>
|
|
1852
|
+
</tr>
|
|
1853
|
+
</table>
|
|
1854
|
+
</div>
|
|
1855
|
+
|
|
1856
|
+
<div class="method_details ">
|
|
1857
|
+
<h3 class="signature " id="info-instance_method">
|
|
1858
|
+
|
|
1859
|
+
#<strong>info</strong> ⇒ <tt>Object</tt>
|
|
1860
|
+
|
|
1861
|
+
|
|
1862
|
+
|
|
1863
|
+
|
|
1864
|
+
|
|
1865
|
+
</h3><div class="docstring">
|
|
1866
|
+
<div class="discussion">
|
|
1867
|
+
|
|
1868
|
+
<p>Get debug information about the client configuration</p>
|
|
1869
|
+
|
|
1870
|
+
|
|
1871
|
+
</div>
|
|
1872
|
+
</div>
|
|
1873
|
+
<div class="tags">
|
|
1874
|
+
|
|
1875
|
+
|
|
1876
|
+
</div><table class="source_code">
|
|
1877
|
+
<tr>
|
|
1878
|
+
<td>
|
|
1879
|
+
<pre class="lines">
|
|
1880
|
+
|
|
1881
|
+
|
|
1882
|
+
326
|
|
1883
|
+
327
|
|
1884
|
+
328
|
|
1885
|
+
329
|
|
1886
|
+
330
|
|
1887
|
+
331
|
|
1888
|
+
332
|
|
1889
|
+
333
|
|
1890
|
+
334
|
|
1891
|
+
335
|
|
1892
|
+
336
|
|
1893
|
+
337
|
|
1894
|
+
338</pre>
|
|
1895
|
+
</td>
|
|
1896
|
+
<td>
|
|
1897
|
+
<pre class="code"><span class="info file"># File 'lib/wsc_sdk/client.rb', line 326</span>
|
|
1898
|
+
|
|
1899
|
+
<span style="color:#080;font-weight:bold">def</span> <span style="color:#06B;font-weight:bold">info</span>
|
|
1900
|
+
{
|
|
1901
|
+
<span style="color:#606">access_key</span>: (<span style="background-color:hsla(0,100%,50%,0.05)"><span style="color:#710">"</span><span style="background-color:hsla(0,0%,0%,0.07);color:black"><span style="font-weight:bold;color:#666">#{</span>access_key[<span style="color:#00D">0</span>..<span style="color:#00D">5</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>access_key[<span style="color:#00D">-6</span>..<span style="color:#00D">-1</span>]<span style="font-weight:bold;color:#666">}</span></span><span style="color:#710">"</span></span> <span style="color:#080;font-weight:bold">rescue</span> <span style="background-color:hsla(0,100%,50%,0.05)"><span style="color:#710">"</span><span style="color:#D20">invalid</span><span style="color:#710">"</span></span>),
|
|
1902
|
+
<span style="color:#606">api_key</span>: (<span style="background-color:hsla(0,100%,50%,0.05)"><span style="color:#710">"</span><span style="background-color:hsla(0,0%,0%,0.07);color:black"><span style="font-weight:bold;color:#666">#{</span>api_key[<span style="color:#00D">0</span>..<span style="color:#00D">5</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>api_key[<span style="color:#00D">-6</span>..<span style="color:#00D">-1</span>]<span style="font-weight:bold;color:#666">}</span></span><span style="color:#710">"</span></span> <span style="color:#080;font-weight:bold">rescue</span> <span style="background-color:hsla(0,100%,50%,0.05)"><span style="color:#710">"</span><span style="color:#D20">invalid</span><span style="color:#710">"</span></span>),
|
|
1903
|
+
<span style="color:#606">base_path</span>: base_path,
|
|
1904
|
+
<span style="color:#606">hostname</span>: hostname,
|
|
1905
|
+
<span style="color:#606">path_version</span>: path_version,
|
|
1906
|
+
<span style="color:#606">logger</span>: (logger.class.name <span style="color:#080;font-weight:bold">rescue</span> <span style="background-color:hsla(0,100%,50%,0.05)"><span style="color:#710">"</span><span style="color:#D20">nil</span><span style="color:#710">"</span></span>),
|
|
1907
|
+
<span style="color:#606">logger_level</span>: (logger.level <span style="color:#080;font-weight:bold">rescue</span> <span style="background-color:hsla(0,100%,50%,0.05)"><span style="color:#710">"</span><span style="color:#D20">nil</span><span style="color:#710">"</span></span>),
|
|
1908
|
+
<span style="color:#606">throttle</span>: <span style="color:#036;font-weight:bold">MAX_REQUESTS_PER_SECOND</span>,
|
|
1909
|
+
<span style="color:#606">user_agent</span>: <span style="color:#036;font-weight:bold">WscSdk</span>::<span style="color:#036;font-weight:bold">USER_AGENT</span>
|
|
1910
|
+
}
|
|
1911
|
+
<span style="color:#080;font-weight:bold">end</span></pre>
|
|
1912
|
+
</td>
|
|
1913
|
+
</tr>
|
|
1914
|
+
</table>
|
|
1915
|
+
</div>
|
|
1916
|
+
|
|
1917
|
+
<div class="method_details ">
|
|
1918
|
+
<h3 class="signature " id="live_streams-instance_method">
|
|
1919
|
+
|
|
1920
|
+
#<strong>live_streams</strong> ⇒ <tt>Wsc::Endpoints::Transcoders</tt>
|
|
1921
|
+
|
|
1922
|
+
|
|
1923
|
+
|
|
1924
|
+
|
|
1925
|
+
|
|
1926
|
+
</h3><div class="docstring">
|
|
1927
|
+
<div class="discussion">
|
|
1928
|
+
|
|
1929
|
+
<p>Access the /transcoders endpoints</p>
|
|
1930
|
+
|
|
1931
|
+
|
|
1932
|
+
</div>
|
|
1933
|
+
</div>
|
|
1934
|
+
<div class="tags">
|
|
1935
|
+
|
|
1936
|
+
<p class="tag_title">Returns:</p>
|
|
1937
|
+
<ul class="return">
|
|
1938
|
+
|
|
1939
|
+
<li>
|
|
1940
|
+
|
|
1941
|
+
|
|
1942
|
+
<span class='type'>(<tt>Wsc::Endpoints::Transcoders</tt>)</span>
|
|
1943
|
+
|
|
1944
|
+
|
|
1945
|
+
|
|
1946
|
+
—
|
|
1947
|
+
<div class='inline'>
|
|
1948
|
+
<p>An instance of the Transcoders endpoint class.</p>
|
|
1949
|
+
</div>
|
|
1950
|
+
|
|
1951
|
+
</li>
|
|
1952
|
+
|
|
1953
|
+
</ul>
|
|
1954
|
+
|
|
1955
|
+
</div><table class="source_code">
|
|
1956
|
+
<tr>
|
|
1957
|
+
<td>
|
|
1958
|
+
<pre class="lines">
|
|
1959
|
+
|
|
1960
|
+
|
|
1961
|
+
105
|
|
1962
|
+
106
|
|
1963
|
+
107</pre>
|
|
1964
|
+
</td>
|
|
1965
|
+
<td>
|
|
1966
|
+
<pre class="code"><span class="info file"># File 'lib/wsc_sdk/client.rb', line 105</span>
|
|
1967
|
+
|
|
1968
|
+
<span style="color:#080;font-weight:bold">def</span> <span style="color:#06B;font-weight:bold">live_streams</span>
|
|
1969
|
+
<span style="color:#036;font-weight:bold">WscSdk</span>::<span style="color:#036;font-weight:bold">Endpoints</span>::<span style="color:#036;font-weight:bold">LiveStreams</span>.new(<span style="color:#069">self</span>)
|
|
1970
|
+
<span style="color:#080;font-weight:bold">end</span></pre>
|
|
1971
|
+
</td>
|
|
1972
|
+
</tr>
|
|
1973
|
+
</table>
|
|
1974
|
+
</div>
|
|
1975
|
+
|
|
1976
|
+
<div class="method_details ">
|
|
1977
|
+
<h3 class="signature " id="patch-instance_method">
|
|
1978
|
+
|
|
1979
|
+
#<strong>patch</strong>(path, options = {}) ⇒ <tt>Object</tt>
|
|
1980
|
+
|
|
1981
|
+
|
|
1982
|
+
|
|
1983
|
+
|
|
1984
|
+
|
|
1985
|
+
</h3><div class="docstring">
|
|
1986
|
+
<div class="discussion">
|
|
1987
|
+
|
|
1988
|
+
<p>Make a GET request against the API.</p>
|
|
1989
|
+
|
|
1990
|
+
|
|
1991
|
+
</div>
|
|
1992
|
+
</div>
|
|
1993
|
+
<div class="tags">
|
|
1994
|
+
<p class="tag_title">Parameters:</p>
|
|
1995
|
+
<ul class="param">
|
|
1996
|
+
|
|
1997
|
+
<li>
|
|
1998
|
+
|
|
1999
|
+
<span class='name'>path</span>
|
|
2000
|
+
|
|
2001
|
+
|
|
2002
|
+
<span class='type'>(<tt>String</tt>)</span>
|
|
2003
|
+
|
|
2004
|
+
|
|
2005
|
+
|
|
2006
|
+
—
|
|
2007
|
+
<div class='inline'>
|
|
2008
|
+
<p>The path to request.</p>
|
|
2009
|
+
</div>
|
|
2010
|
+
|
|
2011
|
+
</li>
|
|
2012
|
+
|
|
2013
|
+
<li>
|
|
2014
|
+
|
|
2015
|
+
<span class='name'>options</span>
|
|
2016
|
+
|
|
2017
|
+
|
|
2018
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
|
2019
|
+
|
|
2020
|
+
|
|
2021
|
+
<em class="default">(defaults to: <tt>{}</tt>)</em>
|
|
2022
|
+
|
|
2023
|
+
|
|
2024
|
+
—
|
|
2025
|
+
<div class='inline'>
|
|
2026
|
+
<p>A hash of options.</p>
|
|
2027
|
+
</div>
|
|
2028
|
+
|
|
2029
|
+
</li>
|
|
2030
|
+
|
|
2031
|
+
</ul>
|
|
2032
|
+
|
|
2033
|
+
|
|
2034
|
+
</div><table class="source_code">
|
|
2035
|
+
<tr>
|
|
2036
|
+
<td>
|
|
2037
|
+
<pre class="lines">
|
|
2038
|
+
|
|
2039
|
+
|
|
2040
|
+
180
|
|
2041
|
+
181
|
|
2042
|
+
182</pre>
|
|
2043
|
+
</td>
|
|
2044
|
+
<td>
|
|
2045
|
+
<pre class="code"><span class="info file"># File 'lib/wsc_sdk/client.rb', line 180</span>
|
|
2046
|
+
|
|
2047
|
+
<span style="color:#080;font-weight:bold">def</span> <span style="color:#06B;font-weight:bold">patch</span>(path, options={})
|
|
2048
|
+
send_request(<span style="color:#A60">:patch</span>, path, options)
|
|
2049
|
+
<span style="color:#080;font-weight:bold">end</span></pre>
|
|
2050
|
+
</td>
|
|
2051
|
+
</tr>
|
|
2052
|
+
</table>
|
|
2053
|
+
</div>
|
|
2054
|
+
|
|
2055
|
+
<div class="method_details ">
|
|
2056
|
+
<h3 class="signature " id="post-instance_method">
|
|
2057
|
+
|
|
2058
|
+
#<strong>post</strong>(path, options = {}) ⇒ <tt>Object</tt>
|
|
2059
|
+
|
|
2060
|
+
|
|
2061
|
+
|
|
2062
|
+
|
|
2063
|
+
|
|
2064
|
+
</h3><div class="docstring">
|
|
2065
|
+
<div class="discussion">
|
|
2066
|
+
|
|
2067
|
+
<p>Make a POST request against the API.</p>
|
|
2068
|
+
|
|
2069
|
+
|
|
2070
|
+
</div>
|
|
2071
|
+
</div>
|
|
2072
|
+
<div class="tags">
|
|
2073
|
+
<p class="tag_title">Parameters:</p>
|
|
2074
|
+
<ul class="param">
|
|
2075
|
+
|
|
2076
|
+
<li>
|
|
2077
|
+
|
|
2078
|
+
<span class='name'>path</span>
|
|
2079
|
+
|
|
2080
|
+
|
|
2081
|
+
<span class='type'>(<tt>String</tt>)</span>
|
|
2082
|
+
|
|
2083
|
+
|
|
2084
|
+
|
|
2085
|
+
—
|
|
2086
|
+
<div class='inline'>
|
|
2087
|
+
<p>The path to request.</p>
|
|
2088
|
+
</div>
|
|
2089
|
+
|
|
2090
|
+
</li>
|
|
2091
|
+
|
|
2092
|
+
<li>
|
|
2093
|
+
|
|
2094
|
+
<span class='name'>options</span>
|
|
2095
|
+
|
|
2096
|
+
|
|
2097
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
|
2098
|
+
|
|
2099
|
+
|
|
2100
|
+
<em class="default">(defaults to: <tt>{}</tt>)</em>
|
|
2101
|
+
|
|
2102
|
+
|
|
2103
|
+
—
|
|
2104
|
+
<div class='inline'>
|
|
2105
|
+
<p>A hash of options.</p>
|
|
2106
|
+
</div>
|
|
2107
|
+
|
|
2108
|
+
</li>
|
|
2109
|
+
|
|
2110
|
+
</ul>
|
|
2111
|
+
|
|
2112
|
+
|
|
2113
|
+
</div><table class="source_code">
|
|
2114
|
+
<tr>
|
|
2115
|
+
<td>
|
|
2116
|
+
<pre class="lines">
|
|
2117
|
+
|
|
2118
|
+
|
|
2119
|
+
156
|
|
2120
|
+
157
|
|
2121
|
+
158</pre>
|
|
2122
|
+
</td>
|
|
2123
|
+
<td>
|
|
2124
|
+
<pre class="code"><span class="info file"># File 'lib/wsc_sdk/client.rb', line 156</span>
|
|
2125
|
+
|
|
2126
|
+
<span style="color:#080;font-weight:bold">def</span> <span style="color:#06B;font-weight:bold">post</span>(path, options={})
|
|
2127
|
+
send_request(<span style="color:#A60">:post</span>, path, options)
|
|
2128
|
+
<span style="color:#080;font-weight:bold">end</span></pre>
|
|
2129
|
+
</td>
|
|
2130
|
+
</tr>
|
|
2131
|
+
</table>
|
|
2132
|
+
</div>
|
|
2133
|
+
|
|
2134
|
+
<div class="method_details ">
|
|
2135
|
+
<h3 class="signature " id="put-instance_method">
|
|
2136
|
+
|
|
2137
|
+
#<strong>put</strong>(path, options = {}) ⇒ <tt>Object</tt>
|
|
2138
|
+
|
|
2139
|
+
|
|
2140
|
+
|
|
2141
|
+
|
|
2142
|
+
|
|
2143
|
+
</h3><div class="docstring">
|
|
2144
|
+
<div class="discussion">
|
|
2145
|
+
|
|
2146
|
+
<p>Make a GET request against the API.</p>
|
|
2147
|
+
|
|
2148
|
+
|
|
2149
|
+
</div>
|
|
2150
|
+
</div>
|
|
2151
|
+
<div class="tags">
|
|
2152
|
+
<p class="tag_title">Parameters:</p>
|
|
2153
|
+
<ul class="param">
|
|
2154
|
+
|
|
2155
|
+
<li>
|
|
2156
|
+
|
|
2157
|
+
<span class='name'>path</span>
|
|
2158
|
+
|
|
2159
|
+
|
|
2160
|
+
<span class='type'>(<tt>String</tt>)</span>
|
|
2161
|
+
|
|
2162
|
+
|
|
2163
|
+
|
|
2164
|
+
—
|
|
2165
|
+
<div class='inline'>
|
|
2166
|
+
<p>The path to request.</p>
|
|
2167
|
+
</div>
|
|
2168
|
+
|
|
2169
|
+
</li>
|
|
2170
|
+
|
|
2171
|
+
<li>
|
|
2172
|
+
|
|
2173
|
+
<span class='name'>options</span>
|
|
2174
|
+
|
|
2175
|
+
|
|
2176
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
|
2177
|
+
|
|
2178
|
+
|
|
2179
|
+
<em class="default">(defaults to: <tt>{}</tt>)</em>
|
|
2180
|
+
|
|
2181
|
+
|
|
2182
|
+
—
|
|
2183
|
+
<div class='inline'>
|
|
2184
|
+
<p>A hash of options.</p>
|
|
2185
|
+
</div>
|
|
2186
|
+
|
|
2187
|
+
</li>
|
|
2188
|
+
|
|
2189
|
+
</ul>
|
|
2190
|
+
|
|
2191
|
+
|
|
2192
|
+
</div><table class="source_code">
|
|
2193
|
+
<tr>
|
|
2194
|
+
<td>
|
|
2195
|
+
<pre class="lines">
|
|
2196
|
+
|
|
2197
|
+
|
|
2198
|
+
168
|
|
2199
|
+
169
|
|
2200
|
+
170</pre>
|
|
2201
|
+
</td>
|
|
2202
|
+
<td>
|
|
2203
|
+
<pre class="code"><span class="info file"># File 'lib/wsc_sdk/client.rb', line 168</span>
|
|
2204
|
+
|
|
2205
|
+
<span style="color:#080;font-weight:bold">def</span> <span style="color:#06B;font-weight:bold">put</span>(path, options={})
|
|
2206
|
+
send_request(<span style="color:#A60">:put</span>, path, options)
|
|
2207
|
+
<span style="color:#080;font-weight:bold">end</span></pre>
|
|
2208
|
+
</td>
|
|
2209
|
+
</tr>
|
|
2210
|
+
</table>
|
|
2211
|
+
</div>
|
|
2212
|
+
|
|
2213
|
+
<div class="method_details ">
|
|
2214
|
+
<h3 class="signature " id="request_endpoint-instance_method">
|
|
2215
|
+
|
|
2216
|
+
#<strong>request_endpoint</strong>(method, path, body = {}) ⇒ <tt>Object</tt>
|
|
2217
|
+
|
|
2218
|
+
|
|
2219
|
+
|
|
2220
|
+
|
|
2221
|
+
|
|
2222
|
+
</h3><div class="docstring">
|
|
2223
|
+
<div class="discussion">
|
|
2224
|
+
|
|
2225
|
+
<p>A generic way to request against an endpoint in the API</p>
|
|
2226
|
+
|
|
2227
|
+
|
|
2228
|
+
</div>
|
|
2229
|
+
</div>
|
|
2230
|
+
<div class="tags">
|
|
2231
|
+
<p class="tag_title">Parameters:</p>
|
|
2232
|
+
<ul class="param">
|
|
2233
|
+
|
|
2234
|
+
<li>
|
|
2235
|
+
|
|
2236
|
+
<span class='name'>method</span>
|
|
2237
|
+
|
|
2238
|
+
|
|
2239
|
+
<span class='type'>(<tt>Symbol</tt>)</span>
|
|
2240
|
+
|
|
2241
|
+
|
|
2242
|
+
|
|
2243
|
+
—
|
|
2244
|
+
<div class='inline'>
|
|
2245
|
+
<p>The method to use to formulate the request.</p>
|
|
2246
|
+
</div>
|
|
2247
|
+
|
|
2248
|
+
</li>
|
|
2249
|
+
|
|
2250
|
+
<li>
|
|
2251
|
+
|
|
2252
|
+
<span class='name'>path</span>
|
|
2253
|
+
|
|
2254
|
+
|
|
2255
|
+
<span class='type'>(<tt>String</tt>)</span>
|
|
2256
|
+
|
|
2257
|
+
|
|
2258
|
+
|
|
2259
|
+
—
|
|
2260
|
+
<div class='inline'>
|
|
2261
|
+
<p>The path to the endpoint. This shoudl not include the protocol, domain or
|
|
2262
|
+
base path information. Only the endpoint path itself.</p>
|
|
2263
|
+
</div>
|
|
2264
|
+
|
|
2265
|
+
</li>
|
|
2266
|
+
|
|
2267
|
+
<li>
|
|
2268
|
+
|
|
2269
|
+
<span class='name'>body</span>
|
|
2270
|
+
|
|
2271
|
+
|
|
2272
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
|
2273
|
+
|
|
2274
|
+
|
|
2275
|
+
<em class="default">(defaults to: <tt>{}</tt>)</em>
|
|
2276
|
+
|
|
2277
|
+
|
|
2278
|
+
—
|
|
2279
|
+
<div class='inline'>
|
|
2280
|
+
<p>A Hash of payload data to send in the request. This data will not be
|
|
2281
|
+
presented in the request if it's a GET or DELETE method.</p>
|
|
2282
|
+
</div>
|
|
2283
|
+
|
|
2284
|
+
</li>
|
|
2285
|
+
|
|
2286
|
+
</ul>
|
|
2287
|
+
|
|
2288
|
+
|
|
2289
|
+
</div><table class="source_code">
|
|
2290
|
+
<tr>
|
|
2291
|
+
<td>
|
|
2292
|
+
<pre class="lines">
|
|
2293
|
+
|
|
2294
|
+
|
|
2295
|
+
209
|
|
2296
|
+
210
|
|
2297
|
+
211
|
|
2298
|
+
212
|
|
2299
|
+
213
|
|
2300
|
+
214
|
|
2301
|
+
215
|
|
2302
|
+
216
|
|
2303
|
+
217
|
|
2304
|
+
218
|
|
2305
|
+
219
|
|
2306
|
+
220
|
|
2307
|
+
221
|
|
2308
|
+
222
|
|
2309
|
+
223
|
|
2310
|
+
224
|
|
2311
|
+
225
|
|
2312
|
+
226</pre>
|
|
2313
|
+
</td>
|
|
2314
|
+
<td>
|
|
2315
|
+
<pre class="code"><span class="info file"># File 'lib/wsc_sdk/client.rb', line 209</span>
|
|
2316
|
+
|
|
2317
|
+
<span style="color:#080;font-weight:bold">def</span> <span style="color:#06B;font-weight:bold">request_endpoint</span>(method, path, body={})
|
|
2318
|
+
<span style="color:#080;font-weight:bold">begin</span>
|
|
2319
|
+
options = {}
|
|
2320
|
+
options = { <span style="color:#606">body</span>: body } <span style="color:#080;font-weight:bold">unless</span> [<span style="color:#A60">:get</span>, <span style="color:#A60">:delete</span>].include?(method)
|
|
2321
|
+
response = send_request(method, path, options)
|
|
2322
|
+
<span style="color:#080;font-weight:bold">return</span> <span style="color:#069">nil</span> <span style="color:#080;font-weight:bold">if</span> response.body.to_s.empty?
|
|
2323
|
+
|
|
2324
|
+
<span style="color:#080;font-weight:bold">begin</span>
|
|
2325
|
+
data = <span style="color:#036;font-weight:bold">JSON</span>.parse(response.body)
|
|
2326
|
+
<span style="color:#080;font-weight:bold">return</span> data
|
|
2327
|
+
<span style="color:#080;font-weight:bold">rescue</span> <span style="color:#036;font-weight:bold">JSON</span>::<span style="color:#036;font-weight:bold">ParserError</span> => jpe
|
|
2328
|
+
<span style="color:#080;font-weight:bold">return</span> build_exception_response(<span style="color:#00D">500</span>, <span style="background-color:hsla(0,100%,50%,0.05)"><span style="color:#710">"</span><span style="color:#D20">Bad JSON returned by request: [</span><span style="background-color:hsla(0,0%,0%,0.07);color:black"><span style="font-weight:bold;color:#666">#{</span>method.to_s.upcase<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>path<span style="font-weight:bold;color:#666">}</span></span><span style="color:#710">"</span></span>, jpe)
|
|
2329
|
+
<span style="color:#080;font-weight:bold">end</span>
|
|
2330
|
+
<span style="color:#080;font-weight:bold">rescue</span> <span style="color:#036;font-weight:bold">Exception</span> => e
|
|
2331
|
+
<span style="color:#777"># return build_exception_response(500, "Exception while requesting endpoint: [#{method.to_s.upcase}] #{path}", e)</span>
|
|
2332
|
+
raise e
|
|
2333
|
+
<span style="color:#080;font-weight:bold">end</span>
|
|
2334
|
+
<span style="color:#080;font-weight:bold">end</span></pre>
|
|
2335
|
+
</td>
|
|
2336
|
+
</tr>
|
|
2337
|
+
</table>
|
|
2338
|
+
</div>
|
|
2339
|
+
|
|
2340
|
+
<div class="method_details ">
|
|
2341
|
+
<h3 class="signature " id="request_params-instance_method">
|
|
2342
|
+
|
|
2343
|
+
#<strong>request_params</strong>(options = {}) ⇒ <tt>Object</tt>
|
|
2344
|
+
|
|
2345
|
+
|
|
2346
|
+
|
|
2347
|
+
|
|
2348
|
+
|
|
2349
|
+
</h3><div class="docstring">
|
|
2350
|
+
<div class="discussion">
|
|
2351
|
+
|
|
2352
|
+
<p>Generate a set of request params for an API request</p>
|
|
2353
|
+
|
|
2354
|
+
|
|
2355
|
+
</div>
|
|
2356
|
+
</div>
|
|
2357
|
+
<div class="tags">
|
|
2358
|
+
<p class="tag_title">Parameters:</p>
|
|
2359
|
+
<ul class="param">
|
|
2360
|
+
|
|
2361
|
+
<li>
|
|
2362
|
+
|
|
2363
|
+
<span class='name'>options</span>
|
|
2364
|
+
|
|
2365
|
+
|
|
2366
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
|
2367
|
+
|
|
2368
|
+
|
|
2369
|
+
<em class="default">(defaults to: <tt>{}</tt>)</em>
|
|
2370
|
+
|
|
2371
|
+
|
|
2372
|
+
—
|
|
2373
|
+
<div class='inline'>
|
|
2374
|
+
<p>A hash of options.</p>
|
|
2375
|
+
</div>
|
|
2376
|
+
|
|
2377
|
+
</li>
|
|
2378
|
+
|
|
2379
|
+
</ul>
|
|
2380
|
+
|
|
2381
|
+
|
|
2382
|
+
|
|
2383
|
+
|
|
2384
|
+
<p class="tag_title">Options Hash (<tt>options</tt>):</p>
|
|
2385
|
+
<ul class="option">
|
|
2386
|
+
|
|
2387
|
+
<li>
|
|
2388
|
+
<span class="name">:params</span>
|
|
2389
|
+
<span class="type">(<tt>Hash</tt>)</span>
|
|
2390
|
+
<span class="default">
|
|
2391
|
+
|
|
2392
|
+
</span>
|
|
2393
|
+
|
|
2394
|
+
— <div class='inline'>
|
|
2395
|
+
<p>A hash of query params or body content to be sent in the request.</p>
|
|
2396
|
+
</div>
|
|
2397
|
+
|
|
2398
|
+
</li>
|
|
2399
|
+
|
|
2400
|
+
<li>
|
|
2401
|
+
<span class="name">:pagination</span>
|
|
2402
|
+
<span class="type">(<tt>Hash</tt>)</span>
|
|
2403
|
+
<span class="default">
|
|
2404
|
+
|
|
2405
|
+
</span>
|
|
2406
|
+
|
|
2407
|
+
— <div class='inline'>
|
|
2408
|
+
<p>Pagination configuration options.</p>
|
|
2409
|
+
</div>
|
|
2410
|
+
|
|
2411
|
+
</li>
|
|
2412
|
+
|
|
2413
|
+
<li>
|
|
2414
|
+
<span class="name">:filters</span>
|
|
2415
|
+
<span class="type">(<tt>Hash</tt>)</span>
|
|
2416
|
+
<span class="default">
|
|
2417
|
+
|
|
2418
|
+
</span>
|
|
2419
|
+
|
|
2420
|
+
— <div class='inline'>
|
|
2421
|
+
<p>Filter configuration options.</p>
|
|
2422
|
+
</div>
|
|
2423
|
+
|
|
2424
|
+
</li>
|
|
2425
|
+
|
|
2426
|
+
</ul>
|
|
2427
|
+
|
|
2428
|
+
|
|
2429
|
+
|
|
2430
|
+
</div><table class="source_code">
|
|
2431
|
+
<tr>
|
|
2432
|
+
<td>
|
|
2433
|
+
<pre class="lines">
|
|
2434
|
+
|
|
2435
|
+
|
|
2436
|
+
300
|
|
2437
|
+
301
|
|
2438
|
+
302
|
|
2439
|
+
303
|
|
2440
|
+
304
|
|
2441
|
+
305
|
|
2442
|
+
306
|
|
2443
|
+
307
|
|
2444
|
+
308
|
|
2445
|
+
309
|
|
2446
|
+
310
|
|
2447
|
+
311
|
|
2448
|
+
312
|
|
2449
|
+
313
|
|
2450
|
+
314
|
|
2451
|
+
315
|
|
2452
|
+
316
|
|
2453
|
+
317
|
|
2454
|
+
318
|
|
2455
|
+
319
|
|
2456
|
+
320
|
|
2457
|
+
321
|
|
2458
|
+
322</pre>
|
|
2459
|
+
</td>
|
|
2460
|
+
<td>
|
|
2461
|
+
<pre class="code"><span class="info file"># File 'lib/wsc_sdk/client.rb', line 300</span>
|
|
2462
|
+
|
|
2463
|
+
<span style="color:#080;font-weight:bold">def</span> <span style="color:#06B;font-weight:bold">request_params</span>(options={})
|
|
2464
|
+
pagination = options.fetch(<span style="color:#A60">:pagination</span>, <span style="color:#069">nil</span>)
|
|
2465
|
+
filters = options.fetch(<span style="color:#A60">:filters</span>, <span style="color:#069">nil</span>)
|
|
2466
|
+
params = options.fetch(<span style="color:#A60">:params</span>, {})
|
|
2467
|
+
|
|
2468
|
+
<span style="color:#080;font-weight:bold">if</span> pagination
|
|
2469
|
+
params[<span style="color:#A60">:page</span>] = pagination.fetch(<span style="color:#A60">:page</span>, <span style="color:#00D">1</span>)
|
|
2470
|
+
params[<span style="color:#A60">:per_page</span>] = pagination.fetch(<span style="color:#A60">:per_page</span>, <span style="color:#00D">25</span>)
|
|
2471
|
+
<span style="color:#080;font-weight:bold">end</span>
|
|
2472
|
+
|
|
2473
|
+
<span style="color:#080;font-weight:bold">if</span> filters
|
|
2474
|
+
<span style="color:#080;font-weight:bold">if</span> filters.is_a?(<span style="color:#036;font-weight:bold">Hash</span>)
|
|
2475
|
+
filter_index = <span style="color:#00D">0</span>
|
|
2476
|
+
filters.each <span style="color:#080;font-weight:bold">do</span> |key, value|
|
|
2477
|
+
params[<span style="background-color:hsla(0,100%,50%,0.05)"><span style="color:#710">"</span><span style="color:#D20">filter[</span><span style="background-color:hsla(0,0%,0%,0.07);color:black"><span style="font-weight:bold;color:#666">#{</span>filter_index<span style="font-weight:bold;color:#666">}</span></span><span style="color:#D20">][field]</span><span style="color:#710">"</span></span>] = key
|
|
2478
|
+
params[<span style="background-color:hsla(0,100%,50%,0.05)"><span style="color:#710">"</span><span style="color:#D20">filter[</span><span style="background-color:hsla(0,0%,0%,0.07);color:black"><span style="font-weight:bold;color:#666">#{</span>filter_index<span style="font-weight:bold;color:#666">}</span></span><span style="color:#D20">][eq]</span><span style="color:#710">"</span></span>] = value
|
|
2479
|
+
filter_index += <span style="color:#00D">1</span>
|
|
2480
|
+
<span style="color:#080;font-weight:bold">end</span>
|
|
2481
|
+
<span style="color:#080;font-weight:bold">end</span>
|
|
2482
|
+
<span style="color:#080;font-weight:bold">end</span>
|
|
2483
|
+
|
|
2484
|
+
params
|
|
2485
|
+
<span style="color:#080;font-weight:bold">end</span></pre>
|
|
2486
|
+
</td>
|
|
2487
|
+
</tr>
|
|
2488
|
+
</table>
|
|
2489
|
+
</div>
|
|
2490
|
+
|
|
2491
|
+
<div class="method_details ">
|
|
2492
|
+
<h3 class="signature " id="stream_targets-instance_method">
|
|
2493
|
+
|
|
2494
|
+
#<strong>stream_targets</strong> ⇒ <tt>Wsc::Endpoints::StreamTargets</tt>
|
|
2495
|
+
|
|
2496
|
+
|
|
2497
|
+
|
|
2498
|
+
|
|
2499
|
+
|
|
2500
|
+
</h3><div class="docstring">
|
|
2501
|
+
<div class="discussion">
|
|
2502
|
+
|
|
2503
|
+
<p>Access the /stream_targets endpoints</p>
|
|
2504
|
+
|
|
2505
|
+
|
|
2506
|
+
</div>
|
|
2507
|
+
</div>
|
|
2508
|
+
<div class="tags">
|
|
2509
|
+
|
|
2510
|
+
<p class="tag_title">Returns:</p>
|
|
2511
|
+
<ul class="return">
|
|
2512
|
+
|
|
2513
|
+
<li>
|
|
2514
|
+
|
|
2515
|
+
|
|
2516
|
+
<span class='type'>(<tt>Wsc::Endpoints::StreamTargets</tt>)</span>
|
|
2517
|
+
|
|
2518
|
+
|
|
2519
|
+
|
|
2520
|
+
—
|
|
2521
|
+
<div class='inline'>
|
|
2522
|
+
<p>An instance of the StreamTargets endpoint class.</p>
|
|
2523
|
+
</div>
|
|
2524
|
+
|
|
2525
|
+
</li>
|
|
2526
|
+
|
|
2527
|
+
</ul>
|
|
2528
|
+
|
|
2529
|
+
</div><table class="source_code">
|
|
2530
|
+
<tr>
|
|
2531
|
+
<td>
|
|
2532
|
+
<pre class="lines">
|
|
2533
|
+
|
|
2534
|
+
|
|
2535
|
+
114
|
|
2536
|
+
115
|
|
2537
|
+
116</pre>
|
|
2538
|
+
</td>
|
|
2539
|
+
<td>
|
|
2540
|
+
<pre class="code"><span class="info file"># File 'lib/wsc_sdk/client.rb', line 114</span>
|
|
2541
|
+
|
|
2542
|
+
<span style="color:#080;font-weight:bold">def</span> <span style="color:#06B;font-weight:bold">stream_targets</span>
|
|
2543
|
+
<span style="color:#036;font-weight:bold">WscSdk</span>::<span style="color:#036;font-weight:bold">Endpoints</span>::<span style="color:#036;font-weight:bold">StreamTargets</span>.new(<span style="color:#069">self</span>)
|
|
2544
|
+
<span style="color:#080;font-weight:bold">end</span></pre>
|
|
2545
|
+
</td>
|
|
2546
|
+
</tr>
|
|
2547
|
+
</table>
|
|
2548
|
+
</div>
|
|
2549
|
+
|
|
2550
|
+
<div class="method_details ">
|
|
2551
|
+
<h3 class="signature " id="to_s-instance_method">
|
|
2552
|
+
|
|
2553
|
+
#<strong>to_s</strong> ⇒ <tt>String</tt>
|
|
2554
|
+
|
|
2555
|
+
|
|
2556
|
+
|
|
2557
|
+
|
|
2558
|
+
|
|
2559
|
+
</h3><div class="docstring">
|
|
2560
|
+
<div class="discussion">
|
|
2561
|
+
|
|
2562
|
+
<p>Outputs the details of the client as a string.</p>
|
|
2563
|
+
|
|
2564
|
+
|
|
2565
|
+
</div>
|
|
2566
|
+
</div>
|
|
2567
|
+
<div class="tags">
|
|
2568
|
+
|
|
2569
|
+
<p class="tag_title">Returns:</p>
|
|
2570
|
+
<ul class="return">
|
|
2571
|
+
|
|
2572
|
+
<li>
|
|
2573
|
+
|
|
2574
|
+
|
|
2575
|
+
<span class='type'>(<tt>String</tt>)</span>
|
|
2576
|
+
|
|
2577
|
+
|
|
2578
|
+
|
|
2579
|
+
—
|
|
2580
|
+
<div class='inline'>
|
|
2581
|
+
<p>The details of the client.</p>
|
|
2582
|
+
</div>
|
|
2583
|
+
|
|
2584
|
+
</li>
|
|
2585
|
+
|
|
2586
|
+
</ul>
|
|
2587
|
+
|
|
2588
|
+
</div><table class="source_code">
|
|
2589
|
+
<tr>
|
|
2590
|
+
<td>
|
|
2591
|
+
<pre class="lines">
|
|
2592
|
+
|
|
2593
|
+
|
|
2594
|
+
89
|
|
2595
|
+
90
|
|
2596
|
+
91</pre>
|
|
2597
|
+
</td>
|
|
2598
|
+
<td>
|
|
2599
|
+
<pre class="code"><span class="info file"># File 'lib/wsc_sdk/client.rb', line 89</span>
|
|
2600
|
+
|
|
2601
|
+
<span style="color:#080;font-weight:bold">def</span> <span style="color:#06B;font-weight:bold">to_s</span>
|
|
2602
|
+
<span style="background-color:hsla(0,100%,50%,0.05)"><span style="color:#710">"</span><span style="color:#D20">WSC SDK Client > hostname: </span><span style="background-color:hsla(0,0%,0%,0.07);color:black"><span style="font-weight:bold;color:#666">#{</span>hostname<span style="font-weight:bold;color:#666">}</span></span><span style="color:#D20"> | version: </span><span style="background-color:hsla(0,0%,0%,0.07);color:black"><span style="font-weight:bold;color:#666">#{</span>path_version<span style="font-weight:bold;color:#666">}</span></span><span style="color:#D20"> | base_path: </span><span style="background-color:hsla(0,0%,0%,0.07);color:black"><span style="font-weight:bold;color:#666">#{</span>base_path<span style="font-weight:bold;color:#666">}</span></span><span style="color:#710">"</span></span>
|
|
2603
|
+
<span style="color:#080;font-weight:bold">end</span></pre>
|
|
2604
|
+
</td>
|
|
2605
|
+
</tr>
|
|
2606
|
+
</table>
|
|
2607
|
+
</div>
|
|
2608
|
+
|
|
2609
|
+
<div class="method_details ">
|
|
2610
|
+
<h3 class="signature " id="transcoders-instance_method">
|
|
2611
|
+
|
|
2612
|
+
#<strong>transcoders</strong> ⇒ <tt>Wsc::Endpoints::Transcoders</tt>
|
|
2613
|
+
|
|
2614
|
+
|
|
2615
|
+
|
|
2616
|
+
|
|
2617
|
+
|
|
2618
|
+
</h3><div class="docstring">
|
|
2619
|
+
<div class="discussion">
|
|
2620
|
+
|
|
2621
|
+
<p>Access the /transcoders endpoints</p>
|
|
2622
|
+
|
|
2623
|
+
|
|
2624
|
+
</div>
|
|
2625
|
+
</div>
|
|
2626
|
+
<div class="tags">
|
|
2627
|
+
|
|
2628
|
+
<p class="tag_title">Returns:</p>
|
|
2629
|
+
<ul class="return">
|
|
2630
|
+
|
|
2631
|
+
<li>
|
|
2632
|
+
|
|
2633
|
+
|
|
2634
|
+
<span class='type'>(<tt>Wsc::Endpoints::Transcoders</tt>)</span>
|
|
2635
|
+
|
|
2636
|
+
|
|
2637
|
+
|
|
2638
|
+
—
|
|
2639
|
+
<div class='inline'>
|
|
2640
|
+
<p>An instance of the Transcoders endpoint class.</p>
|
|
2641
|
+
</div>
|
|
2642
|
+
|
|
2643
|
+
</li>
|
|
2644
|
+
|
|
2645
|
+
</ul>
|
|
2646
|
+
|
|
2647
|
+
</div><table class="source_code">
|
|
2648
|
+
<tr>
|
|
2649
|
+
<td>
|
|
2650
|
+
<pre class="lines">
|
|
2651
|
+
|
|
2652
|
+
|
|
2653
|
+
123
|
|
2654
|
+
124
|
|
2655
|
+
125</pre>
|
|
2656
|
+
</td>
|
|
2657
|
+
<td>
|
|
2658
|
+
<pre class="code"><span class="info file"># File 'lib/wsc_sdk/client.rb', line 123</span>
|
|
2659
|
+
|
|
2660
|
+
<span style="color:#080;font-weight:bold">def</span> <span style="color:#06B;font-weight:bold">transcoders</span>
|
|
2661
|
+
<span style="color:#036;font-weight:bold">WscSdk</span>::<span style="color:#036;font-weight:bold">Endpoints</span>::<span style="color:#036;font-weight:bold">Transcoders</span>.new(<span style="color:#069">self</span>)
|
|
2662
|
+
<span style="color:#080;font-weight:bold">end</span></pre>
|
|
2663
|
+
</td>
|
|
2664
|
+
</tr>
|
|
2665
|
+
</table>
|
|
2666
|
+
</div>
|
|
2667
|
+
|
|
2668
|
+
</div>
|
|
2669
|
+
|
|
2670
|
+
</div>
|
|
2671
|
+
|
|
2672
|
+
|
|
2673
|
+
</div>
|
|
2674
|
+
</div>
|
|
2675
|
+
</div>
|
|
2676
|
+
</body>
|
|
2677
|
+
</html>
|