Agadar / NationStates-API-Java-Wrapper

A Java library for consuming the NationStates API.
5 stars 1 forks source link

Consideration: return boolean indicating if telegram sent succesfully #2

Closed Agadar closed 8 years ago

Agadar commented 8 years ago

Instead of returning nothing if a telegram is sent succesfully and throwing an exception if it failed, it might be better to instead return a 'true' if a telegram is sent succesfully and a 'false' if it failed.

Main counter-arguments to this are that the NationStates API claims telegrams are sent/queued succesfully even if they're blocked by the receiver(s), and error codes only seem to be returned when the rate limit is violated (429), in which case throwing an exception is exactly what we might want to do.

Agadar commented 8 years ago

Not useful now that multiple addressees can be specified, as the boolean to be returned would be true if all telegrams were queued succesfully and false if one or X telegrams failed, making it quite useless.