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

NuGet download count no longer works #678

Closed
Daniel15 opened this issue Mar 27, 2016 · 9 comments · Fixed by #945
Closed

NuGet download count no longer works #678

Daniel15 opened this issue Mar 27, 2016 · 9 comments · Fixed by #945
Labels
good first issue New contributors, join in! service-badge New or updated service badge

Comments

@Daniel15
Copy link
Member

eg. http://img.shields.io/nuget/dt/RouteJs.Mvc4.svg

I understand that this was due to #655, but it would be good to have some solution to retrieve download counts. Visual Studio shows download count in the package browser when using v3 endpoints, so the data must be available somewhere.

@espadrine
Copy link
Member

I would recommend contacting someone knowledgeable about v3, someone at Microsoft perhaps?

Daniel15 referenced this issue Apr 16, 2016
The v2 API returned XML even though we asked for JSON.

MyGet is still not working.

Part of #655.
@Daniel15
Copy link
Member Author

Daniel15 commented Apr 16, 2016

I was going to work on this but I can't even find the source code for NuGet API v3. I was going to look at it to determine all the available endpoints.The NuGet Gallery codebase only contains the v1 and v2 APIs, and the simple NuGet.Server still uses the v2 API. Perhaps I should proxy Visual Studio to see how it does it, although I imagine it uses a search endpoint.

@Daniel15
Copy link
Member Author

Cross-posted to NuGet repo: NuGet/Home#2596

@paulmelnikow
Copy link
Member

In #792, @kzu posted:

The new APIs in NuGet v3 server should make this fairly straightforward now.

For example, to get the stats for GitLink, you would issue an HTTP get to:

https://api-v2v3search-0.nuget.org/query?q=packageid:gitlink

Which gives you json with data.totalDownloads = 11605 as of this writing.

@paulmelnikow
Copy link
Member

@Daniel15 or @kzu, would one of you like to open a pull request?

@paulmelnikow paulmelnikow added the service-badge New or updated service badge label Apr 18, 2017
@Daniel15
Copy link
Member Author

Daniel15 commented Apr 18, 2017 via email

@Daniel15
Copy link
Member Author

PR submitted: #945

paulmelnikow pushed a commit that referenced this issue Apr 20, 2017
Switched from SearchAutocompleteService to SearchQueryService as this service also provides download counts.

Closes #678.
@paulmelnikow
Copy link
Member

Merged! Will be deployed soon.

@kzu
Copy link
Contributor

kzu commented Apr 22, 2017

Awesome guys, thank you!!!

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

Successfully merging a pull request may close this issue.

4 participants