private final Collection<Track> getTracks(final String continuationToken)
throws IOException, URISyntaxException
{
final Collection<Track> chunkedCollection = new ArrayList<Track>();
final TrackFeed chunk = deserializer.deserialize(
client.dispatchPost(new URI(
HTTPS_WWW_GOOGLEAPIS_COM_SJ_V1BETA1_TRACKFEED),
"{\"start-token\":\"" + continuationToken + "\"}"),
TrackFeed.class);
chunkedCollection.addAll(chunk.getData().getItems());
if (!Strings.isNullOrEmpty(chunk.getNextPageToken()))
{
chunkedCollection.addAll(getTracks(chunk.getNextPageToken()));
}
return chunkedCollection;
}