spotify-web-api-java

A Java wrapper for Spotify's Web API using Retrofit

Лицензия

Лицензия

Категории

Категории

Java Языки программирования JSON Данные
Группа

Группа

de.jsone-studios
Идентификатор

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

spotify-web-api-java
Последняя версия

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

1.3.3
Дата

Дата

Тип

Тип

jar
Описание

Описание

spotify-web-api-java
A Java wrapper for Spotify's Web API using Retrofit
Ссылка на сайт

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

https://github.com/sonallux/spotify-web-api-java
Система контроля версий

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

https://github.com/sonallux/spotify-web-api-java

Скачать spotify-web-api-java

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

<!-- https://jarcasting.com/artifacts/de.jsone-studios/spotify-web-api-java/ -->
<dependency>
    <groupId>de.jsone-studios</groupId>
    <artifactId>spotify-web-api-java</artifactId>
    <version>1.3.3</version>
</dependency>
// https://jarcasting.com/artifacts/de.jsone-studios/spotify-web-api-java/
implementation 'de.jsone-studios:spotify-web-api-java:1.3.3'
// https://jarcasting.com/artifacts/de.jsone-studios/spotify-web-api-java/
implementation ("de.jsone-studios:spotify-web-api-java:1.3.3")
'de.jsone-studios:spotify-web-api-java:jar:1.3.3'
<dependency org="de.jsone-studios" name="spotify-web-api-java" rev="1.3.3">
  <artifact name="spotify-web-api-java" type="jar" />
</dependency>
@Grapes(
@Grab(group='de.jsone-studios', module='spotify-web-api-java', version='1.3.3')
)
libraryDependencies += "de.jsone-studios" % "spotify-web-api-java" % "1.3.3"
[de.jsone-studios/spotify-web-api-java "1.3.3"]

Зависимости

compile (2)

Идентификатор библиотеки Тип Версия
com.squareup.retrofit2 : retrofit jar 2.9.0
com.squareup.retrofit2 : converter-jackson jar 2.9.0

test (3)

Идентификатор библиотеки Тип Версия
org.junit.jupiter : junit-jupiter jar 5.7.0
org.mockito : mockito-junit-jupiter jar 3.7.7
com.squareup.okhttp3 : mockwebserver jar 3.14.9

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

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

spotify-web-api-java

Build Maven Central GitHub

A Java wrapper for Spotify's Web API.

This is the 2.x.x version of the spotify-web-api-java library. The 1.x.x version can be found on the master branch

Installation

This library is available on Maven Central and requires at least Java 11.

With maven

<dependency>
  <groupId>de.sonallux.spotify</groupId>
  <artifactId>spotify-web-api-java</artifactId>
  <version>2.1.0</version>
</dependency>

With gradle

compile 'de.sonallux.spotify:spotify-web-api-java:2.1.0'

General usage

var authProvider = new SimpleApiAuthorizationProvider("<your access token>");
var spotifyApi = SpotifyWebApi.builder().authorization(authProvider).build();

var artist = spotifyApi.getArtistsApi().getArtist("<artist id>").build().execute();
System.out.println(artist.getName());

Authorization

Spotify's web API supports different authorization flows. All flows require that your application is registered on the Spotify Developer Dashboard. You can find more details on how to register your app here. After successful registration you can use one of the following authorization flows with the spotify-web-api-java:

Authorization code flow

Code example: AuthorizationCodeExample.java

Authorization code flow with proof key for code exchange (PKCE)

Code example: AuthorizationCodePKCEExample.java

Implicit grant

Code example: ImplicitGrantExample.java

Client credentials flow

Code example: ClientCredentialsExample.java

How to release a new version

  1. Update the version number with ./mvnw versions:set -DnewVersion="<version>" -DgenerateBackupPoms=false
  2. Update version in CHANGELOG.md and README.md
  3. Commit and push changes to GitHub
  4. Wait till CI is green
  5. Tag and push the commit created in step 1. A GitHub actions workflow will automatically deploy the artifacts to Maven Central.

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

Версия
1.3.3
1.3.2
1.3.1
1.3.0
1.2.0