1
0
mirror of https://github.com/yattee/yattee.git synced 2024-12-15 23:00:32 +05:30
yattee/Model/TrendingCountriesProvider.swift
2021-06-18 00:43:29 +02:00

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)
}
}