Skip to content

Commit d1c25a9

Browse files
authored
Merge pull request #14 from appwrite/dev
Fix between query output
2 parents 7fe1b03 + e9094ec commit d1c25a9

23 files changed

+587
-274
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
![Swift Package Manager](https://img.shields.io/github/v/release/appwrite/sdk-for-swift.svg?color=green&style=flat-square)
44
![License](https://img.shields.io/github/license/appwrite/sdk-for-swift.svg?style=flat-square)
5-
![Version](https://img.shields.io/badge/api%20version-1.4.2-blue.svg?style=flat-square)
5+
![Version](https://img.shields.io/badge/api%20version-1.4.12-blue.svg?style=flat-square)
66
[![Build Status](https://img.shields.io/travis/com/appwrite/sdk-generator?style=flat-square)](https://travis-ci.com/appwrite/sdk-generator)
77
[![Twitter Account](https://img.shields.io/twitter/follow/appwrite?color=00acee&label=twitter&style=flat-square)](https://twitter.com/appwrite)
88
[![Discord](https://img.shields.io/discord/564160730845151244?label=discord&style=flat-square)](https://appwrite.io/discord)
@@ -33,7 +33,7 @@ Add the package to your `Package.swift` dependencies:
3333

3434
```swift
3535
dependencies: [
36-
.package(url: "[email protected]:appwrite/sdk-for-swift.git", from: "4.0.1"),
36+
.package(url: "[email protected]:appwrite/sdk-for-swift.git", from: "4.1.0"),
3737
],
3838
```
3939

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": "Swift",
2424
"x-sdk-platform": "server",
2525
"x-sdk-language": "swift",
26-
"x-sdk-version": "4.0.1",
26+
"x-sdk-version": "4.1.0",
2727
"X-Appwrite-Response-Format": "1.4.0"
2828
]
2929

Sources/Appwrite/Query.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,15 @@ public class Query {
3333
}
3434

3535
public static func between(_ attribute: String, start: Int, end: Int) -> String {
36-
buildQueryWhere(attribute, is: "between", to: [start, end])
36+
"between(\"\(attribute)\", \(start), \(end))"
3737
}
3838

3939
public static func between(_ attribute: String, start: Double, end: Double) -> String {
40-
buildQueryWhere(attribute, is: "between", to: [start, end])
40+
"between(\"\(attribute)\", \(start), \(end))"
4141
}
4242

4343
public static func between(_ attribute: String, start: String, end: String) -> String {
44-
buildQueryWhere(attribute, is: "between", to: [start, end])
44+
"between(\"\(attribute)\", \"\(start)\", \"\(end)\")"
4545
}
4646

4747
public static func startsWith(_ attribute: String, value: String) -> String {

Sources/Appwrite/Services/Account.swift

Lines changed: 44 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import AppwriteModels
88
open class Account: Service {
99

1010
///
11-
/// Get Account
11+
/// Get account
1212
///
1313
/// Get the currently logged in user.
1414
///
@@ -40,7 +40,7 @@ open class Account: Service {
4040
}
4141

4242
///
43-
/// Get Account
43+
/// Get account
4444
///
4545
/// Get the currently logged in user.
4646
///
@@ -55,7 +55,7 @@ open class Account: Service {
5555
}
5656

5757
///
58-
/// Update Email
58+
/// Update email
5959
///
6060
/// Update currently logged in user account email address. After changing user
6161
/// address, the user confirmation status will get reset. A new confirmation
@@ -101,7 +101,7 @@ open class Account: Service {
101101
}
102102

103103
///
104-
/// Update Email
104+
/// Update email
105105
///
106106
/// Update currently logged in user account email address. After changing user
107107
/// address, the user confirmation status will get reset. A new confirmation
@@ -192,7 +192,7 @@ open class Account: Service {
192192
}
193193

194194
///
195-
/// List Logs
195+
/// List logs
196196
///
197197
/// Get the list of latest security activity logs for the currently logged in
198198
/// user. Each log returns user IP address, location and date and time of log.
@@ -228,7 +228,7 @@ open class Account: Service {
228228
}
229229

230230
///
231-
/// Update Name
231+
/// Update name
232232
///
233233
/// Update currently logged in user account name.
234234
///
@@ -264,7 +264,7 @@ open class Account: Service {
264264
}
265265

266266
///
267-
/// Update Name
267+
/// Update name
268268
///
269269
/// Update currently logged in user account name.
270270
///
@@ -282,7 +282,7 @@ open class Account: Service {
282282
}
283283

284284
///
285-
/// Update Password
285+
/// Update password
286286
///
287287
/// Update currently logged in user password. For validation, user is required
288288
/// to pass in the new password, and the old password. For users created with
@@ -323,7 +323,7 @@ open class Account: Service {
323323
}
324324

325325
///
326-
/// Update Password
326+
/// Update password
327327
///
328328
/// Update currently logged in user password. For validation, user is required
329329
/// to pass in the new password, and the old password. For users created with
@@ -346,12 +346,12 @@ open class Account: Service {
346346
}
347347

348348
///
349-
/// Update Phone
349+
/// Update phone
350350
///
351351
/// Update the currently logged in user's phone number. After updating the
352352
/// phone number, the phone verification status will be reset. A confirmation
353353
/// SMS is not sent automatically, however you can use the [POST
354-
/// /account/verification/phone](/docs/client/account#accountCreatePhoneVerification)
354+
/// /account/verification/phone](https://appwrite.io/docs/references/cloud/client-web/account#createPhoneVerification)
355355
/// endpoint to send a confirmation SMS.
356356
///
357357
/// @param String phone
@@ -389,12 +389,12 @@ open class Account: Service {
389389
}
390390

391391
///
392-
/// Update Phone
392+
/// Update phone
393393
///
394394
/// Update the currently logged in user's phone number. After updating the
395395
/// phone number, the phone verification status will be reset. A confirmation
396396
/// SMS is not sent automatically, however you can use the [POST
397-
/// /account/verification/phone](/docs/client/account#accountCreatePhoneVerification)
397+
/// /account/verification/phone](https://appwrite.io/docs/references/cloud/client-web/account#createPhoneVerification)
398398
/// endpoint to send a confirmation SMS.
399399
///
400400
/// @param String phone
@@ -414,7 +414,7 @@ open class Account: Service {
414414
}
415415

416416
///
417-
/// Get Account Preferences
417+
/// Get account preferences
418418
///
419419
/// Get the preferences as a key-value object for the currently logged in user.
420420
///
@@ -446,7 +446,7 @@ open class Account: Service {
446446
}
447447

448448
///
449-
/// Get Account Preferences
449+
/// Get account preferences
450450
///
451451
/// Get the preferences as a key-value object for the currently logged in user.
452452
///
@@ -461,7 +461,7 @@ open class Account: Service {
461461
}
462462

463463
///
464-
/// Update Preferences
464+
/// Update preferences
465465
///
466466
/// Update currently logged in user account preferences. The object you pass is
467467
/// stored as is, and replaces any previous value. The maximum allowed prefs
@@ -499,7 +499,7 @@ open class Account: Service {
499499
}
500500

501501
///
502-
/// Update Preferences
502+
/// Update preferences
503503
///
504504
/// Update currently logged in user account preferences. The object you pass is
505505
/// stored as is, and replaces any previous value. The maximum allowed prefs
@@ -519,16 +519,16 @@ open class Account: Service {
519519
}
520520

521521
///
522-
/// Create Password Recovery
522+
/// Create password recovery
523523
///
524524
/// Sends the user an email with a temporary secret key for password reset.
525525
/// When the user clicks the confirmation link he is redirected back to your
526526
/// app password reset URL with the secret key and email address values
527527
/// attached to the URL query string. Use the query string params to submit a
528528
/// request to the [PUT
529-
/// /account/recovery](/docs/client/account#accountUpdateRecovery) endpoint to
530-
/// complete the process. The verification link sent to the user's email
531-
/// address is valid for 1 hour.
529+
/// /account/recovery](https://appwrite.io/docs/references/cloud/client-web/account#updateRecovery)
530+
/// endpoint to complete the process. The verification link sent to the user's
531+
/// email address is valid for 1 hour.
532532
///
533533
/// @param String email
534534
/// @param String url
@@ -564,12 +564,13 @@ open class Account: Service {
564564
}
565565

566566
///
567-
/// Create Password Recovery (confirmation)
567+
/// Create password recovery (confirmation)
568568
///
569569
/// Use this endpoint to complete the user account password reset. Both the
570570
/// **userId** and **secret** arguments will be passed as query parameters to
571571
/// the redirect URL you have provided when sending your request to the [POST
572-
/// /account/recovery](/docs/client/account#accountCreateRecovery) endpoint.
572+
/// /account/recovery](https://appwrite.io/docs/references/cloud/client-web/account#createRecovery)
573+
/// endpoint.
573574
///
574575
/// Please note that in order to avoid a [Redirect
575576
/// Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md)
@@ -616,7 +617,7 @@ open class Account: Service {
616617
}
617618

618619
///
619-
/// List Sessions
620+
/// List sessions
620621
///
621622
/// Get the list of active sessions across different devices for the currently
622623
/// logged in user.
@@ -648,7 +649,7 @@ open class Account: Service {
648649
}
649650

650651
///
651-
/// Delete Sessions
652+
/// Delete sessions
652653
///
653654
/// Delete all sessions from the user account and remove any sessions cookies
654655
/// from the end client.
@@ -674,7 +675,7 @@ open class Account: Service {
674675
}
675676

676677
///
677-
/// Get Session
678+
/// Get session
678679
///
679680
/// Use this endpoint to get a logged in user's session using a Session ID.
680681
/// Inputting 'current' will return the current session being used.
@@ -709,7 +710,7 @@ open class Account: Service {
709710
}
710711

711712
///
712-
/// Update OAuth Session (Refresh Tokens)
713+
/// Update OAuth session (refresh tokens)
713714
///
714715
/// Access tokens have limited lifespan and expire to mitigate security risks.
715716
/// If session was created using an OAuth provider, this route can be used to
@@ -745,12 +746,13 @@ open class Account: Service {
745746
}
746747

747748
///
748-
/// Delete Session
749+
/// Delete session
749750
///
750751
/// Logout the user. Use 'current' as the session ID to logout on this device,
751752
/// use a session ID to logout on another device. If you're looking to logout
752753
/// the user on all devices, use [Delete
753-
/// Sessions](/docs/client/account#accountDeleteSessions) instead.
754+
/// Sessions](https://appwrite.io/docs/references/cloud/client-web/account#deleteSessions)
755+
/// instead.
754756
///
755757
/// @param String sessionId
756758
/// @throws Exception
@@ -776,7 +778,7 @@ open class Account: Service {
776778
}
777779

778780
///
779-
/// Update Status
781+
/// Update status
780782
///
781783
/// Block the currently logged in user account. Behind the scene, the user
782784
/// record is not deleted but permanently blocked from any access. To
@@ -810,7 +812,7 @@ open class Account: Service {
810812
}
811813

812814
///
813-
/// Update Status
815+
/// Update status
814816
///
815817
/// Block the currently logged in user account. Behind the scene, the user
816818
/// record is not deleted but permanently blocked from any access. To
@@ -827,7 +829,7 @@ open class Account: Service {
827829
}
828830

829831
///
830-
/// Create Email Verification
832+
/// Create email verification
831833
///
832834
/// Use this endpoint to send a verification message to your user email address
833835
/// to confirm they are the valid owners of that address. Both the **userId**
@@ -836,8 +838,8 @@ open class Account: Service {
836838
/// should redirect the user back to your app and allow you to complete the
837839
/// verification process by verifying both the **userId** and **secret**
838840
/// parameters. Learn more about how to [complete the verification
839-
/// process](/docs/client/account#accountUpdateEmailVerification). The
840-
/// verification link sent to the user's email address is valid for 7 days.
841+
/// process](https://appwrite.io/docs/references/cloud/client-web/account#updateVerification).
842+
/// The verification link sent to the user's email address is valid for 7 days.
841843
///
842844
/// Please note that in order to avoid a [Redirect
843845
/// Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md),
@@ -876,7 +878,7 @@ open class Account: Service {
876878
}
877879

878880
///
879-
/// Create Email Verification (confirmation)
881+
/// Create email verification (confirmation)
880882
///
881883
/// Use this endpoint to complete the user email verification process. Use both
882884
/// the **userId** and **secret** parameters that were attached to your app URL
@@ -917,14 +919,16 @@ open class Account: Service {
917919
}
918920

919921
///
920-
/// Create Phone Verification
922+
/// Create phone verification
921923
///
922924
/// Use this endpoint to send a verification SMS to the currently logged in
923925
/// user. This endpoint is meant for use after updating a user's phone number
924-
/// using the [accountUpdatePhone](/docs/client/account#accountUpdatePhone)
926+
/// using the
927+
/// [accountUpdatePhone](https://appwrite.io/docs/references/cloud/client-web/account#updatePhone)
925928
/// endpoint. Learn more about how to [complete the verification
926-
/// process](/docs/client/account#accountUpdatePhoneVerification). The
927-
/// verification code sent to the user's phone number is valid for 15 minutes.
929+
/// process](https://appwrite.io/docs/references/cloud/client-web/account#updatePhoneVerification).
930+
/// The verification code sent to the user's phone number is valid for 15
931+
/// minutes.
928932
///
929933
/// @throws Exception
930934
/// @return array
@@ -953,7 +957,7 @@ open class Account: Service {
953957
}
954958

955959
///
956-
/// Create Phone Verification (confirmation)
960+
/// Create phone verification (confirmation)
957961
///
958962
/// Use this endpoint to complete the user phone verification process. Use the
959963
/// **userId** and **secret** that were sent to your user's phone number to

0 commit comments

Comments
 (0)