Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

de.jsone-studios:spotify-web-api-java

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

de.jsone-studios:spotify-web-api-java

A Java wrapper for Spotify's Web API using Retrofit

  • 1.3.3
  • Source
  • Maven
  • Socket score

Version published
Maintainers
1
Source

spotify-web-api-java

Build Status Maven Central GitHub

A Java wrapper for Spotify's Web API using Retrofit

I am currently working on a new spotify-web-api-java library that is generated automatically from the Spotify Web Api documentation. Check out the new project here.

Example: Get the number of tracks of a playlist

AuthenticationProvider authProvider = ...;
SpotifyApi api = new AuthenticatedSpotifyApi(authProvider);
try {
    Playlist playlist = api.callApiAndReturnBody(
        api.getPlaylistsService().getPlaylist("spotify:playlist:37i9dQZEVXbMDoHDwVN2tF"));
    System.out.printf("Playlist %s has %s tracks\n", playlist.name, playlist.tracks.total);
}
catch (SpotifyApiException e) {
    System.err.println(e.getMessage());
}

Authentication and Authorization

All calls to the Spotify Web Api need authorization. Therefore, it is mandatory to provide the required authentication and authorization data. Spotify provides multiple authorization flows. This library provides two option for authentication and authorization:

  • The AuthenticatedSpotifyApi provides support for the authorization code flow. Therefore, only the AuthenticationProvider interface must be implemented.
  • The SpotifyWebApi provides no built in authentication or authorization, but a OkHttpClient can be provided to customize the authentication and authorization. For example a custom Interceptor can be used to add the access token to every request.

Releases

spotify-web-api-java is available on Maven Central:

Maven

<dependency>
    <groupId>de.jsone-studios</groupId>
    <artifactId>spotify-web-api-java</artifactId>
    <version>1.3.3</version>
</dependency>

Gradle

dependencies {
    compile 'de.jsone-studios:spotify-web-api-java:1.3.3'
}    

Why does the groupId not match my username?

I have changed my GitHub username from jsone-studios to sonallux after releasing this library on maven central. Because a groupId cannot be changed on maven central, I am going to stick with the old name for this library.

Deploy a new release to Maven Central

  • Update version number
  • Commit changes
  • Create signed git tag with git tag -s <tag>
  • Run mvn clean deploy -Pdeploy
  • Update version number to next SNAPSHOT version

FAQs

Package last updated on 02 Feb 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc