Socket
Socket
Sign inDemoInstall

github-trends-api

Package Overview
Dependencies
21
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    github-trends-api

Unofficial Github Trending API


Version published
Weekly downloads
0
Maintainers
1
Created
Weekly downloads
 

Readme

Source

Unofficial Github Trending API

npm version

npm i github-trends-api
// or
yarn add github-trends-api

Usage

const githubTrends = require('github-trends-api')
// or
import githubTrends from 'github-trends-api';

Methods

const options = {
  section?: '', // default: empty (repositories) - or 'developers'
  language?: '' // default: empty (all) - or 'javascript', 'java' etc..
  since?: '' // default: empty (daily) - or 'weekly', 'monthly'
  spoken_language_code?: '' // default: empty (all) - or en - fs - zh ...
}

githubTrends(options: Object): Promise

Examples

Repositories

githubTrends()
  .then(result => { console.log(result) })
  .catch(error => { console.log(error) })
  • Response
[
  {
    "author": "CSSEGISandData",
    "reponame": "COVID-19",
    "repourl": "https://github.com//CSSEGISandData/COVID-19",
    "repodesc": "Novel Coronavirus (COVID-19) Cases, provided by JHU CSSE",
    "language": "",
    "langcolor": "",
    "stars": 3,
    "forks": 303,
    "laststars": 1,
    "builtby": [
      {
        "username": "CSSEGISandData",
        "url": "https://github.com/CSSEGISandData",
        "avatar": "https://avatars3.githubusercontent.com/u/60674295?s=40&v=4"
      }
    ]
  }
]

Developers

githubTrends({ section: 'developers', since: 'weekly' })
  .then(result => { console.log(result) })
  .catch(error => { console.log(error) })
  • Response
[
  {
    "author": "James Montemagno",
    "username": "jamesmontemagno",
    "avatar": "https://avatars3.githubusercontent.com/u/1676321?s=96&v=4",
    "url": "https://github.com/jamesmontemagno",
    "reponame": "Xamarin.Plugins",
    "repourl": "https://github.com/jamesmontemagno/Xamarin.Plugins",
    "description": "Cross platform xamarin and windows plugins for PCLs"
  }
..]

Tests

https://npm.runkit.com/github-trends-api

License

MIT

Keywords

FAQs

Last updated on 08 Mar 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc