spotify

package
v1.4.509 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2026 License: MIT Imports: 13 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package spotify provides Spotify Web API integration for podcast metadata retrieval.

Requirements: - Spotify Developer Account: Required to obtain Client ID and Client Secret - Client Credentials: Stored in .env file via fabric --setup

The implementation uses OAuth2 Client Credentials flow for authentication. Note: The Spotify Web API does NOT provide access to podcast transcripts. For transcript functionality, users should use fabric's --transcribe-file feature with audio obtained from other sources.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EpisodeMetadata

type EpisodeMetadata struct {
	Id              string `json:"id"`
	Name            string `json:"name"`
	Description     string `json:"description"`
	ReleaseDate     string `json:"release_date"`
	DurationMs      int    `json:"duration_ms"`
	DurationMinutes int    `json:"duration_minutes"`
	Language        string `json:"language"`
	Explicit        bool   `json:"explicit"`
	ExternalURL     string `json:"external_url"`
	AudioPreviewURL string `json:"audio_preview_url,omitempty"`
	ImageURL        string `json:"image_url,omitempty"`
	ShowId          string `json:"show_id"`
	ShowName        string `json:"show_name"`
}

EpisodeMetadata represents metadata for a Spotify episode.

type SearchResult

type SearchResult struct {
	Shows []ShowMetadata `json:"shows"`
}

SearchResult represents a search result item.

type ShowMetadata

type ShowMetadata struct {
	Id            string   `json:"id"`
	Name          string   `json:"name"`
	Description   string   `json:"description"`
	Publisher     string   `json:"publisher"`
	TotalEpisodes int      `json:"total_episodes"`
	Languages     []string `json:"languages"`
	MediaType     string   `json:"media_type"`
	ExternalURL   string   `json:"external_url"`
	ImageURL      string   `json:"image_url,omitempty"`
}

ShowMetadata represents metadata for a Spotify show (podcast).

type Spotify

type Spotify struct {
	*plugins.PluginBase
	ClientId     *plugins.SetupQuestion
	ClientSecret *plugins.SetupQuestion
	// contains filtered or unexported fields
}

Spotify represents a Spotify API client.

func NewSpotify

func NewSpotify() *Spotify

NewSpotify creates a new Spotify client instance.

func (*Spotify) FormatMetadataAsText

func (s *Spotify) FormatMetadataAsText(metadata any) string

FormatMetadataAsText formats metadata as human-readable text suitable for LLM processing.

func (*Spotify) GetEpisodeMetadata

func (s *Spotify) GetEpisodeMetadata(episodeId string) (*EpisodeMetadata, error)

GetEpisodeMetadata retrieves metadata for a Spotify episode.

func (*Spotify) GetShowEpisodes

func (s *Spotify) GetShowEpisodes(showId string, limit int) ([]EpisodeMetadata, error)

GetShowEpisodes retrieves episodes for a given show.

func (*Spotify) GetShowMetadata

func (s *Spotify) GetShowMetadata(showId string) (*ShowMetadata, error)

GetShowMetadata retrieves metadata for a Spotify show (podcast).

func (*Spotify) GetShowOrEpisodeId

func (s *Spotify) GetShowOrEpisodeId(urlStr string) (showId string, episodeId string, err error)

GetShowOrEpisodeId extracts show or episode ID from a Spotify URL.

func (*Spotify) GrabMetadataForURL

func (s *Spotify) GrabMetadataForURL(urlStr string) (any, error)

GrabMetadataForURL retrieves metadata for a Spotify URL (show or episode).

func (*Spotify) SearchShows

func (s *Spotify) SearchShows(query string, limit int) (*SearchResult, error)

SearchShows searches for podcasts/shows matching the query.

Jump to

Keyboard shortcuts

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