activity

package
v0.12.2 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2024 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Overview

Package activity manages user activity data.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidUser = errors.New("invalid user")
)

Functions

This section is empty.

Types

type Activity

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

func NewActivity

func NewActivity(config *config.Config) *Activity

func (*Activity) Close

func (a *Activity) Close()

func (*Activity) CreateEvents

func (a *Activity) CreateEvents(ctx Context, events Events) error

func (*Activity) DeleteUserEvents

func (a *Activity) DeleteUserEvents(ctx Context) error

func (*Activity) Movies

func (a *Activity) Movies(ctx Context, start, end time.Time) []ActivityMovie

func (*Activity) Open

func (a *Activity) Open() error

func (*Activity) PopularTracks

func (a *Activity) PopularTracks(ctx Context, start, end time.Time) []ActivityTrack

func (*Activity) RecentMovies

func (a *Activity) RecentMovies(ctx Context) []ActivityMovie

func (*Activity) RecentReleases

func (a *Activity) RecentReleases(ctx Context) []ActivityRelease

func (*Activity) RecentTracks

func (a *Activity) RecentTracks(ctx Context) []ActivityTrack

func (*Activity) Releases

func (a *Activity) Releases(ctx Context, start, end time.Time) []ActivityRelease

func (*Activity) Tracks

func (a *Activity) Tracks(ctx Context, start, end time.Time) []ActivityTrack

func (*Activity) UserScrobble

func (a *Activity) UserScrobble(user *auth.User, s Scrobble, music *music.Music) error

Add a scrobble with an MBID that should match a track we have

type Context

type Context interface {
	Music() *music.Music
	Podcast() *podcast.Podcast
	User() *auth.User
	Video() *video.Video
}

Jump to

Keyboard shortcuts

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