Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Auth ¶
type Auth struct { Token string `json:"access_token" validate:"nonzero"` Scope string `json:"scope"` }
Auth is authentication data retrieved from the Soundcloud API
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
A Client is used to make requests to the Soundcloud API
func (*Client) GetAuthToken ¶
GetAuthToken requests an oauth2 token from the api's /oauth2/token endpoint
func (*Client) UploadArtwork ¶
UploadArtwork uploads the given artwork to the specified playlist
type Config ¶
type Config struct { // TODO: auth without password? Username string `yaml:"username" validate:"nonzero"` Password string `yaml:"password" validate:"nonzero"` Client struct { ID string `yaml:"id" validate:"nonzero"` Secret string `yaml:"secret" validate:"nonzero"` } `yaml:"client"` }
Config is configuration data for the soundcloud API, retrieved from a yaml config file
type Playlist ¶
type Playlist struct { ID int `json:"id,omitempty"` Title string `json:"title,omitempty"` Sharing string `json:"sharing,omitempty"` Tracks []Track `json:"tracks,omitempty"` Created string `json:"created_at,omitempty"` ReleaseDay int `json:"release_day,omitempty"` ReleaseMonth int `json:"release_month,omitempty"` ReleaseYear int `json:"release_year,omitempty"` ArtworkData []byte `json:"artwork_data,omitempty"` Type string `json:"playlist_type,omitempty"` Genre string `json:"genre,omitempty"` Description string `json:"description,omitempty"` Tags string `json:"tag_list,omitempty"` }
A Playlist on Soundcloud
Click to show internal directories.
Click to hide internal directories.