chieftools / pkgtrends

A quick way to compare package downloads across languages.
https://pkgtrends.app
11 stars 1 forks source link

Get NuGet (.NET) data #6

Open bruno-garcia opened 5 years ago

bruno-garcia commented 5 years ago

.NET ecosystem package manager is nuget.org. Unfortunately they don't offer historic data but a friend and I started a project to offer this service: https://github.com/NuGetTrends/nuget-trends

Would it be interesting to you to add NuGet support through nugettrends.com API?

stayallive commented 5 years ago

That looks very good, I would really like to integrate that!

Do you have some kind of documentation on how to query the data through the API (example url's would be enough on how to search a package and how to retrieve the stats)?

I can look at the API source but my C# is a bit rusty, so if you have something that would help a great deal 😅


Edit: It doesn't look too bad actually (the site uses the API too so I can just look at that).

Search for "sentry":

https://beta.nugettrends.com/api/package/search?q=sentry

Retrieve the history for the package "Sentry" for the past 6 months:

https://beta.nugettrends.com/api/package/history/Sentry?months=6

Am I correct so far?

Two questions:

bruno-garcia commented 5 years ago

@stayallive we plan to change the grouping (make it possible to define via parameter) but it's not done yet. I was curious if you are interested and it's great to know you are. But please take into account that project isn't ready yet and we haven't had the time to touch it last few months.

So yes, you'd be able to request package name, period and whether to group by day, or week or something.

stayallive commented 5 years ago

I have drafted up the package provider but yet the grouping (so we can request that data from yesterday) would be great. Possibly even adding the short package description (to the search endpoint) would be golden.

I got the provider already setup in #7 but will wait to proceed until the project is ready 👍

bruno-garcia commented 5 years ago

Nice! I'll get back to this issue once we have an update.

stayallive commented 5 years ago

(I assigned the issue to you @bruno-garcia just so people know it's being worked on, no actions needed!)