Class: BombBomb::WebhooksApi
- Inherits:
-
Object
- Object
- BombBomb::WebhooksApi
- Defined in:
- lib/bombbomb/api/webhooks_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#add_web_hook(hook_url, opts = {}) ⇒ BBWebHook
Add Webhook Idempotently adds a Webhook url.
-
#add_web_hook_with_http_info(hook_url, opts = {}) ⇒ Array<(BBWebHook, Fixnum, Hash)>
Add Webhook Idempotently adds a Webhook url.
-
#delete_web_hook(hook_id, opts = {}) ⇒ String
Deletes Webhook Deletes a Webhook.
-
#delete_web_hook_with_http_info(hook_id, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Deletes Webhook Deletes a Webhook.
-
#get_web_hooks(opts = {}) ⇒ Array<BBWebHook>
Lists Webhooks Lists all registered Webhooks.
-
#get_web_hooks_with_http_info(opts = {}) ⇒ Array<(Array<BBWebHook>, Fixnum, Hash)>
Lists Webhooks Lists all registered Webhooks.
-
#initialize(api_client = ApiClient.default) ⇒ WebhooksApi
constructor
A new instance of WebhooksApi.
-
#list_web_hook_events(opts = {}) ⇒ nil
Describe WebHook Events Returns example Webhook events for each kind of possible event.
-
#list_web_hook_events_with_http_info(opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Describe WebHook Events Returns example Webhook events for each kind of possible event.
-
#send_webhook_example(opts = {}) ⇒ nil
Sends test Webhook Triggers a test webhook to be sent to your endpoints.
-
#send_webhook_example_with_http_info(opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Sends test Webhook Triggers a test webhook to be sent to your endpoints.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ WebhooksApi
Returns a new instance of WebhooksApi.
19 20 21 |
# File 'lib/bombbomb/api/webhooks_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/bombbomb/api/webhooks_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#add_web_hook(hook_url, opts = {}) ⇒ BBWebHook
Add Webhook Idempotently adds a Webhook url
28 29 30 31 |
# File 'lib/bombbomb/api/webhooks_api.rb', line 28 def add_web_hook(hook_url, opts = {}) data, _status_code, _headers = add_web_hook_with_http_info(hook_url, opts) return data end |
#add_web_hook_with_http_info(hook_url, opts = {}) ⇒ Array<(BBWebHook, Fixnum, Hash)>
Add Webhook Idempotently adds a Webhook url
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
# File 'lib/bombbomb/api/webhooks_api.rb', line 38 def add_web_hook_with_http_info(hook_url, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: WebhooksApi.add_web_hook ..." end # verify the required parameter 'hook_url' is set if @api_client.config.client_side_validation && hook_url.nil? fail ArgumentError, "Missing the required parameter 'hook_url' when calling WebhooksApi.add_web_hook" end # resource path local_var_path = "/webhook" # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/x-www-form-urlencoded']) # form parameters form_params = {} form_params["hookUrl"] = hook_url # http body (model) post_body = nil auth_names = ['BBOAuth2'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'BBWebHook') if @api_client.config.debugging @api_client.config.logger.debug "API called: WebhooksApi#add_web_hook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_web_hook(hook_id, opts = {}) ⇒ String
Deletes Webhook Deletes a Webhook
84 85 86 87 |
# File 'lib/bombbomb/api/webhooks_api.rb', line 84 def delete_web_hook(hook_id, opts = {}) data, _status_code, _headers = delete_web_hook_with_http_info(hook_id, opts) return data end |
#delete_web_hook_with_http_info(hook_id, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Deletes Webhook Deletes a Webhook
94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 |
# File 'lib/bombbomb/api/webhooks_api.rb', line 94 def delete_web_hook_with_http_info(hook_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: WebhooksApi.delete_web_hook ..." end # verify the required parameter 'hook_id' is set if @api_client.config.client_side_validation && hook_id.nil? fail ArgumentError, "Missing the required parameter 'hook_id' when calling WebhooksApi.delete_web_hook" end # resource path local_var_path = "/webhook/{hookId}".sub('{' + 'hookId' + '}', hook_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/x-www-form-urlencoded']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['BBOAuth2'] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'String') if @api_client.config.debugging @api_client.config.logger.debug "API called: WebhooksApi#delete_web_hook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_web_hooks(opts = {}) ⇒ Array<BBWebHook>
Lists Webhooks Lists all registered Webhooks
138 139 140 141 |
# File 'lib/bombbomb/api/webhooks_api.rb', line 138 def get_web_hooks(opts = {}) data, _status_code, _headers = get_web_hooks_with_http_info(opts) return data end |
#get_web_hooks_with_http_info(opts = {}) ⇒ Array<(Array<BBWebHook>, Fixnum, Hash)>
Lists Webhooks Lists all registered Webhooks
147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 |
# File 'lib/bombbomb/api/webhooks_api.rb', line 147 def get_web_hooks_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: WebhooksApi.get_web_hooks ..." end # resource path local_var_path = "/webhook/" # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/x-www-form-urlencoded']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['BBOAuth2'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Array<BBWebHook>') if @api_client.config.debugging @api_client.config.logger.debug "API called: WebhooksApi#get_web_hooks\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_web_hook_events(opts = {}) ⇒ nil
Describe WebHook Events Returns example Webhook events for each kind of possible event.
187 188 189 190 |
# File 'lib/bombbomb/api/webhooks_api.rb', line 187 def list_web_hook_events(opts = {}) list_web_hook_events_with_http_info(opts) return nil end |
#list_web_hook_events_with_http_info(opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Describe WebHook Events Returns example Webhook events for each kind of possible event.
196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 |
# File 'lib/bombbomb/api/webhooks_api.rb', line 196 def list_web_hook_events_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: WebhooksApi.list_web_hook_events ..." end # resource path local_var_path = "/webhook/events" # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/x-www-form-urlencoded']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: WebhooksApi#list_web_hook_events\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#send_webhook_example(opts = {}) ⇒ nil
Sends test Webhook Triggers a test webhook to be sent to your endpoints.
235 236 237 238 |
# File 'lib/bombbomb/api/webhooks_api.rb', line 235 def send_webhook_example(opts = {}) send_webhook_example_with_http_info(opts) return nil end |
#send_webhook_example_with_http_info(opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Sends test Webhook Triggers a test webhook to be sent to your endpoints.
244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 |
# File 'lib/bombbomb/api/webhooks_api.rb', line 244 def send_webhook_example_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: WebhooksApi.send_webhook_example ..." end # resource path local_var_path = "/webhook/test" # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/x-www-form-urlencoded']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['BBOAuth2'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: WebhooksApi#send_webhook_example\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |