githubtrending

package module
v0.0.0-...-c41c44a Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2020 License: MIT Imports: 6 Imported by: 0

README

GithubTrending

GoDoc License GitHub Action Workflow Go Report Card

Thanks to huchenme/github-trending-api!

Documentation

Overview

githubtrending is a client-side SDK for huchenme/github-trending-api (https://github.com/huchenme/github-trending-api), which provides unofficial APIs for GitHub trending projects and developers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Developer

type Developer struct {
	Username    string `json:"username"`
	DisplayName string `json:"name"`
	Type        string `json:"type"`
	URL         string `json:"url"`
	Avatar      string `json:"avatar"`
	Repo        struct {
		Name        string `json:"name"`
		Description string `json:"description"`
		URL         string `json:"url"`
	} `json:"repo"`
}

Developer consists of basic info of a GitHub trending developer and his/her trending repository.

func GetDevelopers

func GetDevelopers() (devs []*Developer, err error)

GetDevelopers retrieves a list of GitHub trending developers from the API.

func (Developer) String

func (d Developer) String() string

type Repository

type Repository struct {
	Author             string `json:"author"`
	Name               string `json:"name"`
	Avatar             string `json:"avatar"`
	URL                string `json:"url"`
	Description        string `json:"description"`
	Language           string `json:"language,omitempty"`
	LanguageColor      string `json:"languageColor,omitempty"`
	Stars              int    `json:"stars"`
	Forks              int    `json:"forks"`
	CurrentPeriodStars int    `json:"currentPeriodStars"`
	Owner              []struct {
		Username string `json:"username"`
		Href     string `json:"href"`
		Avatar   string `json:"avatar"`
	} `json:"builtBy"`
}

Repository consists of basic info of a GitHub trending repository and its developer.

func GetRepositories

func GetRepositories() (repos []*Repository, err error)

GetRepositories retrieves a list of GitHub trending repositories from the API.

func (Repository) String

func (r Repository) String() string

Jump to

Keyboard shortcuts

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