Playlist¶
Router¶
-
class
Playlists
()¶ Router for playlist lists page, includes new playlist page
Playlists List¶
-
class
PlaylistsView
(props)¶ Top-level object for hosting playlist card grid with new/run all buttons
Trigger loading playlist data during init
- Arguments
props (*) – Component properties
-
PlaylistsView.
getPlaylists
()¶ Get playlist data from API and set state with results
-
PlaylistsView.
handleDeletePlaylist
(name, event)¶ Post delete playlist action to API
- Arguments
name (*) – Playlist name to delete
event (*) – Event data
-
PlaylistsView.
handleRunAll
(event)¶ Post run all playlists action to API
- Arguments
event (*) – Event data
-
PlaylistsView.
handleRunPlaylist
(name, event)¶ Post run playlist action to API
- Arguments
name (*) – Playlist name to run
event (*) – Event data
-
class
PlaylistGrid
(props)¶ Playlist grid component for new/run all buttons and playlist cards
- Arguments
props (*) – Component properties
- Returns
Grid component
-
class
PlaylistCard
(props)¶ Playlist card component with view/run/delete buttons
- Arguments
props (*) – Component properties
- Returns
Playlist card component
-
getPlaylistLink
(playlistName)¶ Get URL for playlist given name
- Arguments
playlistName (*) – Subject playlist name
- Returns
URL string
New Playlist Card¶
-
class
NewPlaylist
(props)¶ New playlist card
-
NewPlaylist.
componentDidMount
()¶ Set initial state of playlist type description
-
NewPlaylist.
handleInputChange
(event)¶ Handle input changes by setting state
- Arguments
event (*) –
-
NewPlaylist.
handleSubmit
(event)¶ Validate input and make new playlist API request
- Arguments
event (*) –
-
NewPlaylist.
setDescription
(value)¶ Set playlist type description
- Arguments
value (*) – Playlist type string to match
-
Playlist Router¶
Playlist View¶
-
class
Edit
()¶ Main view/edit card for playlists
-
Edit.
Edit
¶
-
Edit.
componentDidMount
()¶ Get playlist info and all playlists from API, sort and set state
-
Edit.
getPlaylistInfo
()¶ Get API playlist info request
- Returns
Playlist info request
-
Edit.
getPlaylists
()¶ Get API list of playlist infos request
- Returns
Playlists info request
-
Edit.
handleAddPart
(event)¶ Handle adding new watched Spotify playlist name string
- Arguments
event (*) – Event data
-
Edit.
handleAddReference
(event)¶ Handle adding new watched music tools playlist reference
- Arguments
event (*) – Event data
-
Edit.
handleCheckChange
(event)¶ Handle checkbox state changes, make API requests
- Arguments
event (*) – Event data
-
Edit.
handleInputChange
(event)¶ Handle input box state changes, make API requests
- Arguments
event (*) –
-
Edit.
handleRemovePart
(id, event)¶ Handle removing watched Spotify playlist name string
- Arguments
id (*) – Subject playlist name
event (*) – Event data
-
Edit.
handleRemoveReference
(id, event)¶ Handle removing watched music tools playlist reference
- Arguments
id (*) – Subject playlist name
event (*) – Event data
-
Edit.
handleRun
(event)¶ Handle refreshing playlist action, checks for spotify link
- Arguments
event (*) – Event data
-
Edit.
makeNetworkUpdate
(changes)¶ Send playlist info updates to API
- Arguments
changes (*) – Dictionary of changes to make
-
-
ReferenceEntry
(props)¶ Smart playlist entry in dropbox
- Arguments
props (*) – Properties containing name
- Returns
Dropbox option component
-
Edit.
ListBlock
(props)¶ Grid of cards for smart/Spotify playlist names with delete button
- Arguments
props (*) – Properties
- Returns
Grid component
-
Edit.
BlockGridItem
(props)¶ Smart/Spotify playlist card including name and delete button
- Arguments
props (*) – Properties
- Returns
Card component wrapped in grid cell