Method: ListsApi#remove_list

Defined in:
lib/lists_api.rb

#remove_list(list_id = nil, opts = {}) ⇒ Object

Delete a list and its members.

Parameters:

  • list_id (defaults to: nil)

    ID of the list to remove.

Returns:

  • void



477
478
479
480
481
482
483
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
# File 'lib/lists_api.rb', line 477

def remove_list (list_id = nil, opts={})
  query_param_keys = [:list_id]
  headerParams = {}

  
  
  # set default values and merge with input
  options = {
    :'list_id' => list_id
    
  }.merge(opts)

  #resource path
  path = "/remove-list.json".sub('{format}','json')
  
  # pull querystring keys from options
  queryopts = options.select do |key,value|
    query_param_keys.include? key
  end

  # header parameters
  headers = {}

  _header_accept = 'application/json'
  if _header_accept != ''
    headerParams['Accept'] = _header_accept
  end 
  _header_content_type = ['application/x-www-form-urlencoded']
  headerParams['Content-Type'] = _header_content_type.length > 0 ? _header_content_type[0] : 'application/json'

  
  
  headers[:'Authorization'] = @api_key_secret

  # http body (model)
  post_body = nil
  
  # form parameters
  form_parameter_hash = {}
  
  
  
  Swagger::Request.new(:POST, path, {:params=>queryopts,:headers=>headers, :body=>post_body, :form_params => form_parameter_hash }).make
  

end