diff --git a/app/views/docs/getting-started-for-android.phtml b/app/views/docs/getting-started-for-android.phtml index 07c464bd8..24004953c 100644 --- a/app/views/docs/getting-started-for-android.phtml +++ b/app/views/docs/getting-started-for-android.phtml @@ -90,7 +90,7 @@ val client = Client(context)
// Register User
 val account = Account(client)
-val response = account.create("email@example.com", "password")
+val response = account.create("unique()", "email@example.com", "password")
 val json = response.body?.string()
@@ -123,7 +123,7 @@ val client = Client(context) // Register User val account = Account(client) -val response = account.create("email@example.com", "password") +val response = account.create("unique()", "email@example.com", "password") val json = response.body?.string() // Subscribe to files channel diff --git a/app/views/docs/getting-started-for-apple.phtml b/app/views/docs/getting-started-for-apple.phtml index d4e69af34..50f76d420 100644 --- a/app/views/docs/getting-started-for-apple.phtml +++ b/app/views/docs/getting-started-for-apple.phtml @@ -121,7 +121,7 @@ let client = Client()
// Register User
 let account = Account(client: client)
-account.create(email: "email@example.com", password: "password") { result in
+account.create(userId: "unique()", email: "email@example.com", password: "password") { result in
     switch result {
     case .failure(let error): print(error.message)
     case .success(let user): print(String(describing: user))
@@ -159,7 +159,7 @@ let client = Client()
 
 // Register User
 let account = Account(client: client)
-account.create(email: "email@example.com", password: "password") { result in
+account.create(userId: "unique()", email: "email@example.com", password: "password") { result in
     switch result {
     case .failure(let error): print(error.message)
     case .success(let user): print(String(describing: user))
diff --git a/app/views/docs/getting-started-for-flutter.phtml b/app/views/docs/getting-started-for-flutter.phtml
index 37e95bc62..385b28f08 100644
--- a/app/views/docs/getting-started-for-flutter.phtml
+++ b/app/views/docs/getting-started-for-flutter.phtml
@@ -155,6 +155,7 @@ Account account = Account(client);
 
 Response user = await account
     .create(
+        userId: 'unique()',
         email: 'me@appwrite.io',
         password: 'password',
         name: 'My Name'
@@ -197,6 +198,7 @@ Account account = Account(client);
 
 Response user = await account
     .create(
+        userId: 'unique()',
         email: 'me@appwrite.io',
         password: 'password',
         name: 'My Name'
diff --git a/app/views/docs/getting-started-for-server.phtml b/app/views/docs/getting-started-for-server.phtml
index 56e65271d..083e75327 100644
--- a/app/views/docs/getting-started-for-server.phtml
+++ b/app/views/docs/getting-started-for-server.phtml
@@ -12,6 +12,7 @@ foreach($platforms['server']['languages'] ?? [] as $lang) {
 }
 
 $kotlinVersion = $versions['kotlin'] ?? '';
+$swiftVersion = $versions['swift'] ?? '';
 ?>
 
 

Appwrite is a development platform providing you easy yet powerful API and management console to get your next project up and running quickly.

@@ -85,7 +86,7 @@ $kotlinVersion = $versions['kotlin'] ?? '';
dependencies: [
     // ...
-    .package(url: "https://github.com/appwrite/sdk-for-swift.git", from: "0.0.1")
+    .package(url: "https://github.com/appwrite/sdk-for-swift.git", from: "escape($swiftVersion); ?>")
     // ...
 ]
@@ -318,7 +319,6 @@ $client

Python

from appwrite.client import Client
-from appwrite.services.users import Users
 
 client = Client()
 
@@ -406,7 +406,7 @@ client
         
const users = new sdk.Users(client);
 
-let promise = users.create('email@example.com', 'password');
+let promise = users.create('unique()', 'email@example.com', 'password');
 
 promise.then(function (response) {
     console.log(response);
@@ -429,7 +429,7 @@ $result = $users->create('email@example.com', 'password');
users = Users(client)
 
-result = users.create('email@example.com', 'password')
+result = users.create('unique()', 'email@example.com', 'password')
  • @@ -437,7 +437,7 @@ result = users.create('email@example.com', 'password')
  • users = Appwrite::Users.new(client);
     
    -response = users.create(email: 'email@example.com', password: 'password');
    +response = users.create(userId: 'unique()', email: 'email@example.com', password: 'password');
     
     puts response
    @@ -447,7 +447,7 @@ puts response
    const users = new sdk.Users(client);
     
    -let promise = users.create('email@example.com', 'password');
    +let promise = users.create('unique()', 'email@example.com', 'password');
     
     promise.then(function (response) {
         console.log(response);
    @@ -461,7 +461,7 @@ promise.then(function (response) {
             
    final users = Users(client);
     
    -final res = users.create('email@example.com', 'password');
    +final res = users.create(userId: 'unique()', 'email@example.com', 'password');
     
     res.then((response) {
         print(response);
    @@ -477,7 +477,7 @@ res.then((response) {
     
     val users = Users(client);
     
    -val res = users.create(email = 'email@example.com', password = 'password');
    +val res = users.create(userId = 'unique()', email = 'email@example.com', password = 'password');
     println(res.body?.string())
    @@ -488,7 +488,7 @@ println(res.body?.string())
    let users = Users(client: client) -users.create(email: "email@example.com", password: "password") { result in +users.create(userId: "unique()", email: "email@example.com", password: "password") { result in switch result { case .failure(let error): print(error.message) case .success(let user): print(String(describing: user)) @@ -516,7 +516,7 @@ client ; const users = new sdk.Users(client); -let promise = users.create('email@example.com', 'password'); +let promise = users.create('unique()', 'email@example.com', 'password'); promise.then(function (response) { console.log(response); @@ -542,7 +542,7 @@ $client $users = new Users($client); -$result = $users->create('email@example.com', 'password'); +$result = $users->create('unique()', 'email@example.com', 'password');
  • @@ -561,7 +561,7 @@ client = Client() users = Users(client) -result = users.create('email@example.com', 'password') +result = users.create('unique()', 'email@example.com', 'password')
  • @@ -579,7 +579,7 @@ client users = Appwrite::Users.new(client); -response = users.create(email: 'email@example.com', password: 'password'); +response = users.create(userId: 'unique()', email: 'email@example.com', password: 'password'); puts response @@ -598,7 +598,7 @@ client .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; -let promise = users.create('email@example.com', 'password'); +let promise = users.create('unique()', 'email@example.com', 'password'); promise.then(function (response) { console.log(response); @@ -622,7 +622,7 @@ void main() { .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; - final res = users.create('email@example.com', 'password'); + final res = users.create('unique()', 'email@example.com', 'password'); res.then((response) { print(response); @@ -647,7 +647,7 @@ client val users = Users(client); -val res = users.create('email@example.com', 'password'); +val res = users.create('unique()', 'email@example.com', 'password'); println(res.body?.string()) @@ -666,7 +666,7 @@ client let users = Users(client: client) -users.create(email: "email@example.com", password: "password") { result in +users.create(userId: "unique()", email: "email@example.com", password: "password") { result in switch result { case .failure(let error): print(error.message) case .success(let user): print(String(describing: user)) diff --git a/app/views/docs/getting-started-for-web.phtml b/app/views/docs/getting-started-for-web.phtml index 5e2e0cc20..6ce055fbc 100644 --- a/app/views/docs/getting-started-for-web.phtml +++ b/app/views/docs/getting-started-for-web.phtml @@ -84,7 +84,7 @@ appwrite
    // Register User
     appwrite
    -    .account.create('me@example.com', 'password', 'Jane Doe')
    +    .account.create('unique()', 'me@example.com', 'password', 'Jane Doe')
             .then(response => {
                 console.log(response);
             }, error => {
    @@ -119,7 +119,7 @@ appwrite
     
     // Register User
     appwrite
    -    .account.create('me@example.com', 'password', 'Jane Doe')
    +    .account.create('unique()', 'me@example.com', 'password', 'Jane Doe')
             .then(response => {
                 console.log(response);
             }, error => {