webus / bandcamp

Go library to access public data from Bandcamp.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

bandcamp

Build Status GoDoc

This is a library that can do the following on Bandcamp:

  • Search
  • Lookup Tracks/Albums by URL

Usage

Add it to your Go project

go get github.com/undertideco/bandcamp

Code

package main

import (
  "github.com/undertideco/bandcamp"
)

func main() {
  bandcampClient := bandcamp.NewClient()

  results, err := bandcampClient.Search("Coldplay")
  if err != nil {
    log.Println(err)
  }

  track, err := bandcampClient.Lookup("https://spunoutofcontrol.bandcamp.com/track/infinite")
  if err != nil {
    log.Println(err)
  }

  album, err := bandcampClient.Lookup("https://coldplay.bandcamp.com/album/greatest-hits")
  if err != nil {
    log.Println(err)
  }
}

About

Go library to access public data from Bandcamp.com

License:MIT License


Languages

Language:Go 100.0%