Swift 5.3 CI codecov SPM compatible

关于 AppStoreReviews

AppStoreReviews 是一个 Swift Package,用于从 iTunes Store 和 Mac App Store 下载用户评论。

它支持:

此模块使用公开的客户评论 Feed:https://itunes.apple.com/rss/customerreviews/page=1/id=1510826067/sortby=mostrecent/json?l=en&cc=gb

安装

Swift Package Manager

将 AppStoreReviews 添加为依赖项非常简单,只需将其添加到 Package.swiftdependencies 值即可。

dependencies: [
    .package(url: "https://github.com/jcoynel/app-store-reviews-swift.git", .upToNextMajor(from: "1.0.0")),
]

Mint

$ mint install jcoynel/app-store-reviews-swift

用法

作为使用 Mint 安装的命令行工具

app-store-reviews 包括几个子命令和选项

OVERVIEW: Fetch user reviews from the Apple App Stores.

USAGE: app-store-reviews [--version] <subcommand>

OPTIONS:
  -v, --version           Print the version and exit. 
  -h, --help              Show help information.

SUBCOMMANDS:
  reviews                 Fetch all the reviews from the App Store Reviews feed for the provided app ID and territory.
  page                    Fetch the App Store Reviews feed page for the provided app ID, territory and page number.
  territories             Print the list of territories reviews can be fetched for.

  See 'app-store-reviews help <subcommand>' for detailed help.

territories (地区)

OVERVIEW: Print the list of territories reviews can be fetched for.

USAGE: app-store-reviews territories

OPTIONS:
  -h, --help              Show help information.

示例

$ app-store-reviews territories

reviews (评论)

OVERVIEW: Fetch all the reviews from the App Store Reviews feed for the provided app ID and territory.

USAGE: app-store-reviews reviews <app-id> <territory> <file-output>

ARGUMENTS:
  <app-id>                The ID of the app. 
  <territory>             App Store country or region. 
  <file-output>           The reviews file output. 

OPTIONS:
  -h, --help              Show help information.

示例

$ app-store-reviews reviews 555731861 GB reviews_555731861_GB.json
$ app-store-reviews reviews 497799835 US reviews_497799835_US.json

page (页面)

OVERVIEW: Fetch the App Store Reviews feed page for the provided app ID, territory and page number.

USAGE: app-store-reviews page <app-id> <territory> <page> <file-output>

ARGUMENTS:
  <app-id>                The ID of the app. 
  <territory>             App Store country or region. 
  <page>                  The page number. 
  <file-output>           The reviews file output. 

OPTIONS:
  -h, --help              Show help information.

示例

$ app-store-reviews page 555731861 GB 1 page_555731861_1_GB.json
$ app-store-reviews page 497799835 US 1 page_497799835_1_US.json
$ app-store-reviews page 497799835 US 5 page_497799835_5_US.json

作为库使用

将以下内容添加到您的 Package.swift 文件的 dependencies 中

.package(url: "https://github.com/jcoynel/app-store-reviews-swift.git", .upToNextMajor(from: "1.0.0")),

然后在需要的地方导入

import AppStoreReviews