embed

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2025 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const SpotifyUrlPrefix = "https://open.spotify.com/track/"

Variables

This section is empty.

Functions

func NavidromeScrape(ctx context.Context, q *database.Queries, id string) (database.NavidromeCache, error)

func SpotifyScrape

func SpotifyScrape(ctx context.Context, q *database.Queries, id string) (database.SpotifyCache, error)

func YoutubeScrape

func YoutubeScrape(ctx context.Context, q *database.Queries, id string) (database.YoutubeCache, error)

Types

type Root

type Root struct {
	Entities struct {
		Items map[string]RootTrack `json:"items"`
	} `json:"entities"`
}

type RootArtist

type RootArtist struct {
	ID      string `json:"id"`
	Profile struct {
		Name string `json:"name"`
	} `json:"profile"`
}

type RootCoverArt

type RootCoverArt struct {
	URL    string `json:"url"`
	Width  int    `json:"width"`
	Height int    `json:"height"`
}

type RootTrack

type RootTrack struct {
	ID           string `json:"id"`
	Name         string `json:"name"`
	URI          string `json:"uri"`
	AlbumOfTrack struct {
		CoverArt struct {
			Sources []RootCoverArt `json:"sources"`
		} `json:"coverArt"`
	} `json:"albumOfTrack"`

	Previews struct {
		AudioPreviews struct {
			Items []struct {
				URL string `json:"url"`
			} `json:"items"`
		} `json:"audioPreviews"`
	} `json:"previews"`

	FirstArtist struct {
		Items []RootArtist `json:"items"`
	} `json:"firstArtist"`
}

Jump to

Keyboard shortcuts

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