Libraries.io SourceRank for repository
- Dominant language
- JavaScript
- Stars
- 27.2k
- Forks
- 5.6k
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 46
Description
:clipboard: **Description**
Today I can add a libraries.io SourceRank badge provided my project can be found in any of the 32 package manager tracked by libraries.io. However, libraries.io also track repositories on GitHub, GitLab and Bitbucket. To get the SourceRank for all those projects I would like a new badge using the libraries.io repository API
:link: **Data**
Here is an example how to get the SourceRank for https://github.com/gruntjs/grunt
GET https://libraries.io/api/github/gruntjs/grunt?api_key=your_key
You can probably use the key you already have for libraries.io. The request will return:
```
{
"full_name": "gruntjs/grunt",
"description": "Grunt: The JavaScript Task Runner",
"fork": false,
"created_at": "2011-09-21T15:16:20.000Z",
"updated_at": "2022-04-12T16:03:11.439Z",
"pushed_at": "2022-04-12T11:58:26.000Z",
"homepage": "http://gruntjs.c om/",
"size": 2780,
"stargazers_count": 12126,
"language": "JavaScript",
"has_issues": true,
"has_wiki": true,
"has_pages": false,
"forks_count": 1539,
"mirror_url": null,
"open_issues_count": 155,
"default_branch": "main",
"subscribers_count": 506,
"uuid": "2430537",
"source_name": null,
"license": "Other",
"private": false,
"contributions_count": 81,
"has_readme": "README.md",
"has_changelog": "CHANGELOG",
"has_contributing": "CONTRIBUTING.md",
"has_license": "LICENSE",
"has_coc": "CODE_OF_CONDUCT.md",
"has_threat_model": null,
"has_audit": null,
"status": null,
"last_synced_at": "2022-04-11T03:30:23.223Z",
"rank": 25,
"host_type": "GitHub",
"host_domain": null,
"name": null,
"scm": "git",
"fork_policy": null,
"github_id": "2430537",
"pull_requests_enabled": null,
"logo_url": null,
"github_contributions_count": 81,
"keywords": [
"hacktoberfest"
]
}
```
Rank is the data item to extract .
Full API documentation is found here: https://libraries.io/api
:microphone: **Motivation**
Libraries.io tracks 2.7 million packages through 33 package managers but many more repositories (33 million) on GitHub, GitLab or Bitbucket. Adding support of repositories would tenfold usefulness.
Contributor guide
Research direction
Start by reviewing the existing Libraries.io badge entry point and the Libraries.io repository API documentation at https://libraries.io/api. Use the repository endpoint pattern shown for GitHub repositories and extract the rank value; done means a badge can display SourceRank for supported GitHub, GitLab, or Bitbucket repositories.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100