My favorites | Sign in
Project Home Downloads Wiki Issues Source
Project Information
Members
Featured
Downloads
Links

TwitterN is a yet another c# version of the twitter api.

It uses json, wcf datacontracts, generics, and c# 3.0 to create a cleaner code base.

07/27/08: The second initial release is out, includes changes to the api

  • calling everything a client instead of a service cause it is a client.
  • wraps errors from twitters rest service into a TwitterException.
  • everything now uses WCF service contracts.
  • all calls except one uses json, because twitter's .json doesn't work with that url
  • all lists are now arrays.

stage: alpha/prototyping.

Things to note:

  • Blog: www.amptools.net
  • Required: .Net 3.5, (Gallio/MbUnit3 installed if downloading the source).
  • Specs/Tests While there are tests/specifications for all the services, this mean it totally matches your case and scenario.
  • Tests use Ignore attribute because Twitter enforces a rate limit, remove ignore to test
  • Use your own username and password, these are NOT supplied.
  • Sooner or later this will be a plugin as well for Amplify.Net

using Amplify.Twitter;
using System.Security;

// ... stuff

public void Test() 
{
	try {
		string temp = "password";
	
		Twitter.SetCredentials("Username", temp);

		StatusClient client = Twitter.CreateStatusClient();
 		// or StatusClient client = new StatusClient("Username", temp);

        	Status[] tweets = service.GetUserTimeline();
	} catch (TwitterException ex) {
		Log.Write(ex.ToString()); // write the twitter rest error. 
	}

}
Powered by Google Project Hosting