soundclient

package module
v0.0.0-...-597ea73 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2018 License: MIT Imports: 4 Imported by: 1

README

SoundCloud Go API Wrapper

build

Description

This is the SoundCloud API Wrapper written in Go. It provides methods to handle authorization and execution of HTTP Calls. I built this after my 5th day learning Go so there might be lots of silly beginner mistakes, if you do find one please share some of your wisdom with me. :)

Features

Currently allows users to fetch soundcloud tracks, users, groups and playlists and their associated data as json

Examples

    # Register a client with your YOUR_CLIENT_ID as ClientId
    client := soundclient.SoundCloud{ ClientId: YOUR_CLIENT_ID,
                                      ClientSecret: YOUR_SECRET_KEY}
                                      
    // Retrieve a track by id as json object
    song := client.Tracks("13158")
    
    // Get track title
    title, _ := song.GetString("title")
    # Get track desccription
    description, _ := song.GetString("description")
    
    // Print track information
    fmt.Println("Title ->", title)
    fmt.Println("Description ->", description)

Developed by

Donate with Kamba to keep this project active

Screenshot

Documentation

Overview

Define a type called Client that handles authentication and communication with the sound API

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get(s SoundCloud, apiCall string, kargs string) *jason.Object

Handle get requests to an endpoint and return a *jason.Object containing data

func Post

func Post()

Handle POST requests

Types

type SoundCloud

type SoundCloud struct {
	ClientId     string
	ClientSecret string
}

func (SoundCloud) Comments

func (s SoundCloud) Comments(commentId string) *jason.Object

Get comments for a specific track

func (SoundCloud) Groups

func (s SoundCloud) Groups(groupId string) *jason.Object

Get Group members and contributed tracks

func (SoundCloud) Playlists

func (s SoundCloud) Playlists(playlistsId string) *jason.Object

func (SoundCloud) Tracks

func (s SoundCloud) Tracks(trackId string) *jason.Object

Return a soundcloud track

func (SoundCloud) Users

func (s SoundCloud) Users(userId string) *jason.Object

Return a soundcloud user

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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