0.03
No commit activity in last 3 years
No release in over 3 years
Fetches Trending Github Repos
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.6
>= 0
~> 3.0.0
~> 1.0.1
~> 0.9.0
~> 1.18.0

Runtime

~> 2.3.6
~> 2.7.2
~> 0.19.1
 Project Readme

github-trending

github-trending is a gem that fetches Trending repositories on GitHub. It's functionality was extracted from the command-line utility git-trend, so almost all of the code is written by @rochefort.

Installation

Add this line to your application's Gemfile:

gem 'github-trending', github: 'sheharyarn/github-trending'

And then execute:

$ bundle

Or install it yourself as:

$ gem install github-trending

Usage

Require it if you haven't:

require 'github-trending'

Get the day's trending repos:

repos = Github::Trending.get
repos.each do |r|
  puts "#{r.name} (#{r.star_count} stargazers)"
  puts "--- #{r.description}\n\n"
end

# =>
# sindresorhus/awesome-nodejs (712 stargazers)
# --- A curated list of delightful Node.js packages and resources.
#
# MrSwitch/hello.js (536 stargazers)
# --- A Javascript RESTFUL API library for connecting with OAuth2 services, such as Google+ API, Facebook Graph # and Windows Live Connect
#
# ColdSauce/CosmosBrowserAndroid (391 stargazers)
# --- Cosmos Browser allows a person to connect to the internet through the use of SMS. No data or wifi required.
#
# ...

You can also fetch by a specific language:

ruby_repos = Github::Trending.get :ruby
objc_repos = Github::Trending.get :objective_c

To get a list of all languages:

languages = Github::Trending.languages

You can get top github repos of the :week and :month as well (default is :day):

Github::Trending.get(:scala, :week)
# Top scala repos in the week

Github::Trending.get(nil, :month)
# Top repos (all languages) in this month

Github::Trending.get('objective-c++', 'day')
# Can pass strings as well

Contributing

  1. Fork it ( https://github.com/sheharyarn/github-trending/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request