mirror of
https://github.com/yattee/yattee.git
synced 2024-12-22 21:43:41 +00:00
19 lines
369 B
Swift
19 lines
369 B
Swift
import Alamofire
|
|
import Foundation
|
|
import SwiftyJSON
|
|
|
|
final class TrendingCountriesProvider: DataProvider {
|
|
@Published var countries = [Country]()
|
|
|
|
private var query: String = ""
|
|
|
|
func load(_ query: String) {
|
|
guard query != self.query else {
|
|
return
|
|
}
|
|
|
|
self.query = query
|
|
countries = Country.search(query)
|
|
}
|
|
}
|