Documentation ¶
Index ¶
- Constants
- func AddAttendeeToKeeper(ctx sdk.Context, keeper *longy.Keeper, badgeID string, claimed bool, ...) (attendee types.Attendee)
- func GetAttendees() (ga longy.GenesisAttendees, err sdk.Error)
- func SetServiceAccount(ctx sdk.Context, k longy.Keeper, addresses sdk.AccAddress) exported.Account
- type EventbriteAttendee
- type EventbriteAttendees
- type EventbriteData
- type EventbriteProfile
- type Pagination
Constants ¶
const ( //TicketSponsorNameLowerCase is the sponsors ticket type TicketSponsorNameLowerCase = "sponsors" //TicketSpeakerCescNameLowerCase is the cesc speakers ticket type TicketSpeakerCescNameLowerCase = "cesc speakers" //TicketSpeakerEpicenterNameLowerCase is the epicenter speakers ticket type TicketSpeakerEpicenterNameLowerCase = "epicenter speakers" )
const ( //EventbriteAuthEnvKey the key name for auth EventbriteAuthEnvKey = "EVENTBRITE_AUTH" //EventbriteEventEnvKey the event to operate on EventbriteEventEnvKey = "EVENTBRITE_EVENT" //EventbriteURL the eventbrite url for sfblock week EventbriteURL = "https://www.eventbriteapi.com/v3/events/%s/attendees?page=%d" //HeaderPrefix the prefix to the value for auth with eventbrite HeaderPrefix = "Bearer %s" )
Variables ¶
This section is empty.
Functions ¶
func AddAttendeeToKeeper ¶
func AddAttendeeToKeeper(ctx sdk.Context, keeper *longy.Keeper, badgeID string, claimed bool, sponsor bool) (attendee types.Attendee)
AddAttendeeToKeeper is a helper for adding an attendee and its associate account to a test keeper
func GetAttendees ¶
func GetAttendees() (ga longy.GenesisAttendees, err sdk.Error)
GetAttendees gets the attendee list from eventbrite while using the auth key found in an environmental var
func SetServiceAccount ¶
SetServiceAccount creates and sets an account to be the service
Types ¶
type EventbriteAttendee ¶
type EventbriteAttendee struct { ID string `json:"id"` TicketClassName string `json:"ticket_class_name"` Profile EventbriteProfile `json:"profile"` //gets the full info of the account }
EventbriteAttendee is the attendee structure in the genesis file
func (*EventbriteAttendee) IsSponsorTicket ¶
func (e *EventbriteAttendee) IsSponsorTicket() bool
IsSponsorTicket checks to see if the ticket type is of a speaker or sponsor that gets special point bonuses
func (*EventbriteAttendee) ToGenesisAttendee ¶
func (e *EventbriteAttendee) ToGenesisAttendee() longy.Attendee
ToGenesisAttendee turns the eventbrite type to our local type
type EventbriteAttendees ¶
type EventbriteAttendees []EventbriteAttendee
EventbriteAttendees is the array of attendees that the api returns for processing
type EventbriteData ¶
type EventbriteData struct { PaginationInfo Pagination `json:"pagination"` Attendees EventbriteAttendees `json:"attendees"` }
EventbriteData is the return data of a page call
type EventbriteProfile ¶
type EventbriteProfile struct { Name string `json:"name"` Company string `json:"company"` Email string `json:"email"` JobTitle string `json:"job_title"` }
EventbriteProfile is the profile of the attendee from eventbrite
type Pagination ¶
type Pagination struct { Count int `json:"object_count"` Page int `json:"page_number"` PageCount int `json:"page_count"` }
Pagination is the pagination info of a page call