goartists

package module
Version: v0.0.0-...-1959cfd Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2020 License: MIT Imports: 5 Imported by: 0

README

Installation

go get github.com/lucasmdomingues/goartists

Examples

Search artists by name.
import (
	"log"

	"github.com./lucasmdomingues/goartists"
)

func main() {
	service := goartists.NewService("API_KEY")

	_, err := service.Search("Megadeth")
	if err != nil {
		log.Fatal(err)
	}
}
Search artist events.
import (
	"log"
	
	"github.com./lucasmdomingues/goartists"
)

func main() {
	service := goartists.NewService("API_KEY")

	artist, err := service.Search("Megadeth")
	if err != nil {
		log.Fatal(err)
	}

	if err = service.GetEvents(artist); err != nil {
		log.Fatal(err)
	}
}
Bandsintown

https://manager.bandsintown.com/support/bandsintown-api

Documentation

Index

Constants

View Source
const URL = "https://rest.bandsintown.com"

Variables

This section is empty.

Functions

This section is empty.

Types

type Artist

type Artist struct {
	ID                 string  `json:"id"`
	Name               string  `json:"name"`
	URL                string  `json:"url"`
	ImageURL           string  `json:"image_url"`
	ThumbURL           string  `json:"thumb_url"`
	FacebookPageURL    string  `json:"facebook_page_url"`
	MbID               string  `json:"mbid"`
	TrackerCount       int64   `json:"tracker_count"`
	UpComingEventCount int64   `json:"upcoming_event_count"`
	Events             []Event `json:"events"`
}

type BandsintownError

type BandsintownError struct {
	Error   string `json:"error"`
	Message string `json:"message"`
}

type Event

type Event struct {
	ID             string   `json:"id"`
	ArtistID       string   `json:"artist_id"`
	URL            string   `json:"url"`
	OnSaleDateTime string   `json:"on_sale_datetime"`
	Datetime       string   `json:"datetime"`
	Description    string   `json:"description"`
	Venue          *Venue   `json:"venue"`
	Offers         []*Offer `json:"offers"`
	Lineup         []string `json:"lineup"`
}

type Offer

type Offer struct {
	Type   string `json:"type"`
	URL    string `json:"url"`
	Status string `json:"status"`
}

type Service

type Service interface {
	Search(name string) (*Artist, error)
	GetEvents(artist *Artist) error
}

func NewService

func NewService(appID string) Service

type Venue

type Venue struct {
	Name      string `json:"name"`
	Latitude  string `json:"latitude"`
	Longitude string `json:"longitude"`
	City      string `json:"city"`
	Region    string `json:"region"`
	Country   string `json:"country"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL