Datastore is a Java library which makes life easier when working with datastore-server.
If you are using maven, just download datastore and then run:
mvn install
Then just add maven dependency, if you are running it on desktop:
<dependency>
<groupId>com.gemserk.datastore</groupId>
<artifactId>datastore-desktop</artifactId>
<version>${datastore.version}</version> <!-- the version you want of datastore -->
</dependency>
Or add tne next dependency if you are running it on Android:
<dependency>
<groupId>com.gemserk.datastore</groupId>
<artifactId>datastore-android</artifactId>
<version>${datastore.version}</version> <!-- the version you want of datastore -->
</dependency>
If you don't use maven on your projects, just run:
mvn dependency:copy-dependencies
to download all dependencies of the project and add all of them to yours to make datastore to work correctly.
String gameKey = "..."; // your game key
String appUrl = "http://yourapplicationid.appspot.com"; // the url of the datastore-server instance
Scores scores = new ScoresHttpImpl(gameKey, appUrl);
Profiles profiles = new ProfilesHttpImpl(appUrl);
boolean guest = true;
Profile profile = profiles.register("new player", guest);
Score score = new Score(...);
scores.submit(profile.getPrivatekey(), score);
Set<String> tags = new HashSet<String>();
Collection<Score> dailyScores = scores.getOrderedByPoints(tags, 20, false, Range.Day);
That's all for now, explore the API by yourself and feel free to suggest enhancements or bugs on Issues page.