Skip to content

The Callback System

improv32 edited this page Jul 28, 2012 · 4 revisions

To use the API:

This will login, do a search, and do a concurrent callback to the calling thread without blocking.

public void myFunction()
{
	FranticMeAPI fm = new FranticMeAPI("username", "password");
	fm.search("your query", new ICallback<FMPlayer[]>()
	{
		// This is called when the query finishes
		public void onFinish(FMPlayer[] results)
		{
			doSomethingWithTheResults(results);
		}
	});
}

Clone this wiki locally