Files
swift-request/Examples/Sources/QuoteService.swift
2023-06-28 16:17:04 -03:00

12 lines
270 B
Swift

import Foundation
import SwiftRequest
@Service(resource: "quotes")
protocol QuoteService {
@GET("random")
func getRandomQuotes(@QueryParam limit: Int?) async throws -> [Quote]
@GET("{id}")
func getQuote(@Path by id: String) async throws -> Quote
}