lastfm

package
v0.0.0-...-8101777 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2022 License: AGPL-3.0-or-later Imports: 28 Imported by: 0

Documentation

Overview

nolint: dupl

nolint: dupl

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CollageFromBytes

func CollageFromBytes(
	imageDataArray [][]byte, descriptions []string, width, height, tileWidth, tileHeight int,
) ([]byte, error)

Creates a Collage PNG Image from image []byte (PNG or JPEG). imageDataArray : a slice of all image []byte data descriptions : a slice with text that will be written on each tile. Can be empty. width : the width of the result collage image. height : the height of the result collage image. tileWidth : the width of each tile image. tileHeight : the height of each tile image. backgroundColour : the background colour as a hex string.

func CollageFromURLs

func CollageFromURLs(
	client *http.Client, imageUrls, descriptions []string, width, height, tileWidth, tileHeight int,
) ([]byte, error)

Creates a Collage PNG Image from internet image urls (PNG or JPEG). imageUrls : a slice with all image URLs. Empty strings will create an empty space in the collage. descriptions : a slice with text that will be written on each tile. Can be empty. width : the width of the result collage image. height : the height of the result collage image. tileWidth : the width of each tile image. tileHeight : the height of each tile image. backgroundColour : the background colour as a hex string.

Types

type Config

type Config struct {
	Key    string `envconfig:"LASTFM_KEY"`
	Secret string `envconfig:"LASTFM_SECRET"`
}

type Plugin

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

func (*Plugin) Action

func (p *Plugin) Action(event *events.Event) bool

func (*Plugin) Help

func (p *Plugin) Help() *common.PluginHelp

func (*Plugin) Names

func (p *Plugin) Names() []string

func (*Plugin) Passthrough

func (p *Plugin) Passthrough() bool

func (*Plugin) Priority

func (p *Plugin) Priority() int

func (*Plugin) Start

func (p *Plugin) Start(params common.StartParameters) error

func (*Plugin) Stop

func (p *Plugin) Stop(params common.StopParameters) error

type User deprecated

type User struct {
	gorm.Model
	UserID         string `gorm:"unique_index"`
	LastFMUsername string
}

Deprecated: We use Caco Config instead

func (*User) TableName

func (*User) TableName() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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