gql

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2020 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FetchStargazers

func FetchStargazers(ctx *context.Context) (cursors []string, totalUsers uint, err error)

FetchStargazers fetches the list of cursors to iterate upon to fetch stargazer contributions.

Types

type User

type User struct {
	Login         string        `json:"login"`
	CreatedAt     string        `json:"createdAt"`
	Contributions contributions `json:"contributionsCollection"`

	YearlyContributions map[int]int
}

User represents a github user who starred a repository. It is public because this model is the output of the Fetch methods of this package.

func FetchContributions

func FetchContributions(ctx *context.Context, cursors []string, untilYear int) ([]User, error)

FetchContributions fetches the contribution data of a list of stargazers. ctx contains the scanned context of the astronomer command. untilYear is the year until which to scan for contribuitons.

func (User) DaysOld

func (u User) DaysOld() float64

DaysOld returns the amount of days since this user created their GitHub account.

Jump to

Keyboard shortcuts

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