You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Strange that there's no search API or ability to download the entire list; seems like we'd have to download them all page-at-a-time and cache them somewhere? :(
Hmmm, maybe pulling down a list and caching it would be best. Maybe worth seeing if we can find anyone else already providing this functionality and what they do.
I wonder if @devoncarew might have any suggestions on what would be best (and whether anyone else is doing it)?
Maybe depends on how big it is/how long it takes to download! If it doesn't take long to fetch, maybe refreshing at activating (in BG) if it's more than 24hrs old?
No one else is doing it that I know of :) The old Dart Editor did use to do keyword completion for pubspec files, but not package name completion. I wonder if the built-in lexical completion is sufficient here?
There's an open issue at #2078 about versions. I do have a working PoC for it, but I haven't had changed to finish it off and land it yet. Subscribe there for updates :-)
Activity
jrote1 commentedon Aug 16, 2016
A dart package that uses the pub.dartlang.org api https://github.com/jimsimon/pub_client
jrote1 commentedon Aug 16, 2016
I will look into doing this
DanTup commentedon Aug 16, 2016
Strange that there's no search API or ability to download the entire list; seems like we'd have to download them all page-at-a-time and cache them somewhere? :(
jrote1 commentedon Aug 16, 2016
they have a custom search endpoint not sure if we can use that
https://github.com/dart-lang/pub-dartlang/blob/master/app/handlers/search.py
jrote1 commentedon Aug 16, 2016
I have started investigation it and they use google apis
jrote1 commentedon Aug 16, 2016
I have figured it out, this is the endpoint but we require a google api key, https://www.googleapis.com/customsearch/v1?cx=009011925481577436976:h931xn2j7o0&q=angular&key=
DanTup commentedon Aug 16, 2016
Hmmm, maybe pulling down a list and caching it would be best. Maybe worth seeing if we can find anyone else already providing this functionality and what they do.
I wonder if @devoncarew might have any suggestions on what would be best (and whether anyone else is doing it)?
jrote1 commentedon Aug 16, 2016
Caching does sound like the best option, but when should be refresh the cache :/
DanTup commentedon Aug 16, 2016
Maybe depends on how big it is/how long it takes to download! If it doesn't take long to fetch, maybe refreshing at activating (in BG) if it's more than 24hrs old?
devoncarew commentedon Aug 16, 2016
No one else is doing it that I know of :) The old Dart Editor did use to do keyword completion for pubspec files, but not package name completion. I wonder if the built-in lexical completion is sufficient here?
16 remaining items
DanTup commentedon Mar 4, 2021
This is done in dart-lang/sdk@d901f73.
(It'll arrive in a future SDK update).
HerrNiklasRaab commentedon Apr 7, 2021
@DanTup This is a very nice feature!
But I think every autocomplete suggestion should include the latest available version.
DanTup commentedon Apr 8, 2021
There's an open issue at #2078 about versions. I do have a working PoC for it, but I haven't had changed to finish it off and land it yet. Subscribe there for updates :-)