npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

github-stars-feed

v1.1.4

Published

Get the latest feed of GitHub Stars out there

Downloads

11

Readme

The GitHub Stars program thanks GitHub’s most influential developers and gives them a platform to showcase their work, reach more people, and shape the future of GitHub. Read my journey from a GitHub User to a GitHub Star.

Installation

NPM

npm i github-stars-feed

Usage

Typing SVG

const githubStars = require('github-stars-feed');

Get filtered feed


var options = {
  limit: 2,
  sanitize: true,
  username: 'vinitshahdeo'
};

githubStars.getFeed(options, (err, feed) => {
  if (err) {
    console.log('Something went wrong while fetching GitHub Stars Feed');
  } else {
    console.log(feed); // filtered feed
  }
});

Sample Response


[
  {
    title: 'Meet Vinit Shahdeo, a resident of Jharkhand, has been recognized as a GitHub Star',
    summary: 'My journey got featured by the News Khajana.',
    link: 'https://thenewskhazana.com/story/meet-vinit-shahdeo-a-resident-of-jharkhand-has-been-recognized-as-a-github-star-22451/',
    updated: 'Sunday, November 3rd 2019',
    author: {
      name: 'vinitshahdeo',
      uri: 'https://stars.github.com/vinitshahdeo'
    }
  },
  {
    title: 'Mentor - Google Summer Of Code',
    summary: 'Postman is one of the mentoring organization for GSoC. This year, Postman has AsyncAPI Initiative as part of their team.\n\nI will be mentoring an idea for AsyncAPI i.e. AsyncDiff. It\'s basically a library to compare two AsyncAPI documents and generate diff for the review process.',
    link: 'https://community.postman.com/t/idea-9-asyncdiff-general-information/21694',
    updated: 'Sunday, November 3rd 2019',
    author: {
      name: 'vinitshahdeo',
      uri: 'https://stars.github.com/vinitshahdeo'
    }
  }
]

Get complete feed

githubStars.getFeed((err, feed) => {
  if (err) {
    console.log('Something went wrong while fetching GitHub Stars Feed');
  } else {
    console.log(feed); // complete feed
  }
});

Sample Response

[
  {
    title: {
      type: 'html',
      value: 'Meet Vinit Shahdeo, a resident of Jharkhand, has been recognized as a GitHub Star'
    },
    id: 'cknat1te840382f1viftueegf',
    link: {
      href: 'https://thenewskhazana.com/story/meet-vinit-shahdeo-a-resident-of-jharkhand-has-been-recognized-as-a-github-star-22451/'
    },
    updated: '2021-04-02T00:00:00.000Z',
    summary: {
      type: 'html',
      value: 'My journey got featured by the News Khajana.'
    },
    author: {
      name: 'vinitshahdeo',
      uri: 'https://stars.github.com/vinitshahdeo'
    }
  },
  {
    title: { type: 'html', value: 'Mentor - Google Summer Of Code' },
    id: 'ckmm44oxu03192fxc94w0seir',
    link: {
      href: 'https://community.postman.com/t/idea-9-asyncdiff-general-information/21694'
    },
    updated: '2021-03-20T00:00:00.000Z',
    summary: {
      type: 'html',
      value: 'Postman is one of the mentoring organization for GSoC. This year, Postman has AsyncAPI Initiative as part of their team.\n\nI will be mentoring an idea for AsyncAPI i.e. AsyncDiff. It\'s basically a library to compare two AsyncAPI documents and generate diff for the review process.'
    },
    author: {
      name: 'vinitshahdeo',
      uri: 'https://stars.github.com/vinitshahdeo'
    }
  }
];

Options

Additionally, limit, sanitize and username can be passed to filter the feed entries.

| Options | Type | Description | |:----------|:---------|:---------------------------------------------------------------------------| | limit | Number | max entries to be returned | | sanitize | Boolean | return sanitized feed (only title, summary, link, updated and author) | | username | String | return entries of GitHub Star for given username only |

Show first n feed entries

githubStars.getFeed({ limit: 5 }, (err, feed) => {
  if (err) {
    console.log('Something went wrong while fetching GitHub Stars Feed');
  } else {
    console.log(feed); // first 5 feed entries
  }
});

Get feed of any GitHub Star (by their GitHub username say vinitshahdeo)

githubStars.getFeed({ username: 'vinitshahdeo' }, (err, feed) => {
  if (err) {
    console.log('Something went wrong while fetching GitHub Stars Feed');
  } else {
    console.log(feed); // feed of vinitshahdeo only
  }
});

Get sanitized feed

githubStars.getFeed({ sanitize: true }, (err, feed) => {
  if (err) {
    console.log('Something went wrong while fetching GitHub Stars Feed');
  } else {
    console.log(feed); // sanitized feed
  }
});

Blog

Do check out the article "How to get GitHub Stars Contributions" on Hashnode!

Hashnode blog - Vinit Shahdeo

RSS Feed

This NPM module is basically taking the RSS feed for GitHub Stars contributions and converting it into a valid JSON object which can be further used to build Node.js / React applications.

A sample entry from GitHub Stars Contributions feed looks like below:

<entry>
  <title type="html"><![CDATA[ Meet Vinit Shahdeo, a resident of Jharkhand, has been recognized as a GitHub Star ]]></title>
  <id>cknat1te840382f1viftueegf</id>
  <link href="https://thenewskhazana.com/story/meet-vinit-shahdeo-a-resident-of-jharkhand-has-been-recognized-as-a-github-star-22451/"/>
  <updated>2021-04-02T00:00:00.000Z</updated>
  <summary type="html"><![CDATA[ My journey got featured by the News Khajana. ]]></summary>
  <author>
    <name>vinitshahdeo</name>
    <uri>https://stars.github.com/vinitshahdeo</uri>
  </author>
</entry>

Example

Please checkout examples/ directory to view example.

Refer the sample response here.

Acknowledgement

I'm happy to be a part of the GitHub Stars Hall of Fame. From a (green) dot to a star, here’s how my journey uncoiled - tiny.cc/GitHubStar. Check out my GitHub Star profile here. 🌟 Let me know what do you build consuming this API?

PS: Always grateful to GitHub! 🖤

Twitter Follow