class ESI::MailApi

Attributes

api_client[RW]

Public Class Methods

new(api_client = ApiClient.default) click to toggle source
# File lib/esi-client-bvv/api/mail_api.rb, line 19
def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Public Instance Methods

delete_characters_character_id_mail_labels_label_id(character_id, label_id, opts = {}) click to toggle source

Delete a mail label Delete a mail label — @param character_id An EVE character ID @param label_id An EVE label id @param [Hash] opts the optional parameters @option opts [String] :datasource The server name you would like data from (default to tranquility) @option opts [String] :token Access token to use if unable to set a header @return [nil]

# File lib/esi-client-bvv/api/mail_api.rb, line 31
def delete_characters_character_id_mail_labels_label_id(character_id, label_id, opts = {})
  delete_characters_character_id_mail_labels_label_id_with_http_info(character_id, label_id, opts)
  return nil
end
delete_characters_character_id_mail_labels_label_id_with_http_info(character_id, label_id, opts = {}) click to toggle source

Delete a mail label Delete a mail label — @param character_id An EVE character ID @param label_id An EVE label id @param [Hash] opts the optional parameters @option opts [String] :datasource The server name you would like data from @option opts [String] :token Access token to use if unable to set a header @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers

# File lib/esi-client-bvv/api/mail_api.rb, line 44
def delete_characters_character_id_mail_labels_label_id_with_http_info(character_id, label_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: MailApi.delete_characters_character_id_mail_labels_label_id ..."
  end
  # verify the required parameter 'character_id' is set
  if @api_client.config.client_side_validation && character_id.nil?
    fail ArgumentError, "Missing the required parameter 'character_id' when calling MailApi.delete_characters_character_id_mail_labels_label_id"
  end
  if @api_client.config.client_side_validation && character_id < 1
    fail ArgumentError, 'invalid value for "character_id" when calling MailApi.delete_characters_character_id_mail_labels_label_id, must be greater than or equal to 1.'
  end

  # verify the required parameter 'label_id' is set
  if @api_client.config.client_side_validation && label_id.nil?
    fail ArgumentError, "Missing the required parameter 'label_id' when calling MailApi.delete_characters_character_id_mail_labels_label_id"
  end
  if @api_client.config.client_side_validation && opts[:'datasource'] && !['tranquility', 'singularity'].include?(opts[:'datasource'])
    fail ArgumentError, 'invalid value for "datasource", must be one of tranquility, singularity'
  end
  # resource path
  local_var_path = "/v1/characters/{character_id}/mail/labels/{label_id}/".sub('{' + 'character_id' + '}', character_id.to_s).sub('{' + 'label_id' + '}', label_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'datasource'] = opts[:'datasource'] if !opts[:'datasource'].nil?
  query_params[:'token'] = opts[:'token'] if !opts[:'token'].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/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['evesso']
  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: MailApi#delete_characters_character_id_mail_labels_label_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
delete_characters_character_id_mail_mail_id(character_id, mail_id, opts = {}) click to toggle source

Delete a mail Delete a mail — @param character_id An EVE character ID @param mail_id An EVE mail ID @param [Hash] opts the optional parameters @option opts [String] :datasource The server name you would like data from (default to tranquility) @option opts [String] :token Access token to use if unable to set a header @return [nil]

# File lib/esi-client-bvv/api/mail_api.rb, line 104
def delete_characters_character_id_mail_mail_id(character_id, mail_id, opts = {})
  delete_characters_character_id_mail_mail_id_with_http_info(character_id, mail_id, opts)
  return nil
end
delete_characters_character_id_mail_mail_id_with_http_info(character_id, mail_id, opts = {}) click to toggle source

Delete a mail Delete a mail — @param character_id An EVE character ID @param mail_id An EVE mail ID @param [Hash] opts the optional parameters @option opts [String] :datasource The server name you would like data from @option opts [String] :token Access token to use if unable to set a header @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers

# File lib/esi-client-bvv/api/mail_api.rb, line 117
def delete_characters_character_id_mail_mail_id_with_http_info(character_id, mail_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: MailApi.delete_characters_character_id_mail_mail_id ..."
  end
  # verify the required parameter 'character_id' is set
  if @api_client.config.client_side_validation && character_id.nil?
    fail ArgumentError, "Missing the required parameter 'character_id' when calling MailApi.delete_characters_character_id_mail_mail_id"
  end
  if @api_client.config.client_side_validation && character_id < 1
    fail ArgumentError, 'invalid value for "character_id" when calling MailApi.delete_characters_character_id_mail_mail_id, must be greater than or equal to 1.'
  end

  # verify the required parameter 'mail_id' is set
  if @api_client.config.client_side_validation && mail_id.nil?
    fail ArgumentError, "Missing the required parameter 'mail_id' when calling MailApi.delete_characters_character_id_mail_mail_id"
  end
  if @api_client.config.client_side_validation && opts[:'datasource'] && !['tranquility', 'singularity'].include?(opts[:'datasource'])
    fail ArgumentError, 'invalid value for "datasource", must be one of tranquility, singularity'
  end
  # resource path
  local_var_path = "/v1/characters/{character_id}/mail/{mail_id}/".sub('{' + 'character_id' + '}', character_id.to_s).sub('{' + 'mail_id' + '}', mail_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'datasource'] = opts[:'datasource'] if !opts[:'datasource'].nil?
  query_params[:'token'] = opts[:'token'] if !opts[:'token'].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/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['evesso']
  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: MailApi#delete_characters_character_id_mail_mail_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_characters_character_id_mail(character_id, opts = {}) click to toggle source

Return mail headers Return the 50 most recent mail headers belonging to the character that match the query criteria. Queries can be filtered by label, and last_mail_id can be used to paginate backwards — This route is cached for up to 30 seconds @param character_id An EVE character ID @param [Hash] opts the optional parameters @option opts [String] :datasource The server name you would like data from (default to tranquility) @option opts [String] :if_none_match ETag from a previous request. A 304 will be returned if this matches the current ETag @option opts [Array<Integer>] :labels Fetch only mails that match one or more of the given labels @option opts [Integer] :last_mail_id List only mail with an ID lower than the given ID, if present @option opts [String] :token Access token to use if unable to set a header @return [Array<GetCharactersCharacterIdMail200Ok>]

# File lib/esi-client-bvv/api/mail_api.rb, line 179
def get_characters_character_id_mail(character_id, opts = {})
  data, _status_code, _headers = get_characters_character_id_mail_with_http_info(character_id, opts)
  return data
end
get_characters_character_id_mail_labels(character_id, opts = {}) click to toggle source

Get mail labels and unread counts Return a list of the users mail labels, unread counts for each label and a total unread count. — This route is cached for up to 30 seconds @param character_id An EVE character ID @param [Hash] opts the optional parameters @option opts [String] :datasource The server name you would like data from (default to tranquility) @option opts [String] :if_none_match ETag from a previous request. A 304 will be returned if this matches the current ETag @option opts [String] :token Access token to use if unable to set a header @return [GetCharactersCharacterIdMailLabelsOk]

# File lib/esi-client-bvv/api/mail_api.rb, line 262
def get_characters_character_id_mail_labels(character_id, opts = {})
  data, _status_code, _headers = get_characters_character_id_mail_labels_with_http_info(character_id, opts)
  return data
end
get_characters_character_id_mail_labels_with_http_info(character_id, opts = {}) click to toggle source

Get mail labels and unread counts Return a list of the users mail labels, unread counts for each label and a total unread count. — This route is cached for up to 30 seconds @param character_id An EVE character ID @param [Hash] opts the optional parameters @option opts [String] :datasource The server name you would like data from @option opts [String] :if_none_match ETag from a previous request. A 304 will be returned if this matches the current ETag @option opts [String] :token Access token to use if unable to set a header @return [Array<(GetCharactersCharacterIdMailLabelsOk, Fixnum, Hash)>] GetCharactersCharacterIdMailLabelsOk data, response status code and response headers

# File lib/esi-client-bvv/api/mail_api.rb, line 275
def get_characters_character_id_mail_labels_with_http_info(character_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: MailApi.get_characters_character_id_mail_labels ..."
  end
  # verify the required parameter 'character_id' is set
  if @api_client.config.client_side_validation && character_id.nil?
    fail ArgumentError, "Missing the required parameter 'character_id' when calling MailApi.get_characters_character_id_mail_labels"
  end
  if @api_client.config.client_side_validation && character_id < 1
    fail ArgumentError, 'invalid value for "character_id" when calling MailApi.get_characters_character_id_mail_labels, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && opts[:'datasource'] && !['tranquility', 'singularity'].include?(opts[:'datasource'])
    fail ArgumentError, 'invalid value for "datasource", must be one of tranquility, singularity'
  end
  # resource path
  local_var_path = "/v3/characters/{character_id}/mail/labels/".sub('{' + 'character_id' + '}', character_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'datasource'] = opts[:'datasource'] if !opts[:'datasource'].nil?
  query_params[:'token'] = opts[:'token'] if !opts[:'token'].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/json'])
  header_params[:'If-None-Match'] = opts[:'if_none_match'] if !opts[:'if_none_match'].nil?

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['evesso']
  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 => 'GetCharactersCharacterIdMailLabelsOk')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: MailApi#get_characters_character_id_mail_labels\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_characters_character_id_mail_lists(character_id, opts = {}) click to toggle source

Return mailing list subscriptions Return all mailing lists that the character is subscribed to — This route is cached for up to 120 seconds @param character_id An EVE character ID @param [Hash] opts the optional parameters @option opts [String] :datasource The server name you would like data from (default to tranquility) @option opts [String] :if_none_match ETag from a previous request. A 304 will be returned if this matches the current ETag @option opts [String] :token Access token to use if unable to set a header @return [Array<GetCharactersCharacterIdMailLists200Ok>]

# File lib/esi-client-bvv/api/mail_api.rb, line 333
def get_characters_character_id_mail_lists(character_id, opts = {})
  data, _status_code, _headers = get_characters_character_id_mail_lists_with_http_info(character_id, opts)
  return data
end
get_characters_character_id_mail_lists_with_http_info(character_id, opts = {}) click to toggle source

Return mailing list subscriptions Return all mailing lists that the character is subscribed to — This route is cached for up to 120 seconds @param character_id An EVE character ID @param [Hash] opts the optional parameters @option opts [String] :datasource The server name you would like data from @option opts [String] :if_none_match ETag from a previous request. A 304 will be returned if this matches the current ETag @option opts [String] :token Access token to use if unable to set a header @return [Array<(Array<GetCharactersCharacterIdMailLists200Ok>, Fixnum, Hash)>] Array<GetCharactersCharacterIdMailLists200Ok> data, response status code and response headers

# File lib/esi-client-bvv/api/mail_api.rb, line 346
def get_characters_character_id_mail_lists_with_http_info(character_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: MailApi.get_characters_character_id_mail_lists ..."
  end
  # verify the required parameter 'character_id' is set
  if @api_client.config.client_side_validation && character_id.nil?
    fail ArgumentError, "Missing the required parameter 'character_id' when calling MailApi.get_characters_character_id_mail_lists"
  end
  if @api_client.config.client_side_validation && character_id < 1
    fail ArgumentError, 'invalid value for "character_id" when calling MailApi.get_characters_character_id_mail_lists, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && opts[:'datasource'] && !['tranquility', 'singularity'].include?(opts[:'datasource'])
    fail ArgumentError, 'invalid value for "datasource", must be one of tranquility, singularity'
  end
  # resource path
  local_var_path = "/v1/characters/{character_id}/mail/lists/".sub('{' + 'character_id' + '}', character_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'datasource'] = opts[:'datasource'] if !opts[:'datasource'].nil?
  query_params[:'token'] = opts[:'token'] if !opts[:'token'].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/json'])
  header_params[:'If-None-Match'] = opts[:'if_none_match'] if !opts[:'if_none_match'].nil?

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['evesso']
  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<GetCharactersCharacterIdMailLists200Ok>')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: MailApi#get_characters_character_id_mail_lists\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_characters_character_id_mail_mail_id(character_id, mail_id, opts = {}) click to toggle source

Return a mail Return the contents of an EVE mail — This route is cached for up to 30 seconds @param character_id An EVE character ID @param mail_id An EVE mail ID @param [Hash] opts the optional parameters @option opts [String] :datasource The server name you would like data from (default to tranquility) @option opts [String] :if_none_match ETag from a previous request. A 304 will be returned if this matches the current ETag @option opts [String] :token Access token to use if unable to set a header @return [GetCharactersCharacterIdMailMailIdOk]

# File lib/esi-client-bvv/api/mail_api.rb, line 405
def get_characters_character_id_mail_mail_id(character_id, mail_id, opts = {})
  data, _status_code, _headers = get_characters_character_id_mail_mail_id_with_http_info(character_id, mail_id, opts)
  return data
end
get_characters_character_id_mail_mail_id_with_http_info(character_id, mail_id, opts = {}) click to toggle source

Return a mail Return the contents of an EVE mail — This route is cached for up to 30 seconds @param character_id An EVE character ID @param mail_id An EVE mail ID @param [Hash] opts the optional parameters @option opts [String] :datasource The server name you would like data from @option opts [String] :if_none_match ETag from a previous request. A 304 will be returned if this matches the current ETag @option opts [String] :token Access token to use if unable to set a header @return [Array<(GetCharactersCharacterIdMailMailIdOk, Fixnum, Hash)>] GetCharactersCharacterIdMailMailIdOk data, response status code and response headers

# File lib/esi-client-bvv/api/mail_api.rb, line 419
def get_characters_character_id_mail_mail_id_with_http_info(character_id, mail_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: MailApi.get_characters_character_id_mail_mail_id ..."
  end
  # verify the required parameter 'character_id' is set
  if @api_client.config.client_side_validation && character_id.nil?
    fail ArgumentError, "Missing the required parameter 'character_id' when calling MailApi.get_characters_character_id_mail_mail_id"
  end
  if @api_client.config.client_side_validation && character_id < 1
    fail ArgumentError, 'invalid value for "character_id" when calling MailApi.get_characters_character_id_mail_mail_id, must be greater than or equal to 1.'
  end

  # verify the required parameter 'mail_id' is set
  if @api_client.config.client_side_validation && mail_id.nil?
    fail ArgumentError, "Missing the required parameter 'mail_id' when calling MailApi.get_characters_character_id_mail_mail_id"
  end
  if @api_client.config.client_side_validation && opts[:'datasource'] && !['tranquility', 'singularity'].include?(opts[:'datasource'])
    fail ArgumentError, 'invalid value for "datasource", must be one of tranquility, singularity'
  end
  # resource path
  local_var_path = "/v1/characters/{character_id}/mail/{mail_id}/".sub('{' + 'character_id' + '}', character_id.to_s).sub('{' + 'mail_id' + '}', mail_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'datasource'] = opts[:'datasource'] if !opts[:'datasource'].nil?
  query_params[:'token'] = opts[:'token'] if !opts[:'token'].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/json'])
  header_params[:'If-None-Match'] = opts[:'if_none_match'] if !opts[:'if_none_match'].nil?

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['evesso']
  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 => 'GetCharactersCharacterIdMailMailIdOk')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: MailApi#get_characters_character_id_mail_mail_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_characters_character_id_mail_with_http_info(character_id, opts = {}) click to toggle source

Return mail headers Return the 50 most recent mail headers belonging to the character that match the query criteria. Queries can be filtered by label, and last_mail_id can be used to paginate backwards — This route is cached for up to 30 seconds @param character_id An EVE character ID @param [Hash] opts the optional parameters @option opts [String] :datasource The server name you would like data from @option opts [String] :if_none_match ETag from a previous request. A 304 will be returned if this matches the current ETag @option opts [Array<Integer>] :labels Fetch only mails that match one or more of the given labels @option opts [Integer] :last_mail_id List only mail with an ID lower than the given ID, if present @option opts [String] :token Access token to use if unable to set a header @return [Array<(Array<GetCharactersCharacterIdMail200Ok>, Fixnum, Hash)>] Array<GetCharactersCharacterIdMail200Ok> data, response status code and response headers

# File lib/esi-client-bvv/api/mail_api.rb, line 194
def get_characters_character_id_mail_with_http_info(character_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: MailApi.get_characters_character_id_mail ..."
  end
  # verify the required parameter 'character_id' is set
  if @api_client.config.client_side_validation && character_id.nil?
    fail ArgumentError, "Missing the required parameter 'character_id' when calling MailApi.get_characters_character_id_mail"
  end
  if @api_client.config.client_side_validation && character_id < 1
    fail ArgumentError, 'invalid value for "character_id" when calling MailApi.get_characters_character_id_mail, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && opts[:'datasource'] && !['tranquility', 'singularity'].include?(opts[:'datasource'])
    fail ArgumentError, 'invalid value for "datasource", must be one of tranquility, singularity'
  end
  if @api_client.config.client_side_validation && !opts[:'labels'].nil? && opts[:'labels'].length > 25
    fail ArgumentError, 'invalid value for "opts[:"labels"]" when calling MailApi.get_characters_character_id_mail, number of items must be less than or equal to 25.'
  end

  if @api_client.config.client_side_validation && !opts[:'labels'].nil? && opts[:'labels'].length < 1
    fail ArgumentError, 'invalid value for "opts[:"labels"]" when calling MailApi.get_characters_character_id_mail, number of items must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = "/v1/characters/{character_id}/mail/".sub('{' + 'character_id' + '}', character_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'datasource'] = opts[:'datasource'] if !opts[:'datasource'].nil?
  query_params[:'labels'] = @api_client.build_collection_param(opts[:'labels'], :csv) if !opts[:'labels'].nil?
  query_params[:'last_mail_id'] = opts[:'last_mail_id'] if !opts[:'last_mail_id'].nil?
  query_params[:'token'] = opts[:'token'] if !opts[:'token'].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/json'])
  header_params[:'If-None-Match'] = opts[:'if_none_match'] if !opts[:'if_none_match'].nil?

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['evesso']
  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<GetCharactersCharacterIdMail200Ok>')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: MailApi#get_characters_character_id_mail\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
post_characters_character_id_mail(character_id, mail, opts = {}) click to toggle source

Send a new mail Create and send a new mail — @param character_id An EVE character ID @param mail The mail to send @param [Hash] opts the optional parameters @option opts [String] :datasource The server name you would like data from (default to tranquility) @option opts [String] :token Access token to use if unable to set a header @return [Integer]

# File lib/esi-client-bvv/api/mail_api.rb, line 481
def post_characters_character_id_mail(character_id, mail, opts = {})
  data, _status_code, _headers = post_characters_character_id_mail_with_http_info(character_id, mail, opts)
  return data
end
post_characters_character_id_mail_labels(character_id, label, opts = {}) click to toggle source

Create a mail label Create a mail label — @param character_id An EVE character ID @param label Label to create @param [Hash] opts the optional parameters @option opts [String] :datasource The server name you would like data from (default to tranquility) @option opts [String] :token Access token to use if unable to set a header @return [Integer]

# File lib/esi-client-bvv/api/mail_api.rb, line 555
def post_characters_character_id_mail_labels(character_id, label, opts = {})
  data, _status_code, _headers = post_characters_character_id_mail_labels_with_http_info(character_id, label, opts)
  return data
end
post_characters_character_id_mail_labels_with_http_info(character_id, label, opts = {}) click to toggle source

Create a mail label Create a mail label — @param character_id An EVE character ID @param label Label to create @param [Hash] opts the optional parameters @option opts [String] :datasource The server name you would like data from @option opts [String] :token Access token to use if unable to set a header @return [Array<(Integer, Fixnum, Hash)>] Integer data, response status code and response headers

# File lib/esi-client-bvv/api/mail_api.rb, line 568
def post_characters_character_id_mail_labels_with_http_info(character_id, label, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: MailApi.post_characters_character_id_mail_labels ..."
  end
  # verify the required parameter 'character_id' is set
  if @api_client.config.client_side_validation && character_id.nil?
    fail ArgumentError, "Missing the required parameter 'character_id' when calling MailApi.post_characters_character_id_mail_labels"
  end
  if @api_client.config.client_side_validation && character_id < 1
    fail ArgumentError, 'invalid value for "character_id" when calling MailApi.post_characters_character_id_mail_labels, must be greater than or equal to 1.'
  end

  # verify the required parameter 'label' is set
  if @api_client.config.client_side_validation && label.nil?
    fail ArgumentError, "Missing the required parameter 'label' when calling MailApi.post_characters_character_id_mail_labels"
  end
  if @api_client.config.client_side_validation && opts[:'datasource'] && !['tranquility', 'singularity'].include?(opts[:'datasource'])
    fail ArgumentError, 'invalid value for "datasource", must be one of tranquility, singularity'
  end
  # resource path
  local_var_path = "/v2/characters/{character_id}/mail/labels/".sub('{' + 'character_id' + '}', character_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'datasource'] = opts[:'datasource'] if !opts[:'datasource'].nil?
  query_params[:'token'] = opts[:'token'] if !opts[:'token'].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/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(label)
  auth_names = ['evesso']
  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 => 'Integer')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: MailApi#post_characters_character_id_mail_labels\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
post_characters_character_id_mail_with_http_info(character_id, mail, opts = {}) click to toggle source

Send a new mail Create and send a new mail — @param character_id An EVE character ID @param mail The mail to send @param [Hash] opts the optional parameters @option opts [String] :datasource The server name you would like data from @option opts [String] :token Access token to use if unable to set a header @return [Array<(Integer, Fixnum, Hash)>] Integer data, response status code and response headers

# File lib/esi-client-bvv/api/mail_api.rb, line 494
def post_characters_character_id_mail_with_http_info(character_id, mail, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: MailApi.post_characters_character_id_mail ..."
  end
  # verify the required parameter 'character_id' is set
  if @api_client.config.client_side_validation && character_id.nil?
    fail ArgumentError, "Missing the required parameter 'character_id' when calling MailApi.post_characters_character_id_mail"
  end
  if @api_client.config.client_side_validation && character_id < 1
    fail ArgumentError, 'invalid value for "character_id" when calling MailApi.post_characters_character_id_mail, must be greater than or equal to 1.'
  end

  # verify the required parameter 'mail' is set
  if @api_client.config.client_side_validation && mail.nil?
    fail ArgumentError, "Missing the required parameter 'mail' when calling MailApi.post_characters_character_id_mail"
  end
  if @api_client.config.client_side_validation && opts[:'datasource'] && !['tranquility', 'singularity'].include?(opts[:'datasource'])
    fail ArgumentError, 'invalid value for "datasource", must be one of tranquility, singularity'
  end
  # resource path
  local_var_path = "/v1/characters/{character_id}/mail/".sub('{' + 'character_id' + '}', character_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'datasource'] = opts[:'datasource'] if !opts[:'datasource'].nil?
  query_params[:'token'] = opts[:'token'] if !opts[:'token'].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/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(mail)
  auth_names = ['evesso']
  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 => 'Integer')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: MailApi#post_characters_character_id_mail\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_characters_character_id_mail_mail_id(character_id, contents, mail_id, opts = {}) click to toggle source

Update metadata about a mail Update metadata about a mail — @param character_id An EVE character ID @param contents Data used to update the mail @param mail_id An EVE mail ID @param [Hash] opts the optional parameters @option opts [String] :datasource The server name you would like data from (default to tranquility) @option opts [String] :token Access token to use if unable to set a header @return [nil]

# File lib/esi-client-bvv/api/mail_api.rb, line 630
def put_characters_character_id_mail_mail_id(character_id, contents, mail_id, opts = {})
  put_characters_character_id_mail_mail_id_with_http_info(character_id, contents, mail_id, opts)
  return nil
end
put_characters_character_id_mail_mail_id_with_http_info(character_id, contents, mail_id, opts = {}) click to toggle source

Update metadata about a mail Update metadata about a mail — @param character_id An EVE character ID @param contents Data used to update the mail @param mail_id An EVE mail ID @param [Hash] opts the optional parameters @option opts [String] :datasource The server name you would like data from @option opts [String] :token Access token to use if unable to set a header @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers

# File lib/esi-client-bvv/api/mail_api.rb, line 644
def put_characters_character_id_mail_mail_id_with_http_info(character_id, contents, mail_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: MailApi.put_characters_character_id_mail_mail_id ..."
  end
  # verify the required parameter 'character_id' is set
  if @api_client.config.client_side_validation && character_id.nil?
    fail ArgumentError, "Missing the required parameter 'character_id' when calling MailApi.put_characters_character_id_mail_mail_id"
  end
  if @api_client.config.client_side_validation && character_id < 1
    fail ArgumentError, 'invalid value for "character_id" when calling MailApi.put_characters_character_id_mail_mail_id, must be greater than or equal to 1.'
  end

  # verify the required parameter 'contents' is set
  if @api_client.config.client_side_validation && contents.nil?
    fail ArgumentError, "Missing the required parameter 'contents' when calling MailApi.put_characters_character_id_mail_mail_id"
  end
  # verify the required parameter 'mail_id' is set
  if @api_client.config.client_side_validation && mail_id.nil?
    fail ArgumentError, "Missing the required parameter 'mail_id' when calling MailApi.put_characters_character_id_mail_mail_id"
  end
  if @api_client.config.client_side_validation && opts[:'datasource'] && !['tranquility', 'singularity'].include?(opts[:'datasource'])
    fail ArgumentError, 'invalid value for "datasource", must be one of tranquility, singularity'
  end
  # resource path
  local_var_path = "/v1/characters/{character_id}/mail/{mail_id}/".sub('{' + 'character_id' + '}', character_id.to_s).sub('{' + 'mail_id' + '}', mail_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'datasource'] = opts[:'datasource'] if !opts[:'datasource'].nil?
  query_params[:'token'] = opts[:'token'] if !opts[:'token'].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/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(contents)
  auth_names = ['evesso']
  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: MailApi#put_characters_character_id_mail_mail_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end