Documentation
¶
Overview ¶
Package github provides a client for interacting with the GitHub Notifications API. It wraps the go-github library and converts responses to application-specific models.
Package github provides a client for interacting with the GitHub Notifications API. It wraps the go-github library and converts responses to application-specific models.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client wraps the GitHub API client and provides notification-specific operations.
func NewClient ¶
NewClient creates a new GitHub API client using the GITHUB_TOKEN environment variable. Returns an error if the token is not set or authentication fails.
func (*Client) ListNotifications ¶
func (c *Client) ListNotifications( ctx context.Context, opts ListOptions, ) ([]model.Notification, error)
ListNotifications retrieves all GitHub notifications matching the specified options. It automatically handles pagination to fetch all available notifications. Returns the notifications as application-specific model objects.
type ListOptions ¶
type ListOptions struct {
All bool // Include read notifications in the response
Participating bool // Only show notifications user is participating in
Since *time.Time // Only show notifications updated after this time
}
ListOptions specifies filters for retrieving GitHub notifications.