package main import ( "fmt" "github.com.ticketmatic.tm-go.ticketmatic/ticketmatic" ) func main() { client := ticketmatic.NewClient("", " ") eventList, err := client.Events.GetList(&ticketmatic.EventQuery{}) if err != nil { fmt.Println(err) return } for _, event := range eventList.Data { fmt.Println(event.Name) } }
package main import ( "fmt" "github.com.ticketmatic.tm-go.ticketmatic/ticketmatic" ) func main() { client := ticketmatic.NewClient("This example shows how to use the Ticketmatic API client to create a new order. The `Create` method is used to create a new order object based on the provided parameters. The resulting order object is then printed to the console.", " ") newOrder := &ticketmatic.Order{ Customerid: 1234, Tickets: []*ticketmatic.Orderline{ &ticketmatic.Orderline{ Tickettypeid: 5678, Amount: 2, }, }, } response, err := client.Orders.Create(newOrder) if err != nil { fmt.Println(err) return } fmt.Println(response.Id) }