apiclient

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: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArtistService

type ArtistService struct {
	AppID string
	Sling *sling.Sling
}

An ArtistService provides methods for Artist related requests

func NewArtistService

func NewArtistService(httpClient *http.Client, baseURL string, appID string) *ArtistService

NewArtistService returns a new ArtistService.

func (*ArtistService) GetInfoByMbID

func (service *ArtistService) GetInfoByMbID(MbID string) (datatypes.ArtistInfo, *http.Response, error)

GetInfoByMbID returns basic information for a single artist by MbID, including the number of upcoming events. Useful in determining if an artist is on tour without requesting the event data. https://www.bandsintown.com/api/1.0/requests#artists-get http://api.bandsintown.com/artists/name.format

func (*ArtistService) GetInfoByName

func (service *ArtistService) GetInfoByName(name string) (datatypes.ArtistInfo, *http.Response, error)

GetInfoByName returns basic information for a single artist by name, including the number of upcoming events. Useful in determining if an artist is on tour without requesting the event data. https://www.bandsintown.com/api/1.0/requests#artists-get http://api.bandsintown.com/artists/name.format

type Client

type Client struct {
	// Service Implementations
	ArtistService *ArtistService
	EventService  *EventService
	VenueService  *VenueService
}

Client for the Bands in Town API

func NewClient

func NewClient(appID string) *Client

NewClient returns a new Client // todo, this is nil???

func NewClientDetailed

func NewClientDetailed(httpClient *http.Client, baseURL string, appID string) *Client

NewClientDetailed returns a new Client

type EventService

type EventService struct {
	AppID string
	Sling *sling.Sling
}

EventService provides methods for Event related requests

func NewEventService

func NewEventService(httpClient *http.Client, baseURL string, appID string) *EventService

NewEventService returns a new EventService.

func (*EventService) Daily

func (service *EventService) Daily() ([]datatypes.Event, *http.Response, error)

Daily returns events that have been created, updated or deleted in the last day. Useful in syncing data with Bandsintown. The daily feed is updated each day at 12:00 PM EST. (17:00 UTC) https://www.bandsintown.com/api/1.0/requests#events-daily http://api.bandsintown.com/events/daily.format

func (*EventService) OnSaleSoon

func (service *EventService) OnSaleSoon(params datatypes.EventOnSaleSoonParams) ([]datatypes.Event, *http.Response, error)

OnSaleSoon returns events going on sale in the next week (including today). Supports location filtering. https://www.bandsintown.com/api/1.0/requests#events-on-sale-soon http://api.bandsintown.com/events/on_sale_soon.format

func (*EventService) Recommended

func (service *EventService) Recommended(params datatypes.EventRecommendedParams) ([]datatypes.Event, *http.Response, error)

Recommended returns recommended events given an artist or list of artists and a location (see below for all available params). https://www.bandsintown.com/api/1.0/requests#events-recommended http://api.bandsintown.com/events/recommended.format

func (*EventService) Search

func (service *EventService) Search(params datatypes.EventSearchParams) ([]datatypes.Event, *http.Response, error)

Search returns events matching search criteria (see below for available params). Useful in searching for local events or events within a specific time frame. If you are just looking for upcoming events for a single artist use Artists - Events. https://www.bandsintown.com/api/1.0/requests#events-search http://api.bandsintown.com/events/search.format

type VenueService

type VenueService struct {
	AppID string
	Sling *sling.Sling
}

VenueService provides methods for Venue related requests

func NewVenueService

func NewVenueService(httpClient *http.Client, baseURL string, appID string) *VenueService

NewVenueService returns a new ArtistService.

func (*VenueService) Events

func (service *VenueService) Events(venueID int) ([]datatypes.Event, *http.Response, error)

Events returns all upcoming events for a single venue. https://www.bandsintown.com/api/1.0/requests#venues-events http://api.bandsintown.com/venues/id/events.format

func (*VenueService) Search

func (service *VenueService) Search(params datatypes.VenueSearchParams) ([]datatypes.Venue, *http.Response, error)

Search returns venues matching a search query (supports location filtering). https://www.bandsintown.com/api/1.0/requests#venues-search http://api.bandsintown.com/venues/search.format todo: Seems consistant with the Api. But I can't even get data from their API manually. Perhaps it's broken on their end?

Jump to

Keyboard shortcuts

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