Skip to content
This repository has been archived by the owner on Feb 22, 2018. It is now read-only.

API to get a list of all packages matching a prefix #253

Open
seaneagan opened this issue Oct 1, 2014 · 2 comments
Open

API to get a list of all packages matching a prefix #253

seaneagan opened this issue Oct 1, 2014 · 2 comments

Comments

@seaneagan
Copy link

AFAIK currently you have to request:

http://pub.dartlang.org/packages.json?page=

for each of about 26 pages, and then do the filtering locally, which takes too long for real time use cases.

I'm just looking for the package names, not necessarily any metadata, as that can be gotten from other APIs.

This would be useful for various tooling such as:

  • a pub search command (see npm search)
  • tab completion for pub commands that reference package names (pub global activate, pub depend(dartbug.com/18911))
  • Completion in IDE's when adding dependencies to a pubspec or adding imports.
@sethladd
Copy link
Contributor

patches welcome!

@damondouglas
Copy link

@seaneagan do you think pub-dartlang should have a discovery endpoint api? For this particular use case, we could call pub.packages.list providing the q parameter and limit the response to names only. den could then employ discovery_api_dart_client_generator.

I was thinking to attempt this starting with the following apis:

pub.packages.get
pub.packages.list
pub.authors.get
pub.authors.list

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

No branches or pull requests

3 participants