github

package
v0.0.0-...-c05230d Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChangeUserStatusInput

type ChangeUserStatusInput struct {
	// A unique identifier for the client performing the mutation.
	ClientMutationId *string `json:"clientMutationId"`
	// The emoji to represent your status. Can either be a native Unicode emoji or an emoji name with colons, e.g., :grinning:.
	Emoji *string `json:"emoji"`
	// If set, the user status will not be shown after this date.
	ExpiresAt *time.Time `json:"expiresAt"`
	// Whether this status should indicate you are not fully available on GitHub, e.g., you are away.
	LimitedAvailability *bool `json:"limitedAvailability"`
	// A short description of your current status.
	Message *string `json:"message"`
	// The ID of the organization whose members will be allowed to see the status. If
	// omitted, the status will be publicly visible.
	OrganizationId *string `json:"organizationId"`
}

Autogenerated input type of ChangeUserStatus

func (*ChangeUserStatusInput) GetClientMutationId

func (v *ChangeUserStatusInput) GetClientMutationId() *string

GetClientMutationId returns ChangeUserStatusInput.ClientMutationId, and is useful for accessing the field via an interface.

func (*ChangeUserStatusInput) GetEmoji

func (v *ChangeUserStatusInput) GetEmoji() *string

GetEmoji returns ChangeUserStatusInput.Emoji, and is useful for accessing the field via an interface.

func (*ChangeUserStatusInput) GetExpiresAt

func (v *ChangeUserStatusInput) GetExpiresAt() *time.Time

GetExpiresAt returns ChangeUserStatusInput.ExpiresAt, and is useful for accessing the field via an interface.

func (*ChangeUserStatusInput) GetLimitedAvailability

func (v *ChangeUserStatusInput) GetLimitedAvailability() *bool

GetLimitedAvailability returns ChangeUserStatusInput.LimitedAvailability, and is useful for accessing the field via an interface.

func (*ChangeUserStatusInput) GetMessage

func (v *ChangeUserStatusInput) GetMessage() *string

GetMessage returns ChangeUserStatusInput.Message, and is useful for accessing the field via an interface.

func (*ChangeUserStatusInput) GetOrganizationId

func (v *ChangeUserStatusInput) GetOrganizationId() *string

GetOrganizationId returns ChangeUserStatusInput.OrganizationId, and is useful for accessing the field via an interface.

type Client

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

func New

func New(apiURL string, httpClient *http.Client) *Client

func (*Client) ChangeUserStatus

func (c *Client) ChangeUserStatus(ctx context.Context,
	emoji string, expiresAt time.Time, message string, limited bool) error

func (*Client) GetContributions

func (c *Client) GetContributions(ctx context.Context, user string, from, to time.Time) (githubcontrib.ContributionsResponse, error)

func (*Client) UserStats

func (c *Client) UserStats(ctx context.Context,
	username string,
) (Stats, error)

type Contribution

type Contribution struct {
	Count int
	Color string
}

type Contributions

type Contributions struct {
	IsHalloween   bool
	Contributions []Contribution
	Commits       int
	Issues        int
	PullRequests  int
	Reviews       int
	Total         int
}

type Stats

type Stats struct {
	TotalContribs   int
	PrivateContribs int
	Issues          int
	PullRequests    int
}

Jump to

Keyboard shortcuts

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