1
0
mirror of https://github.com/yattee/yattee.git synced 2024-12-16 07:10:31 +05:30
yattee/Model/DataProvider.swift

15 lines
342 B
Swift
Raw Normal View History

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