use of org.musicbrainz.android.api.data.UserData in project musicbrainz-android by jdamcd.
the class ArtistLoader method getArtistWithUserData.
private AsyncEntityResult<Artist> getArtistWithUserData() throws IOException {
Artist artist = client.lookupArtist(mbid);
UserData userData = client.lookupUserData(Entity.ARTIST, mbid);
data = new AsyncEntityResult<Artist>(LoaderStatus.SUCCESS, artist, userData);
return data;
}
use of org.musicbrainz.android.api.data.UserData 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.musicbrainz.android.api.data.UserData in project musicbrainz-android by jdamcd.
the class ReleaseLoader method getReleaseWithUserData.
private AsyncEntityResult<Release> getReleaseWithUserData() throws IOException {
Release release = client.lookupRelease(mbid);
UserData userData = client.lookupUserData(Entity.RELEASE_GROUP, release.getReleaseGroupMbid());
data = new AsyncEntityResult<Release>(LoaderStatus.SUCCESS, release, userData);
return data;
}
use of org.musicbrainz.android.api.data.UserData in project musicbrainz-android by jdamcd.
the class EditFragment method update.
@Override
public void update(Object entity) {
if (App.isUserLoggedIn()) {
UserData userData = getContract().getUserData();
tagInput.setText(StringFormat.commaSeparate(userData.getTags()));
ratingInput.setRating(userData.getRating());
} else {
disableEditViews();
getView().findViewById(R.id.login_warning).setVisibility(View.VISIBLE);
}
}
use of org.musicbrainz.android.api.data.UserData in project musicbrainz-android by jdamcd.
the class BarcodeReleaseLoader method getReleaseWithUserData.
private AsyncEntityResult<Release> getReleaseWithUserData() throws IOException {
Release release = client.lookupReleaseUsingBarcode(barcode);
UserData userData = client.lookupUserData(Entity.RELEASE_GROUP, release.getReleaseGroupMbid());
data = new AsyncEntityResult<Release>(LoaderStatus.SUCCESS, release, userData);
return data;
}
Aggregations