Skip to content

Commit cb4c4af

Browse files
committed
add scope references in kdocs
1 parent 1f86c1c commit cb4c4af

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

src/commonMain/kotlin/com.adamratzman.spotify/endpoints/public/SearchApi.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import com.adamratzman.spotify.models.serialization.toPagingObject
2121
import com.adamratzman.spotify.utils.Market
2222
import kotlinx.serialization.json.JsonObject
2323
import kotlinx.serialization.serializer
24+
import com.adamratzman.spotify.SpotifyScope
2425

2526
@Deprecated("Endpoint name has been updated for kotlin convention consistency", ReplaceWith("SearchApi"))
2627
typealias SearchAPI = SearchApi
@@ -100,7 +101,7 @@ class SearchApi(api: SpotifyApi<*, *>) : SpotifyEndpoint(api) {
100101
* @param market If a country code is specified, only artists, albums, and tracks with content that is playable in that market is returned. Note:
101102
- Playlist results are not affected by the market parameter.
102103
- If market is set to from_token, and a valid access token is specified in the request header, only content playable in the country associated with the user account, is returned.
103-
- Users can view the country that is associated with their account in the account settings. A user must grant access to the user-read-private scope prior to when the access token is issued.
104+
- Users can view the country that is associated with their account in the account settings. A user must grant access to the [SpotifyScope.USER_READ_PRIVATE] scope prior to when the access token is issued.
104105
* @param includeExternal If true, the response will include any relevant audio content that is hosted externally. By default external content is filtered out from responses.
105106
*/
106107
fun search(

src/commonMain/kotlin/com.adamratzman.spotify/models/Users.kt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,28 @@
11
/* Spotify Web API, Kotlin Wrapper; MIT License, 2017-2020; Original author: Adam Ratzman */
22
package com.adamratzman.spotify.models
33

4+
import com.adamratzman.spotify.SpotifyScope
45
import kotlinx.serialization.SerialName
56
import kotlinx.serialization.Serializable
67

78
/**
89
* Private information about a Spotify user. Each field may require a specific scope.
910
*
1011
* @property birthdate The user’s date-of-birth. This field is only available when the current user
11-
* has granted access to the user-read-birthdate scope.
12+
* has granted access to the [SpotifyScope.USER_READ_BIRTHDATE] scope.
1213
* @property country The country of the user, as set in the user’s account profile. An ISO 3166-1 alpha-2
13-
* country code. This field is only available when the current user has granted access to the user-read-private scope.
14+
* country code. This field is only available when the current user has granted access to the [SpotifyScope.USER_READ_PRIVATE] scope.
1415
* @property displayName The name displayed on the user’s profile. null if not available.
1516
* @property email The user’s email address, as entered by the user when creating their account. Important! This email
1617
* address is unverified; there is no proof that it actually belongs to the user. This field is only
17-
* available when the current user has granted access to the user-read-email scope.
18+
* available when the current user has granted access to the [SpotifyScope.USER_READ_EMAIL] scope.
1819
* @property followers Information about the followers of the user.
1920
* @property href A link to the Web API endpoint for this user.
2021
* @property id The Spotify user ID for the user
2122
* @property images The user’s profile image.
2223
* @property product The user’s Spotify subscription level: “premium”, “free”, etc.
2324
* (The subscription level “open” can be considered the same as “free”.) This field is only available when the
24-
* current user has granted access to the user-read-private scope.
25+
* current user has granted access to the [SpotifyScope.USER_READ_PRIVATE] scope.
2526
* @property type The object type: “user”
2627
*/
2728
@Serializable

0 commit comments

Comments
 (0)