Skip to content

A simple Javascript extension to fetch pinned repositories from a Github profile.

License

Notifications You must be signed in to change notification settings

StynH/GithubPinnedRepos.js

Repository files navigation

GithubPinnedRepos.js

npm version npm npm bundle size

A simple Javascript extension to fetch pinned repositories from a Github profile.

Usage

You will need a Github Personal Access Token that has access to read:user.

Example

<script src="githubpinnedrepos.js"></script>
<script>
  function printRepos(repos){
    console.log(repos);
  }

  window.GithubPinnedRepos.getPinnedRepos(*YourGithubUsername*, *YourPersonalAccessToken*, printRepos);
</script>

Example Output

{
  "itemsRemaining": 0,
  "totalPinnedRepos": 6,
  "pinnedRepos": [
    {
      "name": "CrossWars-2",
      "url": "https://github.com/StynVanDeHaterd/CrossWars-2",
      "primaryLanguage": "C"
    },
    {
      "name": "B2Engine",
      "url": "https://github.com/StynVanDeHaterd/B2Engine",
      "primaryLanguage": "C"
    },
    {
      "name": "CrossWars",
      "url": "https://github.com/StynVanDeHaterd/CrossWars",
      "primaryLanguage": "C++"
    },
    {
      "name": "floatygons.js",
      "url": "https://github.com/StynVanDeHaterd/floatygons.js",
      "primaryLanguage": "JavaScript"
    },
    {
      "name": "textygons.js",
      "url": "https://github.com/StynVanDeHaterd/textygons.js",
      "primaryLanguage": "TypeScript"
    },
    {
      "name": "texterfall.js",
      "url": "https://github.com/StynVanDeHaterd/texterfall.js",
      "primaryLanguage": "TypeScript"
    }
  ]
}

About

A simple Javascript extension to fetch pinned repositories from a Github profile.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages