imvdb

package module
v0.0.0-...-687c150 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2026 License: MPL-2.0 Imports: 7 Imported by: 0

README

imvdb

Package imvdb is a wrapper around the imvdb internet music video database web API.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Artist

type Artist struct {
	Name string
}

type Client

type Client struct {
	// contains filtered or unexported fields
}

func New

func New(apikey string) *Client

func (*Client) Find

func (c *Client) Find(title string, artist string) (*MusicVideo, error)

Find calls the imvdb api with the provided title and artist and returns the first result that has a title that matches the provided title and has an artist that matches the provided artist. If either title or artist is omitted, it will return any.

func (*Client) Search

func (c *Client) Search(term string) (*MusicVideo, error)

Search calls the imvdb api with the provided term and returns the first result, not doing any further checks. If you know the artist and or the song title, use Find instead.

type MusicVideo

type MusicVideo struct {
	ID      int               `json:"id"`
	Title   string            `json:"song_title"`
	Year    int               `json:"year"`
	Images  map[string]string `json:"image"`
	Artists []Artist          `json:"artists"`
}

func (MusicVideo) ArtistNames

func (m MusicVideo) ArtistNames() string

ArtistNames returns a comma seperated list of all the names of all the artists of this MusicVideo flattened as one string. If there is no artist, an empty string is returned, if there is just one artist only that one artist's name is returned without a comma.

func (MusicVideo) Image

func (m MusicVideo) Image() string

Image returns the location of the original image or an empty string if no such image is present.

Jump to

Keyboard shortcuts

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