Skip to content

Commit 049ae80

Browse files
committed
Add time between queries
1 parent 0dafc0a commit 049ae80

File tree

6 files changed

+20
-5
lines changed

6 files changed

+20
-5
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Add the package to your `Package.swift` dependencies:
3131

3232
```swift
3333
dependencies: [
34-
.package(url: "[email protected]:appwrite/sdk-for-apple.git", from: "11.0.0"),
34+
.package(url: "[email protected]:appwrite/sdk-for-apple.git", from: "11.1.0"),
3535
],
3636
```
3737

Sources/Appwrite/Client.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ open class Client {
2323
"x-sdk-name": "Apple",
2424
"x-sdk-platform": "client",
2525
"x-sdk-language": "apple",
26-
"x-sdk-version": "11.0.0",
26+
"x-sdk-version": "11.1.0",
2727
"x-appwrite-response-format": "1.8.0"
2828
]
2929

Sources/Appwrite/Query.swift

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -354,6 +354,13 @@ public struct Query : Codable, CustomStringConvertible {
354354
).description
355355
}
356356

357+
public static func createdBetween(_ start: String, _ end: String) -> String {
358+
return Query(
359+
method: "createdBetween",
360+
values: [start, end]
361+
).description
362+
}
363+
357364
public static func updatedBefore(_ value: String) -> String {
358365
return Query(
359366
method: "updatedBefore",
@@ -368,6 +375,13 @@ public struct Query : Codable, CustomStringConvertible {
368375
).description
369376
}
370377

378+
public static func updatedBetween(_ start: String, _ end: String) -> String {
379+
return Query(
380+
method: "updatedBetween",
381+
values: [start, end]
382+
).description
383+
}
384+
371385
public static func or(_ queries: [String]) -> String {
372386
let decoder = JSONDecoder()
373387
let decodedQueries = queries.compactMap { queryStr -> Query? in

Sources/Appwrite/Services/Account.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1548,7 +1548,7 @@ open class Account: Service {
15481548
/// - Throws: Exception if the request fails
15491549
/// - Returns: AppwriteModels.Session
15501550
///
1551-
@available(*, deprecated, message: "This API has been deprecated.")
1551+
@available(*, deprecated, message: "This API has been deprecated since 1.6.0. Please use `Account.createSession` instead.")
15521552
open func updateMagicURLSession(
15531553
userId: String,
15541554
secret: String
@@ -1648,7 +1648,7 @@ open class Account: Service {
16481648
/// - Throws: Exception if the request fails
16491649
/// - Returns: AppwriteModels.Session
16501650
///
1651-
@available(*, deprecated, message: "This API has been deprecated.")
1651+
@available(*, deprecated, message: "This API has been deprecated since 1.6.0. Please use `Account.createSession` instead.")
16521652
open func updatePhoneSession(
16531653
userId: String,
16541654
secret: String

Sources/AppwriteEnums/CreditCard.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public enum CreditCard: String, CustomStringConvertible {
1313
case mastercard = "mastercard"
1414
case naranja = "naranja"
1515
case tarjetaShopping = "targeta-shopping"
16-
case unionChinaPay = "union-china-pay"
16+
case unionPay = "unionpay"
1717
case visa = "visa"
1818
case mIR = "mir"
1919
case maestro = "maestro"

Sources/AppwriteEnums/ExecutionMethod.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ public enum ExecutionMethod: String, CustomStringConvertible {
77
case pATCH = "PATCH"
88
case dELETE = "DELETE"
99
case oPTIONS = "OPTIONS"
10+
case hEAD = "HEAD"
1011

1112
public var description: String {
1213
return rawValue

0 commit comments

Comments
 (0)