bombbomb 1.0.0

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 (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,204 @@
1
+ # BombBomb::UtilitiesApi
2
+
3
+ All URIs are relative to *https://dev.api.bombbomb.com/v2*
4
+
5
+ Method | HTTP request | Description
6
+ ------------- | ------------- | -------------
7
+ [**create_o_auth_client**](UtilitiesApi.md#create_o_auth_client) | **POST** /oauthclient | Create an OAuth Client
8
+ [**delete_o_auth_client**](UtilitiesApi.md#delete_o_auth_client) | **DELETE** /oauthclient/{id} | Delete an OAuth Client
9
+ [**get_o_auth_clients**](UtilitiesApi.md#get_o_auth_clients) | **GET** /oauthclient | Lists OAuth Clients
10
+ [**get_spec**](UtilitiesApi.md#get_spec) | **GET** /spec | Describes this api
11
+
12
+
13
+ # **create_o_auth_client**
14
+ > OAuthClient create_o_auth_client(name, redirect_uri)
15
+
16
+ Create an OAuth Client
17
+
18
+ Creates an OAuth Client managed by the user
19
+
20
+ ### Example
21
+ ```ruby
22
+ # load the gem
23
+ require 'bombbomb'
24
+ # setup authorization
25
+ BombBomb.configure do |config|
26
+ # Configure OAuth2 access token for authorization: BBOAuth2
27
+ config.access_token = 'YOUR ACCESS TOKEN'
28
+ end
29
+
30
+ api_instance = BombBomb::UtilitiesApi.new
31
+
32
+ name = "name_example" # String | The name of the OAuth client. e.g. MyCrm DEV, or MyCrm PROD
33
+
34
+ redirect_uri = "redirect_uri_example" # String | The URI to direct the client to after logging in.
35
+
36
+
37
+ begin
38
+ #Create an OAuth Client
39
+ result = api_instance.create_o_auth_client(name, redirect_uri)
40
+ p result
41
+ rescue BombBomb::ApiError => e
42
+ puts "Exception when calling UtilitiesApi->create_o_auth_client: #{e}"
43
+ end
44
+ ```
45
+
46
+ ### Parameters
47
+
48
+ Name | Type | Description | Notes
49
+ ------------- | ------------- | ------------- | -------------
50
+ **name** | **String**| The name of the OAuth client. e.g. MyCrm DEV, or MyCrm PROD |
51
+ **redirect_uri** | **String**| The URI to direct the client to after logging in. |
52
+
53
+ ### Return type
54
+
55
+ [**OAuthClient**](OAuthClient.md)
56
+
57
+ ### Authorization
58
+
59
+ [BBOAuth2](../README.md#BBOAuth2)
60
+
61
+ ### HTTP request headers
62
+
63
+ - **Content-Type**: Not defined
64
+ - **Accept**: application/json
65
+
66
+
67
+
68
+ # **delete_o_auth_client**
69
+ > delete_o_auth_client(id)
70
+
71
+ Delete an OAuth Client
72
+
73
+ Deletes an OAuth Client managed by the user
74
+
75
+ ### Example
76
+ ```ruby
77
+ # load the gem
78
+ require 'bombbomb'
79
+ # setup authorization
80
+ BombBomb.configure do |config|
81
+ # Configure OAuth2 access token for authorization: BBOAuth2
82
+ config.access_token = 'YOUR ACCESS TOKEN'
83
+ end
84
+
85
+ api_instance = BombBomb::UtilitiesApi.new
86
+
87
+ id = "id_example" # String | The id of the OAuth Client
88
+
89
+
90
+ begin
91
+ #Delete an OAuth Client
92
+ api_instance.delete_o_auth_client(id)
93
+ rescue BombBomb::ApiError => e
94
+ puts "Exception when calling UtilitiesApi->delete_o_auth_client: #{e}"
95
+ end
96
+ ```
97
+
98
+ ### Parameters
99
+
100
+ Name | Type | Description | Notes
101
+ ------------- | ------------- | ------------- | -------------
102
+ **id** | **String**| The id of the OAuth Client |
103
+
104
+ ### Return type
105
+
106
+ nil (empty response body)
107
+
108
+ ### Authorization
109
+
110
+ [BBOAuth2](../README.md#BBOAuth2)
111
+
112
+ ### HTTP request headers
113
+
114
+ - **Content-Type**: Not defined
115
+ - **Accept**: application/json
116
+
117
+
118
+
119
+ # **get_o_auth_clients**
120
+ > Array<OAuthClient> get_o_auth_clients
121
+
122
+ Lists OAuth Clients
123
+
124
+ Enumerates OAuth Clients managed by the user
125
+
126
+ ### Example
127
+ ```ruby
128
+ # load the gem
129
+ require 'bombbomb'
130
+ # setup authorization
131
+ BombBomb.configure do |config|
132
+ # Configure OAuth2 access token for authorization: BBOAuth2
133
+ config.access_token = 'YOUR ACCESS TOKEN'
134
+ end
135
+
136
+ api_instance = BombBomb::UtilitiesApi.new
137
+
138
+ begin
139
+ #Lists OAuth Clients
140
+ result = api_instance.get_o_auth_clients
141
+ p result
142
+ rescue BombBomb::ApiError => e
143
+ puts "Exception when calling UtilitiesApi->get_o_auth_clients: #{e}"
144
+ end
145
+ ```
146
+
147
+ ### Parameters
148
+ This endpoint does not need any parameter.
149
+
150
+ ### Return type
151
+
152
+ [**Array<OAuthClient>**](OAuthClient.md)
153
+
154
+ ### Authorization
155
+
156
+ [BBOAuth2](../README.md#BBOAuth2)
157
+
158
+ ### HTTP request headers
159
+
160
+ - **Content-Type**: Not defined
161
+ - **Accept**: application/json
162
+
163
+
164
+
165
+ # **get_spec**
166
+ > get_spec
167
+
168
+ Describes this api
169
+
170
+ Describes methods available through the API.
171
+
172
+ ### Example
173
+ ```ruby
174
+ # load the gem
175
+ require 'bombbomb'
176
+
177
+ api_instance = BombBomb::UtilitiesApi.new
178
+
179
+ begin
180
+ #Describes this api
181
+ api_instance.get_spec
182
+ rescue BombBomb::ApiError => e
183
+ puts "Exception when calling UtilitiesApi->get_spec: #{e}"
184
+ end
185
+ ```
186
+
187
+ ### Parameters
188
+ This endpoint does not need any parameter.
189
+
190
+ ### Return type
191
+
192
+ nil (empty response body)
193
+
194
+ ### Authorization
195
+
196
+ No authorization required
197
+
198
+ ### HTTP request headers
199
+
200
+ - **Content-Type**: Not defined
201
+ - **Accept**: application/json
202
+
203
+
204
+
@@ -0,0 +1,25 @@
1
+ # BombBomb::VideoEmailPrompt
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **id** | **String** | The identifier of the prompt. Read Only. | [optional]
7
+ **user_id** | **String** | The prompt's owner. Read Only. | [optional]
8
+ **template_id** | **String** | Optional. The email template to be used in the sent email, if none supplied, the users' default will be applied. | [optional]
9
+ **email_subject_line** | **String** | The subject line of the final email |
10
+ **email_content** | **String** | The HTML content of the final email |
11
+ **to_email_addresses** | **Array<String>** | Email addresses to send the final email to, can be mixed with listIds. | [optional]
12
+ **to_lists** | **Array<String>** | List Ids to send the final email to | [optional]
13
+ **jericho_id** | **String** | If sent in a jericho context, this will have the jericho id | [optional]
14
+ **prompt_subject** | **String** | The prompt's subject line |
15
+ **prompt_html** | **String** | The HTML body of the prompt |
16
+ **send_without_video** | **BOOLEAN** | Whether to send the email if no video is recorded. If set to require a video, and none is added before the videoDueDate, the prompt is cancelled. | [optional]
17
+ **video_due_date** | **DateTime** | When the video must be recorded by | [optional]
18
+ **scheduled_send_date** | **DateTime** | When the final email is scheduled to be sent |
19
+ **video_id** | **String** | The video that was added to the prompt. Read Only. | [optional]
20
+ **email_id** | **String** | The email that was created by the prompt Read Only. | [optional]
21
+ **job_id** | **String** | The job sent by the prompt Read Only. | [optional]
22
+ **status** | **Integer** | The status of the prompt: created = 0, sent = 10, recorded = 20, job_created = 30, timed_out = 40, declined = 50 Read Only | [optional]
23
+ **do_not_apply_template** | **BOOLEAN** | Controls whether a user template is applied to the message as it is sent | [optional]
24
+
25
+
@@ -0,0 +1,207 @@
1
+ # BombBomb::WebhooksApi
2
+
3
+ All URIs are relative to *https://dev.api.bombbomb.com/v2*
4
+
5
+ Method | HTTP request | Description
6
+ ------------- | ------------- | -------------
7
+ [**add_web_hook**](WebhooksApi.md#add_web_hook) | **POST** /webhook | Add Webhook
8
+ [**delete_web_hook**](WebhooksApi.md#delete_web_hook) | **DELETE** /webhook/{hookId} | Deletes Webhook
9
+ [**get_web_hooks**](WebhooksApi.md#get_web_hooks) | **GET** /webhook/ | Lists Webhooks
10
+ [**send_webhook_example**](WebhooksApi.md#send_webhook_example) | **POST** /webhook/test | Sends test Webhook
11
+
12
+
13
+ # **add_web_hook**
14
+ > BBWebHook add_web_hook(hook_url)
15
+
16
+ Add Webhook
17
+
18
+ Idempotently adds a Webhook url
19
+
20
+ ### Example
21
+ ```ruby
22
+ # load the gem
23
+ require 'bombbomb'
24
+ # setup authorization
25
+ BombBomb.configure do |config|
26
+ # Configure OAuth2 access token for authorization: BBOAuth2
27
+ config.access_token = 'YOUR ACCESS TOKEN'
28
+ end
29
+
30
+ api_instance = BombBomb::WebhooksApi.new
31
+
32
+ hook_url = "hook_url_example" # String | The Url of your listener
33
+
34
+
35
+ begin
36
+ #Add Webhook
37
+ result = api_instance.add_web_hook(hook_url)
38
+ p result
39
+ rescue BombBomb::ApiError => e
40
+ puts "Exception when calling WebhooksApi->add_web_hook: #{e}"
41
+ end
42
+ ```
43
+
44
+ ### Parameters
45
+
46
+ Name | Type | Description | Notes
47
+ ------------- | ------------- | ------------- | -------------
48
+ **hook_url** | **String**| The Url of your listener |
49
+
50
+ ### Return type
51
+
52
+ [**BBWebHook**](BBWebHook.md)
53
+
54
+ ### Authorization
55
+
56
+ [BBOAuth2](../README.md#BBOAuth2)
57
+
58
+ ### HTTP request headers
59
+
60
+ - **Content-Type**: Not defined
61
+ - **Accept**: application/json
62
+
63
+
64
+
65
+ # **delete_web_hook**
66
+ > String delete_web_hook(hook_id)
67
+
68
+ Deletes Webhook
69
+
70
+ Deletes a Webhook
71
+
72
+ ### Example
73
+ ```ruby
74
+ # load the gem
75
+ require 'bombbomb'
76
+ # setup authorization
77
+ BombBomb.configure do |config|
78
+ # Configure OAuth2 access token for authorization: BBOAuth2
79
+ config.access_token = 'YOUR ACCESS TOKEN'
80
+ end
81
+
82
+ api_instance = BombBomb::WebhooksApi.new
83
+
84
+ hook_id = "hook_id_example" # String | The id of the webhook to delete
85
+
86
+
87
+ begin
88
+ #Deletes Webhook
89
+ result = api_instance.delete_web_hook(hook_id)
90
+ p result
91
+ rescue BombBomb::ApiError => e
92
+ puts "Exception when calling WebhooksApi->delete_web_hook: #{e}"
93
+ end
94
+ ```
95
+
96
+ ### Parameters
97
+
98
+ Name | Type | Description | Notes
99
+ ------------- | ------------- | ------------- | -------------
100
+ **hook_id** | **String**| The id of the webhook to delete |
101
+
102
+ ### Return type
103
+
104
+ **String**
105
+
106
+ ### Authorization
107
+
108
+ [BBOAuth2](../README.md#BBOAuth2)
109
+
110
+ ### HTTP request headers
111
+
112
+ - **Content-Type**: Not defined
113
+ - **Accept**: application/json
114
+
115
+
116
+
117
+ # **get_web_hooks**
118
+ > Array<BBWebHook> get_web_hooks
119
+
120
+ Lists Webhooks
121
+
122
+ Lists all registered Webhooks
123
+
124
+ ### Example
125
+ ```ruby
126
+ # load the gem
127
+ require 'bombbomb'
128
+ # setup authorization
129
+ BombBomb.configure do |config|
130
+ # Configure OAuth2 access token for authorization: BBOAuth2
131
+ config.access_token = 'YOUR ACCESS TOKEN'
132
+ end
133
+
134
+ api_instance = BombBomb::WebhooksApi.new
135
+
136
+ begin
137
+ #Lists Webhooks
138
+ result = api_instance.get_web_hooks
139
+ p result
140
+ rescue BombBomb::ApiError => e
141
+ puts "Exception when calling WebhooksApi->get_web_hooks: #{e}"
142
+ end
143
+ ```
144
+
145
+ ### Parameters
146
+ This endpoint does not need any parameter.
147
+
148
+ ### Return type
149
+
150
+ [**Array<BBWebHook>**](BBWebHook.md)
151
+
152
+ ### Authorization
153
+
154
+ [BBOAuth2](../README.md#BBOAuth2)
155
+
156
+ ### HTTP request headers
157
+
158
+ - **Content-Type**: Not defined
159
+ - **Accept**: application/json
160
+
161
+
162
+
163
+ # **send_webhook_example**
164
+ > send_webhook_example
165
+
166
+ Sends test Webhook
167
+
168
+ Triggers a test webhook to be sent to your endpoints.
169
+
170
+ ### Example
171
+ ```ruby
172
+ # load the gem
173
+ require 'bombbomb'
174
+ # setup authorization
175
+ BombBomb.configure do |config|
176
+ # Configure OAuth2 access token for authorization: BBOAuth2
177
+ config.access_token = 'YOUR ACCESS TOKEN'
178
+ end
179
+
180
+ api_instance = BombBomb::WebhooksApi.new
181
+
182
+ begin
183
+ #Sends test Webhook
184
+ api_instance.send_webhook_example
185
+ rescue BombBomb::ApiError => e
186
+ puts "Exception when calling WebhooksApi->send_webhook_example: #{e}"
187
+ end
188
+ ```
189
+
190
+ ### Parameters
191
+ This endpoint does not need any parameter.
192
+
193
+ ### Return type
194
+
195
+ nil (empty response body)
196
+
197
+ ### Authorization
198
+
199
+ [BBOAuth2](../README.md#BBOAuth2)
200
+
201
+ ### HTTP request headers
202
+
203
+ - **Content-Type**: Not defined
204
+ - **Accept**: application/json
205
+
206
+
207
+
data/git_push.sh ADDED
@@ -0,0 +1,67 @@
1
+ #!/bin/sh
2
+ #
3
+ # Generated by: https://github.com/swagger-api/swagger-codegen.git
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+ #
17
+ # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
18
+ #
19
+ # Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update"
20
+
21
+ git_user_id=$1
22
+ git_repo_id=$2
23
+ release_note=$3
24
+
25
+ if [ "$git_user_id" = "" ]; then
26
+ git_user_id="GIT_USER_ID"
27
+ echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
28
+ fi
29
+
30
+ if [ "$git_repo_id" = "" ]; then
31
+ git_repo_id="GIT_REPO_ID"
32
+ echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
33
+ fi
34
+
35
+ if [ "$release_note" = "" ]; then
36
+ release_note="Minor update"
37
+ echo "[INFO] No command line input provided. Set \$release_note to $release_note"
38
+ fi
39
+
40
+ # Initialize the local directory as a Git repository
41
+ git init
42
+
43
+ # Adds the files in the local repository and stages them for commit.
44
+ git add .
45
+
46
+ # Commits the tracked changes and prepares them to be pushed to a remote repository.
47
+ git commit -m "$release_note"
48
+
49
+ # Sets the new remote
50
+ git_remote=`git remote`
51
+ if [ "$git_remote" = "" ]; then # git remote not defined
52
+
53
+ if [ "$GIT_TOKEN" = "" ]; then
54
+ echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git crediential in your environment."
55
+ git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
56
+ else
57
+ git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git
58
+ fi
59
+
60
+ fi
61
+
62
+ git pull origin master
63
+
64
+ # Pushes (Forces) the changes in the local repository up to the remote repository
65
+ echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git"
66
+ git push origin master 2>&1 | grep -v 'To https'
67
+