tracks

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 21, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SoundcloudTrack

type SoundcloudTrack struct {
	Track        soundcloud.Track
	TrackService soundcloud.TrackService
	User         string
	AvatarURL    string
}

func (SoundcloudTrack) Duration

func (t SoundcloudTrack) Duration() int

func (SoundcloudTrack) Embed

func (t SoundcloudTrack) Embed(duration bool) *discordgo.MessageEmbed

func (SoundcloudTrack) GetUser

func (t SoundcloudTrack) GetUser() (string, string)

func (SoundcloudTrack) ListenStatus

func (t SoundcloudTrack) ListenStatus() string
func (t SoundcloudTrack) MarkdownLink() string

func (SoundcloudTrack) StreamURL

func (t SoundcloudTrack) StreamURL() (string, error)

GetStreamURL will cycle through the known types of SoundCloud streams and return the first successful URL

type Track

type Track interface {
	StreamURL() (string, error)
	Duration() int
	Embed(duration bool) *discordgo.MessageEmbed
	MarkdownLink() string
	ListenStatus() string
	GetUser() (string, string)
}

type Tracks

type Tracks []Track

type YoutubeTrack

type YoutubeTrack struct {
}

func (YoutubeTrack) Duration

func (yt YoutubeTrack) Duration() int

func (YoutubeTrack) Embed

func (yt YoutubeTrack) Embed() *discordgo.MessageEmbed

func (YoutubeTrack) ListenStatus

func (yt YoutubeTrack) ListenStatus() string
func (yt YoutubeTrack) MarkdownLink() string

func (YoutubeTrack) StreamURL

func (yt YoutubeTrack) StreamURL() (string, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL