alisoft / github-trending-api

:octocat: The missing APIs for GitHub trending projects and developers πŸ“ˆ

Home Page:https://api.gitterapp.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Github Unofficial Trending API

API Status

API status is available at uptimerobot.

Trending Repositories

Receive an array of trending repositories.

URL Endpoint:

https://api.gitterapp.com/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.
  • spoken_language: optional, list trending repositories of certain spoken languages (e.g English, Chinese), possible values are listed here.

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.

Trending Developers

Receive an array of trending developers.

URL Endpoint:

https://api.gitterapp.com/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

URL Endpoint:

https://api.gitterapp.com/languages

Response:

[
  {
    "color": "#814CCC",
    "url": "https://github.com/trending?l=1C Enterprise",
    "name": "1c-enterprise",
    "title": "1C Enterprise"
  },
  {
    "color": "#38761D",
    "url": "https://github.com/trending?l=2-Dimensional Array",
    "name": "2-dimensional-array",
    "title": "2-Dimensional Array"
  },
  {
    "color": "#004289",
    "url": "https://github.com/trending?l=4D",
    "name": "4d",
    "title": "4D"
  },
  {
    "color": "#E8274B",
    "url": "https://github.com/trending?l=ABAP",
    "name": "abap",
    "title": "ABAP"
  }
]

List Spoken Languages

URL Endpoint:

https://api.gitterapp.com/spoken_languages

Response:

[
  {
    "name": "ab",
    "title": "Abkhazian"
  },
  {
    "name": "aa",
    "title": "Afar"
  },
  {
    "name": "af",
    "title": "Afrikaans"
  },
  {
    "name": "ak",
    "title": "Akan"
  }
]

NPM Package

You could also use the API as a NPM package.

Install

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

Usage

import {
  languages,
  spokenLanguages,
  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);
console.log(spokenLanguages);

API

languages

List all languages

[
  {
    "color": "#814CCC",
    "url": "https://github.com/trending?l=1C Enterprise",
    "name": "1c-enterprise",
    "title": "1C Enterprise"
  },
  {
    "color": "#38761D",
    "url": "https://github.com/trending?l=2-Dimensional Array",
    "name": "2-dimensional-array",
    "title": "2-Dimensional Array"
  },
  {
    "color": "#004289",
    "url": "https://github.com/trending?l=4D",
    "name": "4d",
    "title": "4D"
  },
  {
    "color": "#E8274B",
    "url": "https://github.com/trending?l=ABAP",
    "name": "abap",
    "title": "ABAP"
  },
];

spokenLanguages

List all spoken languages

[
  {
    name: 'ab',
    title: 'Abkhazian',
  },
  {
    name: 'aa',
    title: 'Afar',
  },
  {
    name: 'af',
    title: 'Afrikaans',
  },
  {
    name: 'ak',
    title: 'Akan',
  },
];

fetchRepositories(params)

Receive an array of trending repositories.

params:

  • language: possible values are the the ones from languages or just find here.
  • since: daily, weekly or monthly, default to daily.
  • spokenLanguageCode: possible values are the the ones from spokenLanguages or just find here.
[
  ...
  {
    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 languages 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'
    }
  }
  ...
]

Backers

Buy Me A Coffee

License

MIT

About

:octocat: The missing APIs for GitHub trending projects and developers πŸ“ˆ

https://api.gitterapp.com/

License:MIT License


Languages

Language:JavaScript 99.7%Language:Python 0.3%Language:Dockerfile 0.0%