MCPcopy Create free account
hub / github.com/AndroidPoet/playconsole-cli / GetTotalDownloads

Method GetTotalDownloads

internal/api/github.go:74–88  ·  view source on GitHub ↗

GetTotalDownloads returns the total download count across all releases

()

Source from the content-addressed store, hash-verified

72
73// GetTotalDownloads returns the total download count across all releases
74func (c *GitHubClient) GetTotalDownloads() (int64, error) {
75 releases, err := c.GetReleases()
76 if err != nil {
77 return 0, err
78 }
79
80 var total int64
81 for _, release := range releases {
82 for _, asset := range release.Assets {
83 total += asset.DownloadCount
84 }
85 }
86
87 return total, nil
88}
89
90// GetDownloadsByRelease returns download counts grouped by release
91func (c *GitHubClient) GetDownloadsByRelease() ([]ReleaseDownloads, error) {

Callers 1

runDownloadsFunction · 0.95

Calls 1

GetReleasesMethod · 0.95

Tested by

no test coverage detected