pub_api_client 4.0.0
pub_api_client: ^4.0.0 copied to clipboard
An API Client for Pub to interact with public package information.
4.0.0 #
Breaking changes #
- Added
SearchOrder.trendingfor pub.dev's trend-score ordering. Consumers with an exhaustive switch overSearchOrdermust add atrendingcase
Added #
packageLikes— public like count of a package, no authentication required (GET /api/packages/<package>/likes)publisherInfo— public publisher profile (GET /api/publishers/<publisherId>)packageVersionScore— score of a single package version (GET /api/packages/<package>/versions/<version>/score)packageVersionOptions— retraction status of a single package version (GET /api/packages/<package>/versions/<version>/options)topicNameCompletion— every topic mapped to its package count (GET /api/topic-name-completion-data)SearchResults.message, set when pub.dev could not fully honour the queryPackageScoreCard.weeklyVersionDownloads,WeeklyVersionDownloads, andVersionRangeWeeklyDownloads— total weekly downloads plus major, minor, and patch version-range histories #78Repository.fromMapandRepository.fromJson, matching the other models- Re-export the
pubspec_parsedependency types (Dependency,HostedDependency,GitDependency,PathDependency,SdkDependency,HostedDetails,Pubspec) so consumers can name the types reachable fromPubPackage.latestPubspec#78
Fixed #
- Search queries are now percent-encoded. Previously a
#or&in the query or in a tag silently truncated the request, so searches likec# & c++returned results forc fetchGooglePackagesno longer sends a malformedtools.dart.devpublisher tag, and now includes thelabs.dart.devpublisher
Deprecated #
SearchOrder.popularity— pub.dev retired the popularity score and serves these requests asSearchOrder.top. UseSearchOrder.downloadsPackageScore.popularityScore— pub.dev no longer returns this field. UsePackageScore.downloadCount30DaysLatestVersion— unreachable model; no endpoint returns it and no client method produces it. Scheduled for removal in 5.0.0
Changed #
- Documented that search paging is capped at 10 pages (100 results) by
pub.dev. The cap applies once to
fetchAllPackages,fetchPublisherPackages, andfetchFlutterFavorites, and separately for each publisher queried byfetchGooglePackages - Generated
*.mapper.dartfiles are excluded from analysis, and three lint rules removed from the Dart SDK were dropped fromanalysis_options.yaml
3.2.0 #
3.1.0 #
3.0.0 #
- Replaced deprecated
pubspectopubspec_parsepackage - Extensions for Pubspec, repository, issueTracker, screenshots, and issueTracker are now properties and not methods, for consistency with
pubspec_parse
2.7.0 #
- Updated schema by @leoafarias
- Added missing field to pubspec by @jxstxn1
2.6.0 #
- Feature: Added topics parameters to search method
- Chore: Improved models' equality and toString methods
- Fix: Hanging on close #40
2.5.0 #
- Feature: Ability to customize user-agent
- Chore: Set the minimum Dart SDK version to
3.0.0by @gmpassos - Chore: Updated dependencies by @gmpassos
- Chore: Switched analysis to use
lintsby @gmpassos - Chore: Pub.dev API no longer returns latestStableVersion for documentation endpoint
- Fix: Handle invalid JSON on exception
2.3.0 #
- Updated dependencies
- Removed freezed
2.2.2 #
- Chore: Updated dependencies
- Updated min SDK version to 2.17
2.2.1 #
Thank you @Rexios80 for all the great contributions
- Chore: Updated dependencies
- Fix: Recursive paging shares client
- Added: More tests
2.2.0 #
- Fixed
Clientinterface for custom HTTP Client by @Rexios80 #17 - Added Flutter Favorites, Google Packages, and Publisher Package request helpers.
2.1.1 #
- Added
closemethod to PubClient
2.0.6 #
2.0.1 #
1.0.9 #
Changed #
- Ability to pass custom HTTP Client as a parameter
- Changed latest version to display stable version only