https://github.com/olucode/trending-github
Simple package for getting trending repositories on Github.
https://github.com/olucode/trending-github
github github-api trending-repositories
Last synced: 4 days ago
JSON representation
Simple package for getting trending repositories on Github.
- Host: GitHub
- URL: https://github.com/olucode/trending-github
- Owner: olucode
- Created: 2017-12-15T16:19:14.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-06-04T15:33:31.000Z (over 7 years ago)
- Last Synced: 2025-05-17T03:46:37.368Z (8 months ago)
- Topics: github, github-api, trending-repositories
- Language: PHP
- Homepage:
- Size: 4.88 KB
- Stars: 9
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# trending-github
This package is a PHP port of [this module](https://github.com/ecrmnn/trending-github)
## Installation
``` bash
composer require fortecdev/trending-github
```
## Usage
```php
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.
```php
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