Package org.hihn.listenbrainz
Class LbMetadataApi
java.lang.Object
org.hihn.listenbrainz.LbMetadataApi
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclass
class
class
class
class
class
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionartistMetadata
(List<UUID> artistMbids, String inc) This endpoint takes in a list of artist_mbids and returns an array of dicts that contain recording metadata suitable for showing in a context that requires as much detail about a recording and the artist.int
getManualMapping
(UUID recordingMsid) Get the manual mapping of a recording messybrainz ID that a user added.This endpoint looks up mbid metadata for the given artist, recording and optionally a release name.recordingMetadata
(List<UUID> recordingMbids, String inc) This endpoint takes in a list of recording_mbids and returns an array of dicts that contain recording metadata suitable for showing in a context that requires as much detail about a recording and the artist.releaseGroupMetadata
(List<UUID> releaseGroupMbids, String inc) This endpoint takes in a list of release_group_mbids and returns an array of dicts that contain release_group metadata suitable for showing in a context that requires as much detail about a release_group and the artist.void
setApiClient
(ApiClient apiClient) void
setCustomBaseUrl
(String customBaseUrl) void
setHostIndex
(int hostIndex) submitManualMapping
(SubmitManualMapping submitManualMapping) Submit a manual mapping of a recording messybrainz ID to a musicbrainz recording id.
-
Constructor Details
-
LbMetadataApi
public LbMetadataApi() -
LbMetadataApi
-
-
Method Details
-
getApiClient
-
setApiClient
-
getHostIndex
public int getHostIndex() -
setHostIndex
public void setHostIndex(int hostIndex) -
getCustomBaseUrl
-
setCustomBaseUrl
-
artistMetadata
This endpoint takes in a list of artist_mbids and returns an array of dicts that contain recording metadata suitable for showing in a context that requires as much detail about a recording and the artist. Using the inc parameter, you can control which portions of metadata to fetch.- Parameters:
artistMbids
- A comma separated list of recording_mbids. (required)inc
- A space separated list of “artist”, “tag” and/or “release” to indicate which portions of metadata you're interested in fetching. We encourage users to only fetch the data they plan to consume. (required)- Returns:
- APIartistMetadataRequest
- Http Response Details:
Status Code Description Response Headers 200 Yay, you have data! - 400 Invalid arguments. -
-
getManualMapping
Get the manual mapping of a recording messybrainz ID that a user added.- Parameters:
recordingMsid
- (required)- Returns:
- APIgetManualMappingRequest
- Http Response Details:
Status Code Description Response Headers 200 Yay, you have data! - 404 No such mapping for this user/recording msid. -
-
lookup
public LbMetadataApi.APIlookupRequest lookup(String artistName, String recordingName, Boolean metadata, String inc) This endpoint looks up mbid metadata for the given artist, recording and optionally a release name. The total number of characters in the artist name, recording name and release name query arguments should be less than or equal to MAX_MAPPING_QUERY_LENGTH.- Parameters:
artistName
- Artist name of the listen. (required)recordingName
- Track name of the listen. (required)metadata
- Should extra metadata be also returned if a match is found, see /metadata/recording for details. (required)inc
- A space separated list of “artist”, “tag” and/or “release” to indicate which portions of metadata you're interested in fetching. We encourage users to only fetch the data they plan to consume. (required)- Returns:
- APIlookupRequest
- Http Response Details:
Status Code Description Response Headers 200 Yay, you have data! - 400 Invalid arguments. -
-
recordingMetadata
public LbMetadataApi.APIrecordingMetadataRequest recordingMetadata(List<UUID> recordingMbids, String inc) This endpoint takes in a list of recording_mbids and returns an array of dicts that contain recording metadata suitable for showing in a context that requires as much detail about a recording and the artist. Using the inc parameter, you can control which portions of metadata to fetch.- Parameters:
recordingMbids
- A comma separated list of recording_mbids. (required)inc
- A space separated list of “artist”, “tag” and/or “release” to indicate which portions of metadata you're interested in fetching. We encourage users to only fetch the data they plan to consume. (required)- Returns:
- APIrecordingMetadataRequest
- Http Response Details:
Status Code Description Response Headers 200 Yay, you have data! - 400 Invalid query parameters, see error message for details. - 404 The requested user was not found. -
-
releaseGroupMetadata
public LbMetadataApi.APIreleaseGroupMetadataRequest releaseGroupMetadata(List<UUID> releaseGroupMbids, String inc) This endpoint takes in a list of release_group_mbids and returns an array of dicts that contain release_group metadata suitable for showing in a context that requires as much detail about a release_group and the artist. Using the inc parameter, you can control which portions of metadata to fetch.- Parameters:
releaseGroupMbids
- A comma separated list of release_group_mbids. (required)inc
- A space separated list of “artist”, “tag” and/or “release” to indicate which portions of metadata you're interested in fetching. We encourage users to only fetch the data they plan to consume. (required)- Returns:
- APIreleaseGroupMetadataRequest
- Http Response Details:
Status Code Description Response Headers 200 Yay, you have data! - 400 Invalid query parameters, see error message for details. -
-
submitManualMapping
public LbMetadataApi.APIsubmitManualMappingRequest submitManualMapping(SubmitManualMapping submitManualMapping) Submit a manual mapping of a recording messybrainz ID to a musicbrainz recording id.- Parameters:
submitManualMapping
- (required)- Returns:
- APIsubmitManualMappingRequest
- Http Response Details:
Status Code Description Response Headers 200 Listen(s) accepted. - 400 Invalid JSON sent. - 401 Invalid authorization. -
-