Fix since query parameter so that we don't pull all the data all the time.

This commit is contained in:
Maurice Parker 2020-10-19 20:44:16 -05:00
parent a95484852e
commit 006d02a824
1 changed files with 6 additions and 1 deletions

View File

@ -646,7 +646,7 @@ final class ReaderAPICaller: NSObject {
let url = baseURL
.appendingPathComponent(ReaderAPIEndpoints.itemIds.rawValue)
.appendingQueryItems([
URLQueryItem(name: "o", value: String(sinceString)),
URLQueryItem(name: "ot", value: String(sinceString)),
URLQueryItem(name: "n", value: "10000"),
URLQueryItem(name: "output", value: "json"),
URLQueryItem(name: "xt", value: ReaderState.read.rawValue),
@ -671,6 +671,11 @@ final class ReaderAPICaller: NSObject {
return
}
guard entries.itemRefs.count > 0 else {
completion(.success((nil, nil, nil)))
return
}
self.requestAuthorizationToken(endpoint: baseURL) { (result) in
switch result {
case .success(let token):