Class: BombBomb::EmailsApi
- Inherits:
-
Object
- Object
- BombBomb::EmailsApi
- Defined in:
- lib/bombbomb/api/emails_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#create_printing_press_email(template_id, content, opts = {}) ⇒ nil
Create an Email with Printing Press Prints an email using the template id and content to the users account.If a video id is included, it will replace any video placeholders with that video.
-
#create_printing_press_email_with_http_info(template_id, content, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Create an Email with Printing Press Prints an email using the template id and content to the users account.If a video id is included, it will replace any video placeholders with that video.
-
#get_email_tracking(email_id, opts = {}) ⇒ nil
Get Email Tracking Get Tracking data for all sends of an Email.
-
#get_email_tracking_interactions(email_id, opts = {}) ⇒ nil
Get Email Tracking Interactions Get Contact detail interactions for an Email.
-
#get_email_tracking_interactions_with_http_info(email_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Get Email Tracking Interactions Get Contact detail interactions for an Email.
-
#get_email_tracking_with_http_info(email_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Get Email Tracking Get Tracking data for all sends of an Email.
-
#get_hourly_email_tracking(email_id, opts = {}) ⇒ nil
Get Hourly Email Tracking Get Tracking data for an Email, broken down by the hour and filterable by an Interaction type.
-
#get_hourly_email_tracking_with_http_info(email_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Get Hourly Email Tracking Get Tracking data for an Email, broken down by the hour and filterable by an Interaction type.
-
#initialize(api_client = ApiClient.default) ⇒ EmailsApi
constructor
A new instance of EmailsApi.
Constructor Details
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
28 29 30 |
# File 'lib/bombbomb/api/emails_api.rb', line 28 def api_client @api_client end |
Instance Method Details
#create_printing_press_email(template_id, content, opts = {}) ⇒ nil
Create an Email with Printing Press Prints an email using the template id and content to the users account.If a video id is included, it will replace any video placeholders with that video.
43 44 45 46 |
# File 'lib/bombbomb/api/emails_api.rb', line 43 def create_printing_press_email(template_id, content, opts = {}) create_printing_press_email_with_http_info(template_id, content, opts) return nil end |
#create_printing_press_email_with_http_info(template_id, content, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Create an Email with Printing Press Prints an email using the template id and content to the users account.If a video id is included, it will replace any video placeholders with that video.
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 92 93 94 95 96 97 98 99 100 101 102 103 |
# File 'lib/bombbomb/api/emails_api.rb', line 57 def create_printing_press_email_with_http_info(template_id, content, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: EmailsApi.create_printing_press_email ..." end # verify the required parameter 'template_id' is set fail ArgumentError, "Missing the required parameter 'template_id' when calling EmailsApi.create_printing_press_email" if template_id.nil? # verify the required parameter 'content' is set fail ArgumentError, "Missing the required parameter 'content' when calling EmailsApi.create_printing_press_email" if content.nil? # resource path local_var_path = "/emails/print".sub('{format}','json') # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/x-www-form-urlencoded'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} form_params["templateId"] = template_id form_params["content"] = content form_params["emailId"] = opts[:'email_id'] if !opts[:'email_id'].nil? form_params["videoId"] = opts[:'video_id'] if !opts[:'video_id'].nil? form_params["subjectLine"] = opts[:'subject_line'] if !opts[:'subject_line'].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: EmailsApi#create_printing_press_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_email_tracking(email_id, opts = {}) ⇒ nil
Get Email Tracking Get Tracking data for all sends of an Email
111 112 113 114 |
# File 'lib/bombbomb/api/emails_api.rb', line 111 def get_email_tracking(email_id, opts = {}) get_email_tracking_with_http_info(email_id, opts) return nil end |
#get_email_tracking_interactions(email_id, opts = {}) ⇒ nil
Get Email Tracking Interactions Get Contact detail interactions for an Email
172 173 174 175 |
# File 'lib/bombbomb/api/emails_api.rb', line 172 def get_email_tracking_interactions(email_id, opts = {}) get_email_tracking_interactions_with_http_info(email_id, opts) return nil end |
#get_email_tracking_interactions_with_http_info(email_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Get Email Tracking Interactions Get Contact detail interactions for an Email
185 186 187 188 189 190 191 192 193 194 195 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 |
# File 'lib/bombbomb/api/emails_api.rb', line 185 def get_email_tracking_interactions_with_http_info(email_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: EmailsApi.get_email_tracking_interactions ..." end # verify the required parameter 'email_id' is set fail ArgumentError, "Missing the required parameter 'email_id' when calling EmailsApi.get_email_tracking_interactions" if email_id.nil? # resource path local_var_path = "/emails/{emailId}/tracking/interactions".sub('{format}','json').sub('{' + 'emailId' + '}', email_id.to_s) # query parameters query_params = {} query_params[:'jobId'] = opts[:'job_id'] if !opts[:'job_id'].nil? query_params[:'interactionType'] = opts[:'interaction_type'] if !opts[:'interaction_type'].nil? query_params[:'searchTerm'] = opts[:'search_term'] if !opts[:'search_term'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/x-www-form-urlencoded'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # 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: EmailsApi#get_email_tracking_interactions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_email_tracking_with_http_info(email_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Get Email Tracking Get Tracking data for all sends of an Email
122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 |
# File 'lib/bombbomb/api/emails_api.rb', line 122 def get_email_tracking_with_http_info(email_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: EmailsApi.get_email_tracking ..." end # verify the required parameter 'email_id' is set fail ArgumentError, "Missing the required parameter 'email_id' when calling EmailsApi.get_email_tracking" if email_id.nil? # resource path local_var_path = "/emails/{emailId}/tracking".sub('{format}','json').sub('{' + 'emailId' + '}', email_id.to_s) # query parameters query_params = {} query_params[:'jobId'] = opts[:'job_id'] if !opts[:'job_id'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/x-www-form-urlencoded'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # 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: EmailsApi#get_email_tracking\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_hourly_email_tracking(email_id, opts = {}) ⇒ nil
Get Hourly Email Tracking Get Tracking data for an Email, broken down by the hour and filterable by an Interaction type
236 237 238 239 |
# File 'lib/bombbomb/api/emails_api.rb', line 236 def get_hourly_email_tracking(email_id, opts = {}) get_hourly_email_tracking_with_http_info(email_id, opts) return nil end |
#get_hourly_email_tracking_with_http_info(email_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Get Hourly Email Tracking Get Tracking data for an Email, broken down by the hour and filterable by an Interaction type
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 278 279 280 281 282 283 284 285 286 287 288 289 |
# File 'lib/bombbomb/api/emails_api.rb', line 248 def get_hourly_email_tracking_with_http_info(email_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: EmailsApi.get_hourly_email_tracking ..." end # verify the required parameter 'email_id' is set fail ArgumentError, "Missing the required parameter 'email_id' when calling EmailsApi.get_hourly_email_tracking" if email_id.nil? # resource path local_var_path = "/emails/{emailId}/tracking/hourly".sub('{format}','json').sub('{' + 'emailId' + '}', email_id.to_s) # query parameters query_params = {} query_params[:'jobId'] = opts[:'job_id'] if !opts[:'job_id'].nil? query_params[:'interactionType'] = opts[:'interaction_type'] if !opts[:'interaction_type'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/x-www-form-urlencoded'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # 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: EmailsApi#get_hourly_email_tracking\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |