bombbomb 2.0.20679 → 2.0.21432
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 +5 -13
- data/README.md +28 -12
- data/bombbomb.gemspec +1 -1
- data/docs/Curriculum.md +15 -0
- data/docs/CurriculumApi.md +109 -0
- data/docs/CurriculumUserProgress.md +12 -0
- data/docs/CurriculumWithProgress.md +15 -0
- data/docs/PromptsApi.md +3 -3
- data/docs/TeamPublicRepresentation.md +10 -0
- data/docs/TeamsApi.md +344 -5
- data/docs/UtilitiesApi.md +4 -4
- data/docs/WebhooksApi.md +45 -4
- data/lib/bombbomb.rb +6 -1
- data/lib/bombbomb/api/curriculum_api.rb +143 -0
- data/lib/bombbomb/api/prompts_api.rb +4 -4
- data/lib/bombbomb/api/teams_api.rb +374 -6
- data/lib/bombbomb/api/utilities_api.rb +5 -5
- data/lib/bombbomb/api/webhooks_api.rb +57 -5
- data/lib/bombbomb/api_client.rb +1 -1
- data/lib/bombbomb/api_error.rb +1 -1
- data/lib/bombbomb/configuration.rb +1 -1
- data/lib/bombbomb/models/bb_web_hook.rb +1 -1
- data/lib/bombbomb/models/curriculum.rb +272 -0
- data/lib/bombbomb/models/curriculum_user_progress.rb +240 -0
- data/lib/bombbomb/models/curriculum_with_progress.rb +272 -0
- data/lib/bombbomb/models/inline_response_200.rb +1 -1
- data/lib/bombbomb/models/inline_response_200_items.rb +1 -1
- data/lib/bombbomb/models/jericho_configuration.rb +1 -1
- data/lib/bombbomb/models/jericho_performance.rb +1 -1
- data/lib/bombbomb/models/o_auth_client.rb +1 -1
- data/lib/bombbomb/models/string.rb +1 -1
- data/lib/bombbomb/models/team_public_representation.rb +220 -0
- data/lib/bombbomb/models/video_email_prompt.rb +1 -1
- data/lib/bombbomb/version.rb +2 -2
- data/spec/api/curriculum_api_spec.rb +69 -0
- data/spec/models/curriculum_spec.rb +95 -0
- data/spec/models/curriculum_user_progress_spec.rb +77 -0
- data/spec/models/curriculum_with_progress_spec.rb +95 -0
- data/spec/models/team_public_representation_spec.rb +65 -0
- metadata +60 -40
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#We make it easy to build relationships using simple videos.
|
5
5
|
|
6
|
-
OpenAPI spec version: 2.0.
|
6
|
+
OpenAPI spec version: 2.0.21432
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
|
@@ -70,7 +70,7 @@ module BombBomb
|
|
70
70
|
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
71
71
|
|
72
72
|
# HTTP header 'Content-Type'
|
73
|
-
local_header_content_type = []
|
73
|
+
local_header_content_type = ['application/x-www-form-urlencoded']
|
74
74
|
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
75
75
|
|
76
76
|
# form parameters
|
@@ -129,7 +129,7 @@ module BombBomb
|
|
129
129
|
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
130
130
|
|
131
131
|
# HTTP header 'Content-Type'
|
132
|
-
local_header_content_type = []
|
132
|
+
local_header_content_type = ['application/x-www-form-urlencoded']
|
133
133
|
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
134
134
|
|
135
135
|
# form parameters
|
@@ -181,7 +181,7 @@ module BombBomb
|
|
181
181
|
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
182
182
|
|
183
183
|
# HTTP header 'Content-Type'
|
184
|
-
local_header_content_type = []
|
184
|
+
local_header_content_type = ['application/x-www-form-urlencoded']
|
185
185
|
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
186
186
|
|
187
187
|
# form parameters
|
@@ -234,7 +234,7 @@ module BombBomb
|
|
234
234
|
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
235
235
|
|
236
236
|
# HTTP header 'Content-Type'
|
237
|
-
local_header_content_type = []
|
237
|
+
local_header_content_type = ['application/x-www-form-urlencoded']
|
238
238
|
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
239
239
|
|
240
240
|
# form parameters
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#We make it easy to build relationships using simple videos.
|
5
5
|
|
6
|
-
OpenAPI spec version: 2.0.
|
6
|
+
OpenAPI spec version: 2.0.21432
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
|
@@ -66,7 +66,7 @@ module BombBomb
|
|
66
66
|
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
67
67
|
|
68
68
|
# HTTP header 'Content-Type'
|
69
|
-
local_header_content_type = []
|
69
|
+
local_header_content_type = ['application/x-www-form-urlencoded']
|
70
70
|
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
71
71
|
|
72
72
|
# form parameters
|
@@ -124,7 +124,7 @@ module BombBomb
|
|
124
124
|
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
125
125
|
|
126
126
|
# HTTP header 'Content-Type'
|
127
|
-
local_header_content_type = []
|
127
|
+
local_header_content_type = ['application/x-www-form-urlencoded']
|
128
128
|
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
129
129
|
|
130
130
|
# form parameters
|
@@ -177,7 +177,7 @@ module BombBomb
|
|
177
177
|
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
178
178
|
|
179
179
|
# HTTP header 'Content-Type'
|
180
|
-
local_header_content_type = []
|
180
|
+
local_header_content_type = ['application/x-www-form-urlencoded']
|
181
181
|
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
182
182
|
|
183
183
|
# form parameters
|
@@ -199,6 +199,58 @@ module BombBomb
|
|
199
199
|
return data, status_code, headers
|
200
200
|
end
|
201
201
|
|
202
|
+
# Describe WebHook Events
|
203
|
+
# Returns example Webhook events for each kind of possible event.
|
204
|
+
# @param [Hash] opts the optional parameters
|
205
|
+
# @return [nil]
|
206
|
+
def list_web_hook_events(opts = {})
|
207
|
+
list_web_hook_events_with_http_info(opts)
|
208
|
+
return nil
|
209
|
+
end
|
210
|
+
|
211
|
+
# Describe WebHook Events
|
212
|
+
# Returns example Webhook events for each kind of possible event.
|
213
|
+
# @param [Hash] opts the optional parameters
|
214
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
215
|
+
def list_web_hook_events_with_http_info(opts = {})
|
216
|
+
if @api_client.config.debugging
|
217
|
+
@api_client.config.logger.debug "Calling API: WebhooksApi.list_web_hook_events ..."
|
218
|
+
end
|
219
|
+
# resource path
|
220
|
+
local_var_path = "/webhook/events".sub('{format}','json')
|
221
|
+
|
222
|
+
# query parameters
|
223
|
+
query_params = {}
|
224
|
+
|
225
|
+
# header parameters
|
226
|
+
header_params = {}
|
227
|
+
|
228
|
+
# HTTP header 'Accept' (if needed)
|
229
|
+
local_header_accept = ['application/json']
|
230
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
231
|
+
|
232
|
+
# HTTP header 'Content-Type'
|
233
|
+
local_header_content_type = ['application/x-www-form-urlencoded']
|
234
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
235
|
+
|
236
|
+
# form parameters
|
237
|
+
form_params = {}
|
238
|
+
|
239
|
+
# http body (model)
|
240
|
+
post_body = nil
|
241
|
+
auth_names = []
|
242
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
243
|
+
:header_params => header_params,
|
244
|
+
:query_params => query_params,
|
245
|
+
:form_params => form_params,
|
246
|
+
:body => post_body,
|
247
|
+
:auth_names => auth_names)
|
248
|
+
if @api_client.config.debugging
|
249
|
+
@api_client.config.logger.debug "API called: WebhooksApi#list_web_hook_events\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
250
|
+
end
|
251
|
+
return data, status_code, headers
|
252
|
+
end
|
253
|
+
|
202
254
|
# Sends test Webhook
|
203
255
|
# Triggers a test webhook to be sent to your endpoints.
|
204
256
|
# @param [Hash] opts the optional parameters
|
@@ -230,7 +282,7 @@ module BombBomb
|
|
230
282
|
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
231
283
|
|
232
284
|
# HTTP header 'Content-Type'
|
233
|
-
local_header_content_type = []
|
285
|
+
local_header_content_type = ['application/x-www-form-urlencoded']
|
234
286
|
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
235
287
|
|
236
288
|
# form parameters
|
data/lib/bombbomb/api_client.rb
CHANGED
data/lib/bombbomb/api_error.rb
CHANGED
@@ -0,0 +1,272 @@
|
|
1
|
+
=begin
|
2
|
+
#BombBomb
|
3
|
+
|
4
|
+
#We make it easy to build relationships using simple videos.
|
5
|
+
|
6
|
+
OpenAPI spec version: 2.0.21432
|
7
|
+
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
|
10
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
11
|
+
you may not use this file except in compliance with the License.
|
12
|
+
You may obtain a copy of the License at
|
13
|
+
|
14
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
15
|
+
|
16
|
+
Unless required by applicable law or agreed to in writing, software
|
17
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
18
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
19
|
+
See the License for the specific language governing permissions and
|
20
|
+
limitations under the License.
|
21
|
+
|
22
|
+
=end
|
23
|
+
|
24
|
+
require 'date'
|
25
|
+
|
26
|
+
module BombBomb
|
27
|
+
# The Curriculum class
|
28
|
+
class Curriculum
|
29
|
+
# Id
|
30
|
+
attr_accessor :id
|
31
|
+
|
32
|
+
# Name
|
33
|
+
attr_accessor :name
|
34
|
+
|
35
|
+
# HTML formatted intro
|
36
|
+
attr_accessor :html_intro
|
37
|
+
|
38
|
+
# URI of header image
|
39
|
+
attr_accessor :img_url
|
40
|
+
|
41
|
+
# Number of curriculum items
|
42
|
+
attr_accessor :item_count
|
43
|
+
|
44
|
+
# Render method for curriculum
|
45
|
+
attr_accessor :render_as
|
46
|
+
|
47
|
+
# Globally visible
|
48
|
+
attr_accessor :visible_to_all_users
|
49
|
+
|
50
|
+
# Collection of User Progress for Curriculum
|
51
|
+
attr_accessor :progress
|
52
|
+
|
53
|
+
|
54
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
55
|
+
def self.attribute_map
|
56
|
+
{
|
57
|
+
:'id' => :'id',
|
58
|
+
:'name' => :'name',
|
59
|
+
:'html_intro' => :'htmlIntro',
|
60
|
+
:'img_url' => :'imgUrl',
|
61
|
+
:'item_count' => :'itemCount',
|
62
|
+
:'render_as' => :'renderAs',
|
63
|
+
:'visible_to_all_users' => :'visibleToAllUsers',
|
64
|
+
:'progress' => :'progress'
|
65
|
+
}
|
66
|
+
end
|
67
|
+
|
68
|
+
# Attribute type mapping.
|
69
|
+
def self.swagger_types
|
70
|
+
{
|
71
|
+
:'id' => :'String',
|
72
|
+
:'name' => :'String',
|
73
|
+
:'html_intro' => :'String',
|
74
|
+
:'img_url' => :'String',
|
75
|
+
:'item_count' => :'Integer',
|
76
|
+
:'render_as' => :'String',
|
77
|
+
:'visible_to_all_users' => :'BOOLEAN',
|
78
|
+
:'progress' => :'Array<CurriculumUserProgress>'
|
79
|
+
}
|
80
|
+
end
|
81
|
+
|
82
|
+
# Initializes the object
|
83
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
84
|
+
def initialize(attributes = {})
|
85
|
+
return unless attributes.is_a?(Hash)
|
86
|
+
|
87
|
+
# convert string to symbol for hash key
|
88
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
89
|
+
|
90
|
+
if attributes.has_key?(:'id')
|
91
|
+
self.id = attributes[:'id']
|
92
|
+
end
|
93
|
+
|
94
|
+
if attributes.has_key?(:'name')
|
95
|
+
self.name = attributes[:'name']
|
96
|
+
end
|
97
|
+
|
98
|
+
if attributes.has_key?(:'htmlIntro')
|
99
|
+
self.html_intro = attributes[:'htmlIntro']
|
100
|
+
end
|
101
|
+
|
102
|
+
if attributes.has_key?(:'imgUrl')
|
103
|
+
self.img_url = attributes[:'imgUrl']
|
104
|
+
end
|
105
|
+
|
106
|
+
if attributes.has_key?(:'itemCount')
|
107
|
+
self.item_count = attributes[:'itemCount']
|
108
|
+
end
|
109
|
+
|
110
|
+
if attributes.has_key?(:'renderAs')
|
111
|
+
self.render_as = attributes[:'renderAs']
|
112
|
+
end
|
113
|
+
|
114
|
+
if attributes.has_key?(:'visibleToAllUsers')
|
115
|
+
self.visible_to_all_users = attributes[:'visibleToAllUsers']
|
116
|
+
end
|
117
|
+
|
118
|
+
if attributes.has_key?(:'progress')
|
119
|
+
if (value = attributes[:'progress']).is_a?(Array)
|
120
|
+
self.progress = value
|
121
|
+
end
|
122
|
+
end
|
123
|
+
|
124
|
+
end
|
125
|
+
|
126
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
127
|
+
# @return Array for valid properies with the reasons
|
128
|
+
def list_invalid_properties
|
129
|
+
invalid_properties = Array.new
|
130
|
+
return invalid_properties
|
131
|
+
end
|
132
|
+
|
133
|
+
# Check to see if the all the properties in the model are valid
|
134
|
+
# @return true if the model is valid
|
135
|
+
def valid?
|
136
|
+
return true
|
137
|
+
end
|
138
|
+
|
139
|
+
# Checks equality by comparing each attribute.
|
140
|
+
# @param [Object] Object to be compared
|
141
|
+
def ==(o)
|
142
|
+
return true if self.equal?(o)
|
143
|
+
self.class == o.class &&
|
144
|
+
id == o.id &&
|
145
|
+
name == o.name &&
|
146
|
+
html_intro == o.html_intro &&
|
147
|
+
img_url == o.img_url &&
|
148
|
+
item_count == o.item_count &&
|
149
|
+
render_as == o.render_as &&
|
150
|
+
visible_to_all_users == o.visible_to_all_users &&
|
151
|
+
progress == o.progress
|
152
|
+
end
|
153
|
+
|
154
|
+
# @see the `==` method
|
155
|
+
# @param [Object] Object to be compared
|
156
|
+
def eql?(o)
|
157
|
+
self == o
|
158
|
+
end
|
159
|
+
|
160
|
+
# Calculates hash code according to all attributes.
|
161
|
+
# @return [Fixnum] Hash code
|
162
|
+
def hash
|
163
|
+
[id, name, html_intro, img_url, item_count, render_as, visible_to_all_users, progress].hash
|
164
|
+
end
|
165
|
+
|
166
|
+
# Builds the object from hash
|
167
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
168
|
+
# @return [Object] Returns the model itself
|
169
|
+
def build_from_hash(attributes)
|
170
|
+
return nil unless attributes.is_a?(Hash)
|
171
|
+
self.class.swagger_types.each_pair do |key, type|
|
172
|
+
if type =~ /^Array<(.*)>/i
|
173
|
+
# check to ensure the input is an array given that the the attribute
|
174
|
+
# is documented as an array but the input is not
|
175
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
176
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
177
|
+
end
|
178
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
179
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
180
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
181
|
+
end
|
182
|
+
|
183
|
+
self
|
184
|
+
end
|
185
|
+
|
186
|
+
# Deserializes the data based on type
|
187
|
+
# @param string type Data type
|
188
|
+
# @param string value Value to be deserialized
|
189
|
+
# @return [Object] Deserialized data
|
190
|
+
def _deserialize(type, value)
|
191
|
+
case type.to_sym
|
192
|
+
when :DateTime
|
193
|
+
DateTime.parse(value)
|
194
|
+
when :Date
|
195
|
+
Date.parse(value)
|
196
|
+
when :String
|
197
|
+
value.to_s
|
198
|
+
when :Integer
|
199
|
+
value.to_i
|
200
|
+
when :Float
|
201
|
+
value.to_f
|
202
|
+
when :BOOLEAN
|
203
|
+
if value.to_s =~ /^(true|t|yes|y|1)$/i
|
204
|
+
true
|
205
|
+
else
|
206
|
+
false
|
207
|
+
end
|
208
|
+
when :Object
|
209
|
+
# generic object (usually a Hash), return directly
|
210
|
+
value
|
211
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
212
|
+
inner_type = Regexp.last_match[:inner_type]
|
213
|
+
value.map { |v| _deserialize(inner_type, v) }
|
214
|
+
when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
|
215
|
+
k_type = Regexp.last_match[:k_type]
|
216
|
+
v_type = Regexp.last_match[:v_type]
|
217
|
+
{}.tap do |hash|
|
218
|
+
value.each do |k, v|
|
219
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
220
|
+
end
|
221
|
+
end
|
222
|
+
else # model
|
223
|
+
temp_model = BombBomb.const_get(type).new
|
224
|
+
temp_model.build_from_hash(value)
|
225
|
+
end
|
226
|
+
end
|
227
|
+
|
228
|
+
# Returns the string representation of the object
|
229
|
+
# @return [String] String presentation of the object
|
230
|
+
def to_s
|
231
|
+
to_hash.to_s
|
232
|
+
end
|
233
|
+
|
234
|
+
# to_body is an alias to to_hash (backward compatibility)
|
235
|
+
# @return [Hash] Returns the object in the form of hash
|
236
|
+
def to_body
|
237
|
+
to_hash
|
238
|
+
end
|
239
|
+
|
240
|
+
# Returns the object in the form of hash
|
241
|
+
# @return [Hash] Returns the object in the form of hash
|
242
|
+
def to_hash
|
243
|
+
hash = {}
|
244
|
+
self.class.attribute_map.each_pair do |attr, param|
|
245
|
+
value = self.send(attr)
|
246
|
+
next if value.nil?
|
247
|
+
hash[param] = _to_hash(value)
|
248
|
+
end
|
249
|
+
hash
|
250
|
+
end
|
251
|
+
|
252
|
+
# Outputs non-array value in the form of hash
|
253
|
+
# For object, use to_hash. Otherwise, just return the value
|
254
|
+
# @param [Object] value Any valid value
|
255
|
+
# @return [Hash] Returns the value in the form of hash
|
256
|
+
def _to_hash(value)
|
257
|
+
if value.is_a?(Array)
|
258
|
+
value.compact.map{ |v| _to_hash(v) }
|
259
|
+
elsif value.is_a?(Hash)
|
260
|
+
{}.tap do |hash|
|
261
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
262
|
+
end
|
263
|
+
elsif value.respond_to? :to_hash
|
264
|
+
value.to_hash
|
265
|
+
else
|
266
|
+
value
|
267
|
+
end
|
268
|
+
end
|
269
|
+
|
270
|
+
end
|
271
|
+
|
272
|
+
end
|