coverartarchive-api

Java bindings for the MusicBrainz Cover Art Archive

Лицензия

Лицензия

Группа

Группа

fm.last
Идентификатор

Идентификатор

coverartarchive-api
Последняя версия

Последняя версия

2.1.1
Дата

Дата

Тип

Тип

jar
Описание

Описание

coverartarchive-api
Java bindings for the MusicBrainz Cover Art Archive
Ссылка на сайт

Ссылка на сайт

https://github.com/lastfm/coverartarchive-api
Организация-разработчик

Организация-разработчик

Last.fm
Система контроля версий

Система контроля версий

https://github.com/lastfm/coverartarchive-api

Скачать coverartarchive-api

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/fm.last/coverartarchive-api/ -->
<dependency>
    <groupId>fm.last</groupId>
    <artifactId>coverartarchive-api</artifactId>
    <version>2.1.1</version>
</dependency>
// https://jarcasting.com/artifacts/fm.last/coverartarchive-api/
implementation 'fm.last:coverartarchive-api:2.1.1'
// https://jarcasting.com/artifacts/fm.last/coverartarchive-api/
implementation ("fm.last:coverartarchive-api:2.1.1")
'fm.last:coverartarchive-api:jar:2.1.1'
<dependency org="fm.last" name="coverartarchive-api" rev="2.1.1">
  <artifact name="coverartarchive-api" type="jar" />
</dependency>
@Grapes(
@Grab(group='fm.last', module='coverartarchive-api', version='2.1.1')
)
libraryDependencies += "fm.last" % "coverartarchive-api" % "2.1.1"
[fm.last/coverartarchive-api "2.1.1"]

Зависимости

compile (6)

Идентификатор библиотеки Тип Версия
com.google.guava : guava jar 12.0
org.apache.httpcomponents : httpclient jar 4.2.1
com.fasterxml.jackson.core : jackson-core jar 2.0.5
com.fasterxml.jackson.core : jackson-databind jar 2.0.5
org.slf4j : slf4j-api jar 1.6.6
commons-io : commons-io jar 2.4

test (4)

Идентификатор библиотеки Тип Версия
org.hamcrest : hamcrest-library jar 1.3.RC2
junit : junit jar 4.10
org.mockito : mockito-core jar 1.9.0
org.slf4j : slf4j-log4j12 jar 1.6.6

Модули Проекта

Данный проект не имеет модулей.

coverartarchive-api

Java data bindings for the Cover Art Archive.

Things to know

  • Provides access to cover art through the /release/{mbid}/ or /release-group/{mbid}/ end points.
  • The Javadoc can be generated by running mvn javadoc:javadoc.

Configuration

The recommended way of using coverartarchive-api is through Maven. Add the coverartarchive-api dependency to your project's POM:

<dependency>
  <groupId>fm.last</groupId>
  <artifactId>coverartarchive-api</artifactId>
  <version>2.1.1</version>
</dependency>

(Alternatively, a JAR file can be obtained from Maven Central: fm.last:coverartarchive-api:2.1.1)

Usage example

Get all cover art for Portishead's 'Dummy' release:

CoverArtArchiveClient client = new DefaultCoverArtArchiveClient();
UUID mbid = UUID.fromString("76df3287-6cda-33eb-8e9a-044b5e15ffdd");

CoverArt coverArt = null;
try {
  coverArt = client.getByMbid(mbid);
  if (coverArt != null) {
    for (CoverArtImage coverArtImage : coverArt.getImages()) {
      File output = new File(mbid.toString() + "_" + coverArtImage.getId() + ".jpg");
      FileUtils.copyInputStreamToFile(coverArtImage.getImage(), output);
    }
  }
} catch (Exception e) {
  // ...
}

To get all cover art for Portishead's 'Dummy' using the release-group endpoint, replace:

coverArt = client.getByMbid(mbid);

with:

coverArt = client.getReleaseGroupByMbid(mbid);

To query using HTTPs instead of plain HTTP, create the client as follows.

final boolean useHttps = true;
CoverArtArchiveClient client = new DefaultCoverArtArchiveClient(useHttps);

Note that URLs for images returned by the service may still contain insecure addresses. To detect these cases you can query the URLs for each returned image by calling CoverArtImage.getImageUrl().

Running the tests

  • Run mvn clean verify

Contributing

All contributions are welcome. Please use the Last.fm codeformatting profile found in the lastfm-oss-config project for formatting your changes.

License

Copyright 2012-2018 Last.fm

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Kthxbye

Last.fm <3 MusicBrainz

fm.last

Last.fm

Версии библиотеки

Версия
2.1.1
2.1.0
2.0.0
1.0.0