Skip to content

Commit

Permalink
feat(playlist): parse collaborative field
Browse files Browse the repository at this point in the history
  • Loading branch information
streambinder committed Jul 14, 2023
1 parent 1d6a61e commit 3030861
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
9 changes: 5 additions & 4 deletions entity/playlist/playlist.go
Expand Up @@ -8,10 +8,11 @@ import (
)

type Playlist struct {
ID string
Name string
Owner string
Tracks []*entity.Track
ID string
Name string
Owner string
Collaborative bool
Tracks []*entity.Track
}

func (entity Playlist) Encoder(encoding string) (playlistEncoder, error) {
Expand Down
7 changes: 4 additions & 3 deletions spotify/playlist.go
Expand Up @@ -15,9 +15,10 @@ const (

func playlistEntity(fullPlaylist *spotify.FullPlaylist) *playlist.Playlist {
return &playlist.Playlist{
ID: fullPlaylist.ID.String(),
Name: fullPlaylist.Name,
Owner: fullPlaylist.Owner.ID,
ID: fullPlaylist.ID.String(),
Name: fullPlaylist.Name,
Owner: fullPlaylist.Owner.ID,
Collaborative: fullPlaylist.Collaborative,
}
}

Expand Down

0 comments on commit 3030861

Please sign in to comment.