Method: ESIClient::MailApi#get_characters_character_id_mail_with_http_info
- Defined in:
- lib/esi_client/api/mail_api.rb
#get_characters_character_id_mail_with_http_info(character_id, opts = {}) ⇒ Array<(Array<GetCharactersCharacterIdMail200Ok>, Fixnum, Hash)>
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
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 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 |
# File 'lib/esi_client/api/mail_api.rb', line 187 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 fail ArgumentError, "Missing the required parameter 'character_id' when calling MailApi.get_characters_character_id_mail" if character_id.nil? if opts[:'datasource'] && !['tranquility', 'singularity'].include?(opts[:'datasource']) fail ArgumentError, 'invalid value for "datasource", must be one of tranquility, singularity' end if !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 !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('{format}','json').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? query_params[:'user_agent'] = opts[:'user_agent'] if !opts[:'user_agent'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'X-User-Agent'] = opts[:'x_user_agent'] if !opts[:'x_user_agent'].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 |