shared
Toggle table of contents
2.0.0
common
Platform filter
common
Switch theme
Search in API
shared
shared
/
com.nubasu.spotify.webapi.wrapper.response.common
/
SpotifyResult
Spotify
Result
sealed
interface
SpotifyResult
<
out
T
>
Inheritors
Success
Failure
Members
Members & Extensions
Types
Failure
Link copied to clipboard
data
class
Failure
(
val
error
:
SpotifyFailure
)
:
SpotifyResult
<
Nothing
>
Success
Link copied to clipboard
data
class
Success
<
out
T
>
(
val
value
:
T
,
val
statusCode
:
Int
,
val
headers
:
Map
<
String
,
String
>
=
emptyMap()
)
:
SpotifyResult
<
T
>
Properties
is
Success
Link copied to clipboard
val
SpotifyResult
<
*
>
.
isSuccess
:
Boolean
status
Code
Link copied to clipboard
val
SpotifyResult
<
*
>
.
statusCode
:
Int
?
Functions
failure
Or
Null
Link copied to clipboard
fun
SpotifyResult
<
*
>
.
failureOrNull
(
)
:
SpotifyFailure
?
fold
Link copied to clipboard
inline
fun
<
T
,
R
>
SpotifyResult
<
T
>
.
fold
(
onSuccess
:
(
T
)
->
R
,
onFailure
:
(
SpotifyFailure
)
->
R
)
:
R
get
Or
Null
Link copied to clipboard
fun
<
T
>
SpotifyResult
<
T
>
.
getOrNull
(
)
:
T
?
get
Or
Throw
Link copied to clipboard
fun
<
T
>
SpotifyResult
<
T
>
.
getOrThrow
(
)
:
T
header
Link copied to clipboard
fun
SpotifyResult
<
*
>
.
header
(
name
:
String
)
:
String
?
on
Failure
Link copied to clipboard
inline
fun
<
T
>
SpotifyResult
<
T
>
.
onFailure
(
block
:
(
SpotifyFailure
)
->
Unit
)
:
SpotifyResult
<
T
>
on
Success
Link copied to clipboard
inline
fun
<
T
>
SpotifyResult
<
T
>
.
onSuccess
(
block
:
(
T
)
->
Unit
)
:
SpotifyResult
<
T
>