I've finally got around to getting my twitter NAnt task implementation ready for publishing on here.
download (16KB)
There are two class libraries:
- one which talks to the twitter API
- the NAnt task itself, TwitterTasks
I split it off like this because I needed a DLL which makes sending twitter messages simple for other projects. Yes it's overkill, yes it means you have to copy another DLL into the NAnt bin folder, but I needed that DLL :-)
Details on usage are in the archive, but essentially you can send messages via twitter like this:
<twitter updatetext="your message here" />
This can be used in NAnt targets which run on things like build failures to notify your development team of a broken build state. I've put some examples in the archive along with the source and the precompiled binaries themselves.
tweetr.dll can also be used as a very simple .NET wrapper for sending twitter messages from managed applications. I plan to include it in a server status monitor we use at work - I can think of dozens of other uses.
The binaries target .NET 2.0, and it's all licenced under the GNU General Public License so it's free for use and modification as you see fit. Donations would of course be more than welcome!
Any questions/comments, just post them here. Hope this is useful to someone.
Thursday, 20 March 2008
Subscribe to:
Post Comments (Atom)
3 comments:
With regards to using this task for failed build notifications: Can you offer a compelling reason to use this when I could simply send an email to a cell phone's SMS email address (such as [cellnumber]@vtext.com)?
Yep - not everyone is on Verizon. Or in the states. Or has a phone network that provides email addresses for that kind of use.
In Europe we use SMS text messaging in a different way to how you do in the USA. For one, we send/receive one hell of a lot more messages. There is no demand really to be able to receive email via SMS, so that's why I figure the service doesn't exist here.
Besides, there's also the chance that you might not actually want to use this for SMS - but rather for other twitter-enabled applications, or just pure twitter itself.
I had to make a small update to the code to handle Twitters breaking change which caused resulted in an error being thrown when POSTing to the service.
In tweetr.cs (after line 83) I added: httpWebRequest.ServicePoint.Expect100Continue = false;
This solved the problem for me.
Post a Comment