audiusclient

package module
v1.0.21 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCreatorHostHealthCheckFetcher added in v1.0.13

func NewCreatorHostHealthCheckFetcher(appName string) *creatorHostHealthCheckFetcher

func NewDiscoveryHostFetcher added in v1.0.9

func NewDiscoveryHostFetcher(appName string) *discoveryHostFetcher

func NewDiscoveryHostHealthCheckFetcher added in v1.0.9

func NewDiscoveryHostHealthCheckFetcher(appName string) *discoveryHostHealthCheckFetcher

Types

type APIPlaylist

type APIPlaylist struct {
	ID string `json:"id"`

	PlaylistName string `json:"playlist_name"`
	Description  string `json:"description"`
	IsAlbum      bool   `json:"is_album"`

	Artwork map[string]string `json:"artwork"`

	TotalPlayCount int `json:"total_play_count"`
	RepostCount    int `json:"repost_count"`
	FavoriteCount  int `json:"favorite_count"`

	User APIUser `json:"user"`
}

type APITrack

type APITrack struct {
	ID string `json:"id"`

	Title          string `json:"title"`
	Description    string `json:"description"`
	Duration       int    `json:"duration"`
	Mood           string `json:"mood"`
	Genre          string `json:"genre"`
	Tags           string `json:"tags"`
	IsDownloadable bool   `json:"downloadable"`
	ReleaseDate    string `json:"release_date"`

	Artwork map[string]string `json:"artwork"`

	PlayCount     int `json:"play_count"`
	RepostCount   int `json:"repost_count"`
	FavoriteCount int `json:"favorite_count"`

	User APIUser `json:"user"`

	StreamURL string `json:"-"`
}

type APIUser

type APIUser struct {
	ID string `json:"id"`

	Name       string `json:"name"`
	Handle     string `json:"handle"`
	Bio        string `json:"bio"`
	Location   string `json:"location"`
	IsVerified bool   `json:"is_verified"`

	ProfilePicture map[string]string `json:"profile_picture"`
	CoverPhoto     map[string]string `json:"cover_photo"`

	FollowerCount int `json:"follower_count"`
	FolloweeCount int `json:"followee_count"`

	AlbumCount    int `json:"album_count"`
	TrackCount    int `json:"track_count"`
	PlaylistCount int `json:"playlist_count"`
	RepostCount   int `json:"repost_count"`
}

type Client

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

func NewClient

func NewClient(hostSelectionService *HostSelectionService) *Client

func (*Client) GetFollowees added in v1.0.18

func (c *Client) GetFollowees(userID string, limit uint64, offset uint64) (GetFolloweesResponse, error)

func (*Client) GetFollowers added in v1.0.18

func (c *Client) GetFollowers(userID string, limit uint64, offset uint64) (GetFollowersResponse, error)

func (*Client) GetFullUser added in v1.0.18

func (c *Client) GetFullUser(userID string) (GetFullUserResponse, error)

func (*Client) GetHost

func (c *Client) GetHost() (*url.URL, error)

func (*Client) GetPlaylist

func (c *Client) GetPlaylist(playlistID string) (GetPlaylistResponse, error)

func (*Client) GetPlaylistTracks

func (c *Client) GetPlaylistTracks(playlistID string) (GetPlaylistTracksResponse, error)

func (*Client) GetResolvedResource added in v1.0.7

func (c *Client) GetResolvedResource(audiusURL string) (resourceType string, resourceID string, err error)

GetResolvedResource -

func (*Client) GetTrack

func (c *Client) GetTrack(trackID string) (GetTrackResponse, error)

func (*Client) GetTrendingPlaylists added in v1.0.6

func (c *Client) GetTrendingPlaylists(time string) (GetTrendingPlaylistsResponse, error)

func (*Client) GetTrendingTracks

func (c *Client) GetTrendingTracks(genre string, time string) (GetTrendingTracksResponse, error)

func (*Client) GetUser

func (c *Client) GetUser(userID string) (GetUserResponse, error)

func (*Client) SearchPlaylists

func (c *Client) SearchPlaylists(query string) (SearchPlaylistsResponse, error)

func (*Client) SearchTracks

func (c *Client) SearchTracks(query string) (SearchTracksResponse, error)

func (*Client) SearchUsers added in v1.0.21

func (c *Client) SearchUsers(query string) (SearchUsersResponse, error)

type GetFolloweesResponse added in v1.0.18

type GetFolloweesResponse struct {
	Data []APIUser
}

type GetFollowersResponse added in v1.0.18

type GetFollowersResponse struct {
	Data []APIUser
}

type GetFullUserResponse added in v1.0.18

type GetFullUserResponse struct {
	Data []APIUser
}

type GetPlaylistResponse

type GetPlaylistResponse struct {
	Data APIPlaylist
}

type GetPlaylistTracksResponse

type GetPlaylistTracksResponse struct {
	Data []APITrack
}

type GetTrackResponse

type GetTrackResponse struct {
	Data APITrack
}

type GetTrendingPlaylistsResponse added in v1.0.6

type GetTrendingPlaylistsResponse struct {
	Data []APIPlaylist
}

type GetTrendingTracksResponse

type GetTrendingTracksResponse struct {
	Data []APITrack
}

type GetUserResponse

type GetUserResponse struct {
	Data APIUser
}

type HostHealthCheckFetcher added in v1.0.9

type HostHealthCheckFetcher interface {

	// Calls the health check endpoint on the host.
	// Returns the time to first response byte if successful or an error otherwise.
	FetchHostHealthCheck(host string) (time.Duration, error)
}

type HostHealthCheckService added in v1.0.12

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

func NewHostHealthCheckService added in v1.0.12

func NewHostHealthCheckService(healthCheckFetcher HostHealthCheckFetcher) *HostHealthCheckService

func (*HostHealthCheckService) HealthCheckHosts added in v1.0.12

func (s *HostHealthCheckService) HealthCheckHosts(hosts []string) map[string]hostHealthCheckResult

type HostSelectionService added in v1.0.9

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

func NewHostSelectionService added in v1.0.9

func NewHostSelectionService(
	appName string,
) *HostSelectionService

func (*HostSelectionService) GetSelectedHost added in v1.0.9

func (s *HostSelectionService) GetSelectedHost() (string, error)

type SearchPlaylistsResponse

type SearchPlaylistsResponse struct {
	Data []APIPlaylist
}

type SearchTracksResponse

type SearchTracksResponse struct {
	Data []APITrack
}

type SearchUsersResponse added in v1.0.21

type SearchUsersResponse struct {
	Data []APIUser
}

Jump to

Keyboard shortcuts

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