npm / npm-registry-client

http://npm.im/npm-registry-client
ISC License
264 stars 108 forks source link

Fetch the readme for a a package #99

Closed ForbesLindesay closed 9 years ago

ForbesLindesay commented 9 years ago

Is it possible to get the readme for a specific version of a specific package from this API?

othiym23 commented 9 years ago

Assuming the registry exposed that information, then yes, it's just another call to registry.get(). However, right now the only readme data that gets exposed is on the root document for the package, so the "easiest" way to do this at the moment is to grab the version's tarball and extract the README yourself. We want to be able to do this for the web site sooner or later, so we'll probably add an endpoint to the registry to expose that data, but it's not there right now.

ghost commented 8 years ago

To generalise a bit, it would be quite useful if selected files could be read from the registry. This would allow analytic applications to extract only information they need without downloading the whole tarball. This would save bandwidth in the end, though I admit that this use case might be a bit too specific to justify its implementation. Just dropping it in.