-
-
Notifications
You must be signed in to change notification settings - Fork 64
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
Added API framework and a package stats endpoint #76
Conversation
|
If you switched the import in registry.d#130 to be days instead of weeks, you could do the same math for perWeek and perMonth and add a perDay as well. |
|
@PxlBuzzard done. |
|
My only nitpick would be to use a statically typed struct instead of |
|
(Maybe using |
|
Done! As far as the nullable goes, I realized that the db will throw if the package isn't found, so it's trivial to just pass the exception up another level. |
|
Ping? |
1 similar comment
|
Ping? |
| uint total; | ||
| uint perDay; | ||
| uint perWeek; | ||
| uint perMonth; |
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.
How about daily, weekly and monthly instead?
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.
Works for me.
|
What about querying downloads by version? |
|
@MartinNowak I think I've addressed all of your concerns at this point, let me know if you spot anything else that could be better. |
- fix api prefix (needs leading slash) - add package_1_version_1 index on downloads
- responds with 404 otherwise
DB aggregation for downloads stats
|
@MartinNowak now that your changes have been merged, is there anything else we're waiting on? |
|
Ping? |
Added API framework and a package stats endpoint
|
thx |
|
Shield now available on http://shields.io/. |
The idea is that this should allow us to start adding badges to shields.io.
This PR also leads the way towards adding more stats in the future.