[PR #294] [MERGED] Add asc reviews ratings command for App Store rating statistics #419

Closed
opened 2026-02-26 22:30:51 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/rudrankriyam/App-Store-Connect-CLI/pull/294
Author: @rudrankriyam
Created: 1/29/2026
Status: Merged
Merged: 1/29/2026
Merged by: @rudrankriyam

Base: mainHead: feat/reviews-ratings


📝 Commits (5)

  • 7017382 Add asc reviews ratings command for App Store rating statistics
  • 2770f51 Refactor ratings output helpers
  • 1c08092 Fix iTunes ratings edge cases
  • 3399c9d Merge pull request #296 from rudrankriyam/cursor/reviews-output-formatting-ed9f
  • 3e288bb Validate reviews ratings output

📊 Changes

6 files changed (+1317 additions, -0 deletions)

View changed files

internal/cli/cmdtest/reviews_ratings_test.go (+100 -0)
📝 internal/cli/reviews/reviews.go (+3 -0)
internal/cli/reviews/reviews_ratings.go (+273 -0)
internal/itunes/client.go (+282 -0)
internal/itunes/client_test.go (+409 -0)
internal/itunes/storefronts.go (+250 -0)

📄 Description

Summary

  • Add new asc reviews ratings subcommand that fetches aggregate rating data using the public iTunes API
  • Supports single country and global aggregate (--all) modes with parallel fetching
  • No authentication required - uses public iTunes Lookup API

Features

# Single country (default: us)
asc reviews ratings --app 1479784361
asc reviews ratings --app 1479784361 --country de

# Global aggregate across all countries
asc reviews ratings --app 1479784361 --all
asc reviews ratings --app 1479784361 --all --workers 20

# Output formats: json (default), table, markdown
asc reviews ratings --app 1479784361 --output table

Example Output

Table format

Gradient Match Game: Descent
App ID: 1479784361 | Country: US
────────────────────────────────────────
Rating: 4.75 (71 ratings)

Histogram:
  5★       61 ( 85.9%) █████████████████
  4★        6 (  8.5%) █
  3★        1 (  1.4%) 
  2★        2 (  2.8%) 
  1★        1 (  1.4%)

Global ratings (--all)

Gradient Match Game: Descent
App ID: 1479784361
────────────────────────────────────────────────────────────
GLOBAL: 4.76 avg (148 total ratings across 31 countries)

Country                Rating    Count
────────────────────────────────────────
United States            4.75       71
India                    4.75       16
Germany                  5.00        7
...

Test plan

  • Unit tests for iTunes client (client_test.go)
  • CLI validation tests (reviews_ratings_test.go)
  • Manual testing with real apps (Gradient Match Game, Spotify)
  • Verified no authentication required (ASC_BYPASS_KEYCHAIN=1)
  • All tests pass: make test
  • Lint passes: make lint

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/rudrankriyam/App-Store-Connect-CLI/pull/294 **Author:** [@rudrankriyam](https://github.com/rudrankriyam) **Created:** 1/29/2026 **Status:** ✅ Merged **Merged:** 1/29/2026 **Merged by:** [@rudrankriyam](https://github.com/rudrankriyam) **Base:** `main` ← **Head:** `feat/reviews-ratings` --- ### 📝 Commits (5) - [`7017382`](https://github.com/rudrankriyam/App-Store-Connect-CLI/commit/7017382cd039a48f0671dbe44cd53e45826af92f) Add asc reviews ratings command for App Store rating statistics - [`2770f51`](https://github.com/rudrankriyam/App-Store-Connect-CLI/commit/2770f51d0a5684ee550393ed9751e23eadb8c634) Refactor ratings output helpers - [`1c08092`](https://github.com/rudrankriyam/App-Store-Connect-CLI/commit/1c08092b283579530274f77c1781fb4c44fa3fc5) Fix iTunes ratings edge cases - [`3399c9d`](https://github.com/rudrankriyam/App-Store-Connect-CLI/commit/3399c9dbfed13e37b20b72ebe003c5d37d92230b) Merge pull request #296 from rudrankriyam/cursor/reviews-output-formatting-ed9f - [`3e288bb`](https://github.com/rudrankriyam/App-Store-Connect-CLI/commit/3e288bbe687e3fd5822ceeca93962594d1af461c) Validate reviews ratings output ### 📊 Changes **6 files changed** (+1317 additions, -0 deletions) <details> <summary>View changed files</summary> ➕ `internal/cli/cmdtest/reviews_ratings_test.go` (+100 -0) 📝 `internal/cli/reviews/reviews.go` (+3 -0) ➕ `internal/cli/reviews/reviews_ratings.go` (+273 -0) ➕ `internal/itunes/client.go` (+282 -0) ➕ `internal/itunes/client_test.go` (+409 -0) ➕ `internal/itunes/storefronts.go` (+250 -0) </details> ### 📄 Description ## Summary - Add new `asc reviews ratings` subcommand that fetches aggregate rating data using the public iTunes API - Supports single country and global aggregate (`--all`) modes with parallel fetching - No authentication required - uses public iTunes Lookup API ## Features ```bash # Single country (default: us) asc reviews ratings --app 1479784361 asc reviews ratings --app 1479784361 --country de # Global aggregate across all countries asc reviews ratings --app 1479784361 --all asc reviews ratings --app 1479784361 --all --workers 20 # Output formats: json (default), table, markdown asc reviews ratings --app 1479784361 --output table ``` ## Example Output ### Table format ``` Gradient Match Game: Descent App ID: 1479784361 | Country: US ──────────────────────────────────────── Rating: 4.75 (71 ratings) Histogram: 5★ 61 ( 85.9%) █████████████████ 4★ 6 ( 8.5%) █ 3★ 1 ( 1.4%) 2★ 2 ( 2.8%) 1★ 1 ( 1.4%) ``` ### Global ratings (--all) ``` Gradient Match Game: Descent App ID: 1479784361 ──────────────────────────────────────────────────────────── GLOBAL: 4.76 avg (148 total ratings across 31 countries) Country Rating Count ──────────────────────────────────────── United States 4.75 71 India 4.75 16 Germany 5.00 7 ... ``` ## Test plan - [x] Unit tests for iTunes client (client_test.go) - [x] CLI validation tests (reviews_ratings_test.go) - [x] Manual testing with real apps (Gradient Match Game, Spotify) - [x] Verified no authentication required (ASC_BYPASS_KEYCHAIN=1) - [x] All tests pass: `make test` - [x] Lint passes: `make lint` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-26 22:30:51 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/App-Store-Connect-CLI#419
No description provided.