Skip to content

Commit aa4563c

Browse files
authored
Expose download counts in API. (#8397)
1 parent f5181a1 commit aa4563c

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

app/lib/frontend/handlers/custom_api.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,7 @@ Future<VersionScore> packageVersionScoreHandler(
246246
grantedPoints: card.grantedPubPoints,
247247
maxPoints: card.maxPubPoints,
248248
likeCount: pkg.likes,
249+
downloadCount30Days: card.thirtyDaysDownloadCounts,
249250
popularityScore: card.popularityScore,
250251
tags: tags.toList(),
251252
lastUpdated: updated,

pkg/_pub_shared/lib/data/package_api.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,7 @@ class VersionScore {
279279
final int? grantedPoints;
280280
final int? maxPoints;
281281
final int? likeCount;
282+
final int? downloadCount30Days;
282283
final double? popularityScore;
283284
final List<String>? tags;
284285
final DateTime? lastUpdated;
@@ -287,6 +288,7 @@ class VersionScore {
287288
required this.grantedPoints,
288289
required this.maxPoints,
289290
required this.likeCount,
291+
required this.downloadCount30Days,
290292
required this.popularityScore,
291293
required this.tags,
292294
required this.lastUpdated,

pkg/_pub_shared/lib/data/package_api.g.dart

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)