Package gmusic.api.skyjam.model

Examples of gmusic.api.skyjam.model.TrackFeed


    @Override
    public Collection<Track> getAllTracks() throws IOException,
            URISyntaxException
    {
        final Collection<Track> chunkedCollection = new ArrayList<Track>();
        final TrackFeed chunk = deserializer.deserialize(
                client.dispatchGet(new URI(
                        HTTPS_WWW_GOOGLEAPIS_COM_SJ_V1BETA1_TRACKS)),
                TrackFeed.class);
        chunkedCollection.addAll(chunk.getData().getItems());
        chunkedCollection.addAll(getTracks(chunk.getNextPageToken()));
        return chunkedCollection;
    }
View Full Code Here


    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;
    }
View Full Code Here

TOP

Related Classes of gmusic.api.skyjam.model.TrackFeed

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.