api

package
v0.4.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 11, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HasNextPage

func HasNextPage(meta types.PageMeta) bool

HasNextPage checks if there are more pages to fetch.

func NextCursor

func NextCursor(meta types.PageMeta) string

NextCursor returns the cursor for the next page.

Types

type APIError

type APIError struct {
	StatusCode int
	Body       string
	RetryAfter int
}

func (*APIError) Error

func (e *APIError) Error() string

type ArticleService added in v0.3.0

type ArticleService struct {
	// contains filtered or unexported fields
}

func NewArticleService added in v0.3.0

func NewArticleService(client *Client) *ArticleService

func (*ArticleService) Get added in v0.3.0

func (*ArticleService) List added in v0.3.0

func (*ArticleService) Search added in v0.3.0

type Client

type Client struct {
	HTTPClient *http.Client
	BaseURL    string
	TraceID    string
}

func NewClient

func NewClient(subdomain string, creds *auth.ProfileCredentials, traceID string) (*Client, error)

type RetryTransport

type RetryTransport struct {
	Base       http.RoundTripper
	MaxRetries int
}

RetryTransport implements exponential backoff with jitter for 429/5xx.

func (*RetryTransport) RoundTrip

func (t *RetryTransport) RoundTrip(req *http.Request) (*http.Response, error)

type SearchService

type SearchService struct {
	// contains filtered or unexported fields
}

func NewSearchService

func NewSearchService(client *Client) *SearchService

func (*SearchService) Search

func (s *SearchService) Search(ctx context.Context, query string, opts *types.SearchOptions) (*types.SearchPage, error)

type TicketService

type TicketService struct {
	// contains filtered or unexported fields
}

func NewTicketService

func NewTicketService(client *Client) *TicketService

func (*TicketService) Create

func (*TicketService) Delete

func (s *TicketService) Delete(ctx context.Context, id int64) error

func (*TicketService) Get

func (*TicketService) List

func (*TicketService) ListComments added in v0.2.0

func (s *TicketService) ListComments(ctx context.Context, ticketID int64, opts *types.ListCommentsOptions) (*types.CommentPage, error)

func (*TicketService) Update

type UserService added in v0.3.0

type UserService struct {
	// contains filtered or unexported fields
}

func NewUserService added in v0.3.0

func NewUserService(client *Client) *UserService

func (*UserService) AutocompleteUsers added in v0.4.5

func (s *UserService) AutocompleteUsers(ctx context.Context, name string) ([]types.User, error)

func (*UserService) GetMe added in v0.3.0

func (s *UserService) GetMe(ctx context.Context) (*types.User, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL