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

Package Metadata URL May be Deprecated #7

Closed
ghost opened this issue Aug 14, 2015 · 11 comments
Closed

Package Metadata URL May be Deprecated #7

ghost opened this issue Aug 14, 2015 · 11 comments

Comments

@ghost
Copy link

ghost commented Aug 14, 2015

Based on this issue (npm/npm#9164), which was a follow up to pull request #6 , it looks like the <PACKAGE NAME>/<VERSION> API end-point is going to be deprecated in the future.

@sindresorhus
Copy link
Owner

@destroyerofbuilds Would you be willing to open an issue on their issue tracker, per recommendation:

If you want an interface like this back / to work with scoped packages, you might want to file an issue describing your use case at https://github.com/npm/public-api/issues/new.

@ghost
Copy link
Author

ghost commented Aug 26, 2015

@sindresorhus I can do that, but it may be a little longer before I have the time.

Though, I did start to go down the rabbit hole when I was wondering if we could just use the by-field end-point to get the version field. (Assuming it returned the version field for the latest published version of the package).

However, in attempting to use the same URL generated as part of this project's tests (https://registry.npmjs.org/-/by-field/?key=%22pageres%22&field=description) I can't get the value of the description field. With a clean checkout of this project the by-field test fails.

Now I'm wondering if they removed the by-field API end-point.

@sindresorhus
Copy link
Owner

Yeah, I can confirm it no longer works. It did use to work though. Ugh...

Funnily enough, this works: https://skimdb.npmjs.com/registry/_design/app/_view/byField/?key=%22pageres%22&field=description

@othiym23 Was the by-field endpoint removed or changed? It's very useful as the full package is giant and just fetching a field, which is the most common use-case, is faster.

@ghost
Copy link
Author

ghost commented Sep 8, 2015

@sindresorhus npm/public-api#6

@hutson
Copy link
Contributor

hutson commented Sep 22, 2015

I created #9 to focus on the by-field end-point.

Leaving this to the scoped packages end-point.

@hutson
Copy link
Contributor

hutson commented Sep 22, 2015

I've filed npm/public-api#11 to get the discussion moving on the version end-point for scoped packages.

@SamVerschueren
Copy link
Contributor

@sindresorhus In order to solve this, we can maybe just retrieve the latest release (https://registry.npmjs.org/pageres/latest). It's not the entire package so the size is a lot smaller, but allows us to retrieve the field and keep this method.

@sindresorhus
Copy link
Owner

@SamVerschueren That doesn't work for scoped packages: https://registry.npmjs.org/@sindresorhus%2Fdf/latest

@SamVerschueren
Copy link
Contributor

make-an-api

Why can't they make a consistent API :p

@sindresorhus
Copy link
Owner

The API is absolutely horrible, but I guess we can look forward a public API in 2020 :p

@SamVerschueren
Copy link
Contributor

2020... Someone is having high hopes ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants