StackWrap4J Java wrapper
Posted
by
Bill the Lizard
on Stackapps
See other posts from Stackapps
or by Bill the Lizard
Published on 2010-06-21T03:00:21Z
Indexed on
2010/12/27
1:58 UTC
Read the original article
Hit count: 570
The StackWrap4J 1.0.1 jar is now available! (See the changelog)
Sample Code / Screen Shot
The following code snippet was used to test the wrapper in the Android emulator:
TextView text = (TextView)findViewById(R.id.output);
StackWrapper stackWrap = new StackOverflow();
String displayText = null;
try {
Stats stats = stackWrap.getStats();
displayText = "Stack Overflow Statistics";
displayText += "\nTotal Questions: " + stats.getTotalQuestions();
displayText += "\nTotal Unanswered: " + stats.getTotalUnanswered();
displayText += "\nTotal Answers: " + stats.getTotalAnswers();
displayText += "\nTotal Comments: " + stats.getTotalComments();
displayText += "\nTotal Votes: " + stats.getTotalVotes();
displayText += "\nTotal Users: " + stats.getTotalUsers();
}
catch(Exception e){
displayText = e.getMessage();
}
text.setText(displayText);
About
StackWrap4J is a Java wrapper for the Stack Exchange API. It is designed to be easy to use, and intuitive to learn while providing the full functionality of the API.
License
StackWrap4J is available under the MIT license.
Download
Platform
StackWrap4J was built using Java 1.5 and tested on Sun's JVM. It should run on any implementation of the JVM (1.5 or later). It's also been tested on the Android emulator. It also runs under the Google App Engine.
Code
You can download the code from our SVN repository hosted on SourceForge.
Documentation for the code is also available on the SourceForge site.
Authors
Contact
Please feel free to leave feedback here in the Answers section or on the StackWrap4J project discussion forum.
Alternatively:
Bill is available at: lizard.bill (at) gmail.com
Justin can be reached at: jjnguy13 (at) gmail.com
Future
Currently we are focusing on adding more tests and fixing bugs. We are also working on adding serialization so that our objects can be easily persisted, and throttling so that users of our library don't have to worry about breaking the terms of use of the API.
Notes
The latest build was tested against version 1.0 of the API on July 28th.
© Stackapps or respective owner