Class: BombBomb::SocialsApi

Inherits:
Object
  • Object
show all
Defined in:
lib/bombbomb/api/socials_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ SocialsApi

Returns a new instance of SocialsApi.



19
20
21
# File 'lib/bombbomb/api/socials_api.rb', line 19

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/bombbomb/api/socials_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#get_facebook_pages(opts = {}) ⇒ nil

Gets facebook pages Gets facebook pages by client id

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


27
28
29
30
# File 'lib/bombbomb/api/socials_api.rb', line 27

def get_facebook_pages(opts = {})
  get_facebook_pages_with_http_info(opts)
  return nil
end

#get_facebook_pages_with_http_info(opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Gets facebook pages Gets facebook pages by client id

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



36
37
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
# File 'lib/bombbomb/api/socials_api.rb', line 36

def get_facebook_pages_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: SocialsApi.get_facebook_pages ..."
  end
  # resource path
  local_var_path = "/socials/facebook/pages"

  # 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: SocialsApi#get_facebook_pages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_social_article_properties(email_id, social_content_id, opts = {}) ⇒ nil

Gets the social email properties Gets the social email properties

Parameters:

  • email_id

    This is the email Id for the email url

  • social_content_id

    This is the social content Id

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


77
78
79
80
# File 'lib/bombbomb/api/socials_api.rb', line 77

def get_social_article_properties(email_id, social_content_id, opts = {})
  get_social_article_properties_with_http_info(email_id, social_content_id, opts)
  return nil
end

#get_social_article_properties_with_http_info(email_id, social_content_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Gets the social email properties Gets the social email properties

Parameters:

  • email_id

    This is the email Id for the email url

  • social_content_id

    This is the social content Id

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



88
89
90
91
92
93
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
# File 'lib/bombbomb/api/socials_api.rb', line 88

def get_social_article_properties_with_http_info(email_id, social_content_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: SocialsApi.get_social_article_properties ..."
  end
  # verify the required parameter 'email_id' is set
  if @api_client.config.client_side_validation && email_id.nil?
    fail ArgumentError, "Missing the required parameter 'email_id' when calling SocialsApi.get_social_article_properties"
  end
  # verify the required parameter 'social_content_id' is set
  if @api_client.config.client_side_validation && social_content_id.nil?
    fail ArgumentError, "Missing the required parameter 'social_content_id' when calling SocialsApi.get_social_article_properties"
  end
  # resource path
  local_var_path = "/socials/properties"

  # query parameters
  query_params = {}
  query_params[:'emailId'] = email_id
  query_params[:'socialContentId'] = social_content_id

  # 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: SocialsApi#get_social_article_properties\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_social_authorizations(opts = {}) ⇒ nil

Get authorizations for all social integration Get authorizations and autoshares for all social integration and has redirect for user to login

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :client_group_id (String)

    ID of the client group association

Returns:

  • (nil)


138
139
140
141
# File 'lib/bombbomb/api/socials_api.rb', line 138

def get_social_authorizations(opts = {})
  get_social_authorizations_with_http_info(opts)
  return nil
end

#get_social_authorizations_with_http_info(opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Get authorizations for all social integration Get authorizations and autoshares for all social integration and has redirect for user to login

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :client_group_id (String)

    ID of the client group association

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



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
182
# File 'lib/bombbomb/api/socials_api.rb', line 148

def get_social_authorizations_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: SocialsApi.get_social_authorizations ..."
  end
  # resource path
  local_var_path = "/socials/authorizations"

  # query parameters
  query_params = {}
  query_params[:'clientGroupId'] = opts[:'client_group_id'] if !opts[:'client_group_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)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: SocialsApi#get_social_authorizations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_social_profile_properties(social_type, opts = {}) ⇒ nil

Gets the profile properties Gets the social profile properties

Parameters:

  • social_type

    The social type

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


189
190
191
192
# File 'lib/bombbomb/api/socials_api.rb', line 189

def get_social_profile_properties(social_type, opts = {})
  get_social_profile_properties_with_http_info(social_type, opts)
  return nil
end

#get_social_profile_properties_with_http_info(social_type, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Gets the profile properties Gets the social profile properties

Parameters:

  • social_type

    The social type

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



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
230
231
232
233
234
235
236
237
# File 'lib/bombbomb/api/socials_api.rb', line 199

def get_social_profile_properties_with_http_info(social_type, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: SocialsApi.get_social_profile_properties ..."
  end
  # verify the required parameter 'social_type' is set
  if @api_client.config.client_side_validation && social_type.nil?
    fail ArgumentError, "Missing the required parameter 'social_type' when calling SocialsApi.get_social_profile_properties"
  end
  # resource path
  local_var_path = "/socials/profile"

  # query parameters
  query_params = {}
  query_params[:'socialType'] = social_type

  # 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: SocialsApi#get_social_profile_properties\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_social_stats(prompt_id, opts = {}) ⇒ nil

Get social stats for a prompt Get social stats for a prompt by id

Parameters:

  • prompt_id

    ID of the prompt

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


244
245
246
247
# File 'lib/bombbomb/api/socials_api.rb', line 244

def get_social_stats(prompt_id, opts = {})
  get_social_stats_with_http_info(prompt_id, opts)
  return nil
end

#get_social_stats_with_http_info(prompt_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Get social stats for a prompt Get social stats for a prompt by id

Parameters:

  • prompt_id

    ID of the prompt

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



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
290
291
# File 'lib/bombbomb/api/socials_api.rb', line 254

def get_social_stats_with_http_info(prompt_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: SocialsApi.get_social_stats ..."
  end
  # verify the required parameter 'prompt_id' is set
  if @api_client.config.client_side_validation && prompt_id.nil?
    fail ArgumentError, "Missing the required parameter 'prompt_id' when calling SocialsApi.get_social_stats"
  end
  # resource path
  local_var_path = "/socials/{promptId}/stats".sub('{' + 'promptId' + '}', prompt_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(: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: SocialsApi#get_social_stats\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#post_social_content(email_id, opts = {}) ⇒ nil

Creates social content Creates social content for an email

Parameters:

  • email_id

    The email&#39;s id

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


298
299
300
301
# File 'lib/bombbomb/api/socials_api.rb', line 298

def post_social_content(email_id, opts = {})
  post_social_content_with_http_info(email_id, opts)
  return nil
end

#post_social_content_with_http_info(email_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Creates social content Creates social content for an email

Parameters:

  • email_id

    The email&#39;s id

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
# File 'lib/bombbomb/api/socials_api.rb', line 308

def post_social_content_with_http_info(email_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: SocialsApi.post_social_content ..."
  end
  # verify the required parameter 'email_id' is set
  if @api_client.config.client_side_validation && email_id.nil?
    fail ArgumentError, "Missing the required parameter 'email_id' when calling SocialsApi.post_social_content"
  end
  # resource path
  local_var_path = "/socials/content"

  # 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["emailId"] = email_id

  # 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: SocialsApi#post_social_content\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#retry_social_send(prompt_id, opts = {}) ⇒ nil

Sends social content Sends social content that failed for a user via their associated prompt

Parameters:

  • prompt_id

    The prompt id

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


353
354
355
356
# File 'lib/bombbomb/api/socials_api.rb', line 353

def retry_social_send(prompt_id, opts = {})
  retry_social_send_with_http_info(prompt_id, opts)
  return nil
end

#retry_social_send_with_http_info(prompt_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Sends social content Sends social content that failed for a user via their associated prompt

Parameters:

  • prompt_id

    The prompt id

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
# File 'lib/bombbomb/api/socials_api.rb', line 363

def retry_social_send_with_http_info(prompt_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: SocialsApi.retry_social_send ..."
  end
  # verify the required parameter 'prompt_id' is set
  if @api_client.config.client_side_validation && prompt_id.nil?
    fail ArgumentError, "Missing the required parameter 'prompt_id' when calling SocialsApi.retry_social_send"
  end
  # resource path
  local_var_path = "/socials/send/retry"

  # 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["promptId"] = prompt_id

  # 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: SocialsApi#retry_social_send\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#send_social(prompt_id, social_type, opts = {}) ⇒ nil

Sends social content Sends social content for a user via their associated prompt

Parameters:

  • prompt_id

    The prompt id

  • social_type

    The destination for social content

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


409
410
411
412
# File 'lib/bombbomb/api/socials_api.rb', line 409

def send_social(prompt_id, social_type, opts = {})
  send_social_with_http_info(prompt_id, social_type, opts)
  return nil
end

#send_social_with_http_info(prompt_id, social_type, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Sends social content Sends social content for a user via their associated prompt

Parameters:

  • prompt_id

    The prompt id

  • social_type

    The destination for social content

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
# File 'lib/bombbomb/api/socials_api.rb', line 420

def send_social_with_http_info(prompt_id, social_type, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: SocialsApi.send_social ..."
  end
  # verify the required parameter 'prompt_id' is set
  if @api_client.config.client_side_validation && prompt_id.nil?
    fail ArgumentError, "Missing the required parameter 'prompt_id' when calling SocialsApi.send_social"
  end
  # verify the required parameter 'social_type' is set
  if @api_client.config.client_side_validation && social_type.nil?
    fail ArgumentError, "Missing the required parameter 'social_type' when calling SocialsApi.send_social"
  end
  # resource path
  local_var_path = "/socials/send"

  # 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["promptId"] = prompt_id
  form_params["socialType"] = social_type

  # 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: SocialsApi#send_social\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_client_group_send_mechanism(send_mechanism, client_group_id, opts = {}) ⇒ nil

Gets the auto shares from the client group assoc id Gets the auto shares from the client group assoc id

Parameters:

  • send_mechanism

    The send mechanism for the prompt

  • client_group_id

    ID of the client group association

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :enabled (String)

    Is the send mechanism enabled?

Returns:

  • (nil)


472
473
474
475
# File 'lib/bombbomb/api/socials_api.rb', line 472

def update_client_group_send_mechanism(send_mechanism, client_group_id, opts = {})
  update_client_group_send_mechanism_with_http_info(send_mechanism, client_group_id, opts)
  return nil
end

#update_client_group_send_mechanism_with_http_info(send_mechanism, client_group_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Gets the auto shares from the client group assoc id Gets the auto shares from the client group assoc id

Parameters:

  • send_mechanism

    The send mechanism for the prompt

  • client_group_id

    ID of the client group association

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :enabled (String)

    Is the send mechanism enabled?

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
# File 'lib/bombbomb/api/socials_api.rb', line 484

def update_client_group_send_mechanism_with_http_info(send_mechanism, client_group_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: SocialsApi.update_client_group_send_mechanism ..."
  end
  # verify the required parameter 'send_mechanism' is set
  if @api_client.config.client_side_validation && send_mechanism.nil?
    fail ArgumentError, "Missing the required parameter 'send_mechanism' when calling SocialsApi.update_client_group_send_mechanism"
  end
  # verify the required parameter 'client_group_id' is set
  if @api_client.config.client_side_validation && client_group_id.nil?
    fail ArgumentError, "Missing the required parameter 'client_group_id' when calling SocialsApi.update_client_group_send_mechanism"
  end
  # resource path
  local_var_path = "/socials/client/sendMechanism"

  # 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["sendMechanism"] = send_mechanism
  form_params["clientGroupId"] = client_group_id
  form_params["enabled"] = opts[:'enabled'] if !opts[:'enabled'].nil?

  # http body (model)
  post_body = nil
  auth_names = ['BBOAuth2']
  data, status_code, headers = @api_client.call_api(:PUT, 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: SocialsApi#update_client_group_send_mechanism\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_client_groups_send_mechanism(send_mechanism, enabled, opts = {}) ⇒ nil

Toggles the prompt campaigns in a users account Toggles the prompt campaigns in a users account for a social integrations on or off

Parameters:

  • send_mechanism

    The send mechanism for the prompt

  • enabled

    Is the send mechanism enabled?

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


536
537
538
539
# File 'lib/bombbomb/api/socials_api.rb', line 536

def update_client_groups_send_mechanism(send_mechanism, enabled, opts = {})
  update_client_groups_send_mechanism_with_http_info(send_mechanism, enabled, opts)
  return nil
end

#update_client_groups_send_mechanism_with_http_info(send_mechanism, enabled, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Toggles the prompt campaigns in a users account Toggles the prompt campaigns in a users account for a social integrations on or off

Parameters:

  • send_mechanism

    The send mechanism for the prompt

  • enabled

    Is the send mechanism enabled?

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
# File 'lib/bombbomb/api/socials_api.rb', line 547

def update_client_groups_send_mechanism_with_http_info(send_mechanism, enabled, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: SocialsApi.update_client_groups_send_mechanism ..."
  end
  # verify the required parameter 'send_mechanism' is set
  if @api_client.config.client_side_validation && send_mechanism.nil?
    fail ArgumentError, "Missing the required parameter 'send_mechanism' when calling SocialsApi.update_client_groups_send_mechanism"
  end
  # verify the required parameter 'enabled' is set
  if @api_client.config.client_side_validation && enabled.nil?
    fail ArgumentError, "Missing the required parameter 'enabled' when calling SocialsApi.update_client_groups_send_mechanism"
  end
  # resource path
  local_var_path = "/socials/client/sendMechanisms"

  # 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["sendMechanism"] = send_mechanism
  form_params["enabled"] = enabled

  # http body (model)
  post_body = nil
  auth_names = ['BBOAuth2']
  data, status_code, headers = @api_client.call_api(:PUT, 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: SocialsApi#update_client_groups_send_mechanism\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_facebook_pages(page_ids, opts = {}) ⇒ nil

Updates facebook page Ids Updates facebook page Ids to be sent to for prompts

Parameters:

  • page_ids

    Page Ids for the prompt

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


597
598
599
600
# File 'lib/bombbomb/api/socials_api.rb', line 597

def update_facebook_pages(page_ids, opts = {})
  update_facebook_pages_with_http_info(page_ids, opts)
  return nil
end

#update_facebook_pages_with_http_info(page_ids, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Updates facebook page Ids Updates facebook page Ids to be sent to for prompts

Parameters:

  • page_ids

    Page Ids for the prompt

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
# File 'lib/bombbomb/api/socials_api.rb', line 607

def update_facebook_pages_with_http_info(page_ids, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: SocialsApi.update_facebook_pages ..."
  end
  # verify the required parameter 'page_ids' is set
  if @api_client.config.client_side_validation && page_ids.nil?
    fail ArgumentError, "Missing the required parameter 'page_ids' when calling SocialsApi.update_facebook_pages"
  end
  # resource path
  local_var_path = "/socials/facebook/pages"

  # 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["pageIds"] = page_ids

  # http body (model)
  post_body = nil
  auth_names = ['BBOAuth2']
  data, status_code, headers = @api_client.call_api(:PUT, 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: SocialsApi#update_facebook_pages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_social_content(social_id, opts = {}) ⇒ nil

Updates social content Updates social content for an email

Parameters:

  • social_id

    The social id

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :title (String)

    The title for the article

  • :description (String)

    The article description

  • :picture_url (String)

    The article picture url

  • :suggested_message (String)

    The suggested message to use

Returns:

  • (nil)


656
657
658
659
# File 'lib/bombbomb/api/socials_api.rb', line 656

def update_social_content(social_id, opts = {})
  update_social_content_with_http_info(social_id, opts)
  return nil
end

#update_social_content_with_http_info(social_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Updates social content Updates social content for an email

Parameters:

  • social_id

    The social id

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :title (String)

    The title for the article

  • :description (String)

    The article description

  • :picture_url (String)

    The article picture url

  • :suggested_message (String)

    The suggested message to use

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
# File 'lib/bombbomb/api/socials_api.rb', line 670

def update_social_content_with_http_info(social_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: SocialsApi.update_social_content ..."
  end
  # verify the required parameter 'social_id' is set
  if @api_client.config.client_side_validation && social_id.nil?
    fail ArgumentError, "Missing the required parameter 'social_id' when calling SocialsApi.update_social_content"
  end
  # resource path
  local_var_path = "/socials/content"

  # 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["socialId"] = social_id
  form_params["title"] = opts[:'title'] if !opts[:'title'].nil?
  form_params["description"] = opts[:'description'] if !opts[:'description'].nil?
  form_params["pictureUrl"] = opts[:'picture_url'] if !opts[:'picture_url'].nil?
  form_params["suggestedMessage"] = opts[:'suggested_message'] if !opts[:'suggested_message'].nil?

  # http body (model)
  post_body = nil
  auth_names = ['BBOAuth2']
  data, status_code, headers = @api_client.call_api(:PUT, 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: SocialsApi#update_social_content\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end