Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Badge request: The total number of downloads of npm packages published by the specified user #9777

Closed
dukeluo opened this issue Dec 3, 2023 · 2 comments
Labels
good first issue New contributors, join in! service-badge New or updated service badge

Comments

@dukeluo
Copy link
Contributor

dukeluo commented Dec 3, 2023

📋 Description

This badge would show the total number of downloads of npm packages published by the specified user.

🔗 Data

This API can provide download data of all npm packages for a specified user and does not require an API key.

🎤 Motivation

NPM authors could put this badge on their profile.

I have already created an endpoint for it at https://github.com/dukeluo/github-readme-stats-badges. I believe that if the Shields.io can support this endpoint directly, it will be beneficial to more people. I would be willing to submit a PR if you also agree with this idea.

@dukeluo dukeluo added the service-badge New or updated service badge label Dec 3, 2023
@dukeluo dukeluo changed the title The total number of downloads of npm packages published by the specified user Badge request: The total number of downloads of npm packages published by the specified user Dec 3, 2023
@chris48s
Copy link
Member

chris48s commented Dec 4, 2023

Sounds reasonable.

Couple of minor points on this one:

  1. https://npm-stat.com/ says

    These statistics are not provided in real-time. All numbers will change at most once per day.

    so we can serve these with quite a long cache - similar to how we do with pypistats and pepy

  2. I think the "service" for this should be npm-stat, rather than a NPM. Similar to how we treat the npms.io badges.

@chris48s chris48s added the good first issue New contributors, join in! label Dec 4, 2023
@dukeluo
Copy link
Contributor Author

dukeluo commented Dec 4, 2023

@chris48s Got it, thanks for pointing that out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue New contributors, join in! service-badge New or updated service badge
Projects
None yet
Development

No branches or pull requests

3 participants
@chris48s @dukeluo and others