use of org.apache.http.HttpEntity 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;
}
use of org.apache.http.HttpEntity in project musicbrainz-android by jdamcd.
the class MusicBrainzWebClient method lookupUserData.
@Override
public UserData lookupUserData(Entity entityType, String mbid) throws IOException {
HttpEntity entity = get(QueryBuilder.userData(entityType, mbid));
UserData userData = responseParser.parseUserData(entity.getContent());
entity.consumeContent();
return userData;
}
use of org.apache.http.HttpEntity in project musicbrainz-android by jdamcd.
the class MusicBrainzWebClient method lookupRating.
@Override
public float lookupRating(Entity type, String mbid) throws IOException {
HttpEntity entity = get(QueryBuilder.ratingLookup(type, mbid));
float rating = responseParser.parseRatingLookup(entity.getContent());
entity.consumeContent();
return rating;
}
use of org.apache.http.HttpEntity in project musicbrainz-android by jdamcd.
the class MusicBrainzWebClient method searchLabel.
@Override
public LinkedList<LabelSearchResult> searchLabel(String searchTerm) throws IOException {
HttpEntity entity = get(QueryBuilder.labelSearch(searchTerm));
LinkedList<LabelSearchResult> labels = responseParser.parseLabelSearch(entity.getContent());
entity.consumeContent();
return labels;
}
use of org.apache.http.HttpEntity in project musicbrainz-android by jdamcd.
the class MusicBrainzWebClient method lookupArtist.
@Override
public Artist lookupArtist(String mbid) throws IOException {
HttpEntity entity = get(QueryBuilder.artistLookup(mbid));
Artist artist = responseParser.parseArtist(entity.getContent());
entity.consumeContent();
artist.setReleaseGroups(browseArtistReleaseGroups(mbid));
return artist;
}
Aggregations