skylarsch/SSPostmark — pull request #7 by coneybeare (2012-06-25 21:41:12+00:00)
Title: Tons of stuff... read the message

You're gonna hate me, but I have a ton of hanges on the new commit, with a little refactoring here.

1) Removed any NSException throwing. Causing an app to crash on purpose is not ok. If the implementer doesn't "get it" by seeing the big compile time warning you have, it is their own fault. If the class doesn't exist, or the old method is called, it should simply not work, but not cause a crash.

2) Added proper deprecation notice to the method signature. My vote is to remove them completely, but if you want to keep the methods in there, the interface should have them too.

3) Adding the class level convenience sendMail method is great, but the apikey is not part of a message and should not be bundled with one. It takes one less line of code to pass it into the method.

4) The class level convenience method should use the same init as the instance level. Now it is basic, but in the future, it prevents init logic from being in two different places.

5) Added a class level convenience constructor to SSPostmarkAttachment for data. I use JPGs to upload (compress better) so I want to pass in my data in 1 line too!

6) Renamed attachmentWithImage:named: to attachmentWithImage:name This way uses cocoa naming conventions by removing the past tense.

7) Renamed the Base64 category and method to be specific to this project, removing any chance of namespace collisions.

8) Renamed the sendEmail method to be sendMessage for naming consistency (emails are referred to as messages in all other methods)

9) Gave the instance send methods some block love too!

10) A little syntax cleanup for readability and fewer object allocations.