mirror of
https://github.com/zhigang1992/swift-request.git
synced 2026-01-12 22:52:42 +08:00
12 lines
270 B
Swift
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
|
|
}
|