mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
use URLQueryItem helper
This commit is contained in:
@@ -875,18 +875,15 @@ final class ReaderAPICaller: NSObject {
|
||||
return
|
||||
}
|
||||
|
||||
guard var components = URLComponents(url: baseURL.appendingPathComponent(ReaderAPIEndpoints.itemIds.rawValue), resolvingAgainstBaseURL: false) else {
|
||||
completion(.failure(TransportError.noURL))
|
||||
return
|
||||
}
|
||||
let url = baseURL
|
||||
.appendingPathComponent(ReaderAPIEndpoints.itemIds.rawValue)
|
||||
.appendingQueryItems([
|
||||
URLQueryItem(name: "s", value: "user/-/state/com.google/starred"),
|
||||
URLQueryItem(name: "n", value: "10000"),
|
||||
URLQueryItem(name: "output", value: "json")
|
||||
])
|
||||
|
||||
components.queryItems = [
|
||||
URLQueryItem(name: "s", value: "user/-/state/com.google/starred"),
|
||||
URLQueryItem(name: "n", value: "10000"),
|
||||
URLQueryItem(name: "output", value: "json")
|
||||
]
|
||||
|
||||
guard let callURL = components.url else {
|
||||
guard let callURL = url else {
|
||||
completion(.failure(TransportError.noURL))
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user