SupportAPI
| Method | Description |
|---|---|
CreateSupportTicket | Create a ticket |
ListSupportTickets | List my tickets |
GetSupportTicket | Get one ticket |
SendSupportMessage | Send a message |
ConnectSupportTicketWebSocket | Live ticket stream |
ticketBody := analogwakatime.NewCreateSupportTicketRequest(
"Statistics are not updating",
"My weekly dashboard has not changed since this morning.",
)
ticket, _, err := client.SupportAPI.
CreateSupportTicket(ctx).
CreateSupportTicketRequest(*ticketBody).
Execute()
tickets, _, err := client.SupportAPI.
ListSupportTickets(ctx).
Page(1).
PerPage(20).
Status("open").
Execute()
const ticketID = "TICKET_ID"
ticket, _, err := client.SupportAPI.GetSupportTicket(ctx, ticketID).Execute()
messageBody := analogwakatime.NewSendSupportMessageRequest(
"The issue also affects the desktop dashboard.",
)
messageBody.SetClientMessageId("MESSAGE_UUID")
message, _, err := client.SupportAPI.
SendSupportMessage(ctx, ticketID).
SendSupportMessageRequest(*messageBody).
Execute()
response, err := client.SupportAPI.
ConnectSupportTicketWebSocket(context.Background(), ticketID).
Token(apiToken).
Execute()
clientMessageId prevents accidental duplicate messages when the client
retries.