bitlyj 2.0 Available
Bitlyj 2.0 is out and available through maven central or direct download. For a more detailed overview, see the QuickStart page, but here's a teaser. Assuming the imports:
import com.rosaloves.bitlyj.*; import static com.rosaloves.bitlyj.Bitly.*;
and credentials:
String user = "user"; String apiKey = "R_XXXXX";
you shorten a URL like this:
as(user, apiKey).call(shorten("http://rosaloves.com/"));Noteworthy features, as they appear on the project page:
- Concise DSL syntax with obvious semantics == bitly interaction with no boilerplate.
- Natural error handling with no checked exceptions. If you want to deal with exceptions, catch BitlyException and access the delivered message (yields bitly's status text).
- J.mp support baked in, with the same DSL sugar.
- Runs on Android.
- Zero dependencies.
- Flexible API. Bitly methods are no longer hard-wired to an interface, so evolution is possible without API breakage.
- Extensible API. Implementing your own methods is simple: implement the functionality in an implementation of BitlyMethod?. You get core error handling for free, and you can even implement specialized methods not supported by bitly.
- Access to other bitly-powered services is simple: implement Provider (two methods).
The library is well-tested, but you run into a problem open an issue (or post to the list).

