maknz / slack

A simple PHP package for sending messages to Slack, with a focus on ease of use and elegant syntax.
BSD 2-Clause "Simplified" License
1.17k stars 204 forks source link

Rework the send method and implement attachments and icons #2

Closed maknz closed 10 years ago

maknz commented 10 years ago

Rather than bogging down the send() function, we now have nice chainable methods for setting the username, channel and icon. The send function is now used to send the composed message along with the text for the message.

You can now send attachments with messages, and change the icon used to either a Slack emoji or a URL.

Also implemented some unit testing. You can see them being run on Travis-CI: https://travis-ci.org/maknz/slack. I will add a build badge to the README once this is merged.

This isn't BC with 0.1.x, but since we follow semantic versioning, we can make breaking changes for minor versions up until the 1.0 release.

@willwashburn can you take a look at the README (and maybe try it out, if you want to) and let me know what you think (and whether it satisfies the use cases from your PR). If all is well, I'll merge this and tag a 0.2 release.

maknz commented 10 years ago

I'm going to merge this now since I'm pretty sure it's covering all bases. Please open an issue to discuss anything.