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.



30
31
32
# File 'lib/bombbomb/api/socials_api.rb', line 30

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

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



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

def api_client
  @api_client
end

Instance Method Details

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

Gets the social email properties Gets the social email properties

Parameters:

  • jericho_id

    associated jericho Id

  • email_id

    This is the email Id for the email url

  • originator_id

    This is the originator Id

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

    the optional parameters

Returns:

  • (nil)


41
42
43
44
# File 'lib/bombbomb/api/socials_api.rb', line 41

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

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

Gets the social email properties Gets the social email properties

Parameters:

  • jericho_id

    associated jericho Id

  • email_id

    This is the email Id for the email url

  • originator_id

    This is the originator Id

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



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
92
93
94
95
96
97
98
99
# File 'lib/bombbomb/api/socials_api.rb', line 53

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

  # query parameters
  query_params = {}
  query_params[:'jerichoId'] = jericho_id
  query_params[:'emailId'] = email_id
  query_params[:'originatorId'] = originator_id

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

#get_social_auto_shares(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:

  • client_group_id

    ID of the client group association

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

    the optional parameters

Returns:

  • (nil)


106
107
108
109
# File 'lib/bombbomb/api/socials_api.rb', line 106

def get_social_auto_shares(client_group_id, opts = {})
  get_social_auto_shares_with_http_info(client_group_id, opts)
  return nil
end

#get_social_auto_shares_with_http_info(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:

  • client_group_id

    ID of the client group association

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



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
146
147
148
149
150
151
152
153
154
155
156
# File 'lib/bombbomb/api/socials_api.rb', line 116

def get_social_auto_shares_with_http_info(client_group_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: SocialsApi.get_social_auto_shares ..."
  end
  # verify the required parameter 'client_group_id' is set
  fail ArgumentError, "Missing the required parameter 'client_group_id' when calling SocialsApi.get_social_auto_shares" if client_group_id.nil?
  # resource path
  local_var_path = "/socials/shares".sub('{format}','json')

  # query parameters
  query_params = {}
  query_params[:'clientGroupId'] = client_group_id

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

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

Get permissions for social integration Get permissions for social integration and has redirect for user to login

Parameters:

  • social_type

    Type of social integration

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

    the optional parameters

Returns:

  • (nil)


163
164
165
166
# File 'lib/bombbomb/api/socials_api.rb', line 163

def get_social_permissions(social_type, opts = {})
  get_social_permissions_with_http_info(social_type, opts)
  return nil
end

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

Get permissions for social integration Get permissions for social integration and has redirect for user to login

Parameters:

  • social_type

    Type of social integration

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



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
200
201
202
203
204
205
206
207
208
209
210
211
212
213
# File 'lib/bombbomb/api/socials_api.rb', line 173

def get_social_permissions_with_http_info(social_type, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: SocialsApi.get_social_permissions ..."
  end
  # verify the required parameter 'social_type' is set
  fail ArgumentError, "Missing the required parameter 'social_type' when calling SocialsApi.get_social_permissions" if social_type.nil?
  # resource path
  local_var_path = "/socials/permissions".sub('{format}','json')

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

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

#get_social_status(originator_id, opts = {}) ⇒ nil

Gets the social state Gets the social state

Parameters:

  • originator_id

    associated originatorId

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

    the optional parameters

Returns:

  • (nil)


220
221
222
223
# File 'lib/bombbomb/api/socials_api.rb', line 220

def get_social_status(originator_id, opts = {})
  get_social_status_with_http_info(originator_id, opts)
  return nil
end

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

Gets the social state Gets the social state

Parameters:

  • originator_id

    associated originatorId

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



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
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
# File 'lib/bombbomb/api/socials_api.rb', line 230

def get_social_status_with_http_info(originator_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: SocialsApi.get_social_status ..."
  end
  # verify the required parameter 'originator_id' is set
  fail ArgumentError, "Missing the required parameter 'originator_id' when calling SocialsApi.get_social_status" if originator_id.nil?
  # resource path
  local_var_path = "/socials/states".sub('{format}','json')

  # query parameters
  query_params = {}
  query_params[:'originatorId'] = originator_id

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

#update_social_auto_shares(auto_share, 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:

  • auto_share

    The social share that will auto share to

  • client_group_id

    ID of the client group association

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

    the optional parameters

Returns:

  • (nil)


278
279
280
281
# File 'lib/bombbomb/api/socials_api.rb', line 278

def update_social_auto_shares(auto_share, client_group_id, opts = {})
  update_social_auto_shares_with_http_info(auto_share, client_group_id, opts)
  return nil
end

#update_social_auto_shares_with_http_info(auto_share, 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:

  • auto_share

    The social share that will auto share to

  • client_group_id

    ID of the client group association

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
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
# File 'lib/bombbomb/api/socials_api.rb', line 289

def update_social_auto_shares_with_http_info(auto_share, client_group_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: SocialsApi.update_social_auto_shares ..."
  end
  # verify the required parameter 'auto_share' is set
  fail ArgumentError, "Missing the required parameter 'auto_share' when calling SocialsApi.update_social_auto_shares" if auto_share.nil?
  # verify the required parameter 'client_group_id' is set
  fail ArgumentError, "Missing the required parameter 'client_group_id' when calling SocialsApi.update_social_auto_shares" if client_group_id.nil?
  # resource path
  local_var_path = "/socials/shares".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["autoShare"] = auto_share
  form_params["clientGroupId"] = client_group_id

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

#update_social_message(message, originator_id, opts = {}) ⇒ nil

Sets the users social message to what they typed in Sets the users social message to what they typed in

Parameters:

  • message

    The social message the user typed in

  • originator_id

    The parent id tied to the social share

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

    the optional parameters

Returns:

  • (nil)


340
341
342
343
# File 'lib/bombbomb/api/socials_api.rb', line 340

def update_social_message(message, originator_id, opts = {})
  update_social_message_with_http_info(message, originator_id, opts)
  return nil
end

#update_social_message_with_http_info(message, originator_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Sets the users social message to what they typed in Sets the users social message to what they typed in

Parameters:

  • message

    The social message the user typed in

  • originator_id

    The parent id tied to the social share

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



351
352
353
354
355
356
357
358
359
360
361
362
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
# File 'lib/bombbomb/api/socials_api.rb', line 351

def update_social_message_with_http_info(message, originator_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: SocialsApi.update_social_message ..."
  end
  # verify the required parameter 'message' is set
  fail ArgumentError, "Missing the required parameter 'message' when calling SocialsApi.update_social_message" if message.nil?
  # verify the required parameter 'originator_id' is set
  fail ArgumentError, "Missing the required parameter 'originator_id' when calling SocialsApi.update_social_message" if originator_id.nil?
  # resource path
  local_var_path = "/socials/message".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["message"] = message
  form_params["originatorId"] = originator_id

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

#update_social_status(state, originator_id, opts = {}) ⇒ nil

Updates the social state for the object Updates the social state for the object

Parameters:

  • state

    The state to set to

  • originator_id

    The parent id tied to the social share

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

    the optional parameters

Returns:

  • (nil)


402
403
404
405
# File 'lib/bombbomb/api/socials_api.rb', line 402

def update_social_status(state, originator_id, opts = {})
  update_social_status_with_http_info(state, originator_id, opts)
  return nil
end

#update_social_status_with_http_info(state, originator_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Updates the social state for the object Updates the social state for the object

Parameters:

  • state

    The state to set to

  • originator_id

    The parent id tied to the social share

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



413
414
415
416
417
418
419
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
# File 'lib/bombbomb/api/socials_api.rb', line 413

def update_social_status_with_http_info(state, originator_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: SocialsApi.update_social_status ..."
  end
  # verify the required parameter 'state' is set
  fail ArgumentError, "Missing the required parameter 'state' when calling SocialsApi.update_social_status" if state.nil?
  # verify the required parameter 'originator_id' is set
  fail ArgumentError, "Missing the required parameter 'originator_id' when calling SocialsApi.update_social_status" if originator_id.nil?
  # resource path
  local_var_path = "/socials/state".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["state"] = state
  form_params["originatorId"] = originator_id

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