Skip to content

Commit 26424ee

Browse files
committed
Update documentation
1 parent 5e04c92 commit 26424ee

File tree

3 files changed

+30
-5
lines changed

3 files changed

+30
-5
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ This monorepo contains tools for parsing the [Spotify Web API Reference](https:/
2323

2424

2525
## Versioning
26-
Unfortunately Spotify does not provide any version information with their web API reference documentation. Therefore, I try to follow [semantic versioning](https://semver.org) when releasing new versions. But keep in mind that Spotify can update their Web API endpoints at any time, so it is best to always use the latest major version of these libraries. Only updating to a newer patch or minor release even if there is a new major release might be less work for you, but it also imposes to risk of running into issues because Spotify has made a breaking change to their Web API.
26+
Unfortunately Spotify does not provide any version information with their web API reference documentation. Therefore, I try to follow [semantic versioning](https://semver.org) when releasing new versions. But keep in mind that Spotify can update their Web API endpoints at any time so that your code can potentially break. Therefore, it is best to always use the very latest version of these libraries. Not updating does always impose the risk of running into issues because Spotify has made a breaking change to their Web API.
2727

2828
## Disclaimer
2929
Because the wrappers are only based on the Spotify web API reference, there might be difference to the actual behaviour of the actual Spotify Web API endpoints. Also, neither do I have any connections to Spotify nor am I an employee at Spotify.

spotify-web-api-java/CHANGELOG.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Changelog
2+
All notable changes to this project will be documented in this file.
3+
4+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5+
and this project tries to follow [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6+
See [here](https://github.com/sonallux/spotify-web-api#versioning) why we can not guarantee strict semantic versioning.
7+
8+
## [Unreleased]
9+
Complete rewrite of the library by generating the model and endpoints from the Spotify reference documentation. This results in a lot of breaking changes around naming of objects, properties, endpoints and parameters. Other notable changes:
10+
11+
- Renamed the maven groupId from `de.jsone-studios` to `de.sonallux.spotify`
12+
- Renamed package from `de.jsone_studios.wrapper.spotify` to `de.sonallux.spotify.api`
13+
- Removed `SpotifyApi` interface in favour of a `SpotifyWebApi`
14+
- `SpotifyWebApi` uses the builder pattern to create an instance
15+
- Replaced [retrofit](https://square.github.io/retrofit) by a custom wrapper around [OkHttp](https://square.github.io/okhttp)
16+
- Requests are now created with a builder style api for optional parameters. For example:
17+
```java
18+
ApiCall<?> call1 = spotifyWebApi.getXApi().getX("requiredParam").build();
19+
ApiCall<?> call2 = spotifyWebApi.getXApi().getX("requiredParam").optionalParam1("Y").build();
20+
```
21+
- Removed `SpotifyApi.callApi()` in favour of an `executeCall()` method on the new `ApiCall` class
22+
- Removed `SpotifyApi.callApiAndReturnBody()` in favour of an `execute()` method on the new `ApiCall` class
23+
- Added support for all authorization flows. See [here](https://github.com/sonallux/spotify-web-api/tree/master/spotify-web-api-java#authorization) for more details.
24+
25+
## [1.x.x]
26+
The changelog of the `1.x.x` version of the `spotify-web-api-java` can be found [here](https://github.com/sonallux/spotify-web-api-java/blob/master/CHANGELOG.md).

spotify-web-api-java/README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,10 @@ compile 'de.sonallux.spotify:spotify-web-api-java:2.0.0'
2121

2222
## General usage
2323
```java
24-
ApiAuthorizationProvider authProvider = new SimpleApiAuthorizationProvider("<your access token>");
25-
SpotifyApi spotifyApi = new SpotifyApi(authProvider);
24+
var authProvider = new SimpleApiAuthorizationProvider("<your access token>");
25+
var spotifyApi = SpotifyWebApi.builder().authorization(authProvider).build();
2626

27-
Call<Artist> getArtistCall = spotifyApi.getArtistsApi().getArtist("<artist id>");
28-
Artist artist = spotifyApi.callApiAndReturnBody(getArtistCall);
27+
var artist = spotifyApi.getArtistsApi().getArtist("<artist id>").build().execute();
2928
System.out.println(artist.getName());
3029
```
3130

0 commit comments

Comments
 (0)