Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Lyric ¶
type Lyric struct {
// contains filtered or unexported fields
}
Lyric API.
func New ¶
New creates a new Lyric API, which can be used to Search for Lyrics using various providers. The default behaviour is to use all providers available, although it can be explicitly set to the same using, eg.
lyrics.New(WithAllProviders())
In case your usecase requires using only specific providers, you can provide New() with the specific WithXXXXProvider() as an optional parameter.
Eg. to attempt only with Lyrics Wikia:
lyrics.New(WithLyricsWikia())
Eg. to attempt with both Lyrics Wikia and Song Lyrics:
lyrics.New(WithLyricsWikia(), WithSongLyrics())
type Option ¶
Option type describes Option Configuration Decorator return type.
func WithAllProviders ¶
func WithAllProviders() Option
WithAllProviders is an Option Configuration Decorator that sets Lyric to attempt fetching lyrics using all providers.
func WithGeniusLyrics ¶
WithGenius is an Option Configuration Decorator that adds Genius Provider to the list of providers to attempt fetching lyrics from. It requires an additional access token which can be obtained using the developer portal (https://genius.com/developers)
func WithLyricsWikia ¶
func WithLyricsWikia() Option
WithLyricsWikia is an Option Configuration Decorator that adds Lyrics Wikia Provider to the list of providers to attempt fetching lyrics from.
func WithSongLyrics ¶
func WithSongLyrics() Option
WithSongLyrics is an Option Configuration Decorator that adds Song Lyrics Provider to the list of providers to attempt fetching lyrics from.