
Security News
npm Adopts OIDC for Trusted Publishing in CI/CD Workflows
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
de.jsone-studios:spotify-web-api-java
Advanced tools
A Java wrapper for Spotify's Web API using Retrofit
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.
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());
}
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:
AuthenticatedSpotifyApi
provides support for the authorization code flow. Therefore, only the
AuthenticationProvider
interface must be implemented.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.spotify-web-api-java
is available on Maven Central:
<dependency>
<groupId>de.jsone-studios</groupId>
<artifactId>spotify-web-api-java</artifactId>
<version>1.3.3</version>
</dependency>
dependencies {
compile 'de.jsone-studios:spotify-web-api-java:1.3.3'
}
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.
git tag -s <tag>
mvn clean deploy -Pdeploy
FAQs
A Java wrapper for Spotify's Web API using Retrofit
We found that de.jsone-studios:spotify-web-api-java demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
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.
Security News
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.