esi / esi-issues

Issue tracking and feature requests for ESI
https://esi.evetech.net/
208 stars 23 forks source link

Make /ui/openwindow/newmail/ and /characters/{character_id}/mail/ consistent #252

Open SpeedProg opened 7 years ago

SpeedProg commented 7 years ago

Currently those 2 endpoints basically receive the same data. the "send mail" like this parameter mail =

approved_cost (integer, optional):

approved_cost integer ,
body (string):

body string ,
recipients (Array[post_characters_character_id_mail_recipient]):

recipients array ,
subject (string):

subject string
}
post_characters_character_id_mail_recipient {
recipient_id (integer):

recipient_id integer ,
recipient_type (string):

recipient_type string = ['alliance', 'character', 'corporation', 'mailing_list']
}

and the "open mail" like this new_mail =

post_ui_openwindow_newmail_new_mail {
body (string):

body string ,
recipients (Array[integer]):

recipients array ,
subject (string):

subject string ,
to_corp_or_alliance_id (integer, optional):

to_corp_or_alliance_id integer ,
to_mailing_list_id (integer, optional):

Corporations, alliances and mailing lists are all types of mailing groups. You may only send to one mailing group, at a time, so you may fill out either this field or the to_corp_or_alliance_ids field
} 

They basically get the same data, and in my opinion should use the same or a matching model

a-tal commented 7 years ago

agreed the recipients list should be in the same structure. doesn't make sense to post approved cost to the ui endpoint though, as the client will ask you when you go to send the mail there.