Skip to content

Commit 5fb43e0

Browse files
committed
run ktlint, update version
Signed-off-by: Adam Ratzman <adam@adamratzman.com>
1 parent 858b597 commit 5fb43e0

File tree

14 files changed

+43
-40
lines changed

14 files changed

+43
-40
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ This library is available via Maven Central.
1515
<dependency>
1616
<groupId>com.adamratzman</groupId>
1717
<artifactId>spotify-api-kotlin</artifactId>
18-
<version>2.0.1</version>
18+
<version>2.1.0</version>
1919
</dependency>
2020
```
2121

2222
### Gradle
2323
```
24-
compile group: 'com.adamratzman', name: 'spotify-api-kotlin', version: '2.0.1'
24+
compile group: 'com.adamratzman', name: 'spotify-api-kotlin', version: '2.1.0'
2525
```
2626

2727
To use the latest snapshot instead, you must add the Jitpack repository

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ plugins {
1818
apply plugin: 'kotlin'
1919

2020
group 'com.adamratzman'
21-
version '2.0.1'
21+
version '2.1.0'
2222

2323
archivesBaseName = 'spotify-api-kotlin'
2424

src/main/kotlin/com/adamratzman/spotify/endpoints/client/ClientFollowingAPI.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ class ClientFollowingAPI(api: SpotifyAPI) : FollowingAPI(api) {
109109
fun getFollowedArtists(
110110
limit: Int? = null,
111111
after: String? = null
112-
): SpotifyRestActionPaging<Artist,CursorBasedPagingObject<Artist>> {
112+
): SpotifyRestActionPaging<Artist, CursorBasedPagingObject<Artist>> {
113113
return toActionPaging(Supplier {
114114
get(
115115
EndpointBuilder("/me/following").with("type", "artist").with("limit", limit).with(

src/main/kotlin/com/adamratzman/spotify/endpoints/client/ClientLibraryAPI.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class ClientLibraryAPI(api: SpotifyAPI) : SpotifyEndpoint(api) {
3030
limit: Int? = null,
3131
offset: Int? = null,
3232
market: Market? = null
33-
): SpotifyRestActionPaging<SavedTrack,PagingObject<SavedTrack>> {
33+
): SpotifyRestActionPaging<SavedTrack, PagingObject<SavedTrack>> {
3434
return toActionPaging(Supplier {
3535
get(
3636
EndpointBuilder("/me/tracks").with("limit", limit).with("offset", offset).with("market", market?.code)
@@ -48,7 +48,7 @@ class ClientLibraryAPI(api: SpotifyAPI) : SpotifyEndpoint(api) {
4848
limit: Int? = null,
4949
offset: Int? = null,
5050
market: Market? = null
51-
): SpotifyRestActionPaging<SavedAlbum,PagingObject<SavedAlbum>> {
51+
): SpotifyRestActionPaging<SavedAlbum, PagingObject<SavedAlbum>> {
5252
return toActionPaging(Supplier {
5353
get(
5454
EndpointBuilder("/me/albums").with("limit", limit).with("offset", offset).with("market", market?.code)

src/main/kotlin/com/adamratzman/spotify/endpoints/client/ClientPersonalizationAPI.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ class ClientPersonalizationAPI(api: SpotifyAPI) : SpotifyEndpoint(api) {
6363
limit: Int? = null,
6464
offset: Int? = null,
6565
timeRange: TimeRange? = null
66-
): SpotifyRestActionPaging<Track,PagingObject<Track>> {
66+
): SpotifyRestActionPaging<Track, PagingObject<Track>> {
6767
return toActionPaging(Supplier {
6868
get(
6969
EndpointBuilder("/me/top/tracks").with("limit", limit).with("offset", offset)

src/main/kotlin/com/adamratzman/spotify/endpoints/public/PlaylistsAPI.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ open class PlaylistsAPI(api: SpotifyAPI) : SpotifyEndpoint(api) {
4444
user: String,
4545
limit: Int? = null,
4646
offset: Int? = null
47-
): SpotifyRestActionPaging<SimplePlaylist,PagingObject<SimplePlaylist>> {
47+
): SpotifyRestActionPaging<SimplePlaylist, PagingObject<SimplePlaylist>> {
4848
return toActionPaging(Supplier {
4949
get(
5050
EndpointBuilder("/users/${UserURI(user).id.encode()}/playlists").with("limit", limit).with(

src/main/kotlin/com/adamratzman/spotify/main/SpotifyRestAction.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ open class SpotifyRestAction<T>(protected val api: SpotifyAPI, private val suppl
4242
override fun toString() = complete().toString()
4343
}
4444

45-
class SpotifyRestActionPaging<Z, T:AbstractPagingObject<Z>>(api: SpotifyAPI, supplier: Supplier<T>) :
45+
class SpotifyRestActionPaging<Z, T : AbstractPagingObject<Z>>(api: SpotifyAPI, supplier: Supplier<T>) :
4646
SpotifyRestAction<T>(api, supplier) {
4747
fun getAll() = api.tracks.toAction(Supplier { complete().getAllImpl() })
4848
fun getAllItems() = api.tracks.toAction(Supplier { complete().getAllImpl().toList().map { it.items }.flatten() })

src/main/kotlin/com/adamratzman/spotify/utils/AuthObjects.kt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@ package com.adamratzman.spotify.utils
33

44
import com.adamratzman.spotify.main.SpotifyScope
55

6-
76
data class Token(
8-
val access_token: String, val token_type: String, val expires_in: Int,
9-
val refresh_token: String? = null, val scope: String?
7+
val access_token: String,
8+
val token_type: String,
9+
val expires_in: Int,
10+
val refresh_token: String? = null,
11+
val scope: String?
1012
) {
1113
fun getScopes(): List<SpotifyScope> {
1214
val scopes = mutableListOf<SpotifyScope>()
@@ -17,7 +19,6 @@ data class Token(
1719
}
1820
}
1921

20-
2122
data class ErrorResponse(val error: ErrorObject)
2223

2324
data class ErrorObject(val status: Int, val message: String)

src/main/kotlin/com/adamratzman/spotify/utils/Endpoints.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ abstract class SpotifyEndpoint(val api: SpotifyAPI) {
113113
)
114114

115115
fun <T> toAction(supplier: Supplier<T>) = SpotifyRestAction(api, supplier)
116-
fun <Z, T:AbstractPagingObject<Z>> toActionPaging(supplier: Supplier<T>) = SpotifyRestActionPaging(api, supplier)
116+
fun <Z, T : AbstractPagingObject<Z>> toActionPaging(supplier: Supplier<T>) = SpotifyRestActionPaging(api, supplier)
117117
}
118118

119119
internal class EndpointBuilder(private val path: String) {

src/main/kotlin/com/adamratzman/spotify/utils/Helpers.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
/* Created by Adam Ratzman (2018) */
2-
32
package com.adamratzman.spotify.utils
43

54
import com.adamratzman.spotify.main.SpotifyAPI

0 commit comments

Comments
 (0)