Search in sources :

Example 1 with UserCollection

use of org.musicbrainz.android.api.data.UserCollection in project musicbrainz-android by jdamcd.

the class MusicBrainzWebClient method lookupCollection.

@Override
public UserCollection lookupCollection(String mbid) throws IOException {
    HttpEntity entity = get(QueryBuilder.collectionLookup(mbid));
    UserCollection collection = responseParser.parseCollectionLookup(entity.getContent());
    entity.consumeContent();
    return collection;
}
Also used : HttpEntity(org.apache.http.HttpEntity) UserCollection(org.musicbrainz.android.api.data.UserCollection)

Example 2 with UserCollection

use of org.musicbrainz.android.api.data.UserCollection in project musicbrainz-android by jdamcd.

the class CollectionFragment method handleResult.

private void handleResult(AsyncResult<UserCollection> result) {
    switch(result.getStatus()) {
        case SUCCESS:
            UserCollection collection = result.getData();
            setListAdapter(new ReleaseInfoAdapter(getActivity(), R.layout.list_collection_release, collection.getReleases()));
            break;
        case EXCEPTION:
            showConnectionErrorWarning();
    }
}
Also used : UserCollection(org.musicbrainz.android.api.data.UserCollection) ReleaseInfoAdapter(org.musicbrainz.mobile.adapter.list.ReleaseInfoAdapter)

Aggregations

UserCollection (org.musicbrainz.android.api.data.UserCollection)2 HttpEntity (org.apache.http.HttpEntity)1 ReleaseInfoAdapter (org.musicbrainz.mobile.adapter.list.ReleaseInfoAdapter)1