https://github.com/njasm/gosoundcloud
Soundcloud.com API wrapper written in Golang with OAuth2 support.
https://github.com/njasm/gosoundcloud
Last synced: about 2 months ago
JSON representation
Soundcloud.com API wrapper written in Golang with OAuth2 support.
- Host: GitHub
- URL: https://github.com/njasm/gosoundcloud
- Owner: njasm
- Created: 2015-04-24T01:15:29.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2016-06-21T16:24:35.000Z (almost 9 years ago)
- Last Synced: 2025-03-16T23:12:21.930Z (about 2 months ago)
- Language: Go
- Homepage:
- Size: 41 KB
- Stars: 8
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[](https://godoc.org/github.com/njasm/gosoundcloud)
[](https://travis-ci.org/njasm/gosoundcloud)
[](https://coveralls.io/r/njasm/gosoundcloud?branch=master)## Soundcloud.com API for GO
Package is already usable, but still under heavy development, API might change!
Still missing complete map of soundcloud resources to structs, helper functions, etc.#### Implemented features
* User Credentials Flow Authentication (Password Credentials)
* Access to all GET, PUT, POST and DELETE Resources#### Soon to come
* User Authorization/Authentication
* Media File Download/Upload#### Naive Example
```go
package mainimport (
"fmt"
"os"
"github.com/njasm/gosoundcloud"
)func main() {
// callback url is optional - nil in example
s, _ := gosoundcloud.NewSoundcloudApi("client_id", "client_secret", nil)// request password credentials token - what soundcloud calls user credentials authentication
if err = s.PasswordCredentialsToken("[email protected]", "your_password"); err != nil {
fmt.Println(err)
os.Exit(1)
}
// get group id 3 data
var group_id uint64 = 3
group, _ := s.GetGroup(group_id)
fmt.Println(group.Description)
// get group members, that have "great" in they username, description, etc
params := gosoundcloud.NewUrlParams()
params.Set("q", "great");
members, _ := s.GetGroupMembers(group, params)
//members, _ := s.GetGroupMembers(group, nil) // or get all membersfor member := range members {
fmt.Println(member.Username)
}
}
```