github-trending-api

:octocat: The missing APIs for GitHub trending projects and developers ?

Github星跟踪图

GitHub closed issues
Travis
semantic-release
coverage
GitHub license
Code of Conduct

npm (scoped)
module formats: cjs, es Greenkeeper badge


Table of Contents

  • Hacker Tab (Chrome Store): Chrome extension to view GitHub trending projects on new tab.
  • github-trending-plus (Live): ✨ Experimental Github trending UI.
  • HitUp (Chrome Store) (Website): Help you find top things, including GitHub Trending Repositories.
  • Gitter: Gitter for GitHub - 可能是目前颜值最高的 GitHub 小程序客户端.
  • flutter_wanandroid:
    Flutter 完整项目,WanAndroid 客户端,BLoC、RxDart 、国际化、主题色、启动页、引导页,拥有较好的项目结构&比较规范的代码!
  • vsc-github-trending: (VS Code Marketplace): Explore Github Trending repositories directly from Visual Studio Code
  • GiTiny(AppStore): iOS app for GitHub with exploring trending.
  • SwiftHub: GitHub iOS client written in RxSwift and MVVM clean architecture.
  • GitNews: Trending repositories from GitHub, HackerNews & Reddit (Mobile & Desktop).
  • mini-github: GitHub WeChat Mini Program (可能是全网功能最全的 GitHub 微信小程序).

Backers

Thank you to all our backers! ? [Become a backer]

API Status

API status is available at uptimerobot.

REST API

See the full API documentation in Apiary.

Tutorial

How to scrape any website and build an API using cheerio.js

Receive an array of trending repositories.

URL Endpoint:

https://github-trending-api.now.sh/repositories?language=javascript&since=weekly

Parameters:

  • language: optional, list trending repositories of certain programming languages, possible values are listed here.
  • since: optional, default to daily, possible values: daily, weekly and monthly.

Response:

[
  ...
  {
    "author": "google",
    "name": "gvisor",
    "avatar": "https://github.com/google.png",
    "url": "https://github.com/google/gvisor",
    "description": "Container Runtime Sandbox",
    "language": "Go",
    "languageColor": "#3572A5",
    "stars": 3320,
    "forks": 118,
    "currentPeriodStars": 1624,
    "builtBy": [
      {
        "href": "https://github.com/viatsko",
        "avatar": "https://avatars0.githubusercontent.com/u/376065",
        "username": "viatsko"
      }
    ]
  }
  ...
]

Note that GitHub trending page sometimes is empty, in that case this API returns [] in response, your application should be able to handle it or read from previous cache.

Receive an array of trending developers.

URL Endpoint:

https://github-trending-api.now.sh/developers?language=javascript&since=weekly

Parameters:

  • language: optional, list trending repositories of certain programming languages, possible values are listed here.
  • since: optional, default to daily, possible values: daily, weekly and monthly.

Response:

[
  {
    "username": "google",
    "name": "Google",
    "type": "organization",
    "url": "https://github.com/google",
    "avatar": "https://avatars0.githubusercontent.com/u/1342004",
    "repo": {
      "name": "traceur-compiler",
      "description": "Traceur is a JavaScript.next-to-JavaScript-of-today compiler",
      "url": "https://github.com/google/traceur-compiler"
    }
  }
]

type could be organization or user.

List Languages

Receive popular languages and all languages.

URL Endpoint:

https://github-trending-api.now.sh/languages

Response:

[
  {
    "id": "1c-enterprise",
    "name": "1C Enterprise"
  },
  {
    "id": "abap",
    "name": "ABAP"
  },
  {
    "id": "abnf",
    "name": "ABNF"
  },
  {
    "id": "actionscript",
    "name": "ActionScript"
  }
]

NPM Package

You could also use the API as a NPM package.

Install

$ npm install --save @huchenme/github-trending

Usage

import {
  languages,
  fetchRepositories,
  fetchDevelopers,
} from '@huchenme/github-trending';

fetchRepositories({ language: 'ruby', since: 'monthly' }).then(repositories => {
  console.log(repositories);
});

fetchDevelopers({ language: 'javascript' }).then(developers => {
  console.log(developers);
});

console.log(languages);

API

languages

List all languages

[
  {
    id: '1c-enterprise',
    name: '1C Enterprise',
  },
  {
    id: 'abap',
    name: 'ABAP',
  },
  {
    id: 'abnf',
    name: 'ABNF',
  },
  {
    id: 'actionscript',
    name: 'ActionScript',
  },
];

fetchRepositories(params)

Receive an array of trending repositories.

params:

  • language: possible values are the the ones from fetchAllLanguages() or just find here.
  • since: daily, weekly or monthly, default to daily.
[
  ...
  {
    author: 'google',
    name: 'gvisor',
    avatar: 'https://github.com/google.png',
    url: 'https://github.com/google/gvisor',
    description: 'Container Runtime Sandbox',
    language: 'Go',
    languageColor: '#3572A5',
    stars: 3320,
    forks: 118,
    currentPeriodStars: 1624,
    "builtBy": [
      {
        "href": "https://github.com/viatsko",
        "avatar": "https://avatars0.githubusercontent.com/u/376065",
        "username": "viatsko"
      }
    ]
  }
  ...
]

fetchDevelopers(params)

Receive an array of trending developers.

params:

  • language: possible values are the the ones from fetchAllLanguages() or just find here.
  • since: daily, weekly or monthly, default to daily.
[
  ...
  {
    username: 'google',
    name: 'Google',
    type: 'organization',
    url: 'https://github.com/google',
    avatar: 'https://avatars0.githubusercontent.com/u/1342004',
    repo: {
      name: 'traceur-compiler',
      description:
        'Traceur is a JavaScript.next-to-JavaScript-of-today compiler',
      url: 'https://github.com/google/traceur-compiler'
    }
  }
  ...
]

License

MIT

主要指标

概览
名称与所有者huchenme/github-trending-api
主编程语言JavaScript
编程语言JavaScript (语言数: 2)
平台
许可证MIT License
所有者活动
创建于2018-05-04 06:39:16
推送于2023-01-06 01:41:27
最后一次提交2020-12-28 16:23:48
发布数32
最新版本名称v2.4.2 (发布于 )
第一版名称v1.0.0 (发布于 2018-05-09 23:39:32)
用户参与
星数775
关注者数7
派生数107
提交数190
已启用问题?
问题数56
打开的问题数7
拉请求数58
打开的拉请求数33
关闭的拉请求数39
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?