Documentation
¶
Index ¶
- func NewEvent(event *DeserialisableEvent) *datatypes.Event
- func NewEvents(deserialisableEvents []DeserialisableEvent) []datatypes.Event
- type AppIDParam
- type ArtistEventSearchQueryParam
- type CustomResponseTime
- type DeserialisableEvent
- type SerialisableEventOnSaleSoonParams
- type SerialisableEventRecommendedParams
- type SerialisableEventSearchParams
- type SerialisableVenueSearchParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewEvent ¶
func NewEvent(event *DeserialisableEvent) *datatypes.Event
NewEvent creates Event from DeserialisableEvent
func NewEvents ¶
func NewEvents(deserialisableEvents []DeserialisableEvent) []datatypes.Event
NewEvents creates multiple Events from multiple DeserialisableEvents
Types ¶
type AppIDParam ¶
type AppIDParam struct {
AppID string `url:"app_id,omitempty"`
}
AppIDParam to contain appID when there are no other parameters
type ArtistEventSearchQueryParam ¶
type ArtistEventSearchQueryParam struct {
Date string `url:"date,omitempty"`
}
ArtistEventSearchQueryParam is the parameter for the Artist Events api call Internal types are directly compatible with the api https://www.bandsintown.com/api/1.0/requests#artists-events
func NewArtistEventSearchParam ¶
func NewArtistEventSearchParam(params *[]time.Time) *ArtistEventSearchQueryParam
NewArtistEventSearchParam creates ArtistEventSearchParam from []time.Time
type CustomResponseTime ¶
CustomResponseTime is a time.Time with Json serialisation compatible with the bandsintown api
func (*CustomResponseTime) MarshalJSON ¶
func (ct *CustomResponseTime) MarshalJSON() ([]byte, error)
MarshalJSON converts CustomResponseTime from json
func (*CustomResponseTime) UnmarshalJSON ¶
func (ct *CustomResponseTime) UnmarshalJSON(b []byte) (err error)
UnmarshalJSON converts CustomResponseTime to json
type DeserialisableEvent ¶
type DeserialisableEvent struct {
ID int `json:"id"`
URL string `json:"url"`
Datetime CustomResponseTime `json:"datetime"`
TicketURL string `json:"ticket_url"`
Artists []datatypes.Artist `json:"artists"`
Venue datatypes.Venue `json:"venue"`
Status string `json:"status"`
TicketStatus string `json:"ticket_status"`
OnSaleDatetime CustomResponseTime `json:"on_sale_datetime"`
}
DeserialisableEvent in an datatypes.Event.go with CustomDate serialisation
type SerialisableEventOnSaleSoonParams ¶
type SerialisableEventOnSaleSoonParams struct {
Location string `url:"location,omitempty"`
Radius int `url:"radius,omitempty"`
AppID string `url:"app_id,omitempty"`
}
SerialisableEventOnSaleSoonParams is the parameter for the Events On Sale Soon api call Internal types are directly compatible with the api https://www.bandsintown.com/api/1.0/requests#events-on-sale-soon
func NewSerialisableEventOnSaleSoonParams ¶
func NewSerialisableEventOnSaleSoonParams(params *datatypes.EventOnSaleSoonParams, appID string) *SerialisableEventOnSaleSoonParams
NewSerialisableEventOnSaleSoonParams creates SerialisableEventSearchParams from EventSearchParams
type SerialisableEventRecommendedParams ¶
type SerialisableEventRecommendedParams struct {
SerialisableEventSearchParams
OnlyRecommendations bool `url:"only_recs,omitempty"`
}
SerialisableEventRecommendedParams is the parameter for the Events Recommmended api call Internal types are directly compatible with the api https://www.bandsintown.com/api/1.0/requests#events-recommended
func NewSerialisableEventRecommendedParams ¶
func NewSerialisableEventRecommendedParams(params *datatypes.EventRecommendedParams, appID string) *SerialisableEventRecommendedParams
NewSerialisableEventRecommendedParams creates SerialisableEventSearchParams from EventSearchParams
type SerialisableEventSearchParams ¶
type SerialisableEventSearchParams struct {
Artists []string `url:"artists[],omitempty"`
Location string `url:"location,omitempty"`
Radius int `url:"radius,omitempty"`
Date string `url:"date,omitempty"`
Page int `url:"page,omitempty"`
PerPage int `url:"per_page,omitempty"`
AppID string `url:"app_id,omitempty"`
}
SerialisableEventSearchParams is the parameter for the Events Search api call Internal types are directly compatible with the api https://www.bandsintown.com/api/1.0/requests#events-search
func NewSerialisableEventSearchParams ¶
func NewSerialisableEventSearchParams(params *datatypes.EventSearchParams, appID string) *SerialisableEventSearchParams
NewSerialisableEventSearchParams creates SerialisableEventSearchParams from EventSearchParams
type SerialisableVenueSearchParams ¶
type SerialisableVenueSearchParams struct {
Query string `url:"query,omitempty"`
Location string `url:"location,omitempty"`
Radius int `url:"radius,omitempty"`
Page int `url:"page,omitempty"`
PerPage int `url:"per_page,omitempty"`
AppID string `url:"app_id,omitempty"`
}
SerialisableVenueSearchParams is the parameter for the Venue Search api call Internal types are directly compatible with the api https://www.bandsintown.com/api/1.0/requests#venues-search
func NewSerialisableVenueSearchParams ¶
func NewSerialisableVenueSearchParams(params *datatypes.VenueSearchParams, appID string) *SerialisableVenueSearchParams
NewSerialisableVenueSearchParams creates SerialisableVenueSearchParams from VenueSearchParams