bombbomb 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (51) hide show
  1. checksums.yaml +15 -0
  2. data/LICENSE +201 -0
  3. data/README.md +139 -0
  4. data/Rakefile +3 -0
  5. data/bombbomb.gemspec +55 -0
  6. data/docs/BBWebHook.md +11 -0
  7. data/docs/InlineResponse200.md +9 -0
  8. data/docs/InlineResponse200Items.md +11 -0
  9. data/docs/JerichoConfiguration.md +18 -0
  10. data/docs/JerichoPerformance.md +18 -0
  11. data/docs/OAuthClient.md +13 -0
  12. data/docs/PromptsApi.md +169 -0
  13. data/docs/String.md +7 -0
  14. data/docs/TeamsApi.md +290 -0
  15. data/docs/UtilitiesApi.md +204 -0
  16. data/docs/VideoEmailPrompt.md +25 -0
  17. data/docs/WebhooksApi.md +207 -0
  18. data/git_push.sh +67 -0
  19. data/lib/bombbomb.rb +62 -0
  20. data/lib/bombbomb/api/prompts_api.rb +217 -0
  21. data/lib/bombbomb/api/teams_api.rb +346 -0
  22. data/lib/bombbomb/api/utilities_api.rb +258 -0
  23. data/lib/bombbomb/api/webhooks_api.rb +254 -0
  24. data/lib/bombbomb/api_client.rb +379 -0
  25. data/lib/bombbomb/api_error.rb +47 -0
  26. data/lib/bombbomb/configuration.rb +214 -0
  27. data/lib/bombbomb/models/bb_web_hook.rb +230 -0
  28. data/lib/bombbomb/models/inline_response_200.rb +210 -0
  29. data/lib/bombbomb/models/inline_response_200_items.rb +226 -0
  30. data/lib/bombbomb/models/jericho_configuration.rb +299 -0
  31. data/lib/bombbomb/models/jericho_performance.rb +300 -0
  32. data/lib/bombbomb/models/o_auth_client.rb +250 -0
  33. data/lib/bombbomb/models/string.rb +190 -0
  34. data/lib/bombbomb/models/video_email_prompt.rb +379 -0
  35. data/lib/bombbomb/version.rb +26 -0
  36. data/spec/api/prompts_api_spec.rb +84 -0
  37. data/spec/api/teams_api_spec.rb +113 -0
  38. data/spec/api/utilities_api_spec.rb +93 -0
  39. data/spec/api/webhooks_api_spec.rb +92 -0
  40. data/spec/api_client_spec.rb +237 -0
  41. data/spec/configuration_spec.rb +53 -0
  42. data/spec/models/bb_web_hook_spec.rb +71 -0
  43. data/spec/models/inline_response_200_items_spec.rb +71 -0
  44. data/spec/models/inline_response_200_spec.rb +59 -0
  45. data/spec/models/jericho_configuration_spec.rb +113 -0
  46. data/spec/models/jericho_performance_spec.rb +113 -0
  47. data/spec/models/o_auth_client_spec.rb +83 -0
  48. data/spec/models/string_spec.rb +47 -0
  49. data/spec/models/video_email_prompt_spec.rb +155 -0
  50. data/spec/spec_helper.rb +122 -0
  51. metadata +288 -0
@@ -0,0 +1,258 @@
1
+ =begin
2
+ #BombBomb
3
+
4
+ #We make it easy to build relationships using simple videos.
5
+
6
+ OpenAPI spec version: 2.0
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 "uri"
25
+
26
+ module BombBomb
27
+ class UtilitiesApi
28
+ attr_accessor :api_client
29
+
30
+ def initialize(api_client = ApiClient.default)
31
+ @api_client = api_client
32
+ end
33
+
34
+ # Create an OAuth Client
35
+ # Creates an OAuth Client managed by the user
36
+ # @param name The name of the OAuth client. e.g. MyCrm DEV, or MyCrm PROD
37
+ # @param redirect_uri The URI to direct the client to after logging in.
38
+ # @param [Hash] opts the optional parameters
39
+ # @return [OAuthClient]
40
+ def create_o_auth_client(name, redirect_uri, opts = {})
41
+ data, _status_code, _headers = create_o_auth_client_with_http_info(name, redirect_uri, opts)
42
+ return data
43
+ end
44
+
45
+ # Create an OAuth Client
46
+ # Creates an OAuth Client managed by the user
47
+ # @param name The name of the OAuth client. e.g. MyCrm DEV, or MyCrm PROD
48
+ # @param redirect_uri The URI to direct the client to after logging in.
49
+ # @param [Hash] opts the optional parameters
50
+ # @return [Array<(OAuthClient, Fixnum, Hash)>] OAuthClient data, response status code and response headers
51
+ def create_o_auth_client_with_http_info(name, redirect_uri, opts = {})
52
+ if @api_client.config.debugging
53
+ @api_client.config.logger.debug "Calling API: UtilitiesApi.create_o_auth_client ..."
54
+ end
55
+ # verify the required parameter 'name' is set
56
+ fail ArgumentError, "Missing the required parameter 'name' when calling UtilitiesApi.create_o_auth_client" if name.nil?
57
+ # verify the required parameter 'redirect_uri' is set
58
+ fail ArgumentError, "Missing the required parameter 'redirect_uri' when calling UtilitiesApi.create_o_auth_client" if redirect_uri.nil?
59
+ # resource path
60
+ local_var_path = "/oauthclient".sub('{format}','json')
61
+
62
+ # query parameters
63
+ query_params = {}
64
+
65
+ # header parameters
66
+ header_params = {}
67
+
68
+ # HTTP header 'Accept' (if needed)
69
+ local_header_accept = ['application/json']
70
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
71
+
72
+ # HTTP header 'Content-Type'
73
+ local_header_content_type = []
74
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
75
+
76
+ # form parameters
77
+ form_params = {}
78
+ form_params["name"] = name
79
+ form_params["redirectUri"] = redirect_uri
80
+
81
+ # http body (model)
82
+ post_body = nil
83
+ auth_names = ['BBOAuth2']
84
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
85
+ :header_params => header_params,
86
+ :query_params => query_params,
87
+ :form_params => form_params,
88
+ :body => post_body,
89
+ :auth_names => auth_names,
90
+ :return_type => 'OAuthClient')
91
+ if @api_client.config.debugging
92
+ @api_client.config.logger.debug "API called: UtilitiesApi#create_o_auth_client\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
93
+ end
94
+ return data, status_code, headers
95
+ end
96
+
97
+ # Delete an OAuth Client
98
+ # Deletes an OAuth Client managed by the user
99
+ # @param id The id of the OAuth Client
100
+ # @param [Hash] opts the optional parameters
101
+ # @return [nil]
102
+ def delete_o_auth_client(id, opts = {})
103
+ delete_o_auth_client_with_http_info(id, opts)
104
+ return nil
105
+ end
106
+
107
+ # Delete an OAuth Client
108
+ # Deletes an OAuth Client managed by the user
109
+ # @param id The id of the OAuth Client
110
+ # @param [Hash] opts the optional parameters
111
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
112
+ def delete_o_auth_client_with_http_info(id, opts = {})
113
+ if @api_client.config.debugging
114
+ @api_client.config.logger.debug "Calling API: UtilitiesApi.delete_o_auth_client ..."
115
+ end
116
+ # verify the required parameter 'id' is set
117
+ fail ArgumentError, "Missing the required parameter 'id' when calling UtilitiesApi.delete_o_auth_client" if id.nil?
118
+ # resource path
119
+ local_var_path = "/oauthclient/{id}".sub('{format}','json').sub('{' + 'id' + '}', id.to_s)
120
+
121
+ # query parameters
122
+ query_params = {}
123
+
124
+ # header parameters
125
+ header_params = {}
126
+
127
+ # HTTP header 'Accept' (if needed)
128
+ local_header_accept = ['application/json']
129
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
130
+
131
+ # HTTP header 'Content-Type'
132
+ local_header_content_type = []
133
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
134
+
135
+ # form parameters
136
+ form_params = {}
137
+
138
+ # http body (model)
139
+ post_body = nil
140
+ auth_names = ['BBOAuth2']
141
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
142
+ :header_params => header_params,
143
+ :query_params => query_params,
144
+ :form_params => form_params,
145
+ :body => post_body,
146
+ :auth_names => auth_names)
147
+ if @api_client.config.debugging
148
+ @api_client.config.logger.debug "API called: UtilitiesApi#delete_o_auth_client\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
149
+ end
150
+ return data, status_code, headers
151
+ end
152
+
153
+ # Lists OAuth Clients
154
+ # Enumerates OAuth Clients managed by the user
155
+ # @param [Hash] opts the optional parameters
156
+ # @return [Array<OAuthClient>]
157
+ def get_o_auth_clients(opts = {})
158
+ data, _status_code, _headers = get_o_auth_clients_with_http_info(opts)
159
+ return data
160
+ end
161
+
162
+ # Lists OAuth Clients
163
+ # Enumerates OAuth Clients managed by the user
164
+ # @param [Hash] opts the optional parameters
165
+ # @return [Array<(Array<OAuthClient>, Fixnum, Hash)>] Array<OAuthClient> data, response status code and response headers
166
+ def get_o_auth_clients_with_http_info(opts = {})
167
+ if @api_client.config.debugging
168
+ @api_client.config.logger.debug "Calling API: UtilitiesApi.get_o_auth_clients ..."
169
+ end
170
+ # resource path
171
+ local_var_path = "/oauthclient".sub('{format}','json')
172
+
173
+ # query parameters
174
+ query_params = {}
175
+
176
+ # header parameters
177
+ header_params = {}
178
+
179
+ # HTTP header 'Accept' (if needed)
180
+ local_header_accept = ['application/json']
181
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
182
+
183
+ # HTTP header 'Content-Type'
184
+ local_header_content_type = []
185
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
186
+
187
+ # form parameters
188
+ form_params = {}
189
+
190
+ # http body (model)
191
+ post_body = nil
192
+ auth_names = ['BBOAuth2']
193
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
194
+ :header_params => header_params,
195
+ :query_params => query_params,
196
+ :form_params => form_params,
197
+ :body => post_body,
198
+ :auth_names => auth_names,
199
+ :return_type => 'Array<OAuthClient>')
200
+ if @api_client.config.debugging
201
+ @api_client.config.logger.debug "API called: UtilitiesApi#get_o_auth_clients\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
202
+ end
203
+ return data, status_code, headers
204
+ end
205
+
206
+ # Describes this api
207
+ # Describes methods available through the API.
208
+ # @param [Hash] opts the optional parameters
209
+ # @return [nil]
210
+ def get_spec(opts = {})
211
+ get_spec_with_http_info(opts)
212
+ return nil
213
+ end
214
+
215
+ # Describes this api
216
+ # Describes methods available through the API.
217
+ # @param [Hash] opts the optional parameters
218
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
219
+ def get_spec_with_http_info(opts = {})
220
+ if @api_client.config.debugging
221
+ @api_client.config.logger.debug "Calling API: UtilitiesApi.get_spec ..."
222
+ end
223
+ # resource path
224
+ local_var_path = "/spec".sub('{format}','json')
225
+
226
+ # query parameters
227
+ query_params = {}
228
+
229
+ # header parameters
230
+ header_params = {}
231
+
232
+ # HTTP header 'Accept' (if needed)
233
+ local_header_accept = ['application/json']
234
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
235
+
236
+ # HTTP header 'Content-Type'
237
+ local_header_content_type = []
238
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
239
+
240
+ # form parameters
241
+ form_params = {}
242
+
243
+ # http body (model)
244
+ post_body = nil
245
+ auth_names = []
246
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
247
+ :header_params => header_params,
248
+ :query_params => query_params,
249
+ :form_params => form_params,
250
+ :body => post_body,
251
+ :auth_names => auth_names)
252
+ if @api_client.config.debugging
253
+ @api_client.config.logger.debug "API called: UtilitiesApi#get_spec\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
254
+ end
255
+ return data, status_code, headers
256
+ end
257
+ end
258
+ end
@@ -0,0 +1,254 @@
1
+ =begin
2
+ #BombBomb
3
+
4
+ #We make it easy to build relationships using simple videos.
5
+
6
+ OpenAPI spec version: 2.0
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 "uri"
25
+
26
+ module BombBomb
27
+ class WebhooksApi
28
+ attr_accessor :api_client
29
+
30
+ def initialize(api_client = ApiClient.default)
31
+ @api_client = api_client
32
+ end
33
+
34
+ # Add Webhook
35
+ # Idempotently adds a Webhook url
36
+ # @param hook_url The Url of your listener
37
+ # @param [Hash] opts the optional parameters
38
+ # @return [BBWebHook]
39
+ def add_web_hook(hook_url, opts = {})
40
+ data, _status_code, _headers = add_web_hook_with_http_info(hook_url, opts)
41
+ return data
42
+ end
43
+
44
+ # Add Webhook
45
+ # Idempotently adds a Webhook url
46
+ # @param hook_url The Url of your listener
47
+ # @param [Hash] opts the optional parameters
48
+ # @return [Array<(BBWebHook, Fixnum, Hash)>] BBWebHook data, response status code and response headers
49
+ def add_web_hook_with_http_info(hook_url, opts = {})
50
+ if @api_client.config.debugging
51
+ @api_client.config.logger.debug "Calling API: WebhooksApi.add_web_hook ..."
52
+ end
53
+ # verify the required parameter 'hook_url' is set
54
+ fail ArgumentError, "Missing the required parameter 'hook_url' when calling WebhooksApi.add_web_hook" if hook_url.nil?
55
+ # resource path
56
+ local_var_path = "/webhook".sub('{format}','json')
57
+
58
+ # query parameters
59
+ query_params = {}
60
+
61
+ # header parameters
62
+ header_params = {}
63
+
64
+ # HTTP header 'Accept' (if needed)
65
+ local_header_accept = ['application/json']
66
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
67
+
68
+ # HTTP header 'Content-Type'
69
+ local_header_content_type = []
70
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
71
+
72
+ # form parameters
73
+ form_params = {}
74
+ form_params["hookUrl"] = hook_url
75
+
76
+ # http body (model)
77
+ post_body = nil
78
+ auth_names = ['BBOAuth2']
79
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
80
+ :header_params => header_params,
81
+ :query_params => query_params,
82
+ :form_params => form_params,
83
+ :body => post_body,
84
+ :auth_names => auth_names,
85
+ :return_type => 'BBWebHook')
86
+ if @api_client.config.debugging
87
+ @api_client.config.logger.debug "API called: WebhooksApi#add_web_hook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
88
+ end
89
+ return data, status_code, headers
90
+ end
91
+
92
+ # Deletes Webhook
93
+ # Deletes a Webhook
94
+ # @param hook_id The id of the webhook to delete
95
+ # @param [Hash] opts the optional parameters
96
+ # @return [String]
97
+ def delete_web_hook(hook_id, opts = {})
98
+ data, _status_code, _headers = delete_web_hook_with_http_info(hook_id, opts)
99
+ return data
100
+ end
101
+
102
+ # Deletes Webhook
103
+ # Deletes a Webhook
104
+ # @param hook_id The id of the webhook to delete
105
+ # @param [Hash] opts the optional parameters
106
+ # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
107
+ def delete_web_hook_with_http_info(hook_id, opts = {})
108
+ if @api_client.config.debugging
109
+ @api_client.config.logger.debug "Calling API: WebhooksApi.delete_web_hook ..."
110
+ end
111
+ # verify the required parameter 'hook_id' is set
112
+ fail ArgumentError, "Missing the required parameter 'hook_id' when calling WebhooksApi.delete_web_hook" if hook_id.nil?
113
+ # resource path
114
+ local_var_path = "/webhook/{hookId}".sub('{format}','json').sub('{' + 'hookId' + '}', hook_id.to_s)
115
+
116
+ # query parameters
117
+ query_params = {}
118
+
119
+ # header parameters
120
+ header_params = {}
121
+
122
+ # HTTP header 'Accept' (if needed)
123
+ local_header_accept = ['application/json']
124
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
125
+
126
+ # HTTP header 'Content-Type'
127
+ local_header_content_type = []
128
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
129
+
130
+ # form parameters
131
+ form_params = {}
132
+
133
+ # http body (model)
134
+ post_body = nil
135
+ auth_names = ['BBOAuth2']
136
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
137
+ :header_params => header_params,
138
+ :query_params => query_params,
139
+ :form_params => form_params,
140
+ :body => post_body,
141
+ :auth_names => auth_names,
142
+ :return_type => 'String')
143
+ if @api_client.config.debugging
144
+ @api_client.config.logger.debug "API called: WebhooksApi#delete_web_hook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
145
+ end
146
+ return data, status_code, headers
147
+ end
148
+
149
+ # Lists Webhooks
150
+ # Lists all registered Webhooks
151
+ # @param [Hash] opts the optional parameters
152
+ # @return [Array<BBWebHook>]
153
+ def get_web_hooks(opts = {})
154
+ data, _status_code, _headers = get_web_hooks_with_http_info(opts)
155
+ return data
156
+ end
157
+
158
+ # Lists Webhooks
159
+ # Lists all registered Webhooks
160
+ # @param [Hash] opts the optional parameters
161
+ # @return [Array<(Array<BBWebHook>, Fixnum, Hash)>] Array<BBWebHook> data, response status code and response headers
162
+ def get_web_hooks_with_http_info(opts = {})
163
+ if @api_client.config.debugging
164
+ @api_client.config.logger.debug "Calling API: WebhooksApi.get_web_hooks ..."
165
+ end
166
+ # resource path
167
+ local_var_path = "/webhook/".sub('{format}','json')
168
+
169
+ # query parameters
170
+ query_params = {}
171
+
172
+ # header parameters
173
+ header_params = {}
174
+
175
+ # HTTP header 'Accept' (if needed)
176
+ local_header_accept = ['application/json']
177
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
178
+
179
+ # HTTP header 'Content-Type'
180
+ local_header_content_type = []
181
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
182
+
183
+ # form parameters
184
+ form_params = {}
185
+
186
+ # http body (model)
187
+ post_body = nil
188
+ auth_names = ['BBOAuth2']
189
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
190
+ :header_params => header_params,
191
+ :query_params => query_params,
192
+ :form_params => form_params,
193
+ :body => post_body,
194
+ :auth_names => auth_names,
195
+ :return_type => 'Array<BBWebHook>')
196
+ if @api_client.config.debugging
197
+ @api_client.config.logger.debug "API called: WebhooksApi#get_web_hooks\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
198
+ end
199
+ return data, status_code, headers
200
+ end
201
+
202
+ # Sends test Webhook
203
+ # Triggers a test webhook to be sent to your endpoints.
204
+ # @param [Hash] opts the optional parameters
205
+ # @return [nil]
206
+ def send_webhook_example(opts = {})
207
+ send_webhook_example_with_http_info(opts)
208
+ return nil
209
+ end
210
+
211
+ # Sends test Webhook
212
+ # Triggers a test webhook to be sent to your endpoints.
213
+ # @param [Hash] opts the optional parameters
214
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
215
+ def send_webhook_example_with_http_info(opts = {})
216
+ if @api_client.config.debugging
217
+ @api_client.config.logger.debug "Calling API: WebhooksApi.send_webhook_example ..."
218
+ end
219
+ # resource path
220
+ local_var_path = "/webhook/test".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 = []
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 = ['BBOAuth2']
242
+ data, status_code, headers = @api_client.call_api(:POST, 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#send_webhook_example\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
250
+ end
251
+ return data, status_code, headers
252
+ end
253
+ end
254
+ end