-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Add [NpmStatDownloads] Badge #9783
Conversation
Thanks for submitting. I'll try and have a look over this at the weekend. |
t.create('downloads of unknown npm package author') | ||
.get('/dt/npm-api-does-not-have-this-package-author.json') | ||
.expectBadge({ | ||
label: 'downloads', | ||
message: '0', | ||
color: 'red', | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this API allow us to differentiate between a user who does exist with 0 downloads and a non-existant user?
If not, we can roll with this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this API cant differentiate between a user who does exist with 0 downloads and a non-existant user. After my testing, this API always return an empty object with a staus code 200 for a non-existant user.
Co-authored-by: chris48s <chris48s@users.noreply.github.com>
🚀 Updated review app: https://pr-9783-badges-shields.fly.dev |
Thanks. Latest changes look good 👍 Having done a bit of testing on a review app, I think we need to restrict remove the The day, month and year badges mostly seem to return in acceptable times, but the |
Possibly, this API does not support getting npm author total downlands over such a long period of time very well. I agree with your idea of removing dt support to offer a better experience. I will do this. |
🚀 Updated review app: https://pr-9783-badges-shields.fly.dev |
latest changes LGTM - thanks 👍 |
Add the npm downloads (by author) badge discussed in #9777