bands

package module
v0.0.0-...-386eca8 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2016 License: MIT Imports: 10 Imported by: 0

README

go-bandsintown GoDoc Build Status

bandsintown golang api package

Usage

go get github.com/yujinlim/go-bandsintown

Example

package main

import "github.com/yujinlim/go-bandsintown"

func main() {
  client := bands.New("apiKey")

  artist, err := client.GetArtist("artistName")
  events, err := client.GetArtistEvents("artistName")
}

Documentation

Overview

bands This is a BandsInTown golang api package that supports getting artist and artist's events

Index

Constants

View Source
const (
	API_ROUTE   = "http://api.bandsintown.com/"
	ARTIST_PATH = "artists"
	EVENTS_PATH = "events"
	VERSION     = "2.0"
	URL         = API_ROUTE + ARTIST_PATH
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ArtistApi

type ArtistApi interface {
	GetArtist() model.Artist
	GetArtistEvents() []model.Event
}

type Client

type Client struct {
	API_KEY string
}

Client client struct that stores api key and others properties

func New

func New(key string) *Client

New create new bandsintown api client

func (*Client) GetArtist

func (c *Client) GetArtist(name string) (model.Artist, error)

GetArtist get artist information based on artist name

func (Client) GetArtistEvents

func (c Client) GetArtistEvents(name string) ([]model.Event, error)

GetArtistEvents get artist's events by name

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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