yattee/Model/DataProvider.swift
2021-06-11 02:06:23 +02:00

15 lines
342 B
Swift

import Alamofire
import Foundation
class DataProvider: ObservableObject {
static let instance = "https://invidious.home.arekf.net"
static func request(_ path: String) -> DataRequest {
AF.request(apiURLString(path))
}
static func apiURLString(_ path: String) -> String {
"\(instance)/api/v1/\(path)"
}
}