Documentation ¶
Overview ¶
Zendesk API client library for Go (golang).
Index ¶
- func WithLogger(logger *log.Logger) configOption
- func WithRequestPreProcessor(requestPreProcessor RequestPreProcessor) configOption
- func WithRoundTripper(roundTripper http.RoundTripper) configOption
- type AgentEvent
- type AgentEventExportResponse
- type AgentEventService
- type AgentEventValue
- type AgentState
- type AgentStates
- type Article
- type ArticleID
- type ArticleResponse
- type ArticlesResponse
- type ArticlesService
- type AuthenticationPassword
- type AuthenticationToken
- type CategoriesResponse
- type CategoriesService
- type Category
- type CategoryID
- type CategoryResponse
- type Chat
- type ChatCount
- type ChatCredentials
- type ChatEngagement
- type ChatEngagementID
- type ChatHistory
- type ChatID
- type ChatResponseTime
- type ChatSearchResult
- type ChatService
- type ChatSession
- type ChatVisitor
- type ChatWebPath
- type ChatsIncrementalExportResponse
- type ChatsResponse
- type ChatsSearchResponse
- type ChatsService
- func (s *ChatsService) IncrementalExport(ctx context.Context, startTime time.Time, ...) error
- func (s *ChatsService) List(ctx context.Context, pageHandler func(page ChatsResponse) error) error
- func (s *ChatsService) Search(ctx context.Context, query string, ...) error
- func (s *ChatsService) Show(ctx context.Context, id ChatID) (Chat, error)
- type CursorPaginationLinks
- type CursorPaginationMeta
- type CursorPaginationResponse
- type Error
- type GroupID
- type GuideService
- type IncrementalExportChat
- type IncrementalExportResponse
- type Organization
- type OrganizationCustomField
- type OrganizationID
- type OrganizationResponse
- type OrganizationSatisfactionRating
- type OrganizationService
- type OrganizationVia
- type OrganizationsIncrementalExportResponse
- type OrganizationsResponse
- type RequestPreProcessor
- type RequestPreProcessorFunc
- type Section
- type SectionID
- type SectionsResponse
- type SectionsService
- type Service
- type SupportService
- type Tags
- type TagsPayload
- type Ticket
- type TicketCustomField
- type TicketFormID
- type TicketID
- type TicketResponse
- type TicketSatisfactionRating
- type TicketService
- func (s TicketService) AddTags(ctx context.Context, ticketID TicketID, tags Tags) (Tags, error)
- func (s TicketService) IncrementalExport(ctx context.Context, startTime time.Time, perPage uint, ...) error
- func (s TicketService) RemoveTags(ctx context.Context, ticketID TicketID, tags Tags) (Tags, error)
- func (s TicketService) SetTags(ctx context.Context, ticketID TicketID, tags Tags) (Tags, error)
- func (s TicketService) Show(ctx context.Context, id TicketID) (Ticket, error)
- type TicketVia
- type TicketsIncrementalExportResponse
- type TicketsResponse
- type User
- type UserID
- type UserResponse
- type UserService
- type UsersIncrementalExportResponse
- type UsersResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithLogger ¶
func WithRequestPreProcessor ¶
func WithRequestPreProcessor(requestPreProcessor RequestPreProcessor) configOption
func WithRoundTripper ¶
func WithRoundTripper(roundTripper http.RoundTripper) configOption
Types ¶
type AgentEvent ¶ added in v0.0.4
type AgentEvent struct { StartTime time.Time `json:"timestamp"` AccountID uint64 `json:"account_id"` AgentID UserID `json:"agent_id"` FieldName string `json:"field_name"` ID string `json:"id"` PreviousValue AgentEventValue `json:"previous_value"` Value AgentEventValue `json:"value"` }
type AgentEventExportResponse ¶ added in v0.0.4
type AgentEventExportResponse struct { AgentEvents []AgentEvent `json:"agent_events"` EndTimeUnix float64 `json:"end_time"` NextPage string `json:"next_page"` Count int64 `json:"count"` }
func (AgentEventExportResponse) EndTime ¶ added in v0.0.4
func (response AgentEventExportResponse) EndTime() time.Time
type AgentEventService ¶ added in v0.0.4
type AgentEventService struct {
// contains filtered or unexported fields
}
https://developer.zendesk.com/api-reference/live-chat/chat-api/incremental_agent_events_api/
func (*AgentEventService) GetAgentStates ¶ added in v0.0.4
func (s *AgentEventService) GetAgentStates( ctx context.Context, ) AgentStates
func (*AgentEventService) IncrementalExport ¶ added in v0.0.4
func (s *AgentEventService) IncrementalExport( ctx context.Context, startTime time.Time, pageHandler func(response AgentEventExportResponse) error, ) error
func (*AgentEventService) UpdateAgentStates ¶ added in v0.0.4
type AgentEventValue ¶ added in v0.0.4
type AgentEventValue string
func (*AgentEventValue) UnmarshalJSON ¶ added in v0.0.4
func (a *AgentEventValue) UnmarshalJSON(data []byte) (err error)
type AgentState ¶ added in v0.0.4
type AgentStates ¶ added in v0.0.4
type AgentStates map[UserID]AgentState
type Article ¶
type Article struct { AuthorID UserID `json:"author_id"` Body string `json:"body"` CommentsDisabled bool `json:"comments_disabled"` ContentTagIds []any `json:"content_tag_ids"` CreatedAt time.Time `json:"created_at"` Draft bool `json:"draft"` EditedAt time.Time `json:"edited_at"` HTML_URL string `json:"html_url"` ID ArticleID `json:"id"` LabelNames []any `json:"label_names"` Locale string `json:"locale"` Name string `json:"name"` Outdated bool `json:"outdated"` PermissionGroupID uint64 `json:"permission_group_id"` Position int64 `json:"position"` Promoted bool `json:"promoted"` SectionID uint64 `json:"section_id"` SourceLocale string `json:"source_locale"` Title string `json:"title"` UpdatedAt time.Time `json:"updated_at"` URL string `json:"url"` UserSegmentID uint64 `json:"user_segment_id"` VoteCount uint64 `json:"vote_count"` VoteSum uint64 `json:"vote_sum"` }
type ArticleResponse ¶
type ArticleResponse struct {
Article Article `json:"article"`
}
type ArticlesResponse ¶
type ArticlesResponse struct { Articles []Article `json:"articles"` CursorPaginationResponse }
type ArticlesService ¶
type ArticlesService struct {
// contains filtered or unexported fields
}
https://developer.zendesk.com/api-reference/help_center/help-center-api/articles/
func (ArticlesService) List ¶
func (s ArticlesService) List( ctx context.Context, pageHandler func(response ArticlesResponse) error, ) error
https://developer.zendesk.com/api-reference/help_center/help-center-api/articles/#list-articles
func (ArticlesService) Show ¶
https://developer.zendesk.com/api-reference/help_center/help-center-api/articles/#show-article
type AuthenticationPassword ¶
func (AuthenticationPassword) AddZendeskAuthentication ¶
func (auth AuthenticationPassword) AddZendeskAuthentication(r *http.Request)
type AuthenticationToken ¶
func (AuthenticationToken) AddZendeskAuthentication ¶
func (auth AuthenticationToken) AddZendeskAuthentication(r *http.Request)
type CategoriesResponse ¶
type CategoriesResponse struct { Categories []Category `json:"categories"` CursorPaginationResponse }
type CategoriesService ¶
type CategoriesService struct {
// contains filtered or unexported fields
}
https://developer.zendesk.com/api-reference/help_center/help-center-api/categories/
type Category ¶
type Category struct { CreatedAt time.Time `json:"created_at"` Description string `json:"description"` HTML_URL string `json:"html_url"` ID CategoryID `json:"id"` Locale string `json:"locale"` Name string `json:"name"` Outdated bool `json:"outdated"` Position int64 `json:"position"` SourceLocale string `json:"source_locale"` UpdatedAt time.Time `json:"updated_at"` URL string `json:"url"` }
type CategoryID ¶
type CategoryID uint64
type CategoryResponse ¶
type CategoryResponse struct {
Category Category `json:"category"`
}
type Chat ¶
type Chat struct { ID ChatID `json:"id"` Visitor ChatVisitor `json:"visitor"` StartedBy string `json:"started_by"` Session ChatSession `json:"session"` WebPath []ChatWebPath `json:"webpath"` Timestamp time.Time `json:"timestamp"` Count ChatCount `json:"count"` Duration uint64 `json:"duration"` ResponseTime ChatResponseTime `json:"response_time"` AgentIds []UserID `json:"agent_ids"` Triggered bool `json:"triggered"` Unread bool `json:"unread"` Missed bool `json:"missed"` Tags []string `json:"tags"` Type string `json:"type"` History []ChatHistory `json:"history"` DepartmentID *GroupID `json:"department_id"` EndTimestamp time.Time `json:"end_timestamp"` ZendeskTicketID TicketID `json:"zendesk_ticket_id"` }
type ChatCredentials ¶
type ChatEngagement ¶ added in v0.0.2
type ChatEngagement struct { ID ChatEngagementID `json:"id"` AgentID UserID `json:"agent_id"` DepartmentID *GroupID `json:"department_id"` Assigned bool `json:"assigned"` Accepted bool `json:"accepted"` StartedBy string `json:"started_by"` Timestamp time.Time `json:"timestamp"` Duration float64 `json:"duration"` Count ChatCount `json:"count"` ResponseTime ChatResponseTime `json:"response_time"` }
type ChatEngagementID ¶ added in v0.0.2
type ChatEngagementID string
type ChatHistory ¶
type ChatHistory struct { DepartmentID GroupID `json:"department_id"` DepartmentName string `json:"department_name"` Name string `json:"name"` Channel string `json:"channel"` Index int `json:"index"` Timestamp time.Time `json:"timestamp"` Type string `json:"type"` Msg string `json:"msg"` Options string `json:"options"` MsgID string `json:"msg_id"` SenderType string `json:"sender_type"` Source string `json:"source"` AgentID UserID `json:"agent_id,string"` Reason string `json:"reason"` }
type ChatResponseTime ¶
type ChatSearchResult ¶ added in v0.0.3
type ChatService ¶
type ChatService struct {
// contains filtered or unexported fields
}
https://developer.zendesk.com/api-reference/live-chat/introduction/
func (*ChatService) AgentsService ¶ added in v0.0.4
func (s *ChatService) AgentsService() *AgentEventService
https://developer.zendesk.com/api-reference/live-chat/chat-api/agents/
func (*ChatService) Chats ¶
func (s *ChatService) Chats() *ChatsService
https://developer.zendesk.com/api-reference/live-chat/chat-api/chats/
type ChatSession ¶
type ChatSession struct { EndDate time.Time `json:"end_date"` CountryCode string `json:"country_code"` City string `json:"city"` Browser string `json:"browser"` IP string `json:"ip"` CountryName string `json:"country_name"` ID string `json:"id"` Region string `json:"region"` Platform string `json:"platform"` UserAgent string `json:"user_agent"` StartDate time.Time `json:"start_date"` }
type ChatVisitor ¶
type ChatWebPath ¶
type ChatsIncrementalExportResponse ¶
type ChatsIncrementalExportResponse struct { Chats []IncrementalExportChat `json:"chats"` Count uint64 `json:"count"` EndID ChatID `json:"end_id"` EndTimeUnix int64 `json:"end_time"` NextPage string `json:"next_page"` }
func (ChatsIncrementalExportResponse) EndTime ¶
func (response ChatsIncrementalExportResponse) EndTime() time.Time
type ChatsResponse ¶
type ChatsSearchResponse ¶ added in v0.0.3
type ChatsSearchResponse struct { Results []ChatSearchResult `json:"results"` NextURL *string `json:"next_url"` }
type ChatsService ¶
type ChatsService struct {
// contains filtered or unexported fields
}
https://developer.zendesk.com/api-reference/live-chat/chat-api/chats/
func (*ChatsService) IncrementalExport ¶
func (s *ChatsService) IncrementalExport( ctx context.Context, startTime time.Time, pageHandler func(response ChatsIncrementalExportResponse) error, ) error
func (*ChatsService) List ¶
func (s *ChatsService) List(ctx context.Context, pageHandler func(page ChatsResponse) error) error
https://developer.zendesk.com/api-reference/live-chat/chat-api/chats/#list-chats
func (*ChatsService) Search ¶ added in v0.0.3
func (s *ChatsService) Search(ctx context.Context, query string, pageHandler func(page ChatsSearchResponse) error) error
https://developer.zendesk.com/api-reference/live-chat/chat-api/chats/#search-chats
func (*ChatsService) Show ¶
https://developer.zendesk.com/api-reference/live-chat/chat-api/chats/#show-chat
type CursorPaginationLinks ¶
type CursorPaginationMeta ¶
type CursorPaginationResponse ¶
type CursorPaginationResponse struct { Meta CursorPaginationMeta `json:"meta"` Links CursorPaginationLinks `json:"links"` }
type Error ¶
func (*Error) UnmarshalJSON ¶
type GuideService ¶
type GuideService struct {
// contains filtered or unexported fields
}
https://developer.zendesk.com/api-reference/help_center/help-center-api/introduction/
func (*GuideService) Articles ¶
func (s *GuideService) Articles() *ArticlesService
https://developer.zendesk.com/api-reference/help_center/help-center-api/articles/
func (*GuideService) Categories ¶
func (s *GuideService) Categories() *CategoriesService
https://developer.zendesk.com/api-reference/help_center/help-center-api/categories/
func (*GuideService) Sections ¶
func (s *GuideService) Sections() *SectionsService
https://developer.zendesk.com/api-reference/help_center/help-center-api/sections/
type IncrementalExportChat ¶ added in v0.0.2
type IncrementalExportChat struct { Chat ChatEngagements []ChatEngagement `json:"engagements"` }
type IncrementalExportResponse ¶
type IncrementalExportResponse struct { EndTimeUnix int64 `json:"end_time"` EndOfStream bool `json:"end_of_stream"` }
func (IncrementalExportResponse) EndTime ¶
func (response IncrementalExportResponse) EndTime() time.Time
type Organization ¶
type Organization struct {
ID OrganizationID `json:"id"`
}
type OrganizationCustomField ¶
type OrganizationID ¶
type OrganizationID uint64
type OrganizationResponse ¶
type OrganizationResponse struct {
Organization Organization `json:"organization"`
}
type OrganizationSatisfactionRating ¶
type OrganizationSatisfactionRating struct {
Score string `json:"score"`
}
type OrganizationService ¶
type OrganizationService struct {
// contains filtered or unexported fields
}
https://developer.zendesk.com/api-reference/ticketing/organizations/organizations/
func (OrganizationService) IncrementalExport ¶
func (s OrganizationService) IncrementalExport( ctx context.Context, startTime int64, pageHandler func(response OrganizationsIncrementalExportResponse) error, ) error
func (OrganizationService) Show ¶
func (s OrganizationService) Show(ctx context.Context, id OrganizationID) (Organization, error)
https://developer.zendesk.com/api-reference/ticketing/organizations/organizations/#show-organization
type OrganizationVia ¶
type OrganizationVia struct {
Channel string `json:"channel"`
}
type OrganizationsIncrementalExportResponse ¶
type OrganizationsIncrementalExportResponse struct { OrganizationsResponse IncrementalExportResponse }
type OrganizationsResponse ¶
type OrganizationsResponse struct {
Organizations []Organization `json:"organizations"`
}
type RequestPreProcessor ¶
type RequestPreProcessorFunc ¶
func (RequestPreProcessorFunc) ProcessRequest ¶
func (p RequestPreProcessorFunc) ProcessRequest(r *http.Request) error
type Section ¶
type Section struct { CategoryID CategoryID `json:"category_id"` CreatedAt time.Time `json:"created_at"` Description string `json:"description"` HTML_URL string `json:"html_url"` ID SectionID `json:"id"` Locale string `json:"locale"` Name string `json:"name"` Outdated bool `json:"outdated"` ParentSectionID any `json:"parent_section_id"` Position uint `json:"position"` Sorting string `json:"sorting"` SourceLocale string `json:"source_locale"` ThemeTemplate string `json:"theme_template"` UpdatedAt time.Time `json:"updated_at"` URL string `json:"url"` }
type SectionsResponse ¶
type SectionsResponse struct { Sections []Section `json:"sections"` Page int `json:"page"` PreviousPage any `json:"previous_page"` NextPage string `json:"next_page"` PerPage int `json:"per_page"` PageCount int `json:"page_count"` Count int `json:"count"` SortBy string `json:"sort_by"` SortOrder string `json:"sort_order"` }
type SectionsService ¶
type SectionsService struct {
// contains filtered or unexported fields
}
https://developer.zendesk.com/api-reference/help_center/help-center-api/sections/
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService( subDomain string, zendeskAuth authentication, chatCredentials ChatCredentials, opts ...configOption, ) *Service
func (*Service) Chat ¶
func (s *Service) Chat() *ChatService
https://developer.zendesk.com/api-reference/live-chat/introduction/
func (*Service) Guide ¶
func (s *Service) Guide() *GuideService
https://developer.zendesk.com/api-reference/help_center/help-center-api/introduction/
func (*Service) Support ¶
func (s *Service) Support() *SupportService
https://developer.zendesk.com/api-reference/ticketing/introduction/
type SupportService ¶
type SupportService struct {
// contains filtered or unexported fields
}
https://developer.zendesk.com/api-reference/ticketing/introduction/
func (*SupportService) Organizations ¶
func (s *SupportService) Organizations() *OrganizationService
https://developer.zendesk.com/api-reference/ticketing/organizations/organizations/
func (*SupportService) Tickets ¶
func (s *SupportService) Tickets() *TicketService
https://developer.zendesk.com/api-reference/ticketing/tickets/tickets/
func (*SupportService) Users ¶
func (s *SupportService) Users() *UserService
https://developer.zendesk.com/api-reference/ticketing/users/users/
type TagsPayload ¶
type TagsPayload struct {
Tags Tags `json:"tags"`
}
type Ticket ¶
type Ticket struct { AssigneeID *UserID `json:"assignee_id"` CreatedAt time.Time `json:"created_at"` CustomFields []TicketCustomField `json:"custom_fields"` Description string `json:"description"` DueAt *time.Time `json:"due_at"` ExternalID *string `json:"external_id"` GroupID *GroupID `json:"group_id"` HasIncidents bool `json:"has_incidents"` ID TicketID `json:"id"` IsPublic bool `json:"is_public"` OrganizationID *OrganizationID `json:"organization_id"` Priority string `json:"priority"` ProblemID *TicketID `json:"problem_id"` RequesterID UserID `json:"requester_id"` SatisfactionRating TicketSatisfactionRating `json:"satisfaction_rating"` Status string `json:"status"` Subject string `json:"subject"` SubmitterID UserID `json:"submitter_id"` Tags Tags `json:"tags"` TicketFormID TicketFormID `json:"ticket_form_id"` Type *string `json:"type"` UpdatedAt time.Time `json:"updated_at"` URL string `json:"url"` Via TicketVia `json:"via"` }
type TicketCustomField ¶
type TicketFormID ¶
type TicketFormID uint64
type TicketResponse ¶
type TicketResponse struct {
Ticket Ticket `json:"ticket"`
}
type TicketSatisfactionRating ¶
type TicketSatisfactionRating struct {
Score string `json:"score"`
}
type TicketService ¶
type TicketService struct {
// contains filtered or unexported fields
}
https://developer.zendesk.com/api-reference/ticketing/tickets/tickets/
func (TicketService) AddTags ¶
https://developer.zendesk.com/api-reference/ticketing/ticket-management/tags/#add-tags
func (TicketService) IncrementalExport ¶
func (s TicketService) IncrementalExport( ctx context.Context, startTime time.Time, perPage uint, pageHandler func(response TicketsIncrementalExportResponse) error, ) error
func (TicketService) RemoveTags ¶
https://developer.zendesk.com/api-reference/ticketing/ticket-management/tags/#remove-tags
func (TicketService) SetTags ¶
https://developer.zendesk.com/api-reference/ticketing/ticket-management/tags/#set-tags
func (TicketService) Show ¶
https://developer.zendesk.com/api-reference/ticketing/tickets/tickets/#show-ticket
type TicketsIncrementalExportResponse ¶
type TicketsIncrementalExportResponse struct { TicketsResponse IncrementalExportResponse }
type TicketsResponse ¶
type TicketsResponse struct {
Tickets []Ticket `json:"tickets"`
}
type UserResponse ¶
type UserResponse struct {
User User `json:"user"`
}
type UserService ¶
type UserService struct {
// contains filtered or unexported fields
}
https://developer.zendesk.com/api-reference/ticketing/users/users/
func (UserService) IncrementalExport ¶
func (s UserService) IncrementalExport( ctx context.Context, startTime int64, pageHandler func(response UsersIncrementalExportResponse) error, ) error
func (UserService) Show ¶
https://developer.zendesk.com/api-reference/ticketing/users/users/#show-user
type UsersIncrementalExportResponse ¶
type UsersIncrementalExportResponse struct { UsersResponse IncrementalExportResponse }
type UsersResponse ¶
type UsersResponse struct {
Users []User `json:"users"`
}
Source Files ¶
- authentication.go
- chat.go
- chat_agent_events.go
- chat_chats.go
- client.go
- config.go
- docs.go
- error.go
- guide.go
- guide_articles.go
- guide_categories.go
- guide_sections.go
- pagination.go
- service.go
- support.go
- support_group.go
- support_incremental_export.go
- support_organizations.go
- support_ticket_forms.go
- support_tickets.go
- support_users.go