Documentation
¶
Overview ¶
Package api provides functions to easily access the Piped Api.
Package api provides functions to easily access the Piped Api.
Package api provides functions to easily access the Piped Api.
Package api provides functions to easily access the Piped Api.
Package api provides functions to easily access the Piped Api.
Index ¶
- func AddVideosIntoPlaylist(playlistId string, videoIds *[]string, instanceBaseUrl string, ...) error
- func ClearPlaylistVideos(playlistId string, instanceBaseUrl string, userToken string) error
- func CreatePlaylist(name string, instanceBaseUrl string, userToken string) (*pipedPlaylistDto.CreatedPlaylistDto, error)
- func ExtractVideoIdFromUrl(url string) string
- func FetchChannel(subscription pipedDto.SubscriptionDto, instanceBaseUrl string) (*pipedDto.ChannelDto, error)
- func FetchChannelVideos(channel *pipedDto.ChannelDto, startDate time.Time, instanceBaseUrl string) (*[]pipedVideoDto.StreamDto, error)
- func FetchPlaylistVideos(playlistId string, instanceBaseUrl string, userToken string) (*[]pipedVideoDto.RelatedStreamDto, error)
- func FetchPlaylists(instanceBaseUrl string, userToken string) (*[]pipedPlaylistDto.PlaylistDto, error)
- func FetchSubscriptions(instanceBaseUrl string, userToken string) (*[]pipedDto.SubscriptionDto, error)
- func FetchVideo(videoMeta pipedVideoDto.RelatedStreamDto, instanceBaseUrl string) (*pipedVideoDto.StreamDto, error)
- func GetToken() string
- func Login(username string, password string, instanceBaseUrl string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddVideosIntoPlaylist ¶
func AddVideosIntoPlaylist(playlistId string, videoIds *[]string, instanceBaseUrl string, userToken string) error
AddVideosIntoPlaylist calls the remote Piped instance to insert videos into a specific playlist.
Error is returned if the call failed.
func ClearPlaylistVideos ¶ added in v1.4.0
ClearPlaylistVideos calls the remote Piped instance to clear a specific playlist.
Error is returned if the call failed.
func CreatePlaylist ¶
func CreatePlaylist(name string, instanceBaseUrl string, userToken string) (*pipedPlaylistDto.CreatedPlaylistDto, error)
CreatePlaylist calls the remote Piped instance to create a new playlist.
The created playlist is returned if the call succeeded.
Error is returned if the call failed.
func ExtractVideoIdFromUrl ¶
ExtractVideoIdFromUrl returns the video id corresponding to a video url.
Example:
url='/watch?v=123-456789' -> id='123-456789'
func FetchChannel ¶
func FetchChannel(subscription pipedDto.SubscriptionDto, instanceBaseUrl string) (*pipedDto.ChannelDto, error)
FetchChannel calls the remote Piped instance to return a specific channel.
Error is returned if the call failed.
func FetchChannelVideos ¶
func FetchChannelVideos(channel *pipedDto.ChannelDto, startDate time.Time, instanceBaseUrl string) (*[]pipedVideoDto.StreamDto, error)
FetchChannelVideos calls the remote Piped instance to return the videos associated with a specific channel.
Error is returned if the call failed.
func FetchPlaylistVideos ¶
func FetchPlaylistVideos(playlistId string, instanceBaseUrl string, userToken string) (*[]pipedVideoDto.RelatedStreamDto, error)
FetchPlaylistVideos calls the remote Piped instance to return the videos associated with a specific playlist.
Error is returned if the call failed.
func FetchPlaylists ¶
func FetchPlaylists(instanceBaseUrl string, userToken string) (*[]pipedPlaylistDto.PlaylistDto, error)
FetchPlaylists calls the remote Piped instance to return the playlists associated with the user token.
Error is returned if the call failed.
func FetchSubscriptions ¶
func FetchSubscriptions(instanceBaseUrl string, userToken string) (*[]pipedDto.SubscriptionDto, error)
FetchSubscriptions calls the remote Piped instance to return the subscriptions associated with the user token.
Error is returned if the call failed.
func FetchVideo ¶
func FetchVideo(videoMeta pipedVideoDto.RelatedStreamDto, instanceBaseUrl string) (*pipedVideoDto.StreamDto, error)
FetchVideo calls the remote Piped instance and returns the video corresponding to video metadata.
Error is returned if the call failed.
Types ¶
This section is empty.