yattee/Model/DataProvider.swift

15 lines
342 B
Swift
Raw Normal View History

2021-06-10 22:50:10 +00:00
import Alamofire
import Foundation
class DataProvider: ObservableObject {
static let instance = "https://invidious.home.arekf.net"
static func request(_ path: String) -> DataRequest {
2021-06-11 00:05:59 +00:00
AF.request(apiURLString(path))
2021-06-10 22:50:10 +00:00
}
static func apiURLString(_ path: String) -> String {
"\(instance)/api/v1/\(path)"
}
}