mirror of
https://github.com/mas-cli/mas
synced 2025-02-17 13:08:23 +00:00
commit
ab399c59c6
2 changed files with 4 additions and 4 deletions
|
@ -16,12 +16,12 @@ protocol AppStoreSearcher {
|
||||||
/// - Parameter appID: App ID.
|
/// - Parameter appID: App ID.
|
||||||
/// - Returns: A `Promise` for the `SearchResult` for the given `appID` if `appID` is valid.
|
/// - Returns: A `Promise` for the `SearchResult` for the given `appID` if `appID` is valid.
|
||||||
/// A `Promise` for `MASError.unknownAppID(appID)` if `appID` is invalid.
|
/// A `Promise` for `MASError.unknownAppID(appID)` if `appID` is invalid.
|
||||||
/// An `Promise` for some other `Error` if any problems occur.
|
/// A `Promise` for some other `Error` if any problems occur.
|
||||||
func lookup(appID: AppID) -> Promise<SearchResult>
|
func lookup(appID: AppID) -> Promise<SearchResult>
|
||||||
|
|
||||||
/// Searches for apps.
|
/// Searches for apps.
|
||||||
///
|
///
|
||||||
/// - Parameter searchTerm: Term for which to search.
|
/// - Parameter searchTerm: Term for which to search.
|
||||||
/// - Returns: A `Promise` of an `Array` of `SearchResult`s matching `searchTerm`.
|
/// - Returns: A `Promise` for an `Array` of `SearchResult`s matching `searchTerm`.
|
||||||
func search(for searchTerm: String) -> Promise<[SearchResult]>
|
func search(for searchTerm: String) -> Promise<[SearchResult]>
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,7 +35,7 @@ class ITunesSearchAppStoreSearcher: AppStoreSearcher {
|
||||||
/// - Parameter appID: App ID.
|
/// - Parameter appID: App ID.
|
||||||
/// - Returns: A `Promise` for the `SearchResult` for the given `appID` if `appID` is valid.
|
/// - Returns: A `Promise` for the `SearchResult` for the given `appID` if `appID` is valid.
|
||||||
/// A `Promise` for `MASError.unknownAppID(appID)` if `appID` is invalid.
|
/// A `Promise` for `MASError.unknownAppID(appID)` if `appID` is invalid.
|
||||||
/// An `Promise` for some other `Error` if any problems occur.
|
/// A `Promise` for some other `Error` if any problems occur.
|
||||||
func lookup(appID: AppID) -> Promise<SearchResult> {
|
func lookup(appID: AppID) -> Promise<SearchResult> {
|
||||||
guard let url = lookupURL(forAppID: appID, inCountry: country) else {
|
guard let url = lookupURL(forAppID: appID, inCountry: country) else {
|
||||||
fatalError("Failed to build URL for \(appID)")
|
fatalError("Failed to build URL for \(appID)")
|
||||||
|
@ -77,7 +77,7 @@ class ITunesSearchAppStoreSearcher: AppStoreSearcher {
|
||||||
/// Searches for apps from the MAS.
|
/// Searches for apps from the MAS.
|
||||||
///
|
///
|
||||||
/// - Parameter searchTerm: Term for which to search in the MAS.
|
/// - Parameter searchTerm: Term for which to search in the MAS.
|
||||||
/// - Returns: A `Promise` of an `Array` of `SearchResult`s matching `searchTerm`.
|
/// - Returns: A `Promise` for an `Array` of `SearchResult`s matching `searchTerm`.
|
||||||
func search(for searchTerm: String) -> Promise<[SearchResult]> {
|
func search(for searchTerm: String) -> Promise<[SearchResult]> {
|
||||||
// Search for apps for compatible platforms, in order of preference.
|
// Search for apps for compatible platforms, in order of preference.
|
||||||
// Macs with Apple Silicon can run iPad and iPhone apps.
|
// Macs with Apple Silicon can run iPad and iPhone apps.
|
||||||
|
|
Loading…
Add table
Reference in a new issue