Documentation
¶
Index ¶
- type PlaylistsController
- func (p *PlaylistsController) CreatePlaylist(name, description, privacyStatus string)
- func (p *PlaylistsController) DeletePlaylist()
- func (p *PlaylistsController) DeletePlaylistId(i int)
- func (p *PlaylistsController) ExcludeFromPlaylists(playlists []*youtube.Playlist, playlistId string) []*youtube.Playlist
- func (p *PlaylistsController) GetPlaylists() []*youtube.Playlist
- func (p *PlaylistsController) GetSelectedPlaylist() int
- func (p *PlaylistsController) SetSelectedPlaylist(i int)
- func (p *PlaylistsController) SyncPlaylists()
- type VideosController
- func (v *VideosController) AddVideos(playlistId string)
- func (v *VideosController) ClearSelectedVideos()
- func (v *VideosController) DeleteVideos()
- func (v *VideosController) FirstSelectedVideo() *youtube.PlaylistItem
- func (v *VideosController) GetSelectedVideos() map[int]*youtube.PlaylistItem
- func (v *VideosController) GetSelectedVideosList() []*youtube.PlaylistItem
- func (v *VideosController) GetVideos() []*youtube.PlaylistItem
- func (v *VideosController) IsSelectedVideo(i int) bool
- func (v *VideosController) MoveVideos(playlistId string)
- func (v *VideosController) OpenVideoInBrowser(videoId string)
- func (v *VideosController) SyncVideos()
- func (v *VideosController) ToggleSelected(i int)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PlaylistsController ¶
type PlaylistsController struct {
// contains filtered or unexported fields
}
Holds all functionality to manage the data in the Playlists component.
func NewPlaylistsController ¶
func NewPlaylistsController(api *api.ApiService) *PlaylistsController
Creates a new PlaylistsController.
func (*PlaylistsController) CreatePlaylist ¶
func (p *PlaylistsController) CreatePlaylist(name, description, privacyStatus string)
Creates a new playlist.
func (*PlaylistsController) DeletePlaylist ¶
func (p *PlaylistsController) DeletePlaylist()
Deletes the currently selected playlist.
func (*PlaylistsController) DeletePlaylistId ¶
func (p *PlaylistsController) DeletePlaylistId(i int)
Deletes the playlist specified by its index position in PlaylistsController.playlists.
func (*PlaylistsController) ExcludeFromPlaylists ¶
func (p *PlaylistsController) ExcludeFromPlaylists(playlists []*youtube.Playlist, playlistId string) []*youtube.Playlist
Filters the playlists, the playlist with the specified id will be ignored in the result.
func (*PlaylistsController) GetPlaylists ¶
func (p *PlaylistsController) GetPlaylists() []*youtube.Playlist
Retrieves all the playlists of the authenticated user.
func (*PlaylistsController) GetSelectedPlaylist ¶
func (p *PlaylistsController) GetSelectedPlaylist() int
Retrieves the index of the currently selected playlistts. -1 will be returned if no playlist is selected.
func (*PlaylistsController) SetSelectedPlaylist ¶
func (p *PlaylistsController) SetSelectedPlaylist(i int)
Updates the index of the currently selected playlist.
func (*PlaylistsController) SyncPlaylists ¶
func (p *PlaylistsController) SyncPlaylists()
Retrieves the currennt playlists. Call this to sync the current playlists with playlists from the API server.
type VideosController ¶
type VideosController struct { // The currently selected playlist SelectedPlaylist *youtube.Playlist // contains filtered or unexported fields }
Handles all functionality to managing data on the Videos component.
func NewVideosController ¶
func NewVideosController(api *api.ApiService) *VideosController
Creates a new VideosController
func (*VideosController) AddVideos ¶
func (v *VideosController) AddVideos(playlistId string)
Adds the selected videos to the playlist specified by playlistId. The selected videos will be inserted into the playlist.
func (*VideosController) ClearSelectedVideos ¶
func (v *VideosController) ClearSelectedVideos()
Removes all selected videos.
func (*VideosController) DeleteVideos ¶
func (v *VideosController) DeleteVideos()
Deletes the selected videos from the current playlist (VideosController.selectedPlaylist).
func (*VideosController) FirstSelectedVideo ¶
func (v *VideosController) FirstSelectedVideo() *youtube.PlaylistItem
func (*VideosController) GetSelectedVideos ¶
func (v *VideosController) GetSelectedVideos() map[int]*youtube.PlaylistItem
Retrieves the currently selected videos.
func (*VideosController) GetSelectedVideosList ¶
func (v *VideosController) GetSelectedVideosList() []*youtube.PlaylistItem
Retrieves the currently selected videos as a list.
func (*VideosController) GetVideos ¶
func (v *VideosController) GetVideos() []*youtube.PlaylistItem
Retrieves the current videos in this object.
func (*VideosController) IsSelectedVideo ¶
func (v *VideosController) IsSelectedVideo(i int) bool
Checks if the video is selected using its index in VideosController.videos.
func (*VideosController) MoveVideos ¶
func (v *VideosController) MoveVideos(playlistId string)
Moves the selected videos from the current playlist (VideosController.selectedPlaylist) to the playlist specified by playlistId. The selected videos will be deleted from the current playlist and then inserted in the new playlist.
func (*VideosController) OpenVideoInBrowser ¶
func (v *VideosController) OpenVideoInBrowser(videoId string)
func (*VideosController) SyncVideos ¶
func (v *VideosController) SyncVideos()
Retrieves the currennt videos of the selected playlist. Call this to sync the current videos with videos from the API server.
func (*VideosController) ToggleSelected ¶
func (v *VideosController) ToggleSelected(i int)
Toggles the selection of the video based on the index 'i' in VideosController.videos.