sidemash-sdk 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +58 -0
  3. data/.rspec +3 -0
  4. data/.travis.yml +7 -0
  5. data/CODE_OF_CONDUCT.md +74 -0
  6. data/Gemfile +3 -0
  7. data/LICENSE +203 -0
  8. data/README.md +43 -0
  9. data/Rakefile +6 -0
  10. data/bin/console +14 -0
  11. data/bin/setup +8 -0
  12. data/exe/sidemash-sdk +3 -0
  13. data/lib/sidemash/sdk/auth.rb +75 -0
  14. data/lib/sidemash/sdk/client.rb +36 -0
  15. data/lib/sidemash/sdk/create_stream_square_form.rb +114 -0
  16. data/lib/sidemash/sdk/domain.rb +24 -0
  17. data/lib/sidemash/sdk/hook.rb +71 -0
  18. data/lib/sidemash/sdk/hook_http_call.rb +75 -0
  19. data/lib/sidemash/sdk/hook_ws_call.rb +75 -0
  20. data/lib/sidemash/sdk/hook_zoom.rb +41 -0
  21. data/lib/sidemash/sdk/http.rb +112 -0
  22. data/lib/sidemash/sdk/http_call_error.rb +13 -0
  23. data/lib/sidemash/sdk/http_method.rb +119 -0
  24. data/lib/sidemash/sdk/http_request.rb +32 -0
  25. data/lib/sidemash/sdk/instance_status.rb +175 -0
  26. data/lib/sidemash/sdk/list_form.rb +95 -0
  27. data/lib/sidemash/sdk/pagination.rb +116 -0
  28. data/lib/sidemash/sdk/play.rb +68 -0
  29. data/lib/sidemash/sdk/publish.rb +68 -0
  30. data/lib/sidemash/sdk/publish_rtmp.rb +82 -0
  31. data/lib/sidemash/sdk/rest_collection.rb +65 -0
  32. data/lib/sidemash/sdk/secure_and_non_secure.rb +82 -0
  33. data/lib/sidemash/sdk/stream_meta_data.rb +68 -0
  34. data/lib/sidemash/sdk/stream_square.rb +148 -0
  35. data/lib/sidemash/sdk/stream_square_rest_collection.rb +82 -0
  36. data/lib/sidemash/sdk/stream_square_service.rb +56 -0
  37. data/lib/sidemash/sdk/stream_square_size.rb +119 -0
  38. data/lib/sidemash/sdk/timestamp.rb +68 -0
  39. data/lib/sidemash/sdk/update_stream_square_form.rb +100 -0
  40. data/lib/sidemash/sdk/user_desc.rb +68 -0
  41. data/lib/sidemash/sdk/utc_date_time.rb +75 -0
  42. data/lib/sidemash/sdk/version.rb +5 -0
  43. data/lib/sidemash/sdk.rb +39 -0
  44. data/sidemash-sdk.gemspec +31 -0
  45. metadata +48 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 93b4493e81a762932cc0e2d608e9aa6f1875213c5352dd5b1307aeae0d106f17
4
- data.tar.gz: 6fc7760f5c5fc7a4a3fddb289c925670a78f5cc8a022d622b64dc88b09ce2492
3
+ metadata.gz: 948752061f0b64a241eafe70efb8c6d6da1ce5ea674875736286d6d2ea4f24f8
4
+ data.tar.gz: 24f0fde08f783e3f75438eb039c25a6efbfeefa0a46538f5f89cb92f64c356e3
5
5
  SHA512:
6
- metadata.gz: 49976a4ee45ce4c9e8274b435474327192fd8238cc1701629a64cc4695176760f81d290aec2973ee24a6cbbc046120964c91d34b373353ad92d603e0551d06cf
7
- data.tar.gz: 76f2afd969200007a6b0c9ae1c425dd6251cd66b2d08123a7017df85eba7c422815f740ba61a07bfbea4619cc777fa1d2e2be812cf6e259074021facd4b3c9ba
6
+ metadata.gz: '06987e1fc061195aaad3b2ce35c2b8e0c07a087929b69c116b2aa246140bd5d4481e735356f3415b804ab41b8d728f5da58fb1deb27a6c35d7e15f0e1bfa7b98'
7
+ data.tar.gz: cf8f949b5b86d739197ac840a752463e4d702c55b83c3d8b2fd91f5d2e0aa50c85fb57a4ace2fbdfe398e7f91114a35f27e9f8f9cdc06c24be5d0ea5b3d68fd0
data/.gitignore ADDED
@@ -0,0 +1,58 @@
1
+ # rspec failure tracking
2
+ .rspec_status
3
+ *.gem
4
+ *.rbc
5
+ /.config
6
+ /coverage/
7
+ /InstalledFiles
8
+ /pkg/
9
+ /spec/reports/
10
+ /spec/examples.txt
11
+ /test/tmp/
12
+ /test/version_tmp/
13
+ /tmp/
14
+
15
+ # Used by dotenv library to load environment variables.
16
+ # .env
17
+
18
+ # Ignore Byebug command history file.
19
+ .byebug_history
20
+
21
+ ## Specific to RubyMotion:
22
+ .dat*
23
+ .repl_history
24
+ build/
25
+ *.bridgesupport
26
+ build-iPhoneOS/
27
+ build-iPhoneSimulator/
28
+
29
+ ## Specific to RubyMotion (use of CocoaPods):
30
+ #
31
+ # We recommend against adding the Pods directory to your .gitignore. However
32
+ # you should judge for yourself, the pros and cons are mentioned at:
33
+ # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
34
+ #
35
+ # vendor/Pods/
36
+
37
+ ## Documentation cache and generated files:
38
+ /.yardoc/
39
+ /_yardoc/
40
+ /doc/
41
+ /rdoc/
42
+
43
+ ## Environment normalization:
44
+ /.bundle/
45
+ /vendor/bundle
46
+ /lib/bundler/man/
47
+
48
+ # for a library or gem, you might want to ignore these files since the code is
49
+ # intended to run in multiple environments; otherwise, check them in:
50
+ # Gemfile.lock
51
+ # .ruby-version
52
+ # .ruby-gemset
53
+
54
+ # unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
55
+ .rvmrc
56
+
57
+ # Used by RuboCop. Remote config files pulled in from inherit_from directive.
58
+ # .rubocop-https?--*
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
data/.travis.yml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ sudo: false
3
+ language: ruby
4
+ cache: bundler
5
+ rvm:
6
+ - 2.6.6
7
+ before_install: gem install bundler -v 2.0.0
@@ -0,0 +1,74 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ In the interest of fostering an open and welcoming environment, we as
6
+ contributors and maintainers pledge to making participation in our project and
7
+ our community a harassment-free experience for everyone, regardless of age, body
8
+ size, disability, ethnicity, gender identity and expression, level of experience,
9
+ nationality, personal appearance, race, religion, or sexual identity and
10
+ orientation.
11
+
12
+ ## Our Standards
13
+
14
+ Examples of behavior that contributes to creating a positive environment
15
+ include:
16
+
17
+ * Using welcoming and inclusive language
18
+ * Being respectful of differing viewpoints and experiences
19
+ * Gracefully accepting constructive criticism
20
+ * Focusing on what is best for the community
21
+ * Showing empathy towards other community members
22
+
23
+ Examples of unacceptable behavior by participants include:
24
+
25
+ * The use of sexualized language or imagery and unwelcome sexual attention or
26
+ advances
27
+ * Trolling, insulting/derogatory comments, and personal or political attacks
28
+ * Public or private harassment
29
+ * Publishing others' private information, such as a physical or electronic
30
+ address, without explicit permission
31
+ * Other conduct which could reasonably be considered inappropriate in a
32
+ professional setting
33
+
34
+ ## Our Responsibilities
35
+
36
+ Project maintainers are responsible for clarifying the standards of acceptable
37
+ behavior and are expected to take appropriate and fair corrective action in
38
+ response to any instances of unacceptable behavior.
39
+
40
+ Project maintainers have the right and responsibility to remove, edit, or
41
+ reject comments, commits, code, wiki edits, issues, and other contributions
42
+ that are not aligned to this Code of Conduct, or to ban temporarily or
43
+ permanently any contributor for other behaviors that they deem inappropriate,
44
+ threatening, offensive, or harmful.
45
+
46
+ ## Scope
47
+
48
+ This Code of Conduct applies both within project spaces and in public spaces
49
+ when an individual is representing the project or its community. Examples of
50
+ representing a project or community include using an official project e-mail
51
+ address, posting via an official social media account, or acting as an appointed
52
+ representative at an online or offline event. Representation of a project may be
53
+ further defined and clarified by project maintainers.
54
+
55
+ ## Enforcement
56
+
57
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
58
+ reported by contacting the project team at serge.nguetta@sidemash.com. All
59
+ complaints will be reviewed and investigated and will result in a response that
60
+ is deemed necessary and appropriate to the circumstances. The project team is
61
+ obligated to maintain confidentiality with regard to the reporter of an incident.
62
+ Further details of specific enforcement policies may be posted separately.
63
+
64
+ Project maintainers who do not follow or enforce the Code of Conduct in good
65
+ faith may face temporary or permanent repercussions as determined by other
66
+ members of the project's leadership.
67
+
68
+ ## Attribution
69
+
70
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71
+ available at [http://contributor-covenant.org/version/1/4][version]
72
+
73
+ [homepage]: http://contributor-covenant.org
74
+ [version]: http://contributor-covenant.org/version/1/4/
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source "https://rubygems.org"
2
+
3
+ gemspec
data/LICENSE ADDED
@@ -0,0 +1,203 @@
1
+ Copyright © 2020 Sidemash Cloud Services. All rights reserved.
2
+
3
+ Apache License
4
+ Version 2.0, January 2004
5
+ http://www.apache.org/licenses/
6
+
7
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
8
+
9
+ 1. Definitions.
10
+
11
+ "License" shall mean the terms and conditions for use, reproduction,
12
+ and distribution as defined by Sections 1 through 9 of this document.
13
+
14
+ "Licensor" shall mean the copyright owner or entity authorized by
15
+ the copyright owner that is granting the License.
16
+
17
+ "Legal Entity" shall mean the union of the acting entity and all
18
+ other entities that control, are controlled by, or are under common
19
+ control with that entity. For the purposes of this definition,
20
+ "control" means (i) the power, direct or indirect, to cause the
21
+ direction or management of such entity, whether by contract or
22
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
23
+ outstanding shares, or (iii) beneficial ownership of such entity.
24
+
25
+ "You" (or "Your") shall mean an individual or Legal Entity
26
+ exercising permissions granted by this License.
27
+
28
+ "Source" form shall mean the preferred form for making modifications,
29
+ including but not limited to software source code, documentation
30
+ source, and configuration files.
31
+
32
+ "Object" form shall mean any form resulting from mechanical
33
+ transformation or translation of a Source form, including but
34
+ not limited to compiled object code, generated documentation,
35
+ and conversions to other media types.
36
+
37
+ "Work" shall mean the work of authorship, whether in Source or
38
+ Object form, made available under the License, as indicated by a
39
+ copyright notice that is included in or attached to the work
40
+ (an example is provided in the Appendix below).
41
+
42
+ "Derivative Works" shall mean any work, whether in Source or Object
43
+ form, that is based on (or derived from) the Work and for which the
44
+ editorial revisions, annotations, elaborations, or other modifications
45
+ represent, as a whole, an original work of authorship. For the purposes
46
+ of this License, Derivative Works shall not include works that remain
47
+ separable from, or merely link (or bind by name) to the interfaces of,
48
+ the Work and Derivative Works thereof.
49
+
50
+ "Contribution" shall mean any work of authorship, including
51
+ the original version of the Work and any modifications or additions
52
+ to that Work or Derivative Works thereof, that is intentionally
53
+ submitted to Licensor for inclusion in the Work by the copyright owner
54
+ or by an individual or Legal Entity authorized to submit on behalf of
55
+ the copyright owner. For the purposes of this definition, "submitted"
56
+ means any form of electronic, verbal, or written communication sent
57
+ to the Licensor or its representatives, including but not limited to
58
+ communication on electronic mailing lists, source code control systems,
59
+ and issue tracking systems that are managed by, or on behalf of, the
60
+ Licensor for the purpose of discussing and improving the Work, but
61
+ excluding communication that is conspicuously marked or otherwise
62
+ designated in writing by the copyright owner as "Not a Contribution."
63
+
64
+ "Contributor" shall mean Licensor and any individual or Legal Entity
65
+ on behalf of whom a Contribution has been received by Licensor and
66
+ subsequently incorporated within the Work.
67
+
68
+ 2. Grant of Copyright License. Subject to the terms and conditions of
69
+ this License, each Contributor hereby grants to You a perpetual,
70
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
71
+ copyright license to reproduce, prepare Derivative Works of,
72
+ publicly display, publicly perform, sublicense, and distribute the
73
+ Work and such Derivative Works in Source or Object form.
74
+
75
+ 3. Grant of Patent License. Subject to the terms and conditions of
76
+ this License, each Contributor hereby grants to You a perpetual,
77
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
78
+ (except as stated in this section) patent license to make, have made,
79
+ use, offer to sell, sell, import, and otherwise transfer the Work,
80
+ where such license applies only to those patent claims licensable
81
+ by such Contributor that are necessarily infringed by their
82
+ Contribution(s) alone or by combination of their Contribution(s)
83
+ with the Work to which such Contribution(s) was submitted. If You
84
+ institute patent litigation against any entity (including a
85
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
86
+ or a Contribution incorporated within the Work constitutes direct
87
+ or contributory patent infringement, then any patent licenses
88
+ granted to You under this License for that Work shall terminate
89
+ as of the date such litigation is filed.
90
+
91
+ 4. Redistribution. You may reproduce and distribute copies of the
92
+ Work or Derivative Works thereof in any medium, with or without
93
+ modifications, and in Source or Object form, provided that You
94
+ meet the following conditions:
95
+
96
+ (a) You must give any other recipients of the Work or
97
+ Derivative Works a copy of this License; and
98
+
99
+ (b) You must cause any modified files to carry prominent notices
100
+ stating that You changed the files; and
101
+
102
+ (c) You must retain, in the Source form of any Derivative Works
103
+ that You distribute, all copyright, patent, trademark, and
104
+ attribution notices from the Source form of the Work,
105
+ excluding those notices that do not pertain to any part of
106
+ the Derivative Works; and
107
+
108
+ (d) If the Work includes a "NOTICE" text file as part of its
109
+ distribution, then any Derivative Works that You distribute must
110
+ include a readable copy of the attribution notices contained
111
+ within such NOTICE file, excluding those notices that do not
112
+ pertain to any part of the Derivative Works, in at least one
113
+ of the following places: within a NOTICE text file distributed
114
+ as part of the Derivative Works; within the Source form or
115
+ documentation, if provided along with the Derivative Works; or,
116
+ within a display generated by the Derivative Works, if and
117
+ wherever such third-party notices normally appear. The contents
118
+ of the NOTICE file are for informational purposes only and
119
+ do not modify the License. You may add Your own attribution
120
+ notices within Derivative Works that You distribute, alongside
121
+ or as an addendum to the NOTICE text from the Work, provided
122
+ that such additional attribution notices cannot be construed
123
+ as modifying the License.
124
+
125
+ You may add Your own copyright statement to Your modifications and
126
+ may provide additional or different license terms and conditions
127
+ for use, reproduction, or distribution of Your modifications, or
128
+ for any such Derivative Works as a whole, provided Your use,
129
+ reproduction, and distribution of the Work otherwise complies with
130
+ the conditions stated in this License.
131
+
132
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
133
+ any Contribution intentionally submitted for inclusion in the Work
134
+ by You to the Licensor shall be under the terms and conditions of
135
+ this License, without any additional terms or conditions.
136
+ Notwithstanding the above, nothing herein shall supersede or modify
137
+ the terms of any separate license agreement you may have executed
138
+ with Licensor regarding such Contributions.
139
+
140
+ 6. Trademarks. This License does not grant permission to use the trade
141
+ names, trademarks, service marks, or product names of the Licensor,
142
+ except as required for reasonable and customary use in describing the
143
+ origin of the Work and reproducing the content of the NOTICE file.
144
+
145
+ 7. Disclaimer of Warranty. Unless required by applicable law or
146
+ agreed to in writing, Licensor provides the Work (and each
147
+ Contributor provides its Contributions) on an "AS IS" BASIS,
148
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
149
+ implied, including, without limitation, any warranties or conditions
150
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
151
+ PARTICULAR PURPOSE. You are solely responsible for determining the
152
+ appropriateness of using or redistributing the Work and assume any
153
+ risks associated with Your exercise of permissions under this License.
154
+
155
+ 8. Limitation of Liability. In no event and under no legal theory,
156
+ whether in tort (including negligence), contract, or otherwise,
157
+ unless required by applicable law (such as deliberate and grossly
158
+ negligent acts) or agreed to in writing, shall any Contributor be
159
+ liable to You for damages, including any direct, indirect, special,
160
+ incidental, or consequential damages of any character arising as a
161
+ result of this License or out of the use or inability to use the
162
+ Work (including but not limited to damages for loss of goodwill,
163
+ work stoppage, computer failure or malfunction, or any and all
164
+ other commercial damages or losses), even if such Contributor
165
+ has been advised of the possibility of such damages.
166
+
167
+ 9. Accepting Warranty or Additional Liability. While redistributing
168
+ the Work or Derivative Works thereof, You may choose to offer,
169
+ and charge a fee for, acceptance of support, warranty, indemnity,
170
+ or other liability obligations and/or rights consistent with this
171
+ License. However, in accepting such obligations, You may act only
172
+ on Your own behalf and on Your sole responsibility, not on behalf
173
+ of any other Contributor, and only if You agree to indemnify,
174
+ defend, and hold each Contributor harmless for any liability
175
+ incurred by, or claims asserted against, such Contributor by reason
176
+ of your accepting any such warranty or additional liability.
177
+
178
+ END OF TERMS AND CONDITIONS
179
+
180
+ APPENDIX: How to apply the Apache License to your work.
181
+
182
+ To apply the Apache License to your work, attach the following
183
+ boilerplate notice, with the fields enclosed by brackets "[]"
184
+ replaced with your own identifying information. (Don't include
185
+ the brackets!) The text should be enclosed in the appropriate
186
+ comment syntax for the file format. We also recommend that a
187
+ file or class name and description of purpose be included on the
188
+ same "printed page" as the copyright notice for easier
189
+ identification within third-party archives.
190
+
191
+ Copyright [yyyy] [name of copyright owner]
192
+
193
+ Licensed under the Apache License, Version 2.0 (the "License");
194
+ you may not use this file except in compliance with the License.
195
+ You may obtain a copy of the License at
196
+
197
+ http://www.apache.org/licenses/LICENSE-2.0
198
+
199
+ Unless required by applicable law or agreed to in writing, software
200
+ distributed under the License is distributed on an "AS IS" BASIS,
201
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
202
+ See the License for the specific language governing permissions and
203
+ limitations under the License.
data/README.md ADDED
@@ -0,0 +1,43 @@
1
+ # Sidemash::Sdk
2
+
3
+ Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/sidemash/sdk`. To experiment with that code, run `bin/console` for an interactive prompt.
4
+
5
+ TODO: Delete this and the text above, and describe your gem
6
+
7
+ ## Installation
8
+
9
+ Add this line to your application's Gemfile:
10
+
11
+ ```ruby
12
+ gem 'sidemash-sdk'
13
+ ```
14
+
15
+ And then execute:
16
+
17
+ $ bundle
18
+
19
+ Or install it yourself as:
20
+
21
+ $ gem install sidemash-sdk
22
+
23
+ ## Usage
24
+
25
+ TODO: Write usage instructions here
26
+
27
+ ## Development
28
+
29
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
30
+
31
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
32
+
33
+ ## Contributing
34
+
35
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/sidemash-sdk. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
36
+
37
+ ## License
38
+
39
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
40
+
41
+ ## Code of Conduct
42
+
43
+ Everyone interacting in the Sidemash::Sdk project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/sidemash-sdk/blob/master/CODE_OF_CONDUCT.md).
data/Rakefile ADDED
@@ -0,0 +1,6 @@
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task :default => :spec
data/bin/console ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "sidemash/sdk"
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require "irb"
14
+ IRB.start(__FILE__)
data/bin/setup ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
data/exe/sidemash-sdk ADDED
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "sidemash/sdk"
@@ -0,0 +1,75 @@
1
+ =begin
2
+ Copyright © 2020 Sidemash Cloud Services
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing,
11
+ software distributed under the License is distributed on an
12
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13
+ either express or implied. See the License for the specific
14
+ language governing permissions and limitations under the License.
15
+ =end
16
+
17
+
18
+
19
+
20
+ module Sidemash::Sdk
21
+ class Auth
22
+ attr_reader :token
23
+ attr_reader :secret_key
24
+
25
+ def initialize(token, secret_key)
26
+ @_type = 'Auth'
27
+ @token = token
28
+ @secret_key = secret_key
29
+ end
30
+
31
+ def self._type
32
+ 'Auth'
33
+ end
34
+
35
+ def self.from_json(js)
36
+ h = JSON.parse(js)
37
+ Auth.from_hash(h)
38
+ end
39
+
40
+ def to_remote
41
+ result = {}
42
+ result[:_type] = @_type
43
+ result[:token] = @token
44
+ result[:secretKey] = @secret_key
45
+ result
46
+ end
47
+
48
+ def to_hash
49
+ result = {}
50
+ result[:_type] = @_type
51
+ result[:token] = @token
52
+ result[:secret_key] = @secret_key
53
+ result
54
+ end
55
+
56
+ def self.from_remote(h)
57
+ Auth.new(h['token'],
58
+ h['secretKey'])
59
+ end
60
+
61
+ def self.from_hash(h)
62
+ Auth.new(h['token'],
63
+ h['secret_key'])
64
+ end
65
+
66
+ def to_json(*a)
67
+ to_hash.to_json(*a)
68
+ end
69
+
70
+ def to_s
71
+ ('Auth(token=' + @token +
72
+ ', secret_key=******' + ')')
73
+ end
74
+ end
75
+ end
@@ -0,0 +1,36 @@
1
+ =begin
2
+ Copyright © 2020 Sidemash Cloud Services
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing,
11
+ software distributed under the License is distributed on an
12
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13
+ either express or implied. See the License for the specific
14
+ language governing permissions and limitations under the License.
15
+ =end
16
+
17
+
18
+
19
+
20
+ module Sidemash::Sdk
21
+ class Client
22
+ def initialize(auth)
23
+ @_type = 'Client'
24
+ @auth = auth
25
+ @_stream_square = StreamSquareService.new(auth)
26
+ end
27
+
28
+ def stream_square
29
+ @_stream_square
30
+ end
31
+
32
+ def to_s
33
+ 'Client(auth=' + @auth.to_s + ')'
34
+ end
35
+ end
36
+ end
@@ -0,0 +1,114 @@
1
+ =begin
2
+ Copyright © 2020 Sidemash Cloud Services
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing,
11
+ software distributed under the License is distributed on an
12
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13
+ either express or implied. See the License for the specific
14
+ language governing permissions and limitations under the License.
15
+ =end
16
+
17
+
18
+
19
+
20
+ module Sidemash::Sdk
21
+ class CreateStreamSquareForm
22
+ attr_reader :is_elastic
23
+ attr_reader :size
24
+ attr_reader :hook
25
+ attr_reader :description
26
+ attr_reader :foreign_data
27
+ attr_reader :play_domain_name
28
+ attr_reader :publish_domain_name
29
+
30
+ def initialize(is_elastic,
31
+ size,
32
+ hook,
33
+ description = nil,
34
+ foreign_data = nil,
35
+ play_domain_name = nil,
36
+ publish_domain_name = nil)
37
+ @_type = 'CreateStreamSquareForm'
38
+ @is_elastic = is_elastic
39
+ @size = size
40
+ @hook = hook
41
+ @description = description
42
+ @foreign_data = foreign_data
43
+ @play_domain_name = play_domain_name
44
+ @publish_domain_name = publish_domain_name
45
+ end
46
+
47
+ def self._type
48
+ 'CreateStreamSquareForm'
49
+ end
50
+
51
+ def self.from_json(js)
52
+ h = JSON.parse(js)
53
+ CreateStreamSquareForm.from_hash(h)
54
+ end
55
+
56
+ def to_remote
57
+ result = {}
58
+ result[:isElastic] = @is_elastic
59
+ result[:size] = @size.to_s
60
+ result[:hook] = @hook.to_remote
61
+ result[:description] = @description unless @description.nil?
62
+ result[:foreignData] = @foreign_data unless @foreign_data.nil?
63
+ result[:playDomainName] = @play_domain_name unless @play_domain_name.nil?
64
+ result[:publishDomainName] = @publish_domain_name unless @publish_domain_name.nil?
65
+ result
66
+ end
67
+
68
+ def to_hash
69
+ result = {}
70
+ result[:is_elastic] = @is_elastic
71
+ result[:size] = @size.to_s
72
+ result[:hook] = @hook.to_hash
73
+ result[:description] = @description unless @description.nil?
74
+ result[:foreign_data] = @foreign_data unless @foreign_data.nil?
75
+ result[:play_domain_name] = @play_domain_name unless @play_domain_name.nil?
76
+ result[:publish_domain_name] = @publish_domain_name unless @publish_domain_name.nil?
77
+ result
78
+ end
79
+
80
+ def self.from_remote(h)
81
+ CreateStreamSquareForm.new(h['isElastic'],
82
+ StreamSquareSize.from_s(h['size']),
83
+ Hook.from_remote(h['hook']),
84
+ h['description'].nil? ? h['description'] : nil,
85
+ h['foreignData'].nil? ? h['foreignData'] : nil,
86
+ h['playDomainName'].nil? ? h['playDomainName'] : nil,
87
+ h['publishDomainName'].nil? ? h['publishDomainName'] : nil)
88
+ end
89
+
90
+ def self.from_hash(h)
91
+ CreateStreamSquareForm.new(h['is_elastic'],
92
+ StreamSquareSize.from_s(h['size']),
93
+ Hook.from_hash(h['hook']),
94
+ h['description'].nil? ? h['description'] : nil,
95
+ h['foreign_data'].nil? ? h['foreign_data'] : nil,
96
+ h['play_domain_name'].nil? ? h['play_domain_name'] : nil,
97
+ h['publish_domain_name'].nil? ? h['publish_domain_name'] : nil)
98
+ end
99
+
100
+ def to_json(*a)
101
+ to_hash.to_json(*a)
102
+ end
103
+
104
+ def to_s
105
+ ('CreateStreamSquareForm(is_elastic=' + @is_elastic +
106
+ ', size=' + @size.to_s +
107
+ ', hook=' + @hook.to_s +
108
+ ', description=' + @description +
109
+ ', foreign_data=' + @foreign_data +
110
+ ', play_domain_name=' + @play_domain_name +
111
+ ', publish_domain_name=' + @publish_domain_name + ')')
112
+ end
113
+ end
114
+ end