• Stars
    star
    137
  • Rank 256,728 (Top 6 %)
  • Language
    Go
  • License
    MIT License
  • Created almost 9 years ago
  • Updated 6 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Go library for accessing trending repositories and developers at Github.

go-trending

GoDoc Go Report Card

A package to retrieve trending repositories and developers from Github written in Go.

trending package showcase

Features

  • Get trending repositories
  • Get trending developers
  • Get all programming languages known by GitHub
  • Filtering by time and (programming) language
  • Support for GitHub Enterprise

Installation

It is go gettable

$ go get github.com/andygrunwald/go-trending

or using/updating to the latest master

$ go get -u github.com/andygrunwald/go-trending@master

API

Please have a look at the package documentation for a detailed API description.

Examples

A few examples how the API can be used. More examples are available in the GoDoc examples section.

List trending repositories of today for all languages

package main

import (
	"fmt"

	"github.com/andygrunwald/go-trending"
)

func main() {
	trend := trending.NewTrending()

	// Show projects of today
	projects, err := trend.GetProjects(trending.TimeToday, "")
	if err != nil {
		panic(err)
	}

	for index, project := range projects {
		i := index + 1
		if len(project.Language) > 0 {
			fmt.Printf("%d: %s (written in %s with %d ★ )\n", i, project.Name, project.Language, project.Stars)
		} else {
			fmt.Printf("%d: %s (with %d ★ )\n", i, project.Name, project.Stars)
		}
	}
}

List trending repositories of this week for Go

package main

import (
	"fmt"

	"github.com/andygrunwald/go-trending"
)

func main() {
	trend := trending.NewTrending()

	// Show projects of today
	projects, err := trend.GetProjects(trending.TimeWeek, "go")
	if err != nil {
		panic(err)
	}

	for index, project := range projects {
		i := index + 1
		if len(project.Language) > 0 {
			fmt.Printf("%d: %s (written in %s with %d ★ )\n", i, project.Name, project.Language, project.Stars)
		} else {
			fmt.Printf("%d: %s (with %d ★ )\n", i, project.Name, project.Stars)
		}
	}
}

List trending developers of this month for Swift

package main

import (
	"fmt"

	"github.com/andygrunwald/go-trending"
)

func main() {
	trend := trending.NewTrending()

	developers, err := trend.GetDevelopers(trending.TimeMonth, "swift")
	if err != nil {
		panic(err)
	}

	for index, developer := range developers {
		i := index + 1
		fmt.Printf("%d: %s (%s)\n", i, developer.DisplayName, developer.FullName)
	}
}

List available languages

package main

import (
	"fmt"

	"github.com/andygrunwald/go-trending"
)

func main() {
	trend := trending.NewTrending()

	// Show languages
	languages, err := trend.GetLanguages()
	if err != nil {
		panic(err)
	}

	for index, language := range languages {
		i := index + 1
		fmt.Printf("%d: %s (%s)\n", i, language.Name, language.URLName)
	}
}

Inspired by

License

This project is released under the terms of the MIT license.

More Repositories

1

go-jira

Go client library for Atlassian Jira
Go
1,401
star
2

FOM-LaTeX-Template

A LaTeX template for term paper, bachelor or master thesis for "FOM University of Applied Sciences"
TeX
164
star
3

TrendingGithub

A twitter bot (@TrendingGithub) to tweet trending repositories and developers from GitHub
Go
112
star
4

go-gerrit

Go(lang) client/library for Gerrit Code Review
Go
94
star
5

cachet

Go(lang) client library for Cachet (open source status page system).
Go
90
star
6

DigitalKanban

A small digital Kanban board based on Symfony2. This application was developed during a small university project.
PHP
55
star
7

megos

Go(lang) client library for accessing information of an Apache Mesos cluster.
Go
54
star
8

jitic

The JIRA Ticket Checker - Checks the existence of one or more ticket in the JIRA issue tracker
Go
33
star
9

vdf

A Lexer and Parser for Valves Data Format (known as vdf) written in Go
Go
30
star
10

your-connection-deserves-a-name

Examples and code to assign a name to your MongoDB, MySQL, NATS, Oracle, PostgreSQL, RabbitMQ, and redis connection.
Go
26
star
11

things-with-buzzers-jeopardy

A Jeopardy! game frontend for things with buzzers with support for three buzzers 🚀
JavaScript
24
star
12

simple-webserver

A small webserver for testing various technologies, techniques and concepts written in Go.
Go
23
star
13

things-with-buzzers-hardware

Everything you need to build hardware game show buzzers (and to do awesome things with it!) 🚀
Python
12
star
14

Jacobine

A framework to analyze your software development cycle and the community around your software product to discover hidden information.
PHP
11
star
15

gotrap

A Gerrit <=> Github <=> TravisCI bridge written in Go
Go
11
star
16

Gerrie

A crawler for Googles code review system "Gerrit"
PHP
9
star
17

things-with-buzzers-websocket

A WebSocket server to publish messages when someone pushed a hardware game show buzzer 🚀
Go
7
star
18

sico

A Sitemap Comparison that helps you to not fuck up your website migration.
Go
4
star
19

perseus

Local git mirror for your PHP (composer) project dependencies that works together with Satis.
Go
4
star
20

watson

A crawler for Googles code review system "Gerrit"
Go
4
star
21

go-incident

Go client library for accessing the Incident.io API
Go
4
star
22

Jacobine-Vagrant

Vagrant setup for a project to analyze different data sources of various open source projects (source code, ecosystem, community) to detect new information about your community and your contribution. See Jacobine.
Python
2
star
23

Jacobine-Web-Frontend

Website for a project to analyze different data sources of the open source project TYPO3. See TYPO3-Analytics
PHP
1
star
24

Vagrant-MetricsGrimoire

Vagrant setup to play with the MetricsGrimoire toolset
Python
1
star
25

dotfiles

My .files
Shell
1
star