X Tutup
The Wayback Machine - https://web.archive.org/web/20201014104144/https://github.com/olucode/trending-github
Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 
 
 
 
 
 
 

readme.md

trending-github

This package is a PHP port of this module

Installation

composer require fortecdev/trending-github

Usage

require_once __DIR__ . '/vendor/autoload.php';

use Fortec\GithubTrending;

$github = new GithubTrending();

$data = $github->getTrending();

var_dump($data);
/*
[
    [
        'author' => 'facebook',
        'name' => 'react',
        'url' => 'https://github.com/facebook/react',
        'description' => 'A declarative, efficient, and flexible JavaScript library for building user interfaces.',
        'language' => 'JavaScript',
        'stars' => '83,511',
        'forks' => '15,791',
        'starsToday' => '25 stars today'
    ],
    ...
]
*/

You can also add time period and language filters.

require_once __DIR__ . '/vendor/autoload.php';

use Fortec\GithubTrending;

$github = new GithubTrending("weekly","php");

$data = $github->getTrending();

var_dump($data);
/*
[
    [
        'author' => 'laravel',
        'name' => 'laravel',
        'url' => 'https://github.com/laravel/laravel',
        'description' => 'A PHP Framework For Web Artisans',
        'language' => 'JavaScript',
        'stars' => '36,921',
        'forks' => '12,145',
        'starsToday' => '200 stars this week'
    ],
    ...
]
*/

License

The MIT License (MIT)

Copyright (c) 2017 Olumide Falomo

About

Simple package for getting trending repositories on Github.

Topics

Resources

Packages

No packages published

Languages

You can’t perform that action at this time.
X Tutup