Skip to content

Commit

Permalink
Expose download counts in API. (dart-lang#8397)
Browse files Browse the repository at this point in the history
  • Loading branch information
isoos authored Dec 12, 2024
1 parent f5181a1 commit aa4563c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/lib/frontend/handlers/custom_api.dart
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ Future<VersionScore> packageVersionScoreHandler(
grantedPoints: card.grantedPubPoints,
maxPoints: card.maxPubPoints,
likeCount: pkg.likes,
downloadCount30Days: card.thirtyDaysDownloadCounts,
popularityScore: card.popularityScore,
tags: tags.toList(),
lastUpdated: updated,
Expand Down
2 changes: 2 additions & 0 deletions pkg/_pub_shared/lib/data/package_api.dart
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,7 @@ class VersionScore {
final int? grantedPoints;
final int? maxPoints;
final int? likeCount;
final int? downloadCount30Days;
final double? popularityScore;
final List<String>? tags;
final DateTime? lastUpdated;
Expand All @@ -287,6 +288,7 @@ class VersionScore {
required this.grantedPoints,
required this.maxPoints,
required this.likeCount,
required this.downloadCount30Days,
required this.popularityScore,
required this.tags,
required this.lastUpdated,
Expand Down
3 changes: 3 additions & 0 deletions pkg/_pub_shared/lib/data/package_api.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit aa4563c

Please sign in to comment.