Skip to content

Commit

Permalink
Update monitor output log
Browse files Browse the repository at this point in the history
Add reverse URL output
  • Loading branch information
sunnyyoung committed Oct 8, 2021
1 parent 2df3397 commit f538ed8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 31 deletions.
4 changes: 4 additions & 0 deletions Sources/AppleReserver/Constant.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,8 @@ public struct AppleURL {
static func availability(of region: String) -> URL {
return URL(string: "https://reserve-prime.apple.com/\(region)/zh_\(region)/reserve/A/availability.json")!
}

static func reserve(of region: String) -> URL {
return URL(string: "https://reserve-prime.apple.com/\(region)/zh_\(region)/reserve/A/availability")!
}
}
30 changes: 0 additions & 30 deletions Sources/AppleReserver/Script.swift

This file was deleted.

2 changes: 1 addition & 1 deletion Sources/AppleReserver/main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ struct Monitor: ParsableCommand {
print("\u{1B}[1A\u{1B}[KChecked for \(Monitor.count) times.")
} else {
results.forEach { (store: String, part: String) in
print("⚠️ \(Date())\t\(store)\t\(part) 有货啦!!!\n")
print("🚨 \(Date().description(with: .current))\t\(store)\t\(part) 有货啦!!!\n\(AppleURL.reserve(of: region))")
}
}
}.catch { error in
Expand Down

0 comments on commit f538ed8

Please sign in to comment.