online

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2023 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Overview

Package online generates seeded edits from online music providers.

Index

Constants

This section is empty.

Variables

View Source
var ExampleURLs []string

ExampleURLs holds example URLs that can be displayed to the user.

Functions

func CleanURL

func CleanURL(orig string) (string, error)

CleanURL returns a normalized version of the supplied URL. An error is returned if the URL doesn't match a known format (but note that it may still be possible to handle the page using Fetch, e.g. if it's a Bandcamp album being served from a custom domain).

func Fetch

func Fetch(ctx context.Context, url string, rawSetCmds []string,
	db *mbdb.DB, cfg *Config) ([]seed.Edit, error)

Fetch generates seeded edits from the page at url. If cfg is nil, a default configuration will be used.

Types

type Config

type Config internal.Config

Config configures Fetch's behavior. Aliasing an internal type like this is weird, but it avoids a circular dependency (subpackages can't depend on this package since it depends on the subpackages).

Directories

Path Synopsis
Package bandcamp extracts information from Bandcamp pages.
Package bandcamp extracts information from Bandcamp pages.
Package internal defines internal types and functions for online sources.
Package internal defines internal types and functions for online sources.
Package qobuz extracts information from Qobuz pages.
Package qobuz extracts information from Qobuz pages.
Package tidal uses Tidal's API to seed edits.
Package tidal uses Tidal's API to seed edits.

Jump to

Keyboard shortcuts

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