datatypes

package
v0.0.0-...-54e2d6a Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2016 License: BSD-3-Clause Imports: 2 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIError

type APIError struct {
	Errors []string `json:"errors"`
}

APIError represents the container for errors from the bandsintown API

func (APIError) Error

func (apiError APIError) Error() string

func (*APIError) HasErrors

func (apiError *APIError) HasErrors() bool

HasErrors returns whether there are errors in the conatiner

type Artist

type Artist struct {
	Name string `json:"name"`
	MbID string `json:"mbid"`
	URL  string `json:"url"`
}

Artist represents core information about an Artist A component of ArtistInfo.go and Event.go

type ArtistEventSearchParam

type ArtistEventSearchParam struct {
	Name string
	MbID string
	Date []time.Time
}

ArtistEventSearchParam is the parameter for the Artist Events api call https://www.bandsintown.com/api/1.0/requests#artists-events

type ArtistInfo

type ArtistInfo struct {
	Artist
	UpcomingGigCount int `json:"upcoming_events_count"`
}

ArtistInfo is the basic info for a single artist returned by the Artist get api call https://www.bandsintown.com/api/1.0/requests#artists-get

type Event

type Event struct {
	ID             int       `json:"id"`
	URL            string    `json:"url"`
	Datetime       time.Time `json:"datetime"`
	TicketURL      string    `json:"ticket_url"`
	Artists        []Artist  `json:"artists"`
	Venue          Venue     `json:"venue"`
	Status         string    `json:"status"`
	TicketStatus   string    `json:"ticket_status"`
	OnSaleDatetime time.Time `json:"on_sale_datetime"`
}

Event respresent events, returned by the event service Has normal time.Time (RFC 3339) json serialisation

type EventOnSaleSoonParams

type EventOnSaleSoonParams struct {
	Location string `url:"location,omitempty"`
	Radius   int    `url:"radius,omitempty"`
}

EventOnSaleSoonParams is the parameter for the Events On Sale Soon api call https://www.bandsintown.com/api/1.0/requests#events-on-sale-soon

type EventRecommendedParams

type EventRecommendedParams struct {
	EventSearchParams
	OnlyRecommendations bool
}

EventRecommendedParams is the parameter for the Events Recommmended api call https://www.bandsintown.com/api/1.0/requests#events-recommended

type EventSearchParams

type EventSearchParams struct {
	Artists  []string
	Location string
	Radius   int
	Date     []time.Time
	Page     int
	PerPage  int
}

EventSearchParams is the parameter for the Events Search api call https://www.bandsintown.com/api/1.0/requests#events-search

type Venue

type Venue struct {
	ID        int     `json:"id"`
	Name      string  `json:"name"`
	City      string  `json:"city"`
	Region    string  `json:"region"`
	Country   string  `json:"country"`
	URL       string  `json:"url"`
	Latitude  float64 `json:"latitude"`
	Longitude float64 `json:"longitude"`
}

Venue represents a venue, returned by the Venue Search api call https://www.bandsintown.com/api/1.0/requests#venues-search

type VenueSearchParams

type VenueSearchParams struct {
	Query    string
	Location string
	Radius   int
	Page     int
	PerPage  int
}

VenueSearchParams is the parameter for the Venue Search api call https://www.bandsintown.com/api/1.0/requests#venues-search

Jump to

Keyboard shortcuts

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