spotify

package module
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2021 License: OSL-3.0 Imports: 19 Imported by: 0

README

Spotify

This module works with Spotify free accounts. It can download individual tracks. It downloads the audio files served by Spotify's servers and does not work by recording audio outputs.

https://godocs.io/github.com/89z/spotify

HTTPS

audio-fa.scdn.co/audio

We're using HTTPS-based CDN audio file retrieval, similar to the official Web client or librespot-java, instead of the older, channel-based approach in librespot.

https://github.com/jpochyla/psst#thanks

Documentation

Index

Constants

View Source
const (
	AudioFile_AAC_160        = 10
	AudioFile_AAC_320        = 11
	AudioFile_MP3_160        = 5
	AudioFile_MP3_160_ENC    = 7
	AudioFile_MP3_256        = 3
	AudioFile_MP3_320        = 4
	AudioFile_MP3_96         = 6
	AudioFile_OGG_VORBIS_160 = 1
	AudioFile_OGG_VORBIS_320 = 2
	AudioFile_OGG_VORBIS_96  = 0
	AudioFile_OTHER2         = 8
	AudioFile_OTHER3         = 9
	AudioFile_OTHER4         = 12
	AudioFile_OTHER5         = 13
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AudioFile added in v1.0.2

type AudioFile struct {
	FileID []byte `json:"1"`
	Format int32  `json:"2"`
}
type Header struct {
	URI         string `json:"1"`
	ContentType string `json:"2"`
	Method      string `json:"3"`
	StatusCode  int32  `json:"4"`
}

type Session added in v1.0.1

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

func Login

func Login(username string, password string, deviceName string) (*Session, error)

func (*Session) DownloadTrackID added in v1.0.1

func (ses *Session) DownloadTrackID(id string) (io.Reader, error)

type Track added in v1.0.2

type Track struct {
	GID  []byte      `json:"1"`
	File []AudioFile `json:"12"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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