Class: BombBomb::TeamsApi

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ TeamsApi

Returns a new instance of TeamsApi.



30
31
32
# File 'lib/bombbomb/api/teams_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/teams_api.rb', line 28

def api_client
  @api_client
end

Instance Method Details

#add_team_member(team_id, opts = {}) ⇒ String

Add Member to Team Adds a member to a team.

Parameters:

  • team_id

    The team id

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

    the optional parameters

Options Hash (opts):

  • :user_id (String)

    The user id of the member being added to the team.

  • :user_email (String)

    The email of the member being added to the team.

  • :admin (BOOLEAN)

    Set if the user is an admin of this team.

Returns:



42
43
44
45
# File 'lib/bombbomb/api/teams_api.rb', line 42

def add_team_member(team_id, opts = {})
  data, _status_code, _headers = add_team_member_with_http_info(team_id, opts)
  return data
end

#add_team_member_with_http_info(team_id, opts = {}) ⇒ Array<(String, Fixnum, Hash)>

Add Member to Team Adds a member to a team.

Parameters:

  • team_id

    The team id

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

    the optional parameters

Options Hash (opts):

  • :user_id (String)

    The user id of the member being added to the team.

  • :user_email (String)

    The email of the member being added to the team.

  • :admin (BOOLEAN)

    Set if the user is an admin of this team.

Returns:

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

    String data, response status code and response headers



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
# File 'lib/bombbomb/api/teams_api.rb', line 55

def add_team_member_with_http_info(team_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: TeamsApi.add_team_member ..."
  end
  # verify the required parameter 'team_id' is set
  fail ArgumentError, "Missing the required parameter 'team_id' when calling TeamsApi.add_team_member" if team_id.nil?
  # resource path
  local_var_path = "/team/{teamId}/member".sub('{format}','json').sub('{' + 'teamId' + '}', team_id.to_s)

  # 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["userId"] = opts[:'user_id'] if !opts[:'user_id'].nil?
  form_params["userEmail"] = opts[:'user_email'] if !opts[:'user_email'].nil?
  form_params["admin"] = opts[:'admin'] if !opts[:'admin'].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,
    :return_type => 'String')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TeamsApi#add_team_member\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#cancel_jericho_send(jericho_id, opts = {}) ⇒ nil

Cancel a Jericho Send Cancels a scheduled Jericho send from being sent.

Parameters:

  • jericho_id

    ID of the Jericho Job to cancel

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

    the optional parameters

Returns:

  • (nil)


105
106
107
108
# File 'lib/bombbomb/api/teams_api.rb', line 105

def cancel_jericho_send(jericho_id, opts = {})
  cancel_jericho_send_with_http_info(jericho_id, opts)
  return nil
end

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

Cancel a Jericho Send Cancels a scheduled Jericho send from being sent.

Parameters:

  • jericho_id

    ID of the Jericho Job to cancel

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



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

def cancel_jericho_send_with_http_info(jericho_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: TeamsApi.cancel_jericho_send ..."
  end
  # verify the required parameter 'jericho_id' is set
  fail ArgumentError, "Missing the required parameter 'jericho_id' when calling TeamsApi.cancel_jericho_send" if jericho_id.nil?
  # resource path
  local_var_path = "/team/{teamId}/jericho/{jerichoId}".sub('{format}','json').sub('{' + 'jerichoId' + '}', jericho_id.to_s)

  # 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 = {}

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

#create_subteam(team_id, name, opts = {}) ⇒ TeamPublicRepresentation

Add a Subteam Adds a subteam to a parent team

Parameters:

  • team_id

    The team id

  • name

    The subteam&#39;s name.

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

    the optional parameters

Returns:



162
163
164
165
# File 'lib/bombbomb/api/teams_api.rb', line 162

def create_subteam(team_id, name, opts = {})
  data, _status_code, _headers = create_subteam_with_http_info(team_id, name, opts)
  return data
end

#create_subteam_with_http_info(team_id, name, opts = {}) ⇒ Array<(TeamPublicRepresentation, Fixnum, Hash)>

Add a Subteam Adds a subteam to a parent team

Parameters:

  • team_id

    The team id

  • name

    The subteam&#39;s name.

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

    the optional parameters

Returns:

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

    TeamPublicRepresentation data, 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
214
215
216
# File 'lib/bombbomb/api/teams_api.rb', line 173

def create_subteam_with_http_info(team_id, name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: TeamsApi.create_subteam ..."
  end
  # verify the required parameter 'team_id' is set
  fail ArgumentError, "Missing the required parameter 'team_id' when calling TeamsApi.create_subteam" if team_id.nil?
  # verify the required parameter 'name' is set
  fail ArgumentError, "Missing the required parameter 'name' when calling TeamsApi.create_subteam" if name.nil?
  # resource path
  local_var_path = "/team/{teamId}/subteam".sub('{format}','json').sub('{' + 'teamId' + '}', team_id.to_s)

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

  # 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 => 'TeamPublicRepresentation')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TeamsApi#create_subteam\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_subteam(team_id, subteam_id, opts = {}) ⇒ String

Delete Subteam Deletes a subteam

Parameters:

  • team_id

    The team id

  • subteam_id

    The subteam you wish to delete.

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

    the optional parameters

Returns:



224
225
226
227
# File 'lib/bombbomb/api/teams_api.rb', line 224

def delete_subteam(team_id, subteam_id, opts = {})
  data, _status_code, _headers = delete_subteam_with_http_info(team_id, subteam_id, opts)
  return data
end

#delete_subteam_with_http_info(team_id, subteam_id, opts = {}) ⇒ Array<(String, Fixnum, Hash)>

Delete Subteam Deletes a subteam

Parameters:

  • team_id

    The team id

  • subteam_id

    The subteam you wish to delete.

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

    the optional parameters

Returns:

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

    String data, response status code and response headers



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
271
272
273
274
275
276
277
278
# File 'lib/bombbomb/api/teams_api.rb', line 235

def delete_subteam_with_http_info(team_id, subteam_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: TeamsApi.delete_subteam ..."
  end
  # verify the required parameter 'team_id' is set
  fail ArgumentError, "Missing the required parameter 'team_id' when calling TeamsApi.delete_subteam" if team_id.nil?
  # verify the required parameter 'subteam_id' is set
  fail ArgumentError, "Missing the required parameter 'subteam_id' when calling TeamsApi.delete_subteam" if subteam_id.nil?
  # resource path
  local_var_path = "/team/{teamId}/subteam".sub('{format}','json').sub('{' + 'teamId' + '}', team_id.to_s)

  # 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["subteamId"] = subteam_id

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

#get_all_client_group_associations(client_id, opts = {}) ⇒ nil

Lists team associations Returns a collection of team associations for a given user

Parameters:

  • client_id

    The clientId requesting group associations.

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

    the optional parameters

Returns:

  • (nil)


285
286
287
288
# File 'lib/bombbomb/api/teams_api.rb', line 285

def get_all_client_group_associations(client_id, opts = {})
  get_all_client_group_associations_with_http_info(client_id, opts)
  return nil
end

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

Lists team associations Returns a collection of team associations for a given user

Parameters:

  • client_id

    The clientId requesting group associations.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



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
333
334
335
# File 'lib/bombbomb/api/teams_api.rb', line 295

def get_all_client_group_associations_with_http_info(client_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: TeamsApi.get_all_client_group_associations ..."
  end
  # verify the required parameter 'client_id' is set
  fail ArgumentError, "Missing the required parameter 'client_id' when calling TeamsApi.get_all_client_group_associations" if client_id.nil?
  # resource path
  local_var_path = "/team/associations/".sub('{format}','json')

  # query parameters
  query_params = {}
  query_params[:'clientId'] = client_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: TeamsApi#get_all_client_group_associations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_client_group_assets(asset_type, opts = {}) ⇒ InlineResponse200

Lists team assets Returns a collection of assets

Parameters:

  • asset_type

    The type of assets.

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

    the optional parameters

Options Hash (opts):

  • :team_id (String)

    The team containing the assets.

  • :auto_tag_name (String)

    The auto tag name containing the assets.

  • :page_size (String)

    The number of items to retrieve in a single db query.

  • :page (String)

    Zero-based index of the page of data to retrieve from the db.

  • :search (String)

    Search words.

Returns:



347
348
349
350
# File 'lib/bombbomb/api/teams_api.rb', line 347

def get_client_group_assets(asset_type, opts = {})
  data, _status_code, _headers = get_client_group_assets_with_http_info(asset_type, opts)
  return data
end

#get_client_group_assets_with_http_info(asset_type, opts = {}) ⇒ Array<(InlineResponse200, Fixnum, Hash)>

Lists team assets Returns a collection of assets

Parameters:

  • asset_type

    The type of assets.

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

    the optional parameters

Options Hash (opts):

  • :team_id (String)

    The team containing the assets.

  • :auto_tag_name (String)

    The auto tag name containing the assets.

  • :page_size (String)

    The number of items to retrieve in a single db query.

  • :page (String)

    Zero-based index of the page of data to retrieve from the db.

  • :search (String)

    Search words.

Returns:

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

    InlineResponse200 data, response status code and response headers



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
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
# File 'lib/bombbomb/api/teams_api.rb', line 362

def get_client_group_assets_with_http_info(asset_type, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: TeamsApi.get_client_group_assets ..."
  end
  # verify the required parameter 'asset_type' is set
  fail ArgumentError, "Missing the required parameter 'asset_type' when calling TeamsApi.get_client_group_assets" if asset_type.nil?
  # verify enum value
  unless ['email', 'video'].include?(asset_type)
    fail ArgumentError, "invalid value for 'asset_type', must be one of email, video"
  end
  # resource path
  local_var_path = "/team/assets/".sub('{format}','json')

  # query parameters
  query_params = {}
  query_params[:'assetType'] = asset_type
  query_params[:'teamId'] = opts[:'team_id'] if !opts[:'team_id'].nil?
  query_params[:'autoTagName'] = opts[:'auto_tag_name'] if !opts[:'auto_tag_name'].nil?
  query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'search'] = opts[:'search'] if !opts[:'search'].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,
    :return_type => 'InlineResponse200')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TeamsApi#get_client_group_assets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_jericho_sends(team_id, opts = {}) ⇒ Array<JerichoConfiguration>

List Jericho Sends Lists Jericho sends, both pending and sent.

Parameters:

  • team_id

    The team whose Jericho sends you wish to see.

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

    the optional parameters

Returns:



419
420
421
422
# File 'lib/bombbomb/api/teams_api.rb', line 419

def get_jericho_sends(team_id, opts = {})
  data, _status_code, _headers = get_jericho_sends_with_http_info(team_id, opts)
  return data
end

#get_jericho_sends_with_http_info(team_id, opts = {}) ⇒ Array<(Array<JerichoConfiguration>, Fixnum, Hash)>

List Jericho Sends Lists Jericho sends, both pending and sent.

Parameters:

  • team_id

    The team whose Jericho sends you wish to see.

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

    the optional parameters

Returns:

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

    Array<JerichoConfiguration> data, response status code and response headers



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
464
465
466
467
468
469
# File 'lib/bombbomb/api/teams_api.rb', line 429

def get_jericho_sends_with_http_info(team_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: TeamsApi.get_jericho_sends ..."
  end
  # verify the required parameter 'team_id' is set
  fail ArgumentError, "Missing the required parameter 'team_id' when calling TeamsApi.get_jericho_sends" if team_id.nil?
  # resource path
  local_var_path = "/team/{teamId}/jericho".sub('{format}','json').sub('{' + 'teamId' + '}', team_id.to_s)

  # 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 = {}

  # 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<JerichoConfiguration>')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TeamsApi#get_jericho_sends\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_jericho_stats(jericho_id, team_id, opts = {}) ⇒ JerichoPerformance

Gets Jericho performance statistics Returns an aggregate view of the performance of a Jericho send

Parameters:

  • jericho_id

    ID of the Jericho job

  • team_id

    ID of team through which Jericho was sent

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

    the optional parameters

Returns:



477
478
479
480
# File 'lib/bombbomb/api/teams_api.rb', line 477

def get_jericho_stats(jericho_id, team_id, opts = {})
  data, _status_code, _headers = get_jericho_stats_with_http_info(jericho_id, team_id, opts)
  return data
end

#get_jericho_stats_with_http_info(jericho_id, team_id, opts = {}) ⇒ Array<(JerichoPerformance, Fixnum, Hash)>

Gets Jericho performance statistics Returns an aggregate view of the performance of a Jericho send

Parameters:

  • jericho_id

    ID of the Jericho job

  • team_id

    ID of team through which Jericho was sent

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

    the optional parameters

Returns:

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

    JerichoPerformance data, response status code and response headers



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
529
530
# File 'lib/bombbomb/api/teams_api.rb', line 488

def get_jericho_stats_with_http_info(jericho_id, team_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: TeamsApi.get_jericho_stats ..."
  end
  # verify the required parameter 'jericho_id' is set
  fail ArgumentError, "Missing the required parameter 'jericho_id' when calling TeamsApi.get_jericho_stats" if jericho_id.nil?
  # verify the required parameter 'team_id' is set
  fail ArgumentError, "Missing the required parameter 'team_id' when calling TeamsApi.get_jericho_stats" if team_id.nil?
  # resource path
  local_var_path = "/team/{teamId}/jericho/{jerichoId}/performance".sub('{format}','json').sub('{' + 'jerichoId' + '}', jericho_id.to_s).sub('{' + 'teamId' + '}', team_id.to_s)

  # 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 = {}

  # 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 => 'JerichoPerformance')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TeamsApi#get_jericho_stats\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_subteams(team_id, opts = {}) ⇒ Array<TeamPublicRepresentation>

List Subteams Returns a collection of subteams for a parent team

Parameters:

  • team_id

    The team id

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

    the optional parameters

Returns:



537
538
539
540
# File 'lib/bombbomb/api/teams_api.rb', line 537

def get_subteams(team_id, opts = {})
  data, _status_code, _headers = get_subteams_with_http_info(team_id, opts)
  return data
end

#get_subteams_with_http_info(team_id, opts = {}) ⇒ Array<(Array<TeamPublicRepresentation>, Fixnum, Hash)>

List Subteams Returns a collection of subteams for a parent team

Parameters:

  • team_id

    The team id

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

    the optional parameters

Returns:

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

    Array<TeamPublicRepresentation> data, 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
# File 'lib/bombbomb/api/teams_api.rb', line 547

def get_subteams_with_http_info(team_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: TeamsApi.get_subteams ..."
  end
  # verify the required parameter 'team_id' is set
  fail ArgumentError, "Missing the required parameter 'team_id' when calling TeamsApi.get_subteams" if team_id.nil?
  # resource path
  local_var_path = "/team/{teamId}/subteam".sub('{format}','json').sub('{' + 'teamId' + '}', team_id.to_s)

  # 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 = {}

  # 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<TeamPublicRepresentation>')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TeamsApi#get_subteams\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#queue_jericho_send(config, team_id, opts = {}) ⇒ JerichoConfiguration

Creates a Jericho send. Sends email content on behalf of members of a client group. There are two forms this send can take: Static Email, and Video Prompt. Static emails require only an emailId. Video Prompts build emails dynamically and require most of the other fields. You must be an administrator of a Team Account to use this method.

Parameters:

  • config

    JSON representing a Jericho configuration

  • team_id

    The ID of the team.

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

    the optional parameters

Returns:



595
596
597
598
# File 'lib/bombbomb/api/teams_api.rb', line 595

def queue_jericho_send(config, team_id, opts = {})
  data, _status_code, _headers = queue_jericho_send_with_http_info(config, team_id, opts)
  return data
end

#queue_jericho_send_with_http_info(config, team_id, opts = {}) ⇒ Array<(JerichoConfiguration, Fixnum, Hash)>

Creates a Jericho send. Sends email content on behalf of members of a client group. There are two forms this send can take: Static Email, and Video Prompt. Static emails require only an emailId. Video Prompts build emails dynamically and require most of the other fields. You must be an administrator of a Team Account to use this method.

Parameters:

  • config

    JSON representing a Jericho configuration

  • team_id

    The ID of the team.

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

    the optional parameters

Returns:

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

    JerichoConfiguration data, response status code and response headers



606
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
646
647
648
# File 'lib/bombbomb/api/teams_api.rb', line 606

def queue_jericho_send_with_http_info(config, team_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: TeamsApi.queue_jericho_send ..."
  end
  # verify the required parameter 'config' is set
  fail ArgumentError, "Missing the required parameter 'config' when calling TeamsApi.queue_jericho_send" if config.nil?
  # verify the required parameter 'team_id' is set
  fail ArgumentError, "Missing the required parameter 'team_id' when calling TeamsApi.queue_jericho_send" if team_id.nil?
  # resource path
  local_var_path = "/team/{teamId}/jericho".sub('{format}','json').sub('{' + 'teamId' + '}', team_id.to_s)

  # 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/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(config)
  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 => 'JerichoConfiguration')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TeamsApi#queue_jericho_send\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#remove_member_from_team(team_id, user_id, opts = {}) ⇒ String

Remove Member from Team Removes a member from a team.

Parameters:

  • team_id

    The team id

  • user_id

    The user id of the member being removed.

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

    the optional parameters

Returns:



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

def remove_member_from_team(team_id, user_id, opts = {})
  data, _status_code, _headers = remove_member_from_team_with_http_info(team_id, user_id, opts)
  return data
end

#remove_member_from_team_with_http_info(team_id, user_id, opts = {}) ⇒ Array<(String, Fixnum, Hash)>

Remove Member from Team Removes a member from a team.

Parameters:

  • team_id

    The team id

  • user_id

    The user id of the member being removed.

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

    the optional parameters

Returns:

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

    String data, response status code and response headers



667
668
669
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
# File 'lib/bombbomb/api/teams_api.rb', line 667

def remove_member_from_team_with_http_info(team_id, user_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: TeamsApi.remove_member_from_team ..."
  end
  # verify the required parameter 'team_id' is set
  fail ArgumentError, "Missing the required parameter 'team_id' when calling TeamsApi.remove_member_from_team" if team_id.nil?
  # verify the required parameter 'user_id' is set
  fail ArgumentError, "Missing the required parameter 'user_id' when calling TeamsApi.remove_member_from_team" if user_id.nil?
  # resource path
  local_var_path = "/team/{teamId}/member/{userId}".sub('{format}','json').sub('{' + 'teamId' + '}', team_id.to_s).sub('{' + 'userId' + '}', user_id.to_s)

  # 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 = {}

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

#update_jericho_prompt_send(team_id, jericho_id, opts = {}) ⇒ nil

Updates the Jericho Prompt Settings Updates the prompt settings based on the original email id

Parameters:

  • team_id

    The team id

  • jericho_id

    ID of the Jericho job

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

    the optional parameters

Returns:

  • (nil)


717
718
719
720
# File 'lib/bombbomb/api/teams_api.rb', line 717

def update_jericho_prompt_send(team_id, jericho_id, opts = {})
  update_jericho_prompt_send_with_http_info(team_id, jericho_id, opts)
  return nil
end

#update_jericho_prompt_send_with_http_info(team_id, jericho_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Updates the Jericho Prompt Settings Updates the prompt settings based on the original email id

Parameters:

  • team_id

    The team id

  • jericho_id

    ID of the Jericho job

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
# File 'lib/bombbomb/api/teams_api.rb', line 728

def update_jericho_prompt_send_with_http_info(team_id, jericho_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: TeamsApi.update_jericho_prompt_send ..."
  end
  # verify the required parameter 'team_id' is set
  fail ArgumentError, "Missing the required parameter 'team_id' when calling TeamsApi.update_jericho_prompt_send" if team_id.nil?
  # verify the required parameter 'jericho_id' is set
  fail ArgumentError, "Missing the required parameter 'jericho_id' when calling TeamsApi.update_jericho_prompt_send" if jericho_id.nil?
  # resource path
  local_var_path = "/team/{teamId}/jericho/{jerichoId}".sub('{format}','json').sub('{' + 'teamId' + '}', team_id.to_s).sub('{' + 'jerichoId' + '}', jericho_id.to_s)

  # 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 = {}

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

#update_team(team_id, opts = {}) ⇒ TeamPublicRepresentation

Update a team Update fields on a team

Parameters:

  • team_id

    The team id

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

    the optional parameters

Options Hash (opts):

  • :name (String)

    The name of the team

Returns:



777
778
779
780
# File 'lib/bombbomb/api/teams_api.rb', line 777

def update_team(team_id, opts = {})
  data, _status_code, _headers = update_team_with_http_info(team_id, opts)
  return data
end

#update_team_member(team_id, user_id, admin, opts = {}) ⇒ nil

Update Member of Team Updates a member of a team

Parameters:

  • team_id

    The team id

  • user_id

    The user id of the member being added to the team.

  • admin

    Set if the user is an admin of this team.

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

    the optional parameters

Returns:

  • (nil)


838
839
840
841
# File 'lib/bombbomb/api/teams_api.rb', line 838

def update_team_member(team_id, user_id, admin, opts = {})
  update_team_member_with_http_info(team_id, user_id, admin, opts)
  return nil
end

#update_team_member_with_http_info(team_id, user_id, admin, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Update Member of Team Updates a member of a team

Parameters:

  • team_id

    The team id

  • user_id

    The user id of the member being added to the team.

  • admin

    Set if the user is an admin of this team.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
# File 'lib/bombbomb/api/teams_api.rb', line 850

def update_team_member_with_http_info(team_id, user_id, admin, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: TeamsApi.update_team_member ..."
  end
  # verify the required parameter 'team_id' is set
  fail ArgumentError, "Missing the required parameter 'team_id' when calling TeamsApi.update_team_member" if team_id.nil?
  # verify the required parameter 'user_id' is set
  fail ArgumentError, "Missing the required parameter 'user_id' when calling TeamsApi.update_team_member" if user_id.nil?
  # verify the required parameter 'admin' is set
  fail ArgumentError, "Missing the required parameter 'admin' when calling TeamsApi.update_team_member" if admin.nil?
  # resource path
  local_var_path = "/team/{teamId}/member".sub('{format}','json').sub('{' + 'teamId' + '}', team_id.to_s)

  # 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["userId"] = user_id
  form_params["admin"] = admin

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

#update_team_with_http_info(team_id, opts = {}) ⇒ Array<(TeamPublicRepresentation, Fixnum, Hash)>

Update a team Update fields on a team

Parameters:

  • team_id

    The team id

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

    the optional parameters

Options Hash (opts):

  • :name (String)

    The name of the team

Returns:

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

    TeamPublicRepresentation data, response status code and response headers



788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
# File 'lib/bombbomb/api/teams_api.rb', line 788

def update_team_with_http_info(team_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: TeamsApi.update_team ..."
  end
  # verify the required parameter 'team_id' is set
  fail ArgumentError, "Missing the required parameter 'team_id' when calling TeamsApi.update_team" if team_id.nil?
  # resource path
  local_var_path = "/team/{teamId}".sub('{format}','json').sub('{' + 'teamId' + '}', team_id.to_s)

  # 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["name"] = opts[:'name'] if !opts[:'name'].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,
    :return_type => 'TeamPublicRepresentation')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TeamsApi#update_team\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end