Skip to content

Latest commit

 

History

History
45 lines (33 loc) · 1.6 KB

README.md

File metadata and controls

45 lines (33 loc) · 1.6 KB

License: MIT SPM compatible Swift Xcode Issues Releases

Sponsor

Sponsor

AppStoreReviewsAPI

A Swift 5.6 implementation of iTunes customer reviews. Retrieve customer reviews for your app and display most helpful reviews.

Installation

Swift Package Manager (SPM)

You can use The Swift Package Manager to install AppStoreReviewsAPI by adding it to your Package.swift file:

import PackageDescription

let package = Package(
    name: "MyApp",
    targets: [],
    dependencies: [
        .Package(url: "https://github.com/ihamadfuad/AppStoreReviewsAPI.git", .from: "1.0.0")
    ]
)

Usage

import AppStoreReviewsAPI

let appStore = AppStoreReviewsAPI(appID: "310633997") // This app id belongs to WhatsApp
let reviews = try await appStore.reviews()

reviews.feed.entry.forEach {

    print("Rating: ", $0.imRating.label)
    print($0.title.label)
    print($0.content.label)
    print(" +---------------------------------------------------+ ")
}