Class: BombBomb::IntegrationsApi
- Inherits:
-
Object
- Object
- BombBomb::IntegrationsApi
- Defined in:
- lib/bombbomb/api/integrations_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#connect_integration(code, opts = {}) ⇒ nil
Activate an integration for a user.
-
#connect_integration_with_http_info(code, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Activate an integration for a user.
-
#delete_integration(opts = {}) ⇒ nil
Remove an integration for a user.
-
#delete_integration_with_http_info(opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Remove an integration for a user.
-
#get_integration_health(code, opts = {}) ⇒ nil
Get health for a given integration Get health for an integration.
-
#get_integration_health_with_http_info(code, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Get health for a given integration Get health for an integration.
-
#get_integration_page_components(integration_name, opts = {}) ⇒ nil
Get page components for a given integration Get all page components for an integration.
-
#get_integration_page_components_with_http_info(integration_name, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Get page components for a given integration Get all page components for an integration.
-
#initialize(api_client = ApiClient.default) ⇒ IntegrationsApi
constructor
A new instance of IntegrationsApi.
-
#sync_users_integrated_lists(opts = {}) ⇒ String
Synchronize your integration list or lists.
-
#sync_users_integrated_lists_with_http_info(opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Synchronize your integration list or lists.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ IntegrationsApi
Returns a new instance of IntegrationsApi.
19 20 21 |
# File 'lib/bombbomb/api/integrations_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/integrations_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#connect_integration(code, opts = {}) ⇒ nil
Activate an integration for a user. Provide the correct parameters to enable an integration. Required Parameters vary based on the desired integration. Integrations requiring OAuth will provide the OAuth link that the user must be presented.
33 34 35 36 |
# File 'lib/bombbomb/api/integrations_api.rb', line 33 def connect_integration(code, opts = {}) connect_integration_with_http_info(code, opts) return nil end |
#connect_integration_with_http_info(code, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Activate an integration for a user. Provide the correct parameters to enable an integration. Required Parameters vary based on the desired integration. Integrations requiring OAuth will provide the OAuth link that the user must be presented.
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 78 79 80 81 82 83 84 85 86 87 88 89 90 91 |
# File 'lib/bombbomb/api/integrations_api.rb', line 48 def connect_integration_with_http_info(code, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: IntegrationsApi.connect_integration ..." end # verify the required parameter 'code' is set if @api_client.config.client_side_validation && code.nil? fail ArgumentError, "Missing the required parameter 'code' when calling IntegrationsApi.connect_integration" end # resource path local_var_path = "/integrations" # 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["code"] = code form_params["key"] = opts[:'key'] if !opts[:'key'].nil? form_params["secret"] = opts[:'secret'] if !opts[:'secret'].nil? form_params["token"] = opts[:'token'] if !opts[:'token'].nil? form_params["data"] = opts[:'data'] if !opts[:'data'].nil? form_params["overwrite"] = opts[:'overwrite'] if !opts[:'overwrite'].nil? # 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: IntegrationsApi#connect_integration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_integration(opts = {}) ⇒ nil
Remove an integration for a user. Remove an integration by providing the integration id or integration code. Only provide one of the parameters.
99 100 101 102 |
# File 'lib/bombbomb/api/integrations_api.rb', line 99 def delete_integration(opts = {}) delete_integration_with_http_info(opts) return nil end |
#delete_integration_with_http_info(opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Remove an integration for a user. Remove an integration by providing the integration id or integration code. Only provide one of the parameters.
110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 |
# File 'lib/bombbomb/api/integrations_api.rb', line 110 def delete_integration_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: IntegrationsApi.delete_integration ..." end # resource path local_var_path = "/integrations" # 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["id"] = opts[:'id'] if !opts[:'id'].nil? form_params["code"] = opts[:'code'] if !opts[:'code'].nil? # 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) if @api_client.config.debugging @api_client.config.logger.debug "API called: IntegrationsApi#delete_integration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_integration_health(code, opts = {}) ⇒ nil
Get health for a given integration Get health for an integration.
152 153 154 155 |
# File 'lib/bombbomb/api/integrations_api.rb', line 152 def get_integration_health(code, opts = {}) get_integration_health_with_http_info(code, opts) return nil end |
#get_integration_health_with_http_info(code, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Get health for a given integration Get health for an integration.
162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 |
# File 'lib/bombbomb/api/integrations_api.rb', line 162 def get_integration_health_with_http_info(code, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: IntegrationsApi.get_integration_health ..." end # verify the required parameter 'code' is set if @api_client.config.client_side_validation && code.nil? fail ArgumentError, "Missing the required parameter 'code' when calling IntegrationsApi.get_integration_health" end # resource path local_var_path = "/integrations/health/{code}".sub('{' + 'code' + '}', code.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(: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: IntegrationsApi#get_integration_health\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_integration_page_components(integration_name, opts = {}) ⇒ nil
Get page components for a given integration Get all page components for an integration.
206 207 208 209 |
# File 'lib/bombbomb/api/integrations_api.rb', line 206 def get_integration_page_components(integration_name, opts = {}) get_integration_page_components_with_http_info(integration_name, opts) return nil end |
#get_integration_page_components_with_http_info(integration_name, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Get page components for a given integration Get all page components for an integration.
216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 |
# File 'lib/bombbomb/api/integrations_api.rb', line 216 def get_integration_page_components_with_http_info(integration_name, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: IntegrationsApi.get_integration_page_components ..." end # verify the required parameter 'integration_name' is set if @api_client.config.client_side_validation && integration_name.nil? fail ArgumentError, "Missing the required parameter 'integration_name' when calling IntegrationsApi.get_integration_page_components" end # resource path local_var_path = "/integrations/pageComponents" # query parameters query_params = {} query_params[:'integration_name'] = integration_name # 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) if @api_client.config.debugging @api_client.config.logger.debug "API called: IntegrationsApi#get_integration_page_components\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#sync_users_integrated_lists(opts = {}) ⇒ String
Synchronize your integration list or lists. Synchronize your integration contact list with the service you are integrated with. If no integration code is provided, all integrations will be synchronized.
261 262 263 264 |
# File 'lib/bombbomb/api/integrations_api.rb', line 261 def sync_users_integrated_lists(opts = {}) data, _status_code, _headers = sync_users_integrated_lists_with_http_info(opts) return data end |
#sync_users_integrated_lists_with_http_info(opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Synchronize your integration list or lists. Synchronize your integration contact list with the service you are integrated with. If no integration code is provided, all integrations will be synchronized.
271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 |
# File 'lib/bombbomb/api/integrations_api.rb', line 271 def sync_users_integrated_lists_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: IntegrationsApi.sync_users_integrated_lists ..." end # resource path local_var_path = "/integrations/sync" # query parameters query_params = {} query_params[:'integration_id'] = opts[:'integration_id'] if !opts[:'integration_id'].nil? # 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 => 'String') if @api_client.config.debugging @api_client.config.logger.debug "API called: IntegrationsApi#sync_users_integrated_lists\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |