Documentation ¶
Overview ¶
Support for the Amiando API.
Used by http://startuplive.in
Index ¶
- Constants
- func CreateAPIKey(name string) (key string, err error)
- func PrettifyJSON(compactJSON []byte) string
- func TestAmiandoWebHook(posturl string) error
- type Address
- type AmiandoUser
- type Api
- func (self *Api) ActivateEvent(id string) error
- func (self *Api) AddBillingInfoToUser(userid, firstName, lastName, company, street, zipCode, city, country string) error
- func (self *Api) AddPaymentToUser(userid, accountHolder, bankName, swift, iban, country string) error
- func (self *Api) Call(resourceFormat string, resourceArg interface{}, result ErrorReporter) (err error)
- func (self *Api) Call_debug(resourceFormat string, resourceArg interface{}, result ErrorReporter) (err error)
- func (self *Api) CreateAmiandoUser(firstname, lastname, username, password, language string) (id string, err error)
- func (self *Api) CreateEvent(hostId string, title string, country string, date string, identifier string) (id string, err error)
- func (self *Api) CreateTicketCategory(event, name, price, available, salestart, saleend string) (id string, err error)
- func (self *Api) HostId(username string) (ids []ID, err error)
- func (self *Api) Payment(id ID, out interface{}) (err error)
- func (self *Api) Ticket(id ID, out interface{}) (err error)
- func (self *Api) TicketIDsOfPayment(paymentID ID) (ids []ID, err error)
- func (self *Api) User(id ID, out interface{}) (err error)
- type ApiKey
- type BasicEventData
- type Error
- type ErrorReporter
- type Event
- func (self *Event) EnumParticipants() (<-chan *Participant, <-chan error)
- func (self *Event) EnumParticipantsByPayment(payment string) (<-chan *Participant, <-chan error)
- func (self *Event) PaymentIDs() (ids []ID, err error)
- func (self *Event) Read(out ErrorReporter) (err error)
- func (self *Event) TicketIDs() (ids []ID, err error)
- type ID
- type JsonResult
- type Participant
- type PaymentStatus
- type Product
- type ResultBase
- type TicketType
- type UserData
- type UserDataType
Constants ¶
View Source
const ( Male = 1 Female = 2 )
View Source
const DateFormat = "2006-01-02T15:04:05"
Variables ¶
This section is empty.
Functions ¶
func CreateAPIKey ¶
func PrettifyJSON ¶
func TestAmiandoWebHook ¶
Types ¶
type AmiandoUser ¶
type Api ¶
type Api struct { Key string // contains filtered or unexported fields }
func (*Api) ActivateEvent ¶
func (*Api) AddBillingInfoToUser ¶
func (*Api) AddPaymentToUser ¶
func (*Api) Call ¶
func (self *Api) Call(resourceFormat string, resourceArg interface{}, result ErrorReporter) (err error)
func (*Api) Call_debug ¶
func (self *Api) Call_debug(resourceFormat string, resourceArg interface{}, result ErrorReporter) (err error)
func (*Api) CreateAmiandoUser ¶
func (*Api) CreateEvent ¶
func (*Api) CreateTicketCategory ¶
func (*Api) TicketIDsOfPayment ¶
type BasicEventData ¶
type BasicEventData struct { HostID ID `json:"hostId"` Title string `json:"title"` Country string `json:"country"` Language string `json:"language"` StartDate string `json:"selectedDate"` EndDate string `json:"selectedEndDate"` Timezone string `json:"timezone"` Visibility string `json:"visibility"` Identifier string `json:"identifier"` Description string `json:"description"` ShortDescription string `json:"shortDescription"` EventType string `json:"eventType"` OrganisatorDisplayName string `json:"organisatorDisplayName"` PartnerEventUrl string `json:"partnerEventUrl"` Location string `json:"location"` LocationDescription string `json:"locationDescription"` Street string `json:"street2"` ZipCode string `json:"zipCode"` City string `json:"city"` State string `json:"state"` CreationTime string `json:"creationTime"` LastModified string `json:"lastModified"` Longitude float64 `json:"longitude"` Latitude float64 `json:"latitude"` }
type ErrorReporter ¶
type ErrorReporter interface { Err() error Reset() }
type Event ¶
type Event struct { ResultBase Data BasicEventData `json:"event"` Api *Api `json:"-"` Identifier string `json:"-"` InternalID ID `json:"-"` }
func (*Event) EnumParticipants ¶
func (self *Event) EnumParticipants() (<-chan *Participant, <-chan error)
func (*Event) EnumParticipantsByPayment ¶
func (self *Event) EnumParticipantsByPayment(payment string) (<-chan *Participant, <-chan error)
func (*Event) PaymentIDs ¶
func (*Event) Read ¶
func (self *Event) Read(out ErrorReporter) (err error)
type JsonResult ¶
type JsonResult struct { ResultBase JSON []byte }
Has to be used as a pointer to member of a struct
func (*JsonResult) Reset ¶
func (self *JsonResult) Reset()
func (*JsonResult) String ¶
func (self *JsonResult) String() string
func (*JsonResult) UnmarshalJSON ¶
func (self *JsonResult) UnmarshalJSON(jsonData []byte) error
type Participant ¶
type Participant struct { Event *Event `json:"-"` PaymentID ID `json:"-"` PaymentUserID ID `json:"buyerId"` // payment PaymentStatus PaymentStatus `json:"status"` // payment InvoiceNumber string `json:"identifier"` // payment CreatedDate string `json:"creationTime"` // payment ModifiedDate string `json:"lastModified"` // payment UserData []UserData `json:"userData"` // payment & ticket TicketID ID `json:"-"` FirstName string `json:"firstName"` // ticket LastName string `json:"lastName"` // ticket Email string `json:"email"` // ticket CheckedDate string `json:"lastChecked"` // ticket CancelledDate string `json:"cancelled"` // ticket TicketType TicketType `json:"ticketType"` // ticket RegistrationNumber string `json:"displayIdentifier"` // ticket }
func (*Participant) FindRequiredUserData ¶
func (self *Participant) FindRequiredUserData(title string, restrictToTypes ...UserDataType) (userData *UserData, err error)
func (*Participant) FindUserData ¶
func (self *Participant) FindUserData(title string, restrictToTypes ...UserDataType) (userData *UserData, found bool)
Returns nil if no UserData with title is found
type PaymentStatus ¶
type PaymentStatus string
const ( PaymentNew PaymentStatus = "new" PaymentAuthorized PaymentStatus = "authorized" PaymentPaid PaymentStatus = "paid" PaymentDisbursed PaymentStatus = "disbursed" PaymentCancelled PaymentStatus = "cancelled" )
type ResultBase ¶
func (*ResultBase) Err ¶
func (self *ResultBase) Err() error
func (*ResultBase) Reset ¶
func (self *ResultBase) Reset()
type TicketType ¶
type TicketType string
const ( BadgeTicket TicketType = "com.amiando.ticket.type.Badge" // Means that the ticket is a badge. ETicketTicket TicketType = "com.amiando.ticket.type.ETicket" // Means that the ticket will be sent via email. PaperTicket TicketType = "com.amiando.ticket.type.Paper" // Means that the ticket is a confirmation. ConfirmationTicket TicketType = "com.amiando.ticket.type.Confirmation" // Means that the payment was bought using prepayment. OnSiteTicket TicketType = "com.amiando.ticket.type.OnSite" // Means that the ticket was bought via EasyEntry. )
type UserData ¶
type UserData struct { Title string `json:"title"` Type UserDataType `json:"type"` Value interface{} `json:"value"` }
type UserDataType ¶
type UserDataType string
const ( UserDataString UserDataType = "string" // value is of type String. UserDataNumber UserDataType = "number" // value is of type Integer. UserDataDate UserDataType = "date" // value is of type Date. UserDataGender UserDataType = "gender" // value is of type Integer. UserDataEmail UserDataType = "email" // value is of type String. UserDataUrl UserDataType = "url" // value is of type String. UserDataBirthday UserDataType = "birthday" // value is of type Date. UserDataAddress UserDataType = "address" // value is an object of type Address. UserDataPhone UserDataType = "phone" // value is of type String. UserDataZipCode UserDataType = "zipCode" // value is of type String. UserDataCountry UserDataType = "country" // value is of type Country. Country codes are defined by the ISO 3166-1-alpha-2 code standard UserDataBlog UserDataType = "blog" // value is of type String. UserDataCheckbox UserDataType = "checkbox" // value is of type Bool UserDataDropdown UserDataType = "dropdown" // value is of type String. UserDataTextArea UserDataType = "textarea" // value is of type String. UserDataProduct UserDataType = "product" // value is of type String. UserDataPhoto UserDataType = "photo" // value is of type String (URL) )
Click to show internal directories.
Click to hide internal directories.