Documentation ¶
Overview ¶
Package soundcloud provides a minimialist soundcloud API wrapper.
Index ¶
- func Values(keyValues ...string) url.Values
- type Activity
- type Api
- func (api *Api) App(id uint64) *AppApi
- func (api *Api) Apps(params url.Values) ([]*App, error)
- func (api *Api) Authenticated() bool
- func (api *Api) Comment(id uint64) *CommentApi
- func (api *Api) Group(id uint64) *GroupApi
- func (api *Api) Groups(params url.Values) ([]*Group, error)
- func (api *Api) Me() *MeApi
- func (api *Api) Playlist(id uint64) *PlaylistApi
- func (api *Api) Playlists(params url.Values) ([]*Playlist, error)
- func (api *Api) Refresh() error
- func (api *Api) Resolve(scurl string) (uri *url.URL, err error)
- func (api *Api) Track(id uint64) *TrackApi
- func (api *Api) Tracks(params url.Values) ([]*Track, error)
- func (api *Api) User(id uint64) *UserApi
- func (api *Api) Users(params url.Values) ([]*User, error)
- func (api *Api) Values(keyValues ...string) url.Values
- type ApiError
- type App
- type AppApi
- type AuthResponse
- type Comment
- type CommentApi
- type Connection
- type Group
- type GroupApi
- func (g *GroupApi) Contribution(id uint64) *trackEndpoint
- func (g *GroupApi) Contributions(params url.Values) ([]*Track, error)
- func (g *GroupApi) Contributors(params url.Values) ([]*User, error)
- func (t *GroupApi) Get(params url.Values) (*Group, error)
- func (g *GroupApi) Members(params url.Values) ([]*User, error)
- func (g *GroupApi) Moderators(params url.Values) ([]*User, error)
- func (g *GroupApi) PendingTrack(id uint64) *trackEndpoint
- func (g *GroupApi) PendingTracks(params url.Values) ([]*Track, error)
- func (g *GroupApi) Tracks(params url.Values) ([]*Track, error)
- func (g *GroupApi) Users(params url.Values) ([]*User, error)
- type MeApi
- type PaginatedActivities
- type Pagination
- type Playlist
- type PlaylistApi
- type Resolution
- type SubLabel
- type SubPermalink
- type SubUri
- type SubUser
- type Track
- type TrackApi
- type User
- type UserApi
- func (u *UserApi) Comments(params url.Values) ([]*Comment, error)
- func (u *UserApi) Favorite(id string) *trackEndpoint
- func (u *UserApi) Favorites(params url.Values) ([]*Track, error)
- func (u *UserApi) Follower(id string) *userEndpoint
- func (u *UserApi) Followers(params url.Values) ([]*User, error)
- func (u *UserApi) Following(id uint64) *userEndpoint
- func (u *UserApi) Followings(params url.Values) ([]*User, error)
- func (u *UserApi) Get(params url.Values) (*User, error)
- func (u *UserApi) Groups(params url.Values) ([]*Group, error)
- func (u *UserApi) Playlists(params url.Values) ([]*Playlist, error)
- func (u *UserApi) Tracks(params url.Values) ([]*Track, error)
- func (u *UserApi) WebProfiles(params url.Values) ([]*Connection, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Activity ¶
type Activity struct { Type string CreatedAt string `json:"created_at"` Tags string // This is a specific type that should be re-interpreted as a given type (see activities page) Origin interface{} }
Activity by a user (http://developers.soundcloud.com/docs/api/reference#activities)
type Api ¶
func (*Api) Authenticated ¶
func (*Api) Comment ¶
func (api *Api) Comment(id uint64) *CommentApi
func (*Api) Playlist ¶
func (api *Api) Playlist(id uint64) *PlaylistApi
type AuthResponse ¶
type Comment ¶
type Comment struct { Id uint64 *SubUri *SubUser CreatedAt string `json:"created_at"` Body string // Time in milliseconds Timestamp uint64 TrackId uint64 }
Comment on a track (http://developers.soundcloud.com/docs/api/reference#comments)
type CommentApi ¶
type CommentApi struct {
// contains filtered or unexported fields
}
type Connection ¶
type Connection struct { Id uint64 *SubUri CreatedAt string `json:"created_at"` DisplayName string `json:"display_name"` PostFavorite bool `json:"post_favorite"` PostPublish bool `json:"post_publish"` Service string Type string }
A connection to an external service such as twitter, tumblr, facebook, etc (http://developers.soundcloud.com/docs/api/reference#connections)
type Group ¶
type Group struct { Id uint64 *SubPermalink *SubUri CreatedAt string `json:"created_at"` ArtworkUrl string `json:"artwork_url"` Name string Description string ShortDescription string `json:"short_description"` // A mini representation of user Creator *User }
Groups of members with tracks (http://developers.soundcloud.com/docs/api/reference#groups)
type GroupApi ¶
type GroupApi struct {
// contains filtered or unexported fields
}
func (*GroupApi) Contribution ¶
func (*GroupApi) Contributions ¶
func (*GroupApi) PendingTrack ¶
func (*GroupApi) PendingTracks ¶
type MeApi ¶
type MeApi struct {
UserApi
}
func (*MeApi) Activities ¶
func (me *MeApi) Activities(params url.Values) (*PaginatedActivities, error)
func (*MeApi) Connection ¶
type PaginatedActivities ¶
type PaginatedActivities struct { *Pagination Collection []Activity }
type Pagination ¶
type Pagination struct {
NextHref string `json:"next_href"`
}
type Playlist ¶
type Playlist struct { Id uint64 *SubUri *SubLabel *SubUser *SubPermalink CreatedAt string `json:"created_at"` Title string Sharing string EmbeddableBy string `json:"embeddable_by"` PurchaseUrl string `json:"purchase_url"` ArtworkUrl string `json:"artwork_url"` Description string Duration uint64 Genre string TagList string `json:"tag_list"` // Release uint64 //See release above ReleaseDay uint `json:"release_day"` ReleaseMonth uint `json:"release_month"` ReleaseYear uint `json:"release_year"` Streamable bool Downloadable bool EAN string `json:"ean"` PlaylistType string `json:"playlist_type"` Tracks []*Track }
A Soundcloud Set (http://developers.soundcloud.com/docs/api/reference#playlists)
type PlaylistApi ¶
type PlaylistApi struct {
// contains filtered or unexported fields
}
type Resolution ¶
type SubPermalink ¶
type Track ¶
type Track struct { Id uint64 *SubUri *SubLabel *SubUser *SubPermalink CreatedAt string `json:"created_at"` Title string Sharing string EmbeddableBy string `json:"embeddable_by"` PurchaseUrl string `json:"purchase_url"` ArtworkUrl string `json:"artwork_url"` Description string Duration uint64 Genre string TagList string `json:"tag_list"` // Release uint64 // Release is sometimes "" and sometimes null and sometimes a number? ReleaseDay uint `json:"release_day"` ReleaseMonth uint `json:"release_month"` ReleaseYear uint `json:"release_year"` Streamable bool Downloadable bool State string License string TrackType string `json:"track_type"` WaveformUrl string `json:"waveform_url"` DownloadUrl string `json:"download_url"` StreamUrl string `json:"stream_url"` VideoUrl string `json:"video_url"` Bpm float64 Commentable bool ISRC string `json:"isrc"` KeySignature string `json:"key_signature"` CommentCount uint64 `json:"comment_count"` DownloadCount uint64 `json:"download_count"` PlaybackCount uint64 `json:"playback_count"` FavoritingsCount uint64 `json:"favoritings_count"` OriginalFormat string `json:"original_format"` OriginalContentSize uint64 `json:"original_content_size"` CreatedWith *App AssetData []byte `json:"asset_data"` ArtworkData []byte `json:"artwork_data"` UserFavorite bool `json:"user_favorite"` }
Sound Track (http://developers.soundcloud.com/docs/api/reference#tracks)
type User ¶
type User struct { //---- Included in mini-representation Id uint64 *SubUri *SubPermalink Username string AvatarUrl string `json:"avatar_url"` //---- Not included in mini-representation Country string FullName string `json:"full_name"` City string Description string DiscogsName string `json:"discogs-name"` MyspaceName string `json:"myspace-name"` Website string WebsiteTitle string `json:"website_title"` Online bool TrackCount uint64 `json:"track_count"` PlaylistCount uint64 `json:"playlist_count"` FollowersCount uint64 `json:"followers_count"` FollowingsCount uint64 `json:"followings_count"` PublicFavoritesCount uint64 `json:"public_favorites_count"` AvatarData []byte `json:"avatar_data"` }
User Object (http://developers.soundcloud.com/docs/api/reference#token)
type UserApi ¶
type UserApi struct {
// contains filtered or unexported fields
}
func (*UserApi) WebProfiles ¶
func (u *UserApi) WebProfiles(params url.Values) ([]*Connection, error)