diff --git a/docs/examples/0.15.x/client-android/java/database/create-document.md b/docs/examples/0.15.x/client-android/java/database/create-document.md deleted file mode 100644 index 059a42ed66..0000000000 --- a/docs/examples/0.15.x/client-android/java/database/create-document.md +++ /dev/null @@ -1,50 +0,0 @@ -import androidx.appcompat.app.AppCompatActivity -import android.os.Bundle -import kotlinx.coroutines.GlobalScope -import kotlinx.coroutines.launch -import io.appwrite.Client -import io.appwrite.services.Database - -public class MainActivity extends AppCompatActivity { - - @Override - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - setContentView(R.layout.activity_main); - - Client client = new Client(getApplicationContext()) - .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject("5df5acd0d48c2"); // Your project ID - - Database database = new Database(client); - - database.createDocument( - "[COLLECTION_ID]", - "[DOCUMENT_ID]", - mapOf( "a" to "b" ), - new Continuation() { - @NotNull - @Override - public CoroutineContext getContext() { - return EmptyCoroutineContext.INSTANCE; - } - - @Override - public void resumeWith(@NotNull Object o) { - String json = ""; - try { - if (o instanceof Result.Failure) { - Result.Failure failure = (Result.Failure) o; - throw failure.exception; - } else { - Response response = (Response) o; - json = response.body().string(); - } - } catch (Throwable th) { - Log.e("ERROR", th.toString()); - } - } - } - ); - } -} \ No newline at end of file diff --git a/docs/examples/0.15.x/client-android/java/database/delete-document.md b/docs/examples/0.15.x/client-android/java/database/delete-document.md deleted file mode 100644 index 75877c470a..0000000000 --- a/docs/examples/0.15.x/client-android/java/database/delete-document.md +++ /dev/null @@ -1,49 +0,0 @@ -import androidx.appcompat.app.AppCompatActivity -import android.os.Bundle -import kotlinx.coroutines.GlobalScope -import kotlinx.coroutines.launch -import io.appwrite.Client -import io.appwrite.services.Database - -public class MainActivity extends AppCompatActivity { - - @Override - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - setContentView(R.layout.activity_main); - - Client client = new Client(getApplicationContext()) - .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject("5df5acd0d48c2"); // Your project ID - - Database database = new Database(client); - - database.deleteDocument( - "[COLLECTION_ID]", - "[DOCUMENT_ID]" - new Continuation() { - @NotNull - @Override - public CoroutineContext getContext() { - return EmptyCoroutineContext.INSTANCE; - } - - @Override - public void resumeWith(@NotNull Object o) { - String json = ""; - try { - if (o instanceof Result.Failure) { - Result.Failure failure = (Result.Failure) o; - throw failure.exception; - } else { - Response response = (Response) o; - json = response.body().string(); - } - } catch (Throwable th) { - Log.e("ERROR", th.toString()); - } - } - } - ); - } -} \ No newline at end of file diff --git a/docs/examples/0.15.x/client-android/java/database/get-document.md b/docs/examples/0.15.x/client-android/java/database/get-document.md deleted file mode 100644 index 69aff1df2c..0000000000 --- a/docs/examples/0.15.x/client-android/java/database/get-document.md +++ /dev/null @@ -1,49 +0,0 @@ -import androidx.appcompat.app.AppCompatActivity -import android.os.Bundle -import kotlinx.coroutines.GlobalScope -import kotlinx.coroutines.launch -import io.appwrite.Client -import io.appwrite.services.Database - -public class MainActivity extends AppCompatActivity { - - @Override - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - setContentView(R.layout.activity_main); - - Client client = new Client(getApplicationContext()) - .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject("5df5acd0d48c2"); // Your project ID - - Database database = new Database(client); - - database.getDocument( - "[COLLECTION_ID]", - "[DOCUMENT_ID]" - new Continuation() { - @NotNull - @Override - public CoroutineContext getContext() { - return EmptyCoroutineContext.INSTANCE; - } - - @Override - public void resumeWith(@NotNull Object o) { - String json = ""; - try { - if (o instanceof Result.Failure) { - Result.Failure failure = (Result.Failure) o; - throw failure.exception; - } else { - Response response = (Response) o; - json = response.body().string(); - } - } catch (Throwable th) { - Log.e("ERROR", th.toString()); - } - } - } - ); - } -} \ No newline at end of file diff --git a/docs/examples/0.15.x/client-android/java/database/list-documents.md b/docs/examples/0.15.x/client-android/java/database/list-documents.md deleted file mode 100644 index 711aa412c0..0000000000 --- a/docs/examples/0.15.x/client-android/java/database/list-documents.md +++ /dev/null @@ -1,48 +0,0 @@ -import androidx.appcompat.app.AppCompatActivity -import android.os.Bundle -import kotlinx.coroutines.GlobalScope -import kotlinx.coroutines.launch -import io.appwrite.Client -import io.appwrite.services.Database - -public class MainActivity extends AppCompatActivity { - - @Override - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - setContentView(R.layout.activity_main); - - Client client = new Client(getApplicationContext()) - .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject("5df5acd0d48c2"); // Your project ID - - Database database = new Database(client); - - database.listDocuments( - "[COLLECTION_ID]", - new Continuation() { - @NotNull - @Override - public CoroutineContext getContext() { - return EmptyCoroutineContext.INSTANCE; - } - - @Override - public void resumeWith(@NotNull Object o) { - String json = ""; - try { - if (o instanceof Result.Failure) { - Result.Failure failure = (Result.Failure) o; - throw failure.exception; - } else { - Response response = (Response) o; - json = response.body().string(); - } - } catch (Throwable th) { - Log.e("ERROR", th.toString()); - } - } - } - ); - } -} \ No newline at end of file diff --git a/docs/examples/0.15.x/client-android/java/database/update-document.md b/docs/examples/0.15.x/client-android/java/database/update-document.md deleted file mode 100644 index a14c91f48c..0000000000 --- a/docs/examples/0.15.x/client-android/java/database/update-document.md +++ /dev/null @@ -1,50 +0,0 @@ -import androidx.appcompat.app.AppCompatActivity -import android.os.Bundle -import kotlinx.coroutines.GlobalScope -import kotlinx.coroutines.launch -import io.appwrite.Client -import io.appwrite.services.Database - -public class MainActivity extends AppCompatActivity { - - @Override - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - setContentView(R.layout.activity_main); - - Client client = new Client(getApplicationContext()) - .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject("5df5acd0d48c2"); // Your project ID - - Database database = new Database(client); - - database.updateDocument( - "[COLLECTION_ID]", - "[DOCUMENT_ID]", - mapOf( "a" to "b" ), - new Continuation() { - @NotNull - @Override - public CoroutineContext getContext() { - return EmptyCoroutineContext.INSTANCE; - } - - @Override - public void resumeWith(@NotNull Object o) { - String json = ""; - try { - if (o instanceof Result.Failure) { - Result.Failure failure = (Result.Failure) o; - throw failure.exception; - } else { - Response response = (Response) o; - json = response.body().string(); - } - } catch (Throwable th) { - Log.e("ERROR", th.toString()); - } - } - } - ); - } -} \ No newline at end of file diff --git a/docs/examples/0.15.x/client-android/kotlin/database/create-document.md b/docs/examples/0.15.x/client-android/kotlin/database/create-document.md deleted file mode 100644 index d207383e62..0000000000 --- a/docs/examples/0.15.x/client-android/kotlin/database/create-document.md +++ /dev/null @@ -1,28 +0,0 @@ -import androidx.appcompat.app.AppCompatActivity -import android.os.Bundle -import kotlinx.coroutines.GlobalScope -import kotlinx.coroutines.launch -import io.appwrite.Client -import io.appwrite.services.Database - -class MainActivity : AppCompatActivity() { - override fun onCreate(savedInstanceState: Bundle?) { - super.onCreate(savedInstanceState) - setContentView(R.layout.activity_main) - - val client = Client(applicationContext) - .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject("5df5acd0d48c2") // Your project ID - - val database = Database(client) - - GlobalScope.launch { - val response = database.createDocument( - collectionId = "[COLLECTION_ID]", - documentId = "[DOCUMENT_ID]", - data = mapOf( "a" to "b" ), - ) - val json = response.body?.string() - } - } -} \ No newline at end of file diff --git a/docs/examples/0.15.x/client-android/kotlin/database/delete-document.md b/docs/examples/0.15.x/client-android/kotlin/database/delete-document.md deleted file mode 100644 index 49a85c8ebb..0000000000 --- a/docs/examples/0.15.x/client-android/kotlin/database/delete-document.md +++ /dev/null @@ -1,27 +0,0 @@ -import androidx.appcompat.app.AppCompatActivity -import android.os.Bundle -import kotlinx.coroutines.GlobalScope -import kotlinx.coroutines.launch -import io.appwrite.Client -import io.appwrite.services.Database - -class MainActivity : AppCompatActivity() { - override fun onCreate(savedInstanceState: Bundle?) { - super.onCreate(savedInstanceState) - setContentView(R.layout.activity_main) - - val client = Client(applicationContext) - .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject("5df5acd0d48c2") // Your project ID - - val database = Database(client) - - GlobalScope.launch { - val response = database.deleteDocument( - collectionId = "[COLLECTION_ID]", - documentId = "[DOCUMENT_ID]" - ) - val json = response.body?.string() - } - } -} \ No newline at end of file diff --git a/docs/examples/0.15.x/client-android/kotlin/database/get-document.md b/docs/examples/0.15.x/client-android/kotlin/database/get-document.md deleted file mode 100644 index 3dd65c085d..0000000000 --- a/docs/examples/0.15.x/client-android/kotlin/database/get-document.md +++ /dev/null @@ -1,27 +0,0 @@ -import androidx.appcompat.app.AppCompatActivity -import android.os.Bundle -import kotlinx.coroutines.GlobalScope -import kotlinx.coroutines.launch -import io.appwrite.Client -import io.appwrite.services.Database - -class MainActivity : AppCompatActivity() { - override fun onCreate(savedInstanceState: Bundle?) { - super.onCreate(savedInstanceState) - setContentView(R.layout.activity_main) - - val client = Client(applicationContext) - .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject("5df5acd0d48c2") // Your project ID - - val database = Database(client) - - GlobalScope.launch { - val response = database.getDocument( - collectionId = "[COLLECTION_ID]", - documentId = "[DOCUMENT_ID]" - ) - val json = response.body?.string() - } - } -} \ No newline at end of file diff --git a/docs/examples/0.15.x/client-android/kotlin/database/list-documents.md b/docs/examples/0.15.x/client-android/kotlin/database/list-documents.md deleted file mode 100644 index 65119819fd..0000000000 --- a/docs/examples/0.15.x/client-android/kotlin/database/list-documents.md +++ /dev/null @@ -1,26 +0,0 @@ -import androidx.appcompat.app.AppCompatActivity -import android.os.Bundle -import kotlinx.coroutines.GlobalScope -import kotlinx.coroutines.launch -import io.appwrite.Client -import io.appwrite.services.Database - -class MainActivity : AppCompatActivity() { - override fun onCreate(savedInstanceState: Bundle?) { - super.onCreate(savedInstanceState) - setContentView(R.layout.activity_main) - - val client = Client(applicationContext) - .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject("5df5acd0d48c2") // Your project ID - - val database = Database(client) - - GlobalScope.launch { - val response = database.listDocuments( - collectionId = "[COLLECTION_ID]", - ) - val json = response.body?.string() - } - } -} \ No newline at end of file diff --git a/docs/examples/0.15.x/client-android/kotlin/database/update-document.md b/docs/examples/0.15.x/client-android/kotlin/database/update-document.md deleted file mode 100644 index e19ce4a994..0000000000 --- a/docs/examples/0.15.x/client-android/kotlin/database/update-document.md +++ /dev/null @@ -1,28 +0,0 @@ -import androidx.appcompat.app.AppCompatActivity -import android.os.Bundle -import kotlinx.coroutines.GlobalScope -import kotlinx.coroutines.launch -import io.appwrite.Client -import io.appwrite.services.Database - -class MainActivity : AppCompatActivity() { - override fun onCreate(savedInstanceState: Bundle?) { - super.onCreate(savedInstanceState) - setContentView(R.layout.activity_main) - - val client = Client(applicationContext) - .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject("5df5acd0d48c2") // Your project ID - - val database = Database(client) - - GlobalScope.launch { - val response = database.updateDocument( - collectionId = "[COLLECTION_ID]", - documentId = "[DOCUMENT_ID]", - data = mapOf( "a" to "b" ), - ) - val json = response.body?.string() - } - } -} \ No newline at end of file diff --git a/docs/examples/0.15.x/client-apple/examples/account/update-prefs.md b/docs/examples/0.15.x/client-apple/examples/account/update-prefs.md index d9197a5482..2717ecb35e 100644 --- a/docs/examples/0.15.x/client-apple/examples/account/update-prefs.md +++ b/docs/examples/0.15.x/client-apple/examples/account/update-prefs.md @@ -6,7 +6,7 @@ func main() async throws { .setProject("5df5acd0d48c2") // Your project ID let account = Account(client) let user = try await account.updatePrefs( - prefs: + prefs: [:] ) print(String(describing: user) diff --git a/docs/examples/0.15.x/client-apple/examples/database/create-document.md b/docs/examples/0.15.x/client-apple/examples/database/create-document.md deleted file mode 100644 index 416580a46f..0000000000 --- a/docs/examples/0.15.x/client-apple/examples/database/create-document.md +++ /dev/null @@ -1,15 +0,0 @@ -import Appwrite - -func main() async throws { - let client = Client() - .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject("5df5acd0d48c2") // Your project ID - let database = Database(client) - let document = try await database.createDocument( - collectionId: "[COLLECTION_ID]", - documentId: "[DOCUMENT_ID]", - data: - ) - - print(String(describing: document) -} diff --git a/docs/examples/0.15.x/client-apple/examples/database/delete-document.md b/docs/examples/0.15.x/client-apple/examples/database/delete-document.md deleted file mode 100644 index 04eecbf316..0000000000 --- a/docs/examples/0.15.x/client-apple/examples/database/delete-document.md +++ /dev/null @@ -1,14 +0,0 @@ -import Appwrite - -func main() async throws { - let client = Client() - .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject("5df5acd0d48c2") // Your project ID - let database = Database(client) - let result = try await database.deleteDocument( - collectionId: "[COLLECTION_ID]", - documentId: "[DOCUMENT_ID]" - ) - - print(String(describing: result) -} diff --git a/docs/examples/0.15.x/client-apple/examples/database/get-document.md b/docs/examples/0.15.x/client-apple/examples/database/get-document.md deleted file mode 100644 index 26ad5a0b17..0000000000 --- a/docs/examples/0.15.x/client-apple/examples/database/get-document.md +++ /dev/null @@ -1,14 +0,0 @@ -import Appwrite - -func main() async throws { - let client = Client() - .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject("5df5acd0d48c2") // Your project ID - let database = Database(client) - let document = try await database.getDocument( - collectionId: "[COLLECTION_ID]", - documentId: "[DOCUMENT_ID]" - ) - - print(String(describing: document) -} diff --git a/docs/examples/0.15.x/client-apple/examples/database/list-documents.md b/docs/examples/0.15.x/client-apple/examples/database/list-documents.md deleted file mode 100644 index f11cc2793f..0000000000 --- a/docs/examples/0.15.x/client-apple/examples/database/list-documents.md +++ /dev/null @@ -1,13 +0,0 @@ -import Appwrite - -func main() async throws { - let client = Client() - .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject("5df5acd0d48c2") // Your project ID - let database = Database(client) - let documentList = try await database.listDocuments( - collectionId: "[COLLECTION_ID]" - ) - - print(String(describing: documentList) -} diff --git a/docs/examples/0.15.x/client-apple/examples/database/update-document.md b/docs/examples/0.15.x/client-apple/examples/database/update-document.md deleted file mode 100644 index dc1e5646ac..0000000000 --- a/docs/examples/0.15.x/client-apple/examples/database/update-document.md +++ /dev/null @@ -1,15 +0,0 @@ -import Appwrite - -func main() async throws { - let client = Client() - .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject("5df5acd0d48c2") // Your project ID - let database = Database(client) - let document = try await database.updateDocument( - collectionId: "[COLLECTION_ID]", - documentId: "[DOCUMENT_ID]", - data: - ) - - print(String(describing: document) -} diff --git a/docs/examples/0.15.x/client-flutter/examples/database/create-document.md b/docs/examples/0.15.x/client-flutter/examples/database/create-document.md deleted file mode 100644 index 9027b71dca..0000000000 --- a/docs/examples/0.15.x/client-flutter/examples/database/create-document.md +++ /dev/null @@ -1,23 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Database database = Database(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - Future result = database.createDocument( - collectionId: '[COLLECTION_ID]', - documentId: '[DOCUMENT_ID]', - data: {}, - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} diff --git a/docs/examples/0.15.x/client-flutter/examples/database/delete-document.md b/docs/examples/0.15.x/client-flutter/examples/database/delete-document.md deleted file mode 100644 index 94479a0949..0000000000 --- a/docs/examples/0.15.x/client-flutter/examples/database/delete-document.md +++ /dev/null @@ -1,22 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Database database = Database(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - Future result = database.deleteDocument( - collectionId: '[COLLECTION_ID]', - documentId: '[DOCUMENT_ID]', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} diff --git a/docs/examples/0.15.x/client-flutter/examples/database/get-document.md b/docs/examples/0.15.x/client-flutter/examples/database/get-document.md deleted file mode 100644 index 153ad8e0f9..0000000000 --- a/docs/examples/0.15.x/client-flutter/examples/database/get-document.md +++ /dev/null @@ -1,22 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Database database = Database(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - Future result = database.getDocument( - collectionId: '[COLLECTION_ID]', - documentId: '[DOCUMENT_ID]', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} diff --git a/docs/examples/0.15.x/client-flutter/examples/database/list-documents.md b/docs/examples/0.15.x/client-flutter/examples/database/list-documents.md deleted file mode 100644 index dc6893a285..0000000000 --- a/docs/examples/0.15.x/client-flutter/examples/database/list-documents.md +++ /dev/null @@ -1,21 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Database database = Database(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - Future result = database.listDocuments( - collectionId: '[COLLECTION_ID]', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} diff --git a/docs/examples/0.15.x/client-flutter/examples/database/update-document.md b/docs/examples/0.15.x/client-flutter/examples/database/update-document.md deleted file mode 100644 index 65c23a297e..0000000000 --- a/docs/examples/0.15.x/client-flutter/examples/database/update-document.md +++ /dev/null @@ -1,23 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Database database = Database(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - Future result = database.updateDocument( - collectionId: '[COLLECTION_ID]', - documentId: '[DOCUMENT_ID]', - data: {}, - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} diff --git a/docs/examples/0.15.x/client-web/examples/account/create-anonymous-session.md b/docs/examples/0.15.x/client-web/examples/account/create-anonymous-session.md index 8979218e0f..a1ff484477 100644 --- a/docs/examples/0.15.x/client-web/examples/account/create-anonymous-session.md +++ b/docs/examples/0.15.x/client-web/examples/account/create-anonymous-session.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Account } from "appwrite"; -sdk +const client = new Client(); + +const account = new Account(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.account.createAnonymousSession(); +const promise = account.createAnonymousSession(); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/client-web/examples/account/create-email-session.md b/docs/examples/0.15.x/client-web/examples/account/create-email-session.md index 449d257747..43a0aa25a0 100644 --- a/docs/examples/0.15.x/client-web/examples/account/create-email-session.md +++ b/docs/examples/0.15.x/client-web/examples/account/create-email-session.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Account } from "appwrite"; -sdk +const client = new Client(); + +const account = new Account(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.account.createEmailSession('email@example.com', 'password'); +const promise = account.createEmailSession('email@example.com', 'password'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/client-web/examples/account/create-j-w-t.md b/docs/examples/0.15.x/client-web/examples/account/create-j-w-t.md index cf00356375..3b5c7ed679 100644 --- a/docs/examples/0.15.x/client-web/examples/account/create-j-w-t.md +++ b/docs/examples/0.15.x/client-web/examples/account/create-j-w-t.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Account } from "appwrite"; -sdk +const client = new Client(); + +const account = new Account(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.account.createJWT(); +const promise = account.createJWT(); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/client-web/examples/account/create-magic-u-r-l-session.md b/docs/examples/0.15.x/client-web/examples/account/create-magic-u-r-l-session.md index 5318f5f276..9339d6742c 100644 --- a/docs/examples/0.15.x/client-web/examples/account/create-magic-u-r-l-session.md +++ b/docs/examples/0.15.x/client-web/examples/account/create-magic-u-r-l-session.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Account } from "appwrite"; -sdk +const client = new Client(); + +const account = new Account(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.account.createMagicURLSession('[USER_ID]', 'email@example.com'); +const promise = account.createMagicURLSession('[USER_ID]', 'email@example.com'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/client-web/examples/account/create-o-auth2session.md b/docs/examples/0.15.x/client-web/examples/account/create-o-auth2session.md index 886a8f8480..25e67b15ec 100644 --- a/docs/examples/0.15.x/client-web/examples/account/create-o-auth2session.md +++ b/docs/examples/0.15.x/client-web/examples/account/create-o-auth2session.md @@ -1,10 +1,14 @@ -const sdk = new Appwrite(); +import { Client, Account } from "appwrite"; -sdk +const client = new Client(); + +const account = new Account(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; // Go to OAuth provider login page -sdk.account.createOAuth2Session('amazon'); +account.createOAuth2Session('amazon'); diff --git a/docs/examples/0.15.x/client-web/examples/account/create-phone-session.md b/docs/examples/0.15.x/client-web/examples/account/create-phone-session.md index cf16e83b27..465dbe4e49 100644 --- a/docs/examples/0.15.x/client-web/examples/account/create-phone-session.md +++ b/docs/examples/0.15.x/client-web/examples/account/create-phone-session.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Account } from "appwrite"; -sdk +const client = new Client(); + +const account = new Account(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.account.createPhoneSession('[USER_ID]', ''); +const promise = account.createPhoneSession('[USER_ID]', ''); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/client-web/examples/account/create-phone-verification.md b/docs/examples/0.15.x/client-web/examples/account/create-phone-verification.md index a8bd195a45..f325a9210f 100644 --- a/docs/examples/0.15.x/client-web/examples/account/create-phone-verification.md +++ b/docs/examples/0.15.x/client-web/examples/account/create-phone-verification.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Account } from "appwrite"; -sdk +const client = new Client(); + +const account = new Account(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.account.createPhoneVerification(); +const promise = account.createPhoneVerification(); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/client-web/examples/account/create-recovery.md b/docs/examples/0.15.x/client-web/examples/account/create-recovery.md index f57e926e9b..4f737edf3d 100644 --- a/docs/examples/0.15.x/client-web/examples/account/create-recovery.md +++ b/docs/examples/0.15.x/client-web/examples/account/create-recovery.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Account } from "appwrite"; -sdk +const client = new Client(); + +const account = new Account(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.account.createRecovery('email@example.com', 'https://example.com'); +const promise = account.createRecovery('email@example.com', 'https://example.com'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/client-web/examples/account/create-session.md b/docs/examples/0.15.x/client-web/examples/account/create-session.md deleted file mode 100644 index f41438306e..0000000000 --- a/docs/examples/0.15.x/client-web/examples/account/create-session.md +++ /dev/null @@ -1,14 +0,0 @@ -const sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.account.createSession('email@example.com', 'password'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/docs/examples/0.15.x/client-web/examples/account/create-verification.md b/docs/examples/0.15.x/client-web/examples/account/create-verification.md index 6a00f1a3e1..0e7162c8cf 100644 --- a/docs/examples/0.15.x/client-web/examples/account/create-verification.md +++ b/docs/examples/0.15.x/client-web/examples/account/create-verification.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Account } from "appwrite"; -sdk +const client = new Client(); + +const account = new Account(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.account.createVerification('https://example.com'); +const promise = account.createVerification('https://example.com'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/client-web/examples/account/create.md b/docs/examples/0.15.x/client-web/examples/account/create.md index 18f2fbbdc6..5b275bd1ba 100644 --- a/docs/examples/0.15.x/client-web/examples/account/create.md +++ b/docs/examples/0.15.x/client-web/examples/account/create.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Account } from "appwrite"; -sdk +const client = new Client(); + +const account = new Account(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.account.create('[USER_ID]', 'email@example.com', 'password'); +const promise = account.create('[USER_ID]', 'email@example.com', 'password'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/client-web/examples/account/delete-session.md b/docs/examples/0.15.x/client-web/examples/account/delete-session.md index b3f46d15a9..a23a1f25e5 100644 --- a/docs/examples/0.15.x/client-web/examples/account/delete-session.md +++ b/docs/examples/0.15.x/client-web/examples/account/delete-session.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Account } from "appwrite"; -sdk +const client = new Client(); + +const account = new Account(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.account.deleteSession('[SESSION_ID]'); +const promise = account.deleteSession('[SESSION_ID]'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/client-web/examples/account/delete-sessions.md b/docs/examples/0.15.x/client-web/examples/account/delete-sessions.md index e89ba3087a..58495385f1 100644 --- a/docs/examples/0.15.x/client-web/examples/account/delete-sessions.md +++ b/docs/examples/0.15.x/client-web/examples/account/delete-sessions.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Account } from "appwrite"; -sdk +const client = new Client(); + +const account = new Account(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.account.deleteSessions(); +const promise = account.deleteSessions(); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/client-web/examples/account/get-logs.md b/docs/examples/0.15.x/client-web/examples/account/get-logs.md index f382d7216c..934a4c251f 100644 --- a/docs/examples/0.15.x/client-web/examples/account/get-logs.md +++ b/docs/examples/0.15.x/client-web/examples/account/get-logs.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Account } from "appwrite"; -sdk +const client = new Client(); + +const account = new Account(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.account.getLogs(); +const promise = account.getLogs(); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/client-web/examples/account/get-prefs.md b/docs/examples/0.15.x/client-web/examples/account/get-prefs.md index 99e86d4f1d..a355c68ee0 100644 --- a/docs/examples/0.15.x/client-web/examples/account/get-prefs.md +++ b/docs/examples/0.15.x/client-web/examples/account/get-prefs.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Account } from "appwrite"; -sdk +const client = new Client(); + +const account = new Account(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.account.getPrefs(); +const promise = account.getPrefs(); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/client-web/examples/account/get-session.md b/docs/examples/0.15.x/client-web/examples/account/get-session.md index 79ec93f6e9..dd0c08633e 100644 --- a/docs/examples/0.15.x/client-web/examples/account/get-session.md +++ b/docs/examples/0.15.x/client-web/examples/account/get-session.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Account } from "appwrite"; -sdk +const client = new Client(); + +const account = new Account(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.account.getSession('[SESSION_ID]'); +const promise = account.getSession('[SESSION_ID]'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/client-web/examples/account/get-sessions.md b/docs/examples/0.15.x/client-web/examples/account/get-sessions.md index 384e6fa347..ce3bc6130e 100644 --- a/docs/examples/0.15.x/client-web/examples/account/get-sessions.md +++ b/docs/examples/0.15.x/client-web/examples/account/get-sessions.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Account } from "appwrite"; -sdk +const client = new Client(); + +const account = new Account(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.account.getSessions(); +const promise = account.getSessions(); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/client-web/examples/account/get.md b/docs/examples/0.15.x/client-web/examples/account/get.md index cc933152a2..fd26ad70dc 100644 --- a/docs/examples/0.15.x/client-web/examples/account/get.md +++ b/docs/examples/0.15.x/client-web/examples/account/get.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Account } from "appwrite"; -sdk +const client = new Client(); + +const account = new Account(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.account.get(); +const promise = account.get(); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/client-web/examples/account/update-email.md b/docs/examples/0.15.x/client-web/examples/account/update-email.md index e4a68e25c9..6e3d603801 100644 --- a/docs/examples/0.15.x/client-web/examples/account/update-email.md +++ b/docs/examples/0.15.x/client-web/examples/account/update-email.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Account } from "appwrite"; -sdk +const client = new Client(); + +const account = new Account(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.account.updateEmail('email@example.com', 'password'); +const promise = account.updateEmail('email@example.com', 'password'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/client-web/examples/account/update-magic-u-r-l-session.md b/docs/examples/0.15.x/client-web/examples/account/update-magic-u-r-l-session.md index 3c00386b7f..1934263b69 100644 --- a/docs/examples/0.15.x/client-web/examples/account/update-magic-u-r-l-session.md +++ b/docs/examples/0.15.x/client-web/examples/account/update-magic-u-r-l-session.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Account } from "appwrite"; -sdk +const client = new Client(); + +const account = new Account(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.account.updateMagicURLSession('[USER_ID]', '[SECRET]'); +const promise = account.updateMagicURLSession('[USER_ID]', '[SECRET]'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/client-web/examples/account/update-name.md b/docs/examples/0.15.x/client-web/examples/account/update-name.md index ff782195b1..24a27f1363 100644 --- a/docs/examples/0.15.x/client-web/examples/account/update-name.md +++ b/docs/examples/0.15.x/client-web/examples/account/update-name.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Account } from "appwrite"; -sdk +const client = new Client(); + +const account = new Account(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.account.updateName('[NAME]'); +const promise = account.updateName('[NAME]'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/client-web/examples/account/update-password.md b/docs/examples/0.15.x/client-web/examples/account/update-password.md index d551ed726f..5ace968e6b 100644 --- a/docs/examples/0.15.x/client-web/examples/account/update-password.md +++ b/docs/examples/0.15.x/client-web/examples/account/update-password.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Account } from "appwrite"; -sdk +const client = new Client(); + +const account = new Account(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.account.updatePassword('password'); +const promise = account.updatePassword('password'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/client-web/examples/account/update-phone-session.md b/docs/examples/0.15.x/client-web/examples/account/update-phone-session.md index 59b6012ec0..8ad2051057 100644 --- a/docs/examples/0.15.x/client-web/examples/account/update-phone-session.md +++ b/docs/examples/0.15.x/client-web/examples/account/update-phone-session.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Account } from "appwrite"; -sdk +const client = new Client(); + +const account = new Account(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.account.updatePhoneSession('[USER_ID]', '[SECRET]'); +const promise = account.updatePhoneSession('[USER_ID]', '[SECRET]'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/client-web/examples/account/update-phone-verification.md b/docs/examples/0.15.x/client-web/examples/account/update-phone-verification.md index 6b60f35dc3..b96f3bea21 100644 --- a/docs/examples/0.15.x/client-web/examples/account/update-phone-verification.md +++ b/docs/examples/0.15.x/client-web/examples/account/update-phone-verification.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Account } from "appwrite"; -sdk +const client = new Client(); + +const account = new Account(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.account.updatePhoneVerification('[USER_ID]', '[SECRET]'); +const promise = account.updatePhoneVerification('[USER_ID]', '[SECRET]'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/client-web/examples/account/update-phone.md b/docs/examples/0.15.x/client-web/examples/account/update-phone.md index f501ed55a7..852ab16538 100644 --- a/docs/examples/0.15.x/client-web/examples/account/update-phone.md +++ b/docs/examples/0.15.x/client-web/examples/account/update-phone.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Account } from "appwrite"; -sdk +const client = new Client(); + +const account = new Account(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.account.updatePhone('', 'password'); +const promise = account.updatePhone('', 'password'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/client-web/examples/account/update-prefs.md b/docs/examples/0.15.x/client-web/examples/account/update-prefs.md index 232b77025b..4948631a27 100644 --- a/docs/examples/0.15.x/client-web/examples/account/update-prefs.md +++ b/docs/examples/0.15.x/client-web/examples/account/update-prefs.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Account } from "appwrite"; -sdk +const client = new Client(); + +const account = new Account(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.account.updatePrefs({}); +const promise = account.updatePrefs({}); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/client-web/examples/account/update-recovery.md b/docs/examples/0.15.x/client-web/examples/account/update-recovery.md index 6fe36c017e..85915f1ab9 100644 --- a/docs/examples/0.15.x/client-web/examples/account/update-recovery.md +++ b/docs/examples/0.15.x/client-web/examples/account/update-recovery.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Account } from "appwrite"; -sdk +const client = new Client(); + +const account = new Account(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.account.updateRecovery('[USER_ID]', '[SECRET]', 'password', 'password'); +const promise = account.updateRecovery('[USER_ID]', '[SECRET]', 'password', 'password'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/client-web/examples/account/update-session.md b/docs/examples/0.15.x/client-web/examples/account/update-session.md index cfb61b679a..70fe5faa11 100644 --- a/docs/examples/0.15.x/client-web/examples/account/update-session.md +++ b/docs/examples/0.15.x/client-web/examples/account/update-session.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Account } from "appwrite"; -sdk +const client = new Client(); + +const account = new Account(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.account.updateSession('[SESSION_ID]'); +const promise = account.updateSession('[SESSION_ID]'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/client-web/examples/account/update-status.md b/docs/examples/0.15.x/client-web/examples/account/update-status.md index 1b22ae81ad..a7c7817338 100644 --- a/docs/examples/0.15.x/client-web/examples/account/update-status.md +++ b/docs/examples/0.15.x/client-web/examples/account/update-status.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Account } from "appwrite"; -sdk +const client = new Client(); + +const account = new Account(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.account.updateStatus(); +const promise = account.updateStatus(); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/client-web/examples/account/update-verification.md b/docs/examples/0.15.x/client-web/examples/account/update-verification.md index e3312c5d5b..27d5cbc2f7 100644 --- a/docs/examples/0.15.x/client-web/examples/account/update-verification.md +++ b/docs/examples/0.15.x/client-web/examples/account/update-verification.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Account } from "appwrite"; -sdk +const client = new Client(); + +const account = new Account(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.account.updateVerification('[USER_ID]', '[SECRET]'); +const promise = account.updateVerification('[USER_ID]', '[SECRET]'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/client-web/examples/avatars/get-browser.md b/docs/examples/0.15.x/client-web/examples/avatars/get-browser.md index fe0143b818..20480ce124 100644 --- a/docs/examples/0.15.x/client-web/examples/avatars/get-browser.md +++ b/docs/examples/0.15.x/client-web/examples/avatars/get-browser.md @@ -1,10 +1,14 @@ -const sdk = new Appwrite(); +import { Client, Avatars } from "appwrite"; -sdk +const client = new Client(); + +const avatars = new Avatars(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let result = sdk.avatars.getBrowser('aa'); +const result = avatars.getBrowser('aa'); console.log(result); // Resource URL \ No newline at end of file diff --git a/docs/examples/0.15.x/client-web/examples/avatars/get-credit-card.md b/docs/examples/0.15.x/client-web/examples/avatars/get-credit-card.md index 5477094ca5..cdbc4a0067 100644 --- a/docs/examples/0.15.x/client-web/examples/avatars/get-credit-card.md +++ b/docs/examples/0.15.x/client-web/examples/avatars/get-credit-card.md @@ -1,10 +1,14 @@ -const sdk = new Appwrite(); +import { Client, Avatars } from "appwrite"; -sdk +const client = new Client(); + +const avatars = new Avatars(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let result = sdk.avatars.getCreditCard('amex'); +const result = avatars.getCreditCard('amex'); console.log(result); // Resource URL \ No newline at end of file diff --git a/docs/examples/0.15.x/client-web/examples/avatars/get-favicon.md b/docs/examples/0.15.x/client-web/examples/avatars/get-favicon.md index 1327bb7384..f8db5c378c 100644 --- a/docs/examples/0.15.x/client-web/examples/avatars/get-favicon.md +++ b/docs/examples/0.15.x/client-web/examples/avatars/get-favicon.md @@ -1,10 +1,14 @@ -const sdk = new Appwrite(); +import { Client, Avatars } from "appwrite"; -sdk +const client = new Client(); + +const avatars = new Avatars(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let result = sdk.avatars.getFavicon('https://example.com'); +const result = avatars.getFavicon('https://example.com'); console.log(result); // Resource URL \ No newline at end of file diff --git a/docs/examples/0.15.x/client-web/examples/avatars/get-flag.md b/docs/examples/0.15.x/client-web/examples/avatars/get-flag.md index 13a90c3075..e609fb299d 100644 --- a/docs/examples/0.15.x/client-web/examples/avatars/get-flag.md +++ b/docs/examples/0.15.x/client-web/examples/avatars/get-flag.md @@ -1,10 +1,14 @@ -const sdk = new Appwrite(); +import { Client, Avatars } from "appwrite"; -sdk +const client = new Client(); + +const avatars = new Avatars(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let result = sdk.avatars.getFlag('af'); +const result = avatars.getFlag('af'); console.log(result); // Resource URL \ No newline at end of file diff --git a/docs/examples/0.15.x/client-web/examples/avatars/get-image.md b/docs/examples/0.15.x/client-web/examples/avatars/get-image.md index 82cb205a74..468f6a3c54 100644 --- a/docs/examples/0.15.x/client-web/examples/avatars/get-image.md +++ b/docs/examples/0.15.x/client-web/examples/avatars/get-image.md @@ -1,10 +1,14 @@ -const sdk = new Appwrite(); +import { Client, Avatars } from "appwrite"; -sdk +const client = new Client(); + +const avatars = new Avatars(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let result = sdk.avatars.getImage('https://example.com'); +const result = avatars.getImage('https://example.com'); console.log(result); // Resource URL \ No newline at end of file diff --git a/docs/examples/0.15.x/client-web/examples/avatars/get-initials.md b/docs/examples/0.15.x/client-web/examples/avatars/get-initials.md index a3da13d460..d061813297 100644 --- a/docs/examples/0.15.x/client-web/examples/avatars/get-initials.md +++ b/docs/examples/0.15.x/client-web/examples/avatars/get-initials.md @@ -1,10 +1,14 @@ -const sdk = new Appwrite(); +import { Client, Avatars } from "appwrite"; -sdk +const client = new Client(); + +const avatars = new Avatars(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let result = sdk.avatars.getInitials(); +const result = avatars.getInitials(); console.log(result); // Resource URL \ No newline at end of file diff --git a/docs/examples/0.15.x/client-web/examples/avatars/get-q-r.md b/docs/examples/0.15.x/client-web/examples/avatars/get-q-r.md index c900a63531..86fed127e9 100644 --- a/docs/examples/0.15.x/client-web/examples/avatars/get-q-r.md +++ b/docs/examples/0.15.x/client-web/examples/avatars/get-q-r.md @@ -1,10 +1,14 @@ -const sdk = new Appwrite(); +import { Client, Avatars } from "appwrite"; -sdk +const client = new Client(); + +const avatars = new Avatars(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let result = sdk.avatars.getQR('[TEXT]'); +const result = avatars.getQR('[TEXT]'); console.log(result); // Resource URL \ No newline at end of file diff --git a/docs/examples/0.15.x/client-web/examples/database/create-document.md b/docs/examples/0.15.x/client-web/examples/database/create-document.md deleted file mode 100644 index 5f57b2fc3d..0000000000 --- a/docs/examples/0.15.x/client-web/examples/database/create-document.md +++ /dev/null @@ -1,14 +0,0 @@ -const sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.database.createDocument('[COLLECTION_ID]', '[DOCUMENT_ID]', {}); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/docs/examples/0.15.x/client-web/examples/database/delete-document.md b/docs/examples/0.15.x/client-web/examples/database/delete-document.md deleted file mode 100644 index 557662966d..0000000000 --- a/docs/examples/0.15.x/client-web/examples/database/delete-document.md +++ /dev/null @@ -1,14 +0,0 @@ -const sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.database.deleteDocument('[COLLECTION_ID]', '[DOCUMENT_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/docs/examples/0.15.x/client-web/examples/database/get-document.md b/docs/examples/0.15.x/client-web/examples/database/get-document.md deleted file mode 100644 index 841157f551..0000000000 --- a/docs/examples/0.15.x/client-web/examples/database/get-document.md +++ /dev/null @@ -1,14 +0,0 @@ -const sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.database.getDocument('[COLLECTION_ID]', '[DOCUMENT_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/docs/examples/0.15.x/client-web/examples/database/list-documents.md b/docs/examples/0.15.x/client-web/examples/database/list-documents.md deleted file mode 100644 index 620137cf8e..0000000000 --- a/docs/examples/0.15.x/client-web/examples/database/list-documents.md +++ /dev/null @@ -1,14 +0,0 @@ -const sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.database.listDocuments('[COLLECTION_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/docs/examples/0.15.x/client-web/examples/database/update-document.md b/docs/examples/0.15.x/client-web/examples/database/update-document.md deleted file mode 100644 index b07b2ecac1..0000000000 --- a/docs/examples/0.15.x/client-web/examples/database/update-document.md +++ /dev/null @@ -1,14 +0,0 @@ -const sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.database.updateDocument('[COLLECTION_ID]', '[DOCUMENT_ID]', {}); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/docs/examples/0.15.x/client-web/examples/functions/create-execution.md b/docs/examples/0.15.x/client-web/examples/functions/create-execution.md index 87dc73a205..2b64bc9f7b 100644 --- a/docs/examples/0.15.x/client-web/examples/functions/create-execution.md +++ b/docs/examples/0.15.x/client-web/examples/functions/create-execution.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Functions } from "appwrite"; -sdk +const client = new Client(); + +const functions = new Functions(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.functions.createExecution('[FUNCTION_ID]'); +const promise = functions.createExecution('[FUNCTION_ID]'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/client-web/examples/functions/get-execution.md b/docs/examples/0.15.x/client-web/examples/functions/get-execution.md index a8a0c4a0c8..f5046a08c4 100644 --- a/docs/examples/0.15.x/client-web/examples/functions/get-execution.md +++ b/docs/examples/0.15.x/client-web/examples/functions/get-execution.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Functions } from "appwrite"; -sdk +const client = new Client(); + +const functions = new Functions(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.functions.getExecution('[FUNCTION_ID]', '[EXECUTION_ID]'); +const promise = functions.getExecution('[FUNCTION_ID]', '[EXECUTION_ID]'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/client-web/examples/functions/list-executions.md b/docs/examples/0.15.x/client-web/examples/functions/list-executions.md index 82652ddb6c..99186a95de 100644 --- a/docs/examples/0.15.x/client-web/examples/functions/list-executions.md +++ b/docs/examples/0.15.x/client-web/examples/functions/list-executions.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Functions } from "appwrite"; -sdk +const client = new Client(); + +const functions = new Functions(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.functions.listExecutions('[FUNCTION_ID]'); +const promise = functions.listExecutions('[FUNCTION_ID]'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/client-web/examples/functions/retry-build.md b/docs/examples/0.15.x/client-web/examples/functions/retry-build.md index e0f49976b0..1ef690a227 100644 --- a/docs/examples/0.15.x/client-web/examples/functions/retry-build.md +++ b/docs/examples/0.15.x/client-web/examples/functions/retry-build.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Functions } from "appwrite"; -sdk +const client = new Client(); + +const functions = new Functions(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.functions.retryBuild('[FUNCTION_ID]', '[DEPLOYMENT_ID]', '[BUILD_ID]'); +const promise = functions.retryBuild('[FUNCTION_ID]', '[DEPLOYMENT_ID]', '[BUILD_ID]'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/client-web/examples/locale/get-continents.md b/docs/examples/0.15.x/client-web/examples/locale/get-continents.md index f0798a820c..9717181464 100644 --- a/docs/examples/0.15.x/client-web/examples/locale/get-continents.md +++ b/docs/examples/0.15.x/client-web/examples/locale/get-continents.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Locale } from "appwrite"; -sdk +const client = new Client(); + +const locale = new Locale(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.locale.getContinents(); +const promise = locale.getContinents(); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/client-web/examples/locale/get-countries-e-u.md b/docs/examples/0.15.x/client-web/examples/locale/get-countries-e-u.md index 7bc6aa2d50..0439449721 100644 --- a/docs/examples/0.15.x/client-web/examples/locale/get-countries-e-u.md +++ b/docs/examples/0.15.x/client-web/examples/locale/get-countries-e-u.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Locale } from "appwrite"; -sdk +const client = new Client(); + +const locale = new Locale(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.locale.getCountriesEU(); +const promise = locale.getCountriesEU(); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/client-web/examples/locale/get-countries-phones.md b/docs/examples/0.15.x/client-web/examples/locale/get-countries-phones.md index e92982c1a2..26f104c5ac 100644 --- a/docs/examples/0.15.x/client-web/examples/locale/get-countries-phones.md +++ b/docs/examples/0.15.x/client-web/examples/locale/get-countries-phones.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Locale } from "appwrite"; -sdk +const client = new Client(); + +const locale = new Locale(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.locale.getCountriesPhones(); +const promise = locale.getCountriesPhones(); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/client-web/examples/locale/get-countries.md b/docs/examples/0.15.x/client-web/examples/locale/get-countries.md index bb12e6ab5f..ce80e526a4 100644 --- a/docs/examples/0.15.x/client-web/examples/locale/get-countries.md +++ b/docs/examples/0.15.x/client-web/examples/locale/get-countries.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Locale } from "appwrite"; -sdk +const client = new Client(); + +const locale = new Locale(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.locale.getCountries(); +const promise = locale.getCountries(); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/client-web/examples/locale/get-currencies.md b/docs/examples/0.15.x/client-web/examples/locale/get-currencies.md index 3382c2015c..14259a2453 100644 --- a/docs/examples/0.15.x/client-web/examples/locale/get-currencies.md +++ b/docs/examples/0.15.x/client-web/examples/locale/get-currencies.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Locale } from "appwrite"; -sdk +const client = new Client(); + +const locale = new Locale(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.locale.getCurrencies(); +const promise = locale.getCurrencies(); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/client-web/examples/locale/get-languages.md b/docs/examples/0.15.x/client-web/examples/locale/get-languages.md index a7fa4a0170..8866fb609b 100644 --- a/docs/examples/0.15.x/client-web/examples/locale/get-languages.md +++ b/docs/examples/0.15.x/client-web/examples/locale/get-languages.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Locale } from "appwrite"; -sdk +const client = new Client(); + +const locale = new Locale(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.locale.getLanguages(); +const promise = locale.getLanguages(); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/client-web/examples/locale/get.md b/docs/examples/0.15.x/client-web/examples/locale/get.md index 89ade06941..634256c83e 100644 --- a/docs/examples/0.15.x/client-web/examples/locale/get.md +++ b/docs/examples/0.15.x/client-web/examples/locale/get.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Locale } from "appwrite"; -sdk +const client = new Client(); + +const locale = new Locale(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.locale.get(); +const promise = locale.get(); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/client-web/examples/storage/create-file.md b/docs/examples/0.15.x/client-web/examples/storage/create-file.md index f464fe608e..10992d2b89 100644 --- a/docs/examples/0.15.x/client-web/examples/storage/create-file.md +++ b/docs/examples/0.15.x/client-web/examples/storage/create-file.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Storage } from "appwrite"; -sdk +const client = new Client(); + +const storage = new Storage(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.storage.createFile('[BUCKET_ID]', '[FILE_ID]', document.getElementById('uploader').files[0]); +const promise = storage.createFile('[BUCKET_ID]', '[FILE_ID]', document.getElementById('uploader').files[0]); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/client-web/examples/storage/delete-file.md b/docs/examples/0.15.x/client-web/examples/storage/delete-file.md index 94c9e3112c..4512a8c1ce 100644 --- a/docs/examples/0.15.x/client-web/examples/storage/delete-file.md +++ b/docs/examples/0.15.x/client-web/examples/storage/delete-file.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Storage } from "appwrite"; -sdk +const client = new Client(); + +const storage = new Storage(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.storage.deleteFile('[BUCKET_ID]', '[FILE_ID]'); +const promise = storage.deleteFile('[BUCKET_ID]', '[FILE_ID]'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/client-web/examples/storage/get-file-download.md b/docs/examples/0.15.x/client-web/examples/storage/get-file-download.md index 18a01aaa91..17c06600b3 100644 --- a/docs/examples/0.15.x/client-web/examples/storage/get-file-download.md +++ b/docs/examples/0.15.x/client-web/examples/storage/get-file-download.md @@ -1,10 +1,14 @@ -const sdk = new Appwrite(); +import { Client, Storage } from "appwrite"; -sdk +const client = new Client(); + +const storage = new Storage(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let result = sdk.storage.getFileDownload('[BUCKET_ID]', '[FILE_ID]'); +const result = storage.getFileDownload('[BUCKET_ID]', '[FILE_ID]'); console.log(result); // Resource URL \ No newline at end of file diff --git a/docs/examples/0.15.x/client-web/examples/storage/get-file-preview.md b/docs/examples/0.15.x/client-web/examples/storage/get-file-preview.md index b9d9377e1f..52866d108a 100644 --- a/docs/examples/0.15.x/client-web/examples/storage/get-file-preview.md +++ b/docs/examples/0.15.x/client-web/examples/storage/get-file-preview.md @@ -1,10 +1,14 @@ -const sdk = new Appwrite(); +import { Client, Storage } from "appwrite"; -sdk +const client = new Client(); + +const storage = new Storage(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let result = sdk.storage.getFilePreview('[BUCKET_ID]', '[FILE_ID]'); +const result = storage.getFilePreview('[BUCKET_ID]', '[FILE_ID]'); console.log(result); // Resource URL \ No newline at end of file diff --git a/docs/examples/0.15.x/client-web/examples/storage/get-file-view.md b/docs/examples/0.15.x/client-web/examples/storage/get-file-view.md index eae4e78d6a..7bb6c67d51 100644 --- a/docs/examples/0.15.x/client-web/examples/storage/get-file-view.md +++ b/docs/examples/0.15.x/client-web/examples/storage/get-file-view.md @@ -1,10 +1,14 @@ -const sdk = new Appwrite(); +import { Client, Storage } from "appwrite"; -sdk +const client = new Client(); + +const storage = new Storage(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let result = sdk.storage.getFileView('[BUCKET_ID]', '[FILE_ID]'); +const result = storage.getFileView('[BUCKET_ID]', '[FILE_ID]'); console.log(result); // Resource URL \ No newline at end of file diff --git a/docs/examples/0.15.x/client-web/examples/storage/get-file.md b/docs/examples/0.15.x/client-web/examples/storage/get-file.md index 4a8eb23038..3263865c73 100644 --- a/docs/examples/0.15.x/client-web/examples/storage/get-file.md +++ b/docs/examples/0.15.x/client-web/examples/storage/get-file.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Storage } from "appwrite"; -sdk +const client = new Client(); + +const storage = new Storage(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.storage.getFile('[BUCKET_ID]', '[FILE_ID]'); +const promise = storage.getFile('[BUCKET_ID]', '[FILE_ID]'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/client-web/examples/storage/list-files.md b/docs/examples/0.15.x/client-web/examples/storage/list-files.md index f4a83cd29d..92d75742a5 100644 --- a/docs/examples/0.15.x/client-web/examples/storage/list-files.md +++ b/docs/examples/0.15.x/client-web/examples/storage/list-files.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Storage } from "appwrite"; -sdk +const client = new Client(); + +const storage = new Storage(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.storage.listFiles('[BUCKET_ID]'); +const promise = storage.listFiles('[BUCKET_ID]'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/client-web/examples/storage/update-file.md b/docs/examples/0.15.x/client-web/examples/storage/update-file.md index fbb04a9bda..1313e30cff 100644 --- a/docs/examples/0.15.x/client-web/examples/storage/update-file.md +++ b/docs/examples/0.15.x/client-web/examples/storage/update-file.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Storage } from "appwrite"; -sdk +const client = new Client(); + +const storage = new Storage(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.storage.updateFile('[BUCKET_ID]', '[FILE_ID]'); +const promise = storage.updateFile('[BUCKET_ID]', '[FILE_ID]'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/client-web/examples/teams/create-membership.md b/docs/examples/0.15.x/client-web/examples/teams/create-membership.md index 68b7f2be17..6cb7d87b7f 100644 --- a/docs/examples/0.15.x/client-web/examples/teams/create-membership.md +++ b/docs/examples/0.15.x/client-web/examples/teams/create-membership.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Teams } from "appwrite"; -sdk +const client = new Client(); + +const teams = new Teams(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.teams.createMembership('[TEAM_ID]', 'email@example.com', [], 'https://example.com'); +const promise = teams.createMembership('[TEAM_ID]', 'email@example.com', [], 'https://example.com'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/client-web/examples/teams/create.md b/docs/examples/0.15.x/client-web/examples/teams/create.md index c0b5e6aa06..2c40c9017d 100644 --- a/docs/examples/0.15.x/client-web/examples/teams/create.md +++ b/docs/examples/0.15.x/client-web/examples/teams/create.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Teams } from "appwrite"; -sdk +const client = new Client(); + +const teams = new Teams(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.teams.create('[TEAM_ID]', '[NAME]'); +const promise = teams.create('[TEAM_ID]', '[NAME]'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/client-web/examples/teams/delete-membership.md b/docs/examples/0.15.x/client-web/examples/teams/delete-membership.md index 46916ab1f4..828674a86f 100644 --- a/docs/examples/0.15.x/client-web/examples/teams/delete-membership.md +++ b/docs/examples/0.15.x/client-web/examples/teams/delete-membership.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Teams } from "appwrite"; -sdk +const client = new Client(); + +const teams = new Teams(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.teams.deleteMembership('[TEAM_ID]', '[MEMBERSHIP_ID]'); +const promise = teams.deleteMembership('[TEAM_ID]', '[MEMBERSHIP_ID]'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/client-web/examples/teams/delete.md b/docs/examples/0.15.x/client-web/examples/teams/delete.md index e04f9f505a..b9b79ed1b7 100644 --- a/docs/examples/0.15.x/client-web/examples/teams/delete.md +++ b/docs/examples/0.15.x/client-web/examples/teams/delete.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Teams } from "appwrite"; -sdk +const client = new Client(); + +const teams = new Teams(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.teams.delete('[TEAM_ID]'); +const promise = teams.delete('[TEAM_ID]'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/client-web/examples/teams/get-membership.md b/docs/examples/0.15.x/client-web/examples/teams/get-membership.md index 0ff21ca48e..cce63e7fba 100644 --- a/docs/examples/0.15.x/client-web/examples/teams/get-membership.md +++ b/docs/examples/0.15.x/client-web/examples/teams/get-membership.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Teams } from "appwrite"; -sdk +const client = new Client(); + +const teams = new Teams(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.teams.getMembership('[TEAM_ID]', '[MEMBERSHIP_ID]'); +const promise = teams.getMembership('[TEAM_ID]', '[MEMBERSHIP_ID]'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/client-web/examples/teams/get-memberships.md b/docs/examples/0.15.x/client-web/examples/teams/get-memberships.md index c23f190cbe..41c1df2867 100644 --- a/docs/examples/0.15.x/client-web/examples/teams/get-memberships.md +++ b/docs/examples/0.15.x/client-web/examples/teams/get-memberships.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Teams } from "appwrite"; -sdk +const client = new Client(); + +const teams = new Teams(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.teams.getMemberships('[TEAM_ID]'); +const promise = teams.getMemberships('[TEAM_ID]'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/client-web/examples/teams/get.md b/docs/examples/0.15.x/client-web/examples/teams/get.md index c05bd59a0b..3a7185319a 100644 --- a/docs/examples/0.15.x/client-web/examples/teams/get.md +++ b/docs/examples/0.15.x/client-web/examples/teams/get.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Teams } from "appwrite"; -sdk +const client = new Client(); + +const teams = new Teams(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.teams.get('[TEAM_ID]'); +const promise = teams.get('[TEAM_ID]'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/client-web/examples/teams/list.md b/docs/examples/0.15.x/client-web/examples/teams/list.md index 1e1a974d80..1aea267038 100644 --- a/docs/examples/0.15.x/client-web/examples/teams/list.md +++ b/docs/examples/0.15.x/client-web/examples/teams/list.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Teams } from "appwrite"; -sdk +const client = new Client(); + +const teams = new Teams(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.teams.list(); +const promise = teams.list(); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/client-web/examples/teams/update-membership-roles.md b/docs/examples/0.15.x/client-web/examples/teams/update-membership-roles.md index 1d25e2601e..ca76ead1d6 100644 --- a/docs/examples/0.15.x/client-web/examples/teams/update-membership-roles.md +++ b/docs/examples/0.15.x/client-web/examples/teams/update-membership-roles.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Teams } from "appwrite"; -sdk +const client = new Client(); + +const teams = new Teams(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.teams.updateMembershipRoles('[TEAM_ID]', '[MEMBERSHIP_ID]', []); +const promise = teams.updateMembershipRoles('[TEAM_ID]', '[MEMBERSHIP_ID]', []); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/client-web/examples/teams/update-membership-status.md b/docs/examples/0.15.x/client-web/examples/teams/update-membership-status.md index 032f162501..4a29cdc116 100644 --- a/docs/examples/0.15.x/client-web/examples/teams/update-membership-status.md +++ b/docs/examples/0.15.x/client-web/examples/teams/update-membership-status.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Teams } from "appwrite"; -sdk +const client = new Client(); + +const teams = new Teams(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.teams.updateMembershipStatus('[TEAM_ID]', '[MEMBERSHIP_ID]', '[USER_ID]', '[SECRET]'); +const promise = teams.updateMembershipStatus('[TEAM_ID]', '[MEMBERSHIP_ID]', '[USER_ID]', '[SECRET]'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/client-web/examples/teams/update.md b/docs/examples/0.15.x/client-web/examples/teams/update.md index bcf53d1605..a59cc80000 100644 --- a/docs/examples/0.15.x/client-web/examples/teams/update.md +++ b/docs/examples/0.15.x/client-web/examples/teams/update.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Teams } from "appwrite"; -sdk +const client = new Client(); + +const teams = new Teams(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.teams.update('[TEAM_ID]', '[NAME]'); +const promise = teams.update('[TEAM_ID]', '[NAME]'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-cli/examples/database/create-boolean-attribute.md b/docs/examples/0.15.x/console-cli/examples/database/create-boolean-attribute.md deleted file mode 100644 index 4fa1b8f8b8..0000000000 --- a/docs/examples/0.15.x/console-cli/examples/database/create-boolean-attribute.md +++ /dev/null @@ -1,6 +0,0 @@ -appwrite database createBooleanAttribute \ - --collectionId [COLLECTION_ID] \ - --key '' \ - --required false \ - - diff --git a/docs/examples/0.15.x/console-cli/examples/database/create-collection.md b/docs/examples/0.15.x/console-cli/examples/database/create-collection.md deleted file mode 100644 index c08c5dad9e..0000000000 --- a/docs/examples/0.15.x/console-cli/examples/database/create-collection.md +++ /dev/null @@ -1,6 +0,0 @@ -appwrite database createCollection \ - --collectionId [COLLECTION_ID] \ - --name [NAME] \ - --permission document \ - --read "role:all" \ - --write "role:all" diff --git a/docs/examples/0.15.x/console-cli/examples/database/create-document.md b/docs/examples/0.15.x/console-cli/examples/database/create-document.md deleted file mode 100644 index 7fc2e7d49a..0000000000 --- a/docs/examples/0.15.x/console-cli/examples/database/create-document.md +++ /dev/null @@ -1,6 +0,0 @@ -appwrite database createDocument \ - --collectionId [COLLECTION_ID] \ - --documentId [DOCUMENT_ID] \ - --data '{ "key": "value" }' \ - - diff --git a/docs/examples/0.15.x/console-cli/examples/database/create-email-attribute.md b/docs/examples/0.15.x/console-cli/examples/database/create-email-attribute.md deleted file mode 100644 index 649072b53c..0000000000 --- a/docs/examples/0.15.x/console-cli/examples/database/create-email-attribute.md +++ /dev/null @@ -1,6 +0,0 @@ -appwrite database createEmailAttribute \ - --collectionId [COLLECTION_ID] \ - --key '' \ - --required false \ - - diff --git a/docs/examples/0.15.x/console-cli/examples/database/create-enum-attribute.md b/docs/examples/0.15.x/console-cli/examples/database/create-enum-attribute.md deleted file mode 100644 index 309a57b566..0000000000 --- a/docs/examples/0.15.x/console-cli/examples/database/create-enum-attribute.md +++ /dev/null @@ -1,7 +0,0 @@ -appwrite database createEnumAttribute \ - --collectionId [COLLECTION_ID] \ - --key '' \ - --elements one two three \ - --required false \ - - diff --git a/docs/examples/0.15.x/console-cli/examples/database/create-float-attribute.md b/docs/examples/0.15.x/console-cli/examples/database/create-float-attribute.md deleted file mode 100644 index 5fff529cbb..0000000000 --- a/docs/examples/0.15.x/console-cli/examples/database/create-float-attribute.md +++ /dev/null @@ -1,8 +0,0 @@ -appwrite database createFloatAttribute \ - --collectionId [COLLECTION_ID] \ - --key '' \ - --required false \ - - - - diff --git a/docs/examples/0.15.x/console-cli/examples/database/create-index.md b/docs/examples/0.15.x/console-cli/examples/database/create-index.md deleted file mode 100644 index e2b3b5d021..0000000000 --- a/docs/examples/0.15.x/console-cli/examples/database/create-index.md +++ /dev/null @@ -1,6 +0,0 @@ -appwrite database createIndex \ - --collectionId [COLLECTION_ID] \ - --key '' \ - --type key \ - --attributes one two three \ - diff --git a/docs/examples/0.15.x/console-cli/examples/database/create-integer-attribute.md b/docs/examples/0.15.x/console-cli/examples/database/create-integer-attribute.md deleted file mode 100644 index 61546febf9..0000000000 --- a/docs/examples/0.15.x/console-cli/examples/database/create-integer-attribute.md +++ /dev/null @@ -1,8 +0,0 @@ -appwrite database createIntegerAttribute \ - --collectionId [COLLECTION_ID] \ - --key '' \ - --required false \ - - - - diff --git a/docs/examples/0.15.x/console-cli/examples/database/create-ip-attribute.md b/docs/examples/0.15.x/console-cli/examples/database/create-ip-attribute.md deleted file mode 100644 index 19d40a73ef..0000000000 --- a/docs/examples/0.15.x/console-cli/examples/database/create-ip-attribute.md +++ /dev/null @@ -1,6 +0,0 @@ -appwrite database createIpAttribute \ - --collectionId [COLLECTION_ID] \ - --key '' \ - --required false \ - - diff --git a/docs/examples/0.15.x/console-cli/examples/database/create-string-attribute.md b/docs/examples/0.15.x/console-cli/examples/database/create-string-attribute.md deleted file mode 100644 index 542bc8e10b..0000000000 --- a/docs/examples/0.15.x/console-cli/examples/database/create-string-attribute.md +++ /dev/null @@ -1,7 +0,0 @@ -appwrite database createStringAttribute \ - --collectionId [COLLECTION_ID] \ - --key '' \ - --size 1 \ - --required false \ - - diff --git a/docs/examples/0.15.x/console-cli/examples/database/create-url-attribute.md b/docs/examples/0.15.x/console-cli/examples/database/create-url-attribute.md deleted file mode 100644 index 1ff338026d..0000000000 --- a/docs/examples/0.15.x/console-cli/examples/database/create-url-attribute.md +++ /dev/null @@ -1,6 +0,0 @@ -appwrite database createUrlAttribute \ - --collectionId [COLLECTION_ID] \ - --key '' \ - --required false \ - - diff --git a/docs/examples/0.15.x/console-cli/examples/database/delete-attribute.md b/docs/examples/0.15.x/console-cli/examples/database/delete-attribute.md deleted file mode 100644 index 435919b006..0000000000 --- a/docs/examples/0.15.x/console-cli/examples/database/delete-attribute.md +++ /dev/null @@ -1,3 +0,0 @@ -appwrite database deleteAttribute \ - --collectionId [COLLECTION_ID] \ - --key '' diff --git a/docs/examples/0.15.x/console-cli/examples/database/delete-collection.md b/docs/examples/0.15.x/console-cli/examples/database/delete-collection.md deleted file mode 100644 index 90cfde5885..0000000000 --- a/docs/examples/0.15.x/console-cli/examples/database/delete-collection.md +++ /dev/null @@ -1,2 +0,0 @@ -appwrite database deleteCollection \ - --collectionId [COLLECTION_ID] diff --git a/docs/examples/0.15.x/console-cli/examples/database/delete-document.md b/docs/examples/0.15.x/console-cli/examples/database/delete-document.md deleted file mode 100644 index 3987f90779..0000000000 --- a/docs/examples/0.15.x/console-cli/examples/database/delete-document.md +++ /dev/null @@ -1,3 +0,0 @@ -appwrite database deleteDocument \ - --collectionId [COLLECTION_ID] \ - --documentId [DOCUMENT_ID] diff --git a/docs/examples/0.15.x/console-cli/examples/database/delete-index.md b/docs/examples/0.15.x/console-cli/examples/database/delete-index.md deleted file mode 100644 index d3ac3c6a54..0000000000 --- a/docs/examples/0.15.x/console-cli/examples/database/delete-index.md +++ /dev/null @@ -1,3 +0,0 @@ -appwrite database deleteIndex \ - --collectionId [COLLECTION_ID] \ - --key '' diff --git a/docs/examples/0.15.x/console-cli/examples/database/get-attribute.md b/docs/examples/0.15.x/console-cli/examples/database/get-attribute.md deleted file mode 100644 index ef0a004b41..0000000000 --- a/docs/examples/0.15.x/console-cli/examples/database/get-attribute.md +++ /dev/null @@ -1,3 +0,0 @@ -appwrite database getAttribute \ - --collectionId [COLLECTION_ID] \ - --key '' diff --git a/docs/examples/0.15.x/console-cli/examples/database/get-collection-usage.md b/docs/examples/0.15.x/console-cli/examples/database/get-collection-usage.md deleted file mode 100644 index e945936251..0000000000 --- a/docs/examples/0.15.x/console-cli/examples/database/get-collection-usage.md +++ /dev/null @@ -1,3 +0,0 @@ -appwrite database getCollectionUsage \ - --collectionId [COLLECTION_ID] \ - diff --git a/docs/examples/0.15.x/console-cli/examples/database/get-collection.md b/docs/examples/0.15.x/console-cli/examples/database/get-collection.md deleted file mode 100644 index bfee02ff60..0000000000 --- a/docs/examples/0.15.x/console-cli/examples/database/get-collection.md +++ /dev/null @@ -1,2 +0,0 @@ -appwrite database getCollection \ - --collectionId [COLLECTION_ID] diff --git a/docs/examples/0.15.x/console-cli/examples/database/get-document.md b/docs/examples/0.15.x/console-cli/examples/database/get-document.md deleted file mode 100644 index d1082b3967..0000000000 --- a/docs/examples/0.15.x/console-cli/examples/database/get-document.md +++ /dev/null @@ -1,3 +0,0 @@ -appwrite database getDocument \ - --collectionId [COLLECTION_ID] \ - --documentId [DOCUMENT_ID] diff --git a/docs/examples/0.15.x/console-cli/examples/database/get-index.md b/docs/examples/0.15.x/console-cli/examples/database/get-index.md deleted file mode 100644 index d931f64b79..0000000000 --- a/docs/examples/0.15.x/console-cli/examples/database/get-index.md +++ /dev/null @@ -1,3 +0,0 @@ -appwrite database getIndex \ - --collectionId [COLLECTION_ID] \ - --key '' diff --git a/docs/examples/0.15.x/console-cli/examples/database/get-usage.md b/docs/examples/0.15.x/console-cli/examples/database/get-usage.md deleted file mode 100644 index 4c0611a64e..0000000000 --- a/docs/examples/0.15.x/console-cli/examples/database/get-usage.md +++ /dev/null @@ -1,2 +0,0 @@ -appwrite database getUsage \ - diff --git a/docs/examples/0.15.x/console-cli/examples/database/list-attributes.md b/docs/examples/0.15.x/console-cli/examples/database/list-attributes.md deleted file mode 100644 index 164f110d14..0000000000 --- a/docs/examples/0.15.x/console-cli/examples/database/list-attributes.md +++ /dev/null @@ -1,2 +0,0 @@ -appwrite database listAttributes \ - --collectionId [COLLECTION_ID] diff --git a/docs/examples/0.15.x/console-cli/examples/database/list-collection-logs.md b/docs/examples/0.15.x/console-cli/examples/database/list-collection-logs.md deleted file mode 100644 index d6dfcf5163..0000000000 --- a/docs/examples/0.15.x/console-cli/examples/database/list-collection-logs.md +++ /dev/null @@ -1,4 +0,0 @@ -appwrite database listCollectionLogs \ - --collectionId [COLLECTION_ID] \ - - diff --git a/docs/examples/0.15.x/console-cli/examples/database/list-collections.md b/docs/examples/0.15.x/console-cli/examples/database/list-collections.md deleted file mode 100644 index a81fd940dc..0000000000 --- a/docs/examples/0.15.x/console-cli/examples/database/list-collections.md +++ /dev/null @@ -1,7 +0,0 @@ -appwrite database listCollections \ - - - - - - diff --git a/docs/examples/0.15.x/console-cli/examples/database/list-document-logs.md b/docs/examples/0.15.x/console-cli/examples/database/list-document-logs.md deleted file mode 100644 index dfe192e6ed..0000000000 --- a/docs/examples/0.15.x/console-cli/examples/database/list-document-logs.md +++ /dev/null @@ -1,5 +0,0 @@ -appwrite database listDocumentLogs \ - --collectionId [COLLECTION_ID] \ - --documentId [DOCUMENT_ID] \ - - diff --git a/docs/examples/0.15.x/console-cli/examples/database/list-documents.md b/docs/examples/0.15.x/console-cli/examples/database/list-documents.md deleted file mode 100644 index cd295c64c7..0000000000 --- a/docs/examples/0.15.x/console-cli/examples/database/list-documents.md +++ /dev/null @@ -1,9 +0,0 @@ -appwrite database listDocuments \ - --collectionId [COLLECTION_ID] \ - - - - - - - diff --git a/docs/examples/0.15.x/console-cli/examples/database/list-indexes.md b/docs/examples/0.15.x/console-cli/examples/database/list-indexes.md deleted file mode 100644 index ccfc13f2ab..0000000000 --- a/docs/examples/0.15.x/console-cli/examples/database/list-indexes.md +++ /dev/null @@ -1,2 +0,0 @@ -appwrite database listIndexes \ - --collectionId [COLLECTION_ID] diff --git a/docs/examples/0.15.x/console-cli/examples/database/update-collection.md b/docs/examples/0.15.x/console-cli/examples/database/update-collection.md deleted file mode 100644 index 576fbe5c71..0000000000 --- a/docs/examples/0.15.x/console-cli/examples/database/update-collection.md +++ /dev/null @@ -1,7 +0,0 @@ -appwrite database updateCollection \ - --collectionId [COLLECTION_ID] \ - --name [NAME] \ - --permission document \ - - - diff --git a/docs/examples/0.15.x/console-cli/examples/database/update-document.md b/docs/examples/0.15.x/console-cli/examples/database/update-document.md deleted file mode 100644 index 475ff0d557..0000000000 --- a/docs/examples/0.15.x/console-cli/examples/database/update-document.md +++ /dev/null @@ -1,6 +0,0 @@ -appwrite database updateDocument \ - --collectionId [COLLECTION_ID] \ - --documentId [DOCUMENT_ID] \ - --data '{ "key": "value" }' \ - - diff --git a/docs/examples/0.15.x/console-web/examples/account/create-anonymous-session.md b/docs/examples/0.15.x/console-web/examples/account/create-anonymous-session.md index 8979218e0f..a1ff484477 100644 --- a/docs/examples/0.15.x/console-web/examples/account/create-anonymous-session.md +++ b/docs/examples/0.15.x/console-web/examples/account/create-anonymous-session.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Account } from "appwrite"; -sdk +const client = new Client(); + +const account = new Account(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.account.createAnonymousSession(); +const promise = account.createAnonymousSession(); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/account/create-email-session.md b/docs/examples/0.15.x/console-web/examples/account/create-email-session.md index 449d257747..43a0aa25a0 100644 --- a/docs/examples/0.15.x/console-web/examples/account/create-email-session.md +++ b/docs/examples/0.15.x/console-web/examples/account/create-email-session.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Account } from "appwrite"; -sdk +const client = new Client(); + +const account = new Account(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.account.createEmailSession('email@example.com', 'password'); +const promise = account.createEmailSession('email@example.com', 'password'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/account/create-j-w-t.md b/docs/examples/0.15.x/console-web/examples/account/create-j-w-t.md index cf00356375..3b5c7ed679 100644 --- a/docs/examples/0.15.x/console-web/examples/account/create-j-w-t.md +++ b/docs/examples/0.15.x/console-web/examples/account/create-j-w-t.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Account } from "appwrite"; -sdk +const client = new Client(); + +const account = new Account(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.account.createJWT(); +const promise = account.createJWT(); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/account/create-magic-u-r-l-session.md b/docs/examples/0.15.x/console-web/examples/account/create-magic-u-r-l-session.md index 5318f5f276..9339d6742c 100644 --- a/docs/examples/0.15.x/console-web/examples/account/create-magic-u-r-l-session.md +++ b/docs/examples/0.15.x/console-web/examples/account/create-magic-u-r-l-session.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Account } from "appwrite"; -sdk +const client = new Client(); + +const account = new Account(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.account.createMagicURLSession('[USER_ID]', 'email@example.com'); +const promise = account.createMagicURLSession('[USER_ID]', 'email@example.com'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/account/create-o-auth2session.md b/docs/examples/0.15.x/console-web/examples/account/create-o-auth2session.md index 886a8f8480..25e67b15ec 100644 --- a/docs/examples/0.15.x/console-web/examples/account/create-o-auth2session.md +++ b/docs/examples/0.15.x/console-web/examples/account/create-o-auth2session.md @@ -1,10 +1,14 @@ -const sdk = new Appwrite(); +import { Client, Account } from "appwrite"; -sdk +const client = new Client(); + +const account = new Account(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; // Go to OAuth provider login page -sdk.account.createOAuth2Session('amazon'); +account.createOAuth2Session('amazon'); diff --git a/docs/examples/0.15.x/console-web/examples/account/create-phone-session.md b/docs/examples/0.15.x/console-web/examples/account/create-phone-session.md index cf16e83b27..465dbe4e49 100644 --- a/docs/examples/0.15.x/console-web/examples/account/create-phone-session.md +++ b/docs/examples/0.15.x/console-web/examples/account/create-phone-session.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Account } from "appwrite"; -sdk +const client = new Client(); + +const account = new Account(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.account.createPhoneSession('[USER_ID]', ''); +const promise = account.createPhoneSession('[USER_ID]', ''); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/account/create-phone-verification.md b/docs/examples/0.15.x/console-web/examples/account/create-phone-verification.md index a8bd195a45..f325a9210f 100644 --- a/docs/examples/0.15.x/console-web/examples/account/create-phone-verification.md +++ b/docs/examples/0.15.x/console-web/examples/account/create-phone-verification.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Account } from "appwrite"; -sdk +const client = new Client(); + +const account = new Account(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.account.createPhoneVerification(); +const promise = account.createPhoneVerification(); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/account/create-recovery.md b/docs/examples/0.15.x/console-web/examples/account/create-recovery.md index f57e926e9b..4f737edf3d 100644 --- a/docs/examples/0.15.x/console-web/examples/account/create-recovery.md +++ b/docs/examples/0.15.x/console-web/examples/account/create-recovery.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Account } from "appwrite"; -sdk +const client = new Client(); + +const account = new Account(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.account.createRecovery('email@example.com', 'https://example.com'); +const promise = account.createRecovery('email@example.com', 'https://example.com'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/account/create-session.md b/docs/examples/0.15.x/console-web/examples/account/create-session.md deleted file mode 100644 index f41438306e..0000000000 --- a/docs/examples/0.15.x/console-web/examples/account/create-session.md +++ /dev/null @@ -1,14 +0,0 @@ -const sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.account.createSession('email@example.com', 'password'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/docs/examples/0.15.x/console-web/examples/account/create-verification.md b/docs/examples/0.15.x/console-web/examples/account/create-verification.md index 6a00f1a3e1..0e7162c8cf 100644 --- a/docs/examples/0.15.x/console-web/examples/account/create-verification.md +++ b/docs/examples/0.15.x/console-web/examples/account/create-verification.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Account } from "appwrite"; -sdk +const client = new Client(); + +const account = new Account(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.account.createVerification('https://example.com'); +const promise = account.createVerification('https://example.com'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/account/create.md b/docs/examples/0.15.x/console-web/examples/account/create.md index 18f2fbbdc6..5b275bd1ba 100644 --- a/docs/examples/0.15.x/console-web/examples/account/create.md +++ b/docs/examples/0.15.x/console-web/examples/account/create.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Account } from "appwrite"; -sdk +const client = new Client(); + +const account = new Account(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.account.create('[USER_ID]', 'email@example.com', 'password'); +const promise = account.create('[USER_ID]', 'email@example.com', 'password'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/account/delete-session.md b/docs/examples/0.15.x/console-web/examples/account/delete-session.md index b3f46d15a9..a23a1f25e5 100644 --- a/docs/examples/0.15.x/console-web/examples/account/delete-session.md +++ b/docs/examples/0.15.x/console-web/examples/account/delete-session.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Account } from "appwrite"; -sdk +const client = new Client(); + +const account = new Account(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.account.deleteSession('[SESSION_ID]'); +const promise = account.deleteSession('[SESSION_ID]'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/account/delete-sessions.md b/docs/examples/0.15.x/console-web/examples/account/delete-sessions.md index e89ba3087a..58495385f1 100644 --- a/docs/examples/0.15.x/console-web/examples/account/delete-sessions.md +++ b/docs/examples/0.15.x/console-web/examples/account/delete-sessions.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Account } from "appwrite"; -sdk +const client = new Client(); + +const account = new Account(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.account.deleteSessions(); +const promise = account.deleteSessions(); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/account/get-logs.md b/docs/examples/0.15.x/console-web/examples/account/get-logs.md index f382d7216c..934a4c251f 100644 --- a/docs/examples/0.15.x/console-web/examples/account/get-logs.md +++ b/docs/examples/0.15.x/console-web/examples/account/get-logs.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Account } from "appwrite"; -sdk +const client = new Client(); + +const account = new Account(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.account.getLogs(); +const promise = account.getLogs(); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/account/get-prefs.md b/docs/examples/0.15.x/console-web/examples/account/get-prefs.md index 99e86d4f1d..a355c68ee0 100644 --- a/docs/examples/0.15.x/console-web/examples/account/get-prefs.md +++ b/docs/examples/0.15.x/console-web/examples/account/get-prefs.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Account } from "appwrite"; -sdk +const client = new Client(); + +const account = new Account(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.account.getPrefs(); +const promise = account.getPrefs(); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/account/get-session.md b/docs/examples/0.15.x/console-web/examples/account/get-session.md index 79ec93f6e9..dd0c08633e 100644 --- a/docs/examples/0.15.x/console-web/examples/account/get-session.md +++ b/docs/examples/0.15.x/console-web/examples/account/get-session.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Account } from "appwrite"; -sdk +const client = new Client(); + +const account = new Account(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.account.getSession('[SESSION_ID]'); +const promise = account.getSession('[SESSION_ID]'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/account/get-sessions.md b/docs/examples/0.15.x/console-web/examples/account/get-sessions.md index 384e6fa347..ce3bc6130e 100644 --- a/docs/examples/0.15.x/console-web/examples/account/get-sessions.md +++ b/docs/examples/0.15.x/console-web/examples/account/get-sessions.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Account } from "appwrite"; -sdk +const client = new Client(); + +const account = new Account(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.account.getSessions(); +const promise = account.getSessions(); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/account/get.md b/docs/examples/0.15.x/console-web/examples/account/get.md index cc933152a2..fd26ad70dc 100644 --- a/docs/examples/0.15.x/console-web/examples/account/get.md +++ b/docs/examples/0.15.x/console-web/examples/account/get.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Account } from "appwrite"; -sdk +const client = new Client(); + +const account = new Account(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.account.get(); +const promise = account.get(); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/account/update-email.md b/docs/examples/0.15.x/console-web/examples/account/update-email.md index e4a68e25c9..6e3d603801 100644 --- a/docs/examples/0.15.x/console-web/examples/account/update-email.md +++ b/docs/examples/0.15.x/console-web/examples/account/update-email.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Account } from "appwrite"; -sdk +const client = new Client(); + +const account = new Account(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.account.updateEmail('email@example.com', 'password'); +const promise = account.updateEmail('email@example.com', 'password'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/account/update-magic-u-r-l-session.md b/docs/examples/0.15.x/console-web/examples/account/update-magic-u-r-l-session.md index 3c00386b7f..1934263b69 100644 --- a/docs/examples/0.15.x/console-web/examples/account/update-magic-u-r-l-session.md +++ b/docs/examples/0.15.x/console-web/examples/account/update-magic-u-r-l-session.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Account } from "appwrite"; -sdk +const client = new Client(); + +const account = new Account(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.account.updateMagicURLSession('[USER_ID]', '[SECRET]'); +const promise = account.updateMagicURLSession('[USER_ID]', '[SECRET]'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/account/update-name.md b/docs/examples/0.15.x/console-web/examples/account/update-name.md index ff782195b1..24a27f1363 100644 --- a/docs/examples/0.15.x/console-web/examples/account/update-name.md +++ b/docs/examples/0.15.x/console-web/examples/account/update-name.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Account } from "appwrite"; -sdk +const client = new Client(); + +const account = new Account(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.account.updateName('[NAME]'); +const promise = account.updateName('[NAME]'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/account/update-password.md b/docs/examples/0.15.x/console-web/examples/account/update-password.md index d551ed726f..5ace968e6b 100644 --- a/docs/examples/0.15.x/console-web/examples/account/update-password.md +++ b/docs/examples/0.15.x/console-web/examples/account/update-password.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Account } from "appwrite"; -sdk +const client = new Client(); + +const account = new Account(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.account.updatePassword('password'); +const promise = account.updatePassword('password'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/account/update-phone-session.md b/docs/examples/0.15.x/console-web/examples/account/update-phone-session.md index 59b6012ec0..8ad2051057 100644 --- a/docs/examples/0.15.x/console-web/examples/account/update-phone-session.md +++ b/docs/examples/0.15.x/console-web/examples/account/update-phone-session.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Account } from "appwrite"; -sdk +const client = new Client(); + +const account = new Account(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.account.updatePhoneSession('[USER_ID]', '[SECRET]'); +const promise = account.updatePhoneSession('[USER_ID]', '[SECRET]'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/account/update-phone-verification.md b/docs/examples/0.15.x/console-web/examples/account/update-phone-verification.md index 6b60f35dc3..b96f3bea21 100644 --- a/docs/examples/0.15.x/console-web/examples/account/update-phone-verification.md +++ b/docs/examples/0.15.x/console-web/examples/account/update-phone-verification.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Account } from "appwrite"; -sdk +const client = new Client(); + +const account = new Account(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.account.updatePhoneVerification('[USER_ID]', '[SECRET]'); +const promise = account.updatePhoneVerification('[USER_ID]', '[SECRET]'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/account/update-phone.md b/docs/examples/0.15.x/console-web/examples/account/update-phone.md index f501ed55a7..852ab16538 100644 --- a/docs/examples/0.15.x/console-web/examples/account/update-phone.md +++ b/docs/examples/0.15.x/console-web/examples/account/update-phone.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Account } from "appwrite"; -sdk +const client = new Client(); + +const account = new Account(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.account.updatePhone('', 'password'); +const promise = account.updatePhone('', 'password'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/account/update-prefs.md b/docs/examples/0.15.x/console-web/examples/account/update-prefs.md index 232b77025b..4948631a27 100644 --- a/docs/examples/0.15.x/console-web/examples/account/update-prefs.md +++ b/docs/examples/0.15.x/console-web/examples/account/update-prefs.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Account } from "appwrite"; -sdk +const client = new Client(); + +const account = new Account(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.account.updatePrefs({}); +const promise = account.updatePrefs({}); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/account/update-recovery.md b/docs/examples/0.15.x/console-web/examples/account/update-recovery.md index 6fe36c017e..85915f1ab9 100644 --- a/docs/examples/0.15.x/console-web/examples/account/update-recovery.md +++ b/docs/examples/0.15.x/console-web/examples/account/update-recovery.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Account } from "appwrite"; -sdk +const client = new Client(); + +const account = new Account(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.account.updateRecovery('[USER_ID]', '[SECRET]', 'password', 'password'); +const promise = account.updateRecovery('[USER_ID]', '[SECRET]', 'password', 'password'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/account/update-session.md b/docs/examples/0.15.x/console-web/examples/account/update-session.md index cfb61b679a..70fe5faa11 100644 --- a/docs/examples/0.15.x/console-web/examples/account/update-session.md +++ b/docs/examples/0.15.x/console-web/examples/account/update-session.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Account } from "appwrite"; -sdk +const client = new Client(); + +const account = new Account(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.account.updateSession('[SESSION_ID]'); +const promise = account.updateSession('[SESSION_ID]'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/account/update-status.md b/docs/examples/0.15.x/console-web/examples/account/update-status.md index 1b22ae81ad..a7c7817338 100644 --- a/docs/examples/0.15.x/console-web/examples/account/update-status.md +++ b/docs/examples/0.15.x/console-web/examples/account/update-status.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Account } from "appwrite"; -sdk +const client = new Client(); + +const account = new Account(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.account.updateStatus(); +const promise = account.updateStatus(); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/account/update-verification.md b/docs/examples/0.15.x/console-web/examples/account/update-verification.md index e3312c5d5b..27d5cbc2f7 100644 --- a/docs/examples/0.15.x/console-web/examples/account/update-verification.md +++ b/docs/examples/0.15.x/console-web/examples/account/update-verification.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Account } from "appwrite"; -sdk +const client = new Client(); + +const account = new Account(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.account.updateVerification('[USER_ID]', '[SECRET]'); +const promise = account.updateVerification('[USER_ID]', '[SECRET]'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/avatars/get-browser.md b/docs/examples/0.15.x/console-web/examples/avatars/get-browser.md index fe0143b818..20480ce124 100644 --- a/docs/examples/0.15.x/console-web/examples/avatars/get-browser.md +++ b/docs/examples/0.15.x/console-web/examples/avatars/get-browser.md @@ -1,10 +1,14 @@ -const sdk = new Appwrite(); +import { Client, Avatars } from "appwrite"; -sdk +const client = new Client(); + +const avatars = new Avatars(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let result = sdk.avatars.getBrowser('aa'); +const result = avatars.getBrowser('aa'); console.log(result); // Resource URL \ No newline at end of file diff --git a/docs/examples/0.15.x/console-web/examples/avatars/get-credit-card.md b/docs/examples/0.15.x/console-web/examples/avatars/get-credit-card.md index 5477094ca5..cdbc4a0067 100644 --- a/docs/examples/0.15.x/console-web/examples/avatars/get-credit-card.md +++ b/docs/examples/0.15.x/console-web/examples/avatars/get-credit-card.md @@ -1,10 +1,14 @@ -const sdk = new Appwrite(); +import { Client, Avatars } from "appwrite"; -sdk +const client = new Client(); + +const avatars = new Avatars(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let result = sdk.avatars.getCreditCard('amex'); +const result = avatars.getCreditCard('amex'); console.log(result); // Resource URL \ No newline at end of file diff --git a/docs/examples/0.15.x/console-web/examples/avatars/get-favicon.md b/docs/examples/0.15.x/console-web/examples/avatars/get-favicon.md index 1327bb7384..f8db5c378c 100644 --- a/docs/examples/0.15.x/console-web/examples/avatars/get-favicon.md +++ b/docs/examples/0.15.x/console-web/examples/avatars/get-favicon.md @@ -1,10 +1,14 @@ -const sdk = new Appwrite(); +import { Client, Avatars } from "appwrite"; -sdk +const client = new Client(); + +const avatars = new Avatars(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let result = sdk.avatars.getFavicon('https://example.com'); +const result = avatars.getFavicon('https://example.com'); console.log(result); // Resource URL \ No newline at end of file diff --git a/docs/examples/0.15.x/console-web/examples/avatars/get-flag.md b/docs/examples/0.15.x/console-web/examples/avatars/get-flag.md index 13a90c3075..e609fb299d 100644 --- a/docs/examples/0.15.x/console-web/examples/avatars/get-flag.md +++ b/docs/examples/0.15.x/console-web/examples/avatars/get-flag.md @@ -1,10 +1,14 @@ -const sdk = new Appwrite(); +import { Client, Avatars } from "appwrite"; -sdk +const client = new Client(); + +const avatars = new Avatars(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let result = sdk.avatars.getFlag('af'); +const result = avatars.getFlag('af'); console.log(result); // Resource URL \ No newline at end of file diff --git a/docs/examples/0.15.x/console-web/examples/avatars/get-image.md b/docs/examples/0.15.x/console-web/examples/avatars/get-image.md index 82cb205a74..468f6a3c54 100644 --- a/docs/examples/0.15.x/console-web/examples/avatars/get-image.md +++ b/docs/examples/0.15.x/console-web/examples/avatars/get-image.md @@ -1,10 +1,14 @@ -const sdk = new Appwrite(); +import { Client, Avatars } from "appwrite"; -sdk +const client = new Client(); + +const avatars = new Avatars(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let result = sdk.avatars.getImage('https://example.com'); +const result = avatars.getImage('https://example.com'); console.log(result); // Resource URL \ No newline at end of file diff --git a/docs/examples/0.15.x/console-web/examples/avatars/get-initials.md b/docs/examples/0.15.x/console-web/examples/avatars/get-initials.md index a3da13d460..d061813297 100644 --- a/docs/examples/0.15.x/console-web/examples/avatars/get-initials.md +++ b/docs/examples/0.15.x/console-web/examples/avatars/get-initials.md @@ -1,10 +1,14 @@ -const sdk = new Appwrite(); +import { Client, Avatars } from "appwrite"; -sdk +const client = new Client(); + +const avatars = new Avatars(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let result = sdk.avatars.getInitials(); +const result = avatars.getInitials(); console.log(result); // Resource URL \ No newline at end of file diff --git a/docs/examples/0.15.x/console-web/examples/avatars/get-q-r.md b/docs/examples/0.15.x/console-web/examples/avatars/get-q-r.md index c900a63531..86fed127e9 100644 --- a/docs/examples/0.15.x/console-web/examples/avatars/get-q-r.md +++ b/docs/examples/0.15.x/console-web/examples/avatars/get-q-r.md @@ -1,10 +1,14 @@ -const sdk = new Appwrite(); +import { Client, Avatars } from "appwrite"; -sdk +const client = new Client(); + +const avatars = new Avatars(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let result = sdk.avatars.getQR('[TEXT]'); +const result = avatars.getQR('[TEXT]'); console.log(result); // Resource URL \ No newline at end of file diff --git a/docs/examples/0.15.x/console-web/examples/database/create-boolean-attribute.md b/docs/examples/0.15.x/console-web/examples/database/create-boolean-attribute.md deleted file mode 100644 index cfa1ea0e8d..0000000000 --- a/docs/examples/0.15.x/console-web/examples/database/create-boolean-attribute.md +++ /dev/null @@ -1,14 +0,0 @@ -const sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.database.createBooleanAttribute('[COLLECTION_ID]', '', false); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/docs/examples/0.15.x/console-web/examples/database/create-collection.md b/docs/examples/0.15.x/console-web/examples/database/create-collection.md deleted file mode 100644 index c4add41814..0000000000 --- a/docs/examples/0.15.x/console-web/examples/database/create-collection.md +++ /dev/null @@ -1,14 +0,0 @@ -const sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.database.createCollection('[COLLECTION_ID]', '[NAME]', 'document', ["role:all"], ["role:all"]); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/docs/examples/0.15.x/console-web/examples/database/create-document.md b/docs/examples/0.15.x/console-web/examples/database/create-document.md deleted file mode 100644 index 5f57b2fc3d..0000000000 --- a/docs/examples/0.15.x/console-web/examples/database/create-document.md +++ /dev/null @@ -1,14 +0,0 @@ -const sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.database.createDocument('[COLLECTION_ID]', '[DOCUMENT_ID]', {}); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/docs/examples/0.15.x/console-web/examples/database/create-email-attribute.md b/docs/examples/0.15.x/console-web/examples/database/create-email-attribute.md deleted file mode 100644 index c6dc762917..0000000000 --- a/docs/examples/0.15.x/console-web/examples/database/create-email-attribute.md +++ /dev/null @@ -1,14 +0,0 @@ -const sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.database.createEmailAttribute('[COLLECTION_ID]', '', false); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/docs/examples/0.15.x/console-web/examples/database/create-enum-attribute.md b/docs/examples/0.15.x/console-web/examples/database/create-enum-attribute.md deleted file mode 100644 index e1d8146d3d..0000000000 --- a/docs/examples/0.15.x/console-web/examples/database/create-enum-attribute.md +++ /dev/null @@ -1,14 +0,0 @@ -const sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.database.createEnumAttribute('[COLLECTION_ID]', '', [], false); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/docs/examples/0.15.x/console-web/examples/database/create-float-attribute.md b/docs/examples/0.15.x/console-web/examples/database/create-float-attribute.md deleted file mode 100644 index 302a6fdfa3..0000000000 --- a/docs/examples/0.15.x/console-web/examples/database/create-float-attribute.md +++ /dev/null @@ -1,14 +0,0 @@ -const sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.database.createFloatAttribute('[COLLECTION_ID]', '', false); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/docs/examples/0.15.x/console-web/examples/database/create-index.md b/docs/examples/0.15.x/console-web/examples/database/create-index.md deleted file mode 100644 index 4dc3b43fef..0000000000 --- a/docs/examples/0.15.x/console-web/examples/database/create-index.md +++ /dev/null @@ -1,14 +0,0 @@ -const sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.database.createIndex('[COLLECTION_ID]', '', 'key', []); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/docs/examples/0.15.x/console-web/examples/database/create-integer-attribute.md b/docs/examples/0.15.x/console-web/examples/database/create-integer-attribute.md deleted file mode 100644 index e9d50a2525..0000000000 --- a/docs/examples/0.15.x/console-web/examples/database/create-integer-attribute.md +++ /dev/null @@ -1,14 +0,0 @@ -const sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.database.createIntegerAttribute('[COLLECTION_ID]', '', false); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/docs/examples/0.15.x/console-web/examples/database/create-ip-attribute.md b/docs/examples/0.15.x/console-web/examples/database/create-ip-attribute.md deleted file mode 100644 index 62fad8c742..0000000000 --- a/docs/examples/0.15.x/console-web/examples/database/create-ip-attribute.md +++ /dev/null @@ -1,14 +0,0 @@ -const sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.database.createIpAttribute('[COLLECTION_ID]', '', false); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/docs/examples/0.15.x/console-web/examples/database/create-string-attribute.md b/docs/examples/0.15.x/console-web/examples/database/create-string-attribute.md deleted file mode 100644 index 2a5b6169fd..0000000000 --- a/docs/examples/0.15.x/console-web/examples/database/create-string-attribute.md +++ /dev/null @@ -1,14 +0,0 @@ -const sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.database.createStringAttribute('[COLLECTION_ID]', '', 1, false); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/docs/examples/0.15.x/console-web/examples/database/create-url-attribute.md b/docs/examples/0.15.x/console-web/examples/database/create-url-attribute.md deleted file mode 100644 index e95c5f0a72..0000000000 --- a/docs/examples/0.15.x/console-web/examples/database/create-url-attribute.md +++ /dev/null @@ -1,14 +0,0 @@ -const sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.database.createUrlAttribute('[COLLECTION_ID]', '', false); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/docs/examples/0.15.x/console-web/examples/database/delete-attribute.md b/docs/examples/0.15.x/console-web/examples/database/delete-attribute.md deleted file mode 100644 index 574137390b..0000000000 --- a/docs/examples/0.15.x/console-web/examples/database/delete-attribute.md +++ /dev/null @@ -1,14 +0,0 @@ -const sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.database.deleteAttribute('[COLLECTION_ID]', ''); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/docs/examples/0.15.x/console-web/examples/database/delete-collection.md b/docs/examples/0.15.x/console-web/examples/database/delete-collection.md deleted file mode 100644 index 94ff0a6f06..0000000000 --- a/docs/examples/0.15.x/console-web/examples/database/delete-collection.md +++ /dev/null @@ -1,14 +0,0 @@ -const sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.database.deleteCollection('[COLLECTION_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/docs/examples/0.15.x/console-web/examples/database/delete-document.md b/docs/examples/0.15.x/console-web/examples/database/delete-document.md deleted file mode 100644 index 557662966d..0000000000 --- a/docs/examples/0.15.x/console-web/examples/database/delete-document.md +++ /dev/null @@ -1,14 +0,0 @@ -const sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.database.deleteDocument('[COLLECTION_ID]', '[DOCUMENT_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/docs/examples/0.15.x/console-web/examples/database/delete-index.md b/docs/examples/0.15.x/console-web/examples/database/delete-index.md deleted file mode 100644 index 0ffb7b626b..0000000000 --- a/docs/examples/0.15.x/console-web/examples/database/delete-index.md +++ /dev/null @@ -1,14 +0,0 @@ -const sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.database.deleteIndex('[COLLECTION_ID]', ''); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/docs/examples/0.15.x/console-web/examples/database/get-attribute.md b/docs/examples/0.15.x/console-web/examples/database/get-attribute.md deleted file mode 100644 index 38f96614e1..0000000000 --- a/docs/examples/0.15.x/console-web/examples/database/get-attribute.md +++ /dev/null @@ -1,14 +0,0 @@ -const sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.database.getAttribute('[COLLECTION_ID]', ''); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/docs/examples/0.15.x/console-web/examples/database/get-collection-usage.md b/docs/examples/0.15.x/console-web/examples/database/get-collection-usage.md deleted file mode 100644 index 80bb7a8acd..0000000000 --- a/docs/examples/0.15.x/console-web/examples/database/get-collection-usage.md +++ /dev/null @@ -1,14 +0,0 @@ -const sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.database.getCollectionUsage('[COLLECTION_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/docs/examples/0.15.x/console-web/examples/database/get-collection.md b/docs/examples/0.15.x/console-web/examples/database/get-collection.md deleted file mode 100644 index 4180a5c7db..0000000000 --- a/docs/examples/0.15.x/console-web/examples/database/get-collection.md +++ /dev/null @@ -1,14 +0,0 @@ -const sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.database.getCollection('[COLLECTION_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/docs/examples/0.15.x/console-web/examples/database/get-document.md b/docs/examples/0.15.x/console-web/examples/database/get-document.md deleted file mode 100644 index 841157f551..0000000000 --- a/docs/examples/0.15.x/console-web/examples/database/get-document.md +++ /dev/null @@ -1,14 +0,0 @@ -const sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.database.getDocument('[COLLECTION_ID]', '[DOCUMENT_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/docs/examples/0.15.x/console-web/examples/database/get-index.md b/docs/examples/0.15.x/console-web/examples/database/get-index.md deleted file mode 100644 index 1994f9c8a3..0000000000 --- a/docs/examples/0.15.x/console-web/examples/database/get-index.md +++ /dev/null @@ -1,14 +0,0 @@ -const sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.database.getIndex('[COLLECTION_ID]', ''); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/docs/examples/0.15.x/console-web/examples/database/get-usage.md b/docs/examples/0.15.x/console-web/examples/database/get-usage.md deleted file mode 100644 index 1e4316ac62..0000000000 --- a/docs/examples/0.15.x/console-web/examples/database/get-usage.md +++ /dev/null @@ -1,14 +0,0 @@ -const sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.database.getUsage(); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/docs/examples/0.15.x/console-web/examples/database/list-attributes.md b/docs/examples/0.15.x/console-web/examples/database/list-attributes.md deleted file mode 100644 index e05c5e778f..0000000000 --- a/docs/examples/0.15.x/console-web/examples/database/list-attributes.md +++ /dev/null @@ -1,14 +0,0 @@ -const sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.database.listAttributes('[COLLECTION_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/docs/examples/0.15.x/console-web/examples/database/list-collection-logs.md b/docs/examples/0.15.x/console-web/examples/database/list-collection-logs.md deleted file mode 100644 index 536b1c698b..0000000000 --- a/docs/examples/0.15.x/console-web/examples/database/list-collection-logs.md +++ /dev/null @@ -1,14 +0,0 @@ -const sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.database.listCollectionLogs('[COLLECTION_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/docs/examples/0.15.x/console-web/examples/database/list-collections.md b/docs/examples/0.15.x/console-web/examples/database/list-collections.md deleted file mode 100644 index d06151dcee..0000000000 --- a/docs/examples/0.15.x/console-web/examples/database/list-collections.md +++ /dev/null @@ -1,14 +0,0 @@ -const sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.database.listCollections(); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/docs/examples/0.15.x/console-web/examples/database/list-document-logs.md b/docs/examples/0.15.x/console-web/examples/database/list-document-logs.md deleted file mode 100644 index 761328157c..0000000000 --- a/docs/examples/0.15.x/console-web/examples/database/list-document-logs.md +++ /dev/null @@ -1,14 +0,0 @@ -const sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.database.listDocumentLogs('[COLLECTION_ID]', '[DOCUMENT_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/docs/examples/0.15.x/console-web/examples/database/list-documents.md b/docs/examples/0.15.x/console-web/examples/database/list-documents.md deleted file mode 100644 index 620137cf8e..0000000000 --- a/docs/examples/0.15.x/console-web/examples/database/list-documents.md +++ /dev/null @@ -1,14 +0,0 @@ -const sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.database.listDocuments('[COLLECTION_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/docs/examples/0.15.x/console-web/examples/database/list-indexes.md b/docs/examples/0.15.x/console-web/examples/database/list-indexes.md deleted file mode 100644 index 4d755d929b..0000000000 --- a/docs/examples/0.15.x/console-web/examples/database/list-indexes.md +++ /dev/null @@ -1,14 +0,0 @@ -const sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.database.listIndexes('[COLLECTION_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/docs/examples/0.15.x/console-web/examples/database/update-collection.md b/docs/examples/0.15.x/console-web/examples/database/update-collection.md deleted file mode 100644 index efca04d443..0000000000 --- a/docs/examples/0.15.x/console-web/examples/database/update-collection.md +++ /dev/null @@ -1,14 +0,0 @@ -const sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.database.updateCollection('[COLLECTION_ID]', '[NAME]', 'document'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/docs/examples/0.15.x/console-web/examples/database/update-document.md b/docs/examples/0.15.x/console-web/examples/database/update-document.md deleted file mode 100644 index b07b2ecac1..0000000000 --- a/docs/examples/0.15.x/console-web/examples/database/update-document.md +++ /dev/null @@ -1,14 +0,0 @@ -const sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.database.updateDocument('[COLLECTION_ID]', '[DOCUMENT_ID]', {}); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/docs/examples/0.15.x/console-web/examples/functions/create-deployment.md b/docs/examples/0.15.x/console-web/examples/functions/create-deployment.md index 6076987a56..57687bc535 100644 --- a/docs/examples/0.15.x/console-web/examples/functions/create-deployment.md +++ b/docs/examples/0.15.x/console-web/examples/functions/create-deployment.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Functions } from "appwrite"; -sdk +const client = new Client(); + +const functions = new Functions(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.functions.createDeployment('[FUNCTION_ID]', '[ENTRYPOINT]', document.getElementById('uploader').files[0], false); +const promise = functions.createDeployment('[FUNCTION_ID]', '[ENTRYPOINT]', document.getElementById('uploader').files[0], false); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/functions/create-execution.md b/docs/examples/0.15.x/console-web/examples/functions/create-execution.md index 87dc73a205..2b64bc9f7b 100644 --- a/docs/examples/0.15.x/console-web/examples/functions/create-execution.md +++ b/docs/examples/0.15.x/console-web/examples/functions/create-execution.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Functions } from "appwrite"; -sdk +const client = new Client(); + +const functions = new Functions(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.functions.createExecution('[FUNCTION_ID]'); +const promise = functions.createExecution('[FUNCTION_ID]'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/functions/create.md b/docs/examples/0.15.x/console-web/examples/functions/create.md index 296e2798c6..7a1a0921af 100644 --- a/docs/examples/0.15.x/console-web/examples/functions/create.md +++ b/docs/examples/0.15.x/console-web/examples/functions/create.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Functions } from "appwrite"; -sdk +const client = new Client(); + +const functions = new Functions(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.functions.create('[FUNCTION_ID]', '[NAME]', [], 'node-14.5'); +const promise = functions.create('[FUNCTION_ID]', '[NAME]', [], 'node-14.5'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/functions/delete-deployment.md b/docs/examples/0.15.x/console-web/examples/functions/delete-deployment.md index 1bea4d90fc..8f2c646401 100644 --- a/docs/examples/0.15.x/console-web/examples/functions/delete-deployment.md +++ b/docs/examples/0.15.x/console-web/examples/functions/delete-deployment.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Functions } from "appwrite"; -sdk +const client = new Client(); + +const functions = new Functions(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.functions.deleteDeployment('[FUNCTION_ID]', '[DEPLOYMENT_ID]'); +const promise = functions.deleteDeployment('[FUNCTION_ID]', '[DEPLOYMENT_ID]'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/functions/delete.md b/docs/examples/0.15.x/console-web/examples/functions/delete.md index d080c101bf..4ac987df81 100644 --- a/docs/examples/0.15.x/console-web/examples/functions/delete.md +++ b/docs/examples/0.15.x/console-web/examples/functions/delete.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Functions } from "appwrite"; -sdk +const client = new Client(); + +const functions = new Functions(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.functions.delete('[FUNCTION_ID]'); +const promise = functions.delete('[FUNCTION_ID]'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/functions/get-deployment.md b/docs/examples/0.15.x/console-web/examples/functions/get-deployment.md index 3eb536f9ee..a07fb7e844 100644 --- a/docs/examples/0.15.x/console-web/examples/functions/get-deployment.md +++ b/docs/examples/0.15.x/console-web/examples/functions/get-deployment.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Functions } from "appwrite"; -sdk +const client = new Client(); + +const functions = new Functions(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.functions.getDeployment('[FUNCTION_ID]', '[DEPLOYMENT_ID]'); +const promise = functions.getDeployment('[FUNCTION_ID]', '[DEPLOYMENT_ID]'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/functions/get-execution.md b/docs/examples/0.15.x/console-web/examples/functions/get-execution.md index a8a0c4a0c8..f5046a08c4 100644 --- a/docs/examples/0.15.x/console-web/examples/functions/get-execution.md +++ b/docs/examples/0.15.x/console-web/examples/functions/get-execution.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Functions } from "appwrite"; -sdk +const client = new Client(); + +const functions = new Functions(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.functions.getExecution('[FUNCTION_ID]', '[EXECUTION_ID]'); +const promise = functions.getExecution('[FUNCTION_ID]', '[EXECUTION_ID]'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/functions/get-usage.md b/docs/examples/0.15.x/console-web/examples/functions/get-usage.md index 3a14e5d0be..c01af9b6dc 100644 --- a/docs/examples/0.15.x/console-web/examples/functions/get-usage.md +++ b/docs/examples/0.15.x/console-web/examples/functions/get-usage.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Functions } from "appwrite"; -sdk +const client = new Client(); + +const functions = new Functions(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.functions.getUsage('[FUNCTION_ID]'); +const promise = functions.getUsage('[FUNCTION_ID]'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/functions/get.md b/docs/examples/0.15.x/console-web/examples/functions/get.md index eeeee205bd..b6e32b5171 100644 --- a/docs/examples/0.15.x/console-web/examples/functions/get.md +++ b/docs/examples/0.15.x/console-web/examples/functions/get.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Functions } from "appwrite"; -sdk +const client = new Client(); + +const functions = new Functions(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.functions.get('[FUNCTION_ID]'); +const promise = functions.get('[FUNCTION_ID]'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/functions/list-deployments.md b/docs/examples/0.15.x/console-web/examples/functions/list-deployments.md index 04ef5bf9c4..843dd07a61 100644 --- a/docs/examples/0.15.x/console-web/examples/functions/list-deployments.md +++ b/docs/examples/0.15.x/console-web/examples/functions/list-deployments.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Functions } from "appwrite"; -sdk +const client = new Client(); + +const functions = new Functions(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.functions.listDeployments('[FUNCTION_ID]'); +const promise = functions.listDeployments('[FUNCTION_ID]'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/functions/list-executions.md b/docs/examples/0.15.x/console-web/examples/functions/list-executions.md index 82652ddb6c..99186a95de 100644 --- a/docs/examples/0.15.x/console-web/examples/functions/list-executions.md +++ b/docs/examples/0.15.x/console-web/examples/functions/list-executions.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Functions } from "appwrite"; -sdk +const client = new Client(); + +const functions = new Functions(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.functions.listExecutions('[FUNCTION_ID]'); +const promise = functions.listExecutions('[FUNCTION_ID]'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/functions/list-runtimes.md b/docs/examples/0.15.x/console-web/examples/functions/list-runtimes.md index a6d0099e1b..d5e1f6630e 100644 --- a/docs/examples/0.15.x/console-web/examples/functions/list-runtimes.md +++ b/docs/examples/0.15.x/console-web/examples/functions/list-runtimes.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Functions } from "appwrite"; -sdk +const client = new Client(); + +const functions = new Functions(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.functions.listRuntimes(); +const promise = functions.listRuntimes(); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/functions/list.md b/docs/examples/0.15.x/console-web/examples/functions/list.md index 3002e2d8ee..730a90fff6 100644 --- a/docs/examples/0.15.x/console-web/examples/functions/list.md +++ b/docs/examples/0.15.x/console-web/examples/functions/list.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Functions } from "appwrite"; -sdk +const client = new Client(); + +const functions = new Functions(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.functions.list(); +const promise = functions.list(); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/functions/retry-build.md b/docs/examples/0.15.x/console-web/examples/functions/retry-build.md index e0f49976b0..1ef690a227 100644 --- a/docs/examples/0.15.x/console-web/examples/functions/retry-build.md +++ b/docs/examples/0.15.x/console-web/examples/functions/retry-build.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Functions } from "appwrite"; -sdk +const client = new Client(); + +const functions = new Functions(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.functions.retryBuild('[FUNCTION_ID]', '[DEPLOYMENT_ID]', '[BUILD_ID]'); +const promise = functions.retryBuild('[FUNCTION_ID]', '[DEPLOYMENT_ID]', '[BUILD_ID]'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/functions/update-deployment.md b/docs/examples/0.15.x/console-web/examples/functions/update-deployment.md index e8e3ad2faa..b231ae593e 100644 --- a/docs/examples/0.15.x/console-web/examples/functions/update-deployment.md +++ b/docs/examples/0.15.x/console-web/examples/functions/update-deployment.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Functions } from "appwrite"; -sdk +const client = new Client(); + +const functions = new Functions(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.functions.updateDeployment('[FUNCTION_ID]', '[DEPLOYMENT_ID]'); +const promise = functions.updateDeployment('[FUNCTION_ID]', '[DEPLOYMENT_ID]'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/functions/update.md b/docs/examples/0.15.x/console-web/examples/functions/update.md index 4243843568..4ffbe859cf 100644 --- a/docs/examples/0.15.x/console-web/examples/functions/update.md +++ b/docs/examples/0.15.x/console-web/examples/functions/update.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Functions } from "appwrite"; -sdk +const client = new Client(); + +const functions = new Functions(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.functions.update('[FUNCTION_ID]', '[NAME]', []); +const promise = functions.update('[FUNCTION_ID]', '[NAME]', []); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/health/get-antivirus.md b/docs/examples/0.15.x/console-web/examples/health/get-antivirus.md index 71e16bd903..0b14fa8acf 100644 --- a/docs/examples/0.15.x/console-web/examples/health/get-antivirus.md +++ b/docs/examples/0.15.x/console-web/examples/health/get-antivirus.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Health } from "appwrite"; -sdk +const client = new Client(); + +const health = new Health(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.health.getAntivirus(); +const promise = health.getAntivirus(); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/health/get-cache.md b/docs/examples/0.15.x/console-web/examples/health/get-cache.md index a087d8db58..a754f9be93 100644 --- a/docs/examples/0.15.x/console-web/examples/health/get-cache.md +++ b/docs/examples/0.15.x/console-web/examples/health/get-cache.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Health } from "appwrite"; -sdk +const client = new Client(); + +const health = new Health(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.health.getCache(); +const promise = health.getCache(); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/health/get-d-b.md b/docs/examples/0.15.x/console-web/examples/health/get-d-b.md index fa4810de41..86ff4a7d84 100644 --- a/docs/examples/0.15.x/console-web/examples/health/get-d-b.md +++ b/docs/examples/0.15.x/console-web/examples/health/get-d-b.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Health } from "appwrite"; -sdk +const client = new Client(); + +const health = new Health(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.health.getDB(); +const promise = health.getDB(); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/health/get-queue-certificates.md b/docs/examples/0.15.x/console-web/examples/health/get-queue-certificates.md index 9395664549..2b4dc05c37 100644 --- a/docs/examples/0.15.x/console-web/examples/health/get-queue-certificates.md +++ b/docs/examples/0.15.x/console-web/examples/health/get-queue-certificates.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Health } from "appwrite"; -sdk +const client = new Client(); + +const health = new Health(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.health.getQueueCertificates(); +const promise = health.getQueueCertificates(); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/health/get-queue-functions.md b/docs/examples/0.15.x/console-web/examples/health/get-queue-functions.md index 9153497870..9d6f3b7f7d 100644 --- a/docs/examples/0.15.x/console-web/examples/health/get-queue-functions.md +++ b/docs/examples/0.15.x/console-web/examples/health/get-queue-functions.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Health } from "appwrite"; -sdk +const client = new Client(); + +const health = new Health(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.health.getQueueFunctions(); +const promise = health.getQueueFunctions(); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/health/get-queue-logs.md b/docs/examples/0.15.x/console-web/examples/health/get-queue-logs.md index 32b58757a3..010e603f92 100644 --- a/docs/examples/0.15.x/console-web/examples/health/get-queue-logs.md +++ b/docs/examples/0.15.x/console-web/examples/health/get-queue-logs.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Health } from "appwrite"; -sdk +const client = new Client(); + +const health = new Health(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.health.getQueueLogs(); +const promise = health.getQueueLogs(); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/health/get-queue-webhooks.md b/docs/examples/0.15.x/console-web/examples/health/get-queue-webhooks.md index 8a23b957d7..2687863f12 100644 --- a/docs/examples/0.15.x/console-web/examples/health/get-queue-webhooks.md +++ b/docs/examples/0.15.x/console-web/examples/health/get-queue-webhooks.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Health } from "appwrite"; -sdk +const client = new Client(); + +const health = new Health(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.health.getQueueWebhooks(); +const promise = health.getQueueWebhooks(); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/health/get-storage-local.md b/docs/examples/0.15.x/console-web/examples/health/get-storage-local.md index 8fb72d9538..b11daa2fec 100644 --- a/docs/examples/0.15.x/console-web/examples/health/get-storage-local.md +++ b/docs/examples/0.15.x/console-web/examples/health/get-storage-local.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Health } from "appwrite"; -sdk +const client = new Client(); + +const health = new Health(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.health.getStorageLocal(); +const promise = health.getStorageLocal(); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/health/get-time.md b/docs/examples/0.15.x/console-web/examples/health/get-time.md index 49c9848e9b..1f617e13a2 100644 --- a/docs/examples/0.15.x/console-web/examples/health/get-time.md +++ b/docs/examples/0.15.x/console-web/examples/health/get-time.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Health } from "appwrite"; -sdk +const client = new Client(); + +const health = new Health(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.health.getTime(); +const promise = health.getTime(); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/health/get.md b/docs/examples/0.15.x/console-web/examples/health/get.md index b933fb70f0..b1d6be4509 100644 --- a/docs/examples/0.15.x/console-web/examples/health/get.md +++ b/docs/examples/0.15.x/console-web/examples/health/get.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Health } from "appwrite"; -sdk +const client = new Client(); + +const health = new Health(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.health.get(); +const promise = health.get(); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/locale/get-continents.md b/docs/examples/0.15.x/console-web/examples/locale/get-continents.md index f0798a820c..9717181464 100644 --- a/docs/examples/0.15.x/console-web/examples/locale/get-continents.md +++ b/docs/examples/0.15.x/console-web/examples/locale/get-continents.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Locale } from "appwrite"; -sdk +const client = new Client(); + +const locale = new Locale(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.locale.getContinents(); +const promise = locale.getContinents(); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/locale/get-countries-e-u.md b/docs/examples/0.15.x/console-web/examples/locale/get-countries-e-u.md index 7bc6aa2d50..0439449721 100644 --- a/docs/examples/0.15.x/console-web/examples/locale/get-countries-e-u.md +++ b/docs/examples/0.15.x/console-web/examples/locale/get-countries-e-u.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Locale } from "appwrite"; -sdk +const client = new Client(); + +const locale = new Locale(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.locale.getCountriesEU(); +const promise = locale.getCountriesEU(); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/locale/get-countries-phones.md b/docs/examples/0.15.x/console-web/examples/locale/get-countries-phones.md index e92982c1a2..26f104c5ac 100644 --- a/docs/examples/0.15.x/console-web/examples/locale/get-countries-phones.md +++ b/docs/examples/0.15.x/console-web/examples/locale/get-countries-phones.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Locale } from "appwrite"; -sdk +const client = new Client(); + +const locale = new Locale(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.locale.getCountriesPhones(); +const promise = locale.getCountriesPhones(); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/locale/get-countries.md b/docs/examples/0.15.x/console-web/examples/locale/get-countries.md index bb12e6ab5f..ce80e526a4 100644 --- a/docs/examples/0.15.x/console-web/examples/locale/get-countries.md +++ b/docs/examples/0.15.x/console-web/examples/locale/get-countries.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Locale } from "appwrite"; -sdk +const client = new Client(); + +const locale = new Locale(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.locale.getCountries(); +const promise = locale.getCountries(); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/locale/get-currencies.md b/docs/examples/0.15.x/console-web/examples/locale/get-currencies.md index 3382c2015c..14259a2453 100644 --- a/docs/examples/0.15.x/console-web/examples/locale/get-currencies.md +++ b/docs/examples/0.15.x/console-web/examples/locale/get-currencies.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Locale } from "appwrite"; -sdk +const client = new Client(); + +const locale = new Locale(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.locale.getCurrencies(); +const promise = locale.getCurrencies(); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/locale/get-languages.md b/docs/examples/0.15.x/console-web/examples/locale/get-languages.md index a7fa4a0170..8866fb609b 100644 --- a/docs/examples/0.15.x/console-web/examples/locale/get-languages.md +++ b/docs/examples/0.15.x/console-web/examples/locale/get-languages.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Locale } from "appwrite"; -sdk +const client = new Client(); + +const locale = new Locale(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.locale.getLanguages(); +const promise = locale.getLanguages(); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/locale/get.md b/docs/examples/0.15.x/console-web/examples/locale/get.md index 89ade06941..634256c83e 100644 --- a/docs/examples/0.15.x/console-web/examples/locale/get.md +++ b/docs/examples/0.15.x/console-web/examples/locale/get.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Locale } from "appwrite"; -sdk +const client = new Client(); + +const locale = new Locale(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.locale.get(); +const promise = locale.get(); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/projects/create-domain.md b/docs/examples/0.15.x/console-web/examples/projects/create-domain.md index 1382106c03..452a594c48 100644 --- a/docs/examples/0.15.x/console-web/examples/projects/create-domain.md +++ b/docs/examples/0.15.x/console-web/examples/projects/create-domain.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Projects } from "appwrite"; -sdk +const client = new Client(); + +const projects = new Projects(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.projects.createDomain('[PROJECT_ID]', ''); +const promise = projects.createDomain('[PROJECT_ID]', ''); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/projects/create-key.md b/docs/examples/0.15.x/console-web/examples/projects/create-key.md index 95157eab7b..8bd57d54c6 100644 --- a/docs/examples/0.15.x/console-web/examples/projects/create-key.md +++ b/docs/examples/0.15.x/console-web/examples/projects/create-key.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Projects } from "appwrite"; -sdk +const client = new Client(); + +const projects = new Projects(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.projects.createKey('[PROJECT_ID]', '[NAME]', []); +const promise = projects.createKey('[PROJECT_ID]', '[NAME]', []); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/projects/create-platform.md b/docs/examples/0.15.x/console-web/examples/projects/create-platform.md index 177fe89e01..c2c6a030b4 100644 --- a/docs/examples/0.15.x/console-web/examples/projects/create-platform.md +++ b/docs/examples/0.15.x/console-web/examples/projects/create-platform.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Projects } from "appwrite"; -sdk +const client = new Client(); + +const projects = new Projects(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.projects.createPlatform('[PROJECT_ID]', 'web', '[NAME]'); +const promise = projects.createPlatform('[PROJECT_ID]', 'web', '[NAME]'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/projects/create-webhook.md b/docs/examples/0.15.x/console-web/examples/projects/create-webhook.md index f3a1271d34..1469e6b30f 100644 --- a/docs/examples/0.15.x/console-web/examples/projects/create-webhook.md +++ b/docs/examples/0.15.x/console-web/examples/projects/create-webhook.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Projects } from "appwrite"; -sdk +const client = new Client(); + +const projects = new Projects(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.projects.createWebhook('[PROJECT_ID]', '[NAME]', [], 'https://example.com', false); +const promise = projects.createWebhook('[PROJECT_ID]', '[NAME]', [], 'https://example.com', false); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/projects/create.md b/docs/examples/0.15.x/console-web/examples/projects/create.md index 5321ffa040..792515c35b 100644 --- a/docs/examples/0.15.x/console-web/examples/projects/create.md +++ b/docs/examples/0.15.x/console-web/examples/projects/create.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Projects } from "appwrite"; -sdk +const client = new Client(); + +const projects = new Projects(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.projects.create('[PROJECT_ID]', '[NAME]', '[TEAM_ID]'); +const promise = projects.create('[PROJECT_ID]', '[NAME]', '[TEAM_ID]'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/projects/delete-domain.md b/docs/examples/0.15.x/console-web/examples/projects/delete-domain.md index 53aaa577f7..266d343ae1 100644 --- a/docs/examples/0.15.x/console-web/examples/projects/delete-domain.md +++ b/docs/examples/0.15.x/console-web/examples/projects/delete-domain.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Projects } from "appwrite"; -sdk +const client = new Client(); + +const projects = new Projects(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.projects.deleteDomain('[PROJECT_ID]', '[DOMAIN_ID]'); +const promise = projects.deleteDomain('[PROJECT_ID]', '[DOMAIN_ID]'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/projects/delete-key.md b/docs/examples/0.15.x/console-web/examples/projects/delete-key.md index 205f357a70..0b227e7f1a 100644 --- a/docs/examples/0.15.x/console-web/examples/projects/delete-key.md +++ b/docs/examples/0.15.x/console-web/examples/projects/delete-key.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Projects } from "appwrite"; -sdk +const client = new Client(); + +const projects = new Projects(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.projects.deleteKey('[PROJECT_ID]', '[KEY_ID]'); +const promise = projects.deleteKey('[PROJECT_ID]', '[KEY_ID]'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/projects/delete-platform.md b/docs/examples/0.15.x/console-web/examples/projects/delete-platform.md index 3f770290ad..681362017c 100644 --- a/docs/examples/0.15.x/console-web/examples/projects/delete-platform.md +++ b/docs/examples/0.15.x/console-web/examples/projects/delete-platform.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Projects } from "appwrite"; -sdk +const client = new Client(); + +const projects = new Projects(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.projects.deletePlatform('[PROJECT_ID]', '[PLATFORM_ID]'); +const promise = projects.deletePlatform('[PROJECT_ID]', '[PLATFORM_ID]'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/projects/delete-webhook.md b/docs/examples/0.15.x/console-web/examples/projects/delete-webhook.md index 5e698f398f..3edbdadb07 100644 --- a/docs/examples/0.15.x/console-web/examples/projects/delete-webhook.md +++ b/docs/examples/0.15.x/console-web/examples/projects/delete-webhook.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Projects } from "appwrite"; -sdk +const client = new Client(); + +const projects = new Projects(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.projects.deleteWebhook('[PROJECT_ID]', '[WEBHOOK_ID]'); +const promise = projects.deleteWebhook('[PROJECT_ID]', '[WEBHOOK_ID]'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/projects/delete.md b/docs/examples/0.15.x/console-web/examples/projects/delete.md index 506bba2f42..1e479709e9 100644 --- a/docs/examples/0.15.x/console-web/examples/projects/delete.md +++ b/docs/examples/0.15.x/console-web/examples/projects/delete.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Projects } from "appwrite"; -sdk +const client = new Client(); + +const projects = new Projects(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.projects.delete('[PROJECT_ID]', 'password'); +const promise = projects.delete('[PROJECT_ID]', 'password'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/projects/get-domain.md b/docs/examples/0.15.x/console-web/examples/projects/get-domain.md index f81b67f3ab..a90d5eec33 100644 --- a/docs/examples/0.15.x/console-web/examples/projects/get-domain.md +++ b/docs/examples/0.15.x/console-web/examples/projects/get-domain.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Projects } from "appwrite"; -sdk +const client = new Client(); + +const projects = new Projects(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.projects.getDomain('[PROJECT_ID]', '[DOMAIN_ID]'); +const promise = projects.getDomain('[PROJECT_ID]', '[DOMAIN_ID]'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/projects/get-key.md b/docs/examples/0.15.x/console-web/examples/projects/get-key.md index 0780229ecf..59a4224f78 100644 --- a/docs/examples/0.15.x/console-web/examples/projects/get-key.md +++ b/docs/examples/0.15.x/console-web/examples/projects/get-key.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Projects } from "appwrite"; -sdk +const client = new Client(); + +const projects = new Projects(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.projects.getKey('[PROJECT_ID]', '[KEY_ID]'); +const promise = projects.getKey('[PROJECT_ID]', '[KEY_ID]'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/projects/get-platform.md b/docs/examples/0.15.x/console-web/examples/projects/get-platform.md index a2229a2c59..8eaea3371b 100644 --- a/docs/examples/0.15.x/console-web/examples/projects/get-platform.md +++ b/docs/examples/0.15.x/console-web/examples/projects/get-platform.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Projects } from "appwrite"; -sdk +const client = new Client(); + +const projects = new Projects(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.projects.getPlatform('[PROJECT_ID]', '[PLATFORM_ID]'); +const promise = projects.getPlatform('[PROJECT_ID]', '[PLATFORM_ID]'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/projects/get-usage.md b/docs/examples/0.15.x/console-web/examples/projects/get-usage.md index db4f2d84f9..be7ee4379e 100644 --- a/docs/examples/0.15.x/console-web/examples/projects/get-usage.md +++ b/docs/examples/0.15.x/console-web/examples/projects/get-usage.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Projects } from "appwrite"; -sdk +const client = new Client(); + +const projects = new Projects(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.projects.getUsage('[PROJECT_ID]'); +const promise = projects.getUsage('[PROJECT_ID]'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/projects/get-webhook.md b/docs/examples/0.15.x/console-web/examples/projects/get-webhook.md index 849cf75ee0..b636a797ee 100644 --- a/docs/examples/0.15.x/console-web/examples/projects/get-webhook.md +++ b/docs/examples/0.15.x/console-web/examples/projects/get-webhook.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Projects } from "appwrite"; -sdk +const client = new Client(); + +const projects = new Projects(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.projects.getWebhook('[PROJECT_ID]', '[WEBHOOK_ID]'); +const promise = projects.getWebhook('[PROJECT_ID]', '[WEBHOOK_ID]'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/projects/get.md b/docs/examples/0.15.x/console-web/examples/projects/get.md index 3e3e10f023..ac20f56023 100644 --- a/docs/examples/0.15.x/console-web/examples/projects/get.md +++ b/docs/examples/0.15.x/console-web/examples/projects/get.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Projects } from "appwrite"; -sdk +const client = new Client(); + +const projects = new Projects(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.projects.get('[PROJECT_ID]'); +const promise = projects.get('[PROJECT_ID]'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/projects/list-domains.md b/docs/examples/0.15.x/console-web/examples/projects/list-domains.md index f6537d86bf..2c4a7415d2 100644 --- a/docs/examples/0.15.x/console-web/examples/projects/list-domains.md +++ b/docs/examples/0.15.x/console-web/examples/projects/list-domains.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Projects } from "appwrite"; -sdk +const client = new Client(); + +const projects = new Projects(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.projects.listDomains('[PROJECT_ID]'); +const promise = projects.listDomains('[PROJECT_ID]'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/projects/list-keys.md b/docs/examples/0.15.x/console-web/examples/projects/list-keys.md index 1ce0040051..957531a892 100644 --- a/docs/examples/0.15.x/console-web/examples/projects/list-keys.md +++ b/docs/examples/0.15.x/console-web/examples/projects/list-keys.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Projects } from "appwrite"; -sdk +const client = new Client(); + +const projects = new Projects(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.projects.listKeys('[PROJECT_ID]'); +const promise = projects.listKeys('[PROJECT_ID]'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/projects/list-platforms.md b/docs/examples/0.15.x/console-web/examples/projects/list-platforms.md index 7851b80b44..100be04115 100644 --- a/docs/examples/0.15.x/console-web/examples/projects/list-platforms.md +++ b/docs/examples/0.15.x/console-web/examples/projects/list-platforms.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Projects } from "appwrite"; -sdk +const client = new Client(); + +const projects = new Projects(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.projects.listPlatforms('[PROJECT_ID]'); +const promise = projects.listPlatforms('[PROJECT_ID]'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/projects/list-webhooks.md b/docs/examples/0.15.x/console-web/examples/projects/list-webhooks.md index eef35c531e..093b9e91f7 100644 --- a/docs/examples/0.15.x/console-web/examples/projects/list-webhooks.md +++ b/docs/examples/0.15.x/console-web/examples/projects/list-webhooks.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Projects } from "appwrite"; -sdk +const client = new Client(); + +const projects = new Projects(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.projects.listWebhooks('[PROJECT_ID]'); +const promise = projects.listWebhooks('[PROJECT_ID]'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/projects/list.md b/docs/examples/0.15.x/console-web/examples/projects/list.md index 2dae186849..a576843401 100644 --- a/docs/examples/0.15.x/console-web/examples/projects/list.md +++ b/docs/examples/0.15.x/console-web/examples/projects/list.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Projects } from "appwrite"; -sdk +const client = new Client(); + +const projects = new Projects(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.projects.list(); +const promise = projects.list(); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/projects/update-auth-limit.md b/docs/examples/0.15.x/console-web/examples/projects/update-auth-limit.md index 68e3a4a764..7cc850ad2e 100644 --- a/docs/examples/0.15.x/console-web/examples/projects/update-auth-limit.md +++ b/docs/examples/0.15.x/console-web/examples/projects/update-auth-limit.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Projects } from "appwrite"; -sdk +const client = new Client(); + +const projects = new Projects(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.projects.updateAuthLimit('[PROJECT_ID]', 0); +const promise = projects.updateAuthLimit('[PROJECT_ID]', 0); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/projects/update-auth-status.md b/docs/examples/0.15.x/console-web/examples/projects/update-auth-status.md index 7e325972b3..400d5a4f7b 100644 --- a/docs/examples/0.15.x/console-web/examples/projects/update-auth-status.md +++ b/docs/examples/0.15.x/console-web/examples/projects/update-auth-status.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Projects } from "appwrite"; -sdk +const client = new Client(); + +const projects = new Projects(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.projects.updateAuthStatus('[PROJECT_ID]', 'email-password', false); +const promise = projects.updateAuthStatus('[PROJECT_ID]', 'email-password', false); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/projects/update-domain-verification.md b/docs/examples/0.15.x/console-web/examples/projects/update-domain-verification.md index c00aea2724..c632ad10fb 100644 --- a/docs/examples/0.15.x/console-web/examples/projects/update-domain-verification.md +++ b/docs/examples/0.15.x/console-web/examples/projects/update-domain-verification.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Projects } from "appwrite"; -sdk +const client = new Client(); + +const projects = new Projects(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.projects.updateDomainVerification('[PROJECT_ID]', '[DOMAIN_ID]'); +const promise = projects.updateDomainVerification('[PROJECT_ID]', '[DOMAIN_ID]'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/projects/update-key.md b/docs/examples/0.15.x/console-web/examples/projects/update-key.md index 90209de5e1..627bf6c38b 100644 --- a/docs/examples/0.15.x/console-web/examples/projects/update-key.md +++ b/docs/examples/0.15.x/console-web/examples/projects/update-key.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Projects } from "appwrite"; -sdk +const client = new Client(); + +const projects = new Projects(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.projects.updateKey('[PROJECT_ID]', '[KEY_ID]', '[NAME]', []); +const promise = projects.updateKey('[PROJECT_ID]', '[KEY_ID]', '[NAME]', []); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/projects/update-o-auth2.md b/docs/examples/0.15.x/console-web/examples/projects/update-o-auth2.md index 126a45e425..df22de53d3 100644 --- a/docs/examples/0.15.x/console-web/examples/projects/update-o-auth2.md +++ b/docs/examples/0.15.x/console-web/examples/projects/update-o-auth2.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Projects } from "appwrite"; -sdk +const client = new Client(); + +const projects = new Projects(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.projects.updateOAuth2('[PROJECT_ID]', 'amazon'); +const promise = projects.updateOAuth2('[PROJECT_ID]', 'amazon'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/projects/update-platform.md b/docs/examples/0.15.x/console-web/examples/projects/update-platform.md index 17d3773ea9..0d6b91999e 100644 --- a/docs/examples/0.15.x/console-web/examples/projects/update-platform.md +++ b/docs/examples/0.15.x/console-web/examples/projects/update-platform.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Projects } from "appwrite"; -sdk +const client = new Client(); + +const projects = new Projects(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.projects.updatePlatform('[PROJECT_ID]', '[PLATFORM_ID]', '[NAME]'); +const promise = projects.updatePlatform('[PROJECT_ID]', '[PLATFORM_ID]', '[NAME]'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/projects/update-service-status.md b/docs/examples/0.15.x/console-web/examples/projects/update-service-status.md index 3fdaa5ad6d..ae95091908 100644 --- a/docs/examples/0.15.x/console-web/examples/projects/update-service-status.md +++ b/docs/examples/0.15.x/console-web/examples/projects/update-service-status.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Projects } from "appwrite"; -sdk +const client = new Client(); + +const projects = new Projects(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.projects.updateServiceStatus('[PROJECT_ID]', 'account', false); +const promise = projects.updateServiceStatus('[PROJECT_ID]', 'account', false); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/projects/update-webhook-signature.md b/docs/examples/0.15.x/console-web/examples/projects/update-webhook-signature.md index e36f325282..3545f9a50a 100644 --- a/docs/examples/0.15.x/console-web/examples/projects/update-webhook-signature.md +++ b/docs/examples/0.15.x/console-web/examples/projects/update-webhook-signature.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Projects } from "appwrite"; -sdk +const client = new Client(); + +const projects = new Projects(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.projects.updateWebhookSignature('[PROJECT_ID]', '[WEBHOOK_ID]'); +const promise = projects.updateWebhookSignature('[PROJECT_ID]', '[WEBHOOK_ID]'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/projects/update-webhook.md b/docs/examples/0.15.x/console-web/examples/projects/update-webhook.md index cf12bcb209..45ecb8b02d 100644 --- a/docs/examples/0.15.x/console-web/examples/projects/update-webhook.md +++ b/docs/examples/0.15.x/console-web/examples/projects/update-webhook.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Projects } from "appwrite"; -sdk +const client = new Client(); + +const projects = new Projects(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.projects.updateWebhook('[PROJECT_ID]', '[WEBHOOK_ID]', '[NAME]', [], 'https://example.com', false); +const promise = projects.updateWebhook('[PROJECT_ID]', '[WEBHOOK_ID]', '[NAME]', [], 'https://example.com', false); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/projects/update.md b/docs/examples/0.15.x/console-web/examples/projects/update.md index 835779e30f..661eb11920 100644 --- a/docs/examples/0.15.x/console-web/examples/projects/update.md +++ b/docs/examples/0.15.x/console-web/examples/projects/update.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Projects } from "appwrite"; -sdk +const client = new Client(); + +const projects = new Projects(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.projects.update('[PROJECT_ID]', '[NAME]'); +const promise = projects.update('[PROJECT_ID]', '[NAME]'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/storage/create-bucket.md b/docs/examples/0.15.x/console-web/examples/storage/create-bucket.md index 5af19f6264..5c2026d0af 100644 --- a/docs/examples/0.15.x/console-web/examples/storage/create-bucket.md +++ b/docs/examples/0.15.x/console-web/examples/storage/create-bucket.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Storage } from "appwrite"; -sdk +const client = new Client(); + +const storage = new Storage(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.storage.createBucket('[BUCKET_ID]', '[NAME]', 'file'); +const promise = storage.createBucket('[BUCKET_ID]', '[NAME]', 'file'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/storage/create-file.md b/docs/examples/0.15.x/console-web/examples/storage/create-file.md index f464fe608e..10992d2b89 100644 --- a/docs/examples/0.15.x/console-web/examples/storage/create-file.md +++ b/docs/examples/0.15.x/console-web/examples/storage/create-file.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Storage } from "appwrite"; -sdk +const client = new Client(); + +const storage = new Storage(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.storage.createFile('[BUCKET_ID]', '[FILE_ID]', document.getElementById('uploader').files[0]); +const promise = storage.createFile('[BUCKET_ID]', '[FILE_ID]', document.getElementById('uploader').files[0]); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/storage/delete-bucket.md b/docs/examples/0.15.x/console-web/examples/storage/delete-bucket.md index 02d11d5846..a8580f9a08 100644 --- a/docs/examples/0.15.x/console-web/examples/storage/delete-bucket.md +++ b/docs/examples/0.15.x/console-web/examples/storage/delete-bucket.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Storage } from "appwrite"; -sdk +const client = new Client(); + +const storage = new Storage(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.storage.deleteBucket('[BUCKET_ID]'); +const promise = storage.deleteBucket('[BUCKET_ID]'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/storage/delete-file.md b/docs/examples/0.15.x/console-web/examples/storage/delete-file.md index 94c9e3112c..4512a8c1ce 100644 --- a/docs/examples/0.15.x/console-web/examples/storage/delete-file.md +++ b/docs/examples/0.15.x/console-web/examples/storage/delete-file.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Storage } from "appwrite"; -sdk +const client = new Client(); + +const storage = new Storage(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.storage.deleteFile('[BUCKET_ID]', '[FILE_ID]'); +const promise = storage.deleteFile('[BUCKET_ID]', '[FILE_ID]'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/storage/get-bucket-usage.md b/docs/examples/0.15.x/console-web/examples/storage/get-bucket-usage.md index 7cc74b6665..61ef7fa956 100644 --- a/docs/examples/0.15.x/console-web/examples/storage/get-bucket-usage.md +++ b/docs/examples/0.15.x/console-web/examples/storage/get-bucket-usage.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Storage } from "appwrite"; -sdk +const client = new Client(); + +const storage = new Storage(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.storage.getBucketUsage('[BUCKET_ID]'); +const promise = storage.getBucketUsage('[BUCKET_ID]'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/storage/get-bucket.md b/docs/examples/0.15.x/console-web/examples/storage/get-bucket.md index 57c32e138b..3ffd9f3b42 100644 --- a/docs/examples/0.15.x/console-web/examples/storage/get-bucket.md +++ b/docs/examples/0.15.x/console-web/examples/storage/get-bucket.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Storage } from "appwrite"; -sdk +const client = new Client(); + +const storage = new Storage(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.storage.getBucket('[BUCKET_ID]'); +const promise = storage.getBucket('[BUCKET_ID]'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/storage/get-file-download.md b/docs/examples/0.15.x/console-web/examples/storage/get-file-download.md index 18a01aaa91..17c06600b3 100644 --- a/docs/examples/0.15.x/console-web/examples/storage/get-file-download.md +++ b/docs/examples/0.15.x/console-web/examples/storage/get-file-download.md @@ -1,10 +1,14 @@ -const sdk = new Appwrite(); +import { Client, Storage } from "appwrite"; -sdk +const client = new Client(); + +const storage = new Storage(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let result = sdk.storage.getFileDownload('[BUCKET_ID]', '[FILE_ID]'); +const result = storage.getFileDownload('[BUCKET_ID]', '[FILE_ID]'); console.log(result); // Resource URL \ No newline at end of file diff --git a/docs/examples/0.15.x/console-web/examples/storage/get-file-preview.md b/docs/examples/0.15.x/console-web/examples/storage/get-file-preview.md index b9d9377e1f..52866d108a 100644 --- a/docs/examples/0.15.x/console-web/examples/storage/get-file-preview.md +++ b/docs/examples/0.15.x/console-web/examples/storage/get-file-preview.md @@ -1,10 +1,14 @@ -const sdk = new Appwrite(); +import { Client, Storage } from "appwrite"; -sdk +const client = new Client(); + +const storage = new Storage(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let result = sdk.storage.getFilePreview('[BUCKET_ID]', '[FILE_ID]'); +const result = storage.getFilePreview('[BUCKET_ID]', '[FILE_ID]'); console.log(result); // Resource URL \ No newline at end of file diff --git a/docs/examples/0.15.x/console-web/examples/storage/get-file-view.md b/docs/examples/0.15.x/console-web/examples/storage/get-file-view.md index eae4e78d6a..7bb6c67d51 100644 --- a/docs/examples/0.15.x/console-web/examples/storage/get-file-view.md +++ b/docs/examples/0.15.x/console-web/examples/storage/get-file-view.md @@ -1,10 +1,14 @@ -const sdk = new Appwrite(); +import { Client, Storage } from "appwrite"; -sdk +const client = new Client(); + +const storage = new Storage(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let result = sdk.storage.getFileView('[BUCKET_ID]', '[FILE_ID]'); +const result = storage.getFileView('[BUCKET_ID]', '[FILE_ID]'); console.log(result); // Resource URL \ No newline at end of file diff --git a/docs/examples/0.15.x/console-web/examples/storage/get-file.md b/docs/examples/0.15.x/console-web/examples/storage/get-file.md index 4a8eb23038..3263865c73 100644 --- a/docs/examples/0.15.x/console-web/examples/storage/get-file.md +++ b/docs/examples/0.15.x/console-web/examples/storage/get-file.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Storage } from "appwrite"; -sdk +const client = new Client(); + +const storage = new Storage(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.storage.getFile('[BUCKET_ID]', '[FILE_ID]'); +const promise = storage.getFile('[BUCKET_ID]', '[FILE_ID]'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/storage/get-usage.md b/docs/examples/0.15.x/console-web/examples/storage/get-usage.md index a232301ba6..a5ce5853e9 100644 --- a/docs/examples/0.15.x/console-web/examples/storage/get-usage.md +++ b/docs/examples/0.15.x/console-web/examples/storage/get-usage.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Storage } from "appwrite"; -sdk +const client = new Client(); + +const storage = new Storage(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.storage.getUsage(); +const promise = storage.getUsage(); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/storage/list-buckets.md b/docs/examples/0.15.x/console-web/examples/storage/list-buckets.md index f44b2d232d..4f916c1536 100644 --- a/docs/examples/0.15.x/console-web/examples/storage/list-buckets.md +++ b/docs/examples/0.15.x/console-web/examples/storage/list-buckets.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Storage } from "appwrite"; -sdk +const client = new Client(); + +const storage = new Storage(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.storage.listBuckets(); +const promise = storage.listBuckets(); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/storage/list-files.md b/docs/examples/0.15.x/console-web/examples/storage/list-files.md index f4a83cd29d..92d75742a5 100644 --- a/docs/examples/0.15.x/console-web/examples/storage/list-files.md +++ b/docs/examples/0.15.x/console-web/examples/storage/list-files.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Storage } from "appwrite"; -sdk +const client = new Client(); + +const storage = new Storage(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.storage.listFiles('[BUCKET_ID]'); +const promise = storage.listFiles('[BUCKET_ID]'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/storage/update-bucket.md b/docs/examples/0.15.x/console-web/examples/storage/update-bucket.md index 06eaf14176..0716a8b2c0 100644 --- a/docs/examples/0.15.x/console-web/examples/storage/update-bucket.md +++ b/docs/examples/0.15.x/console-web/examples/storage/update-bucket.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Storage } from "appwrite"; -sdk +const client = new Client(); + +const storage = new Storage(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.storage.updateBucket('[BUCKET_ID]', '[NAME]', 'file'); +const promise = storage.updateBucket('[BUCKET_ID]', '[NAME]', 'file'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/storage/update-file.md b/docs/examples/0.15.x/console-web/examples/storage/update-file.md index fbb04a9bda..1313e30cff 100644 --- a/docs/examples/0.15.x/console-web/examples/storage/update-file.md +++ b/docs/examples/0.15.x/console-web/examples/storage/update-file.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Storage } from "appwrite"; -sdk +const client = new Client(); + +const storage = new Storage(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.storage.updateFile('[BUCKET_ID]', '[FILE_ID]'); +const promise = storage.updateFile('[BUCKET_ID]', '[FILE_ID]'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/teams/create-membership.md b/docs/examples/0.15.x/console-web/examples/teams/create-membership.md index 68b7f2be17..6cb7d87b7f 100644 --- a/docs/examples/0.15.x/console-web/examples/teams/create-membership.md +++ b/docs/examples/0.15.x/console-web/examples/teams/create-membership.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Teams } from "appwrite"; -sdk +const client = new Client(); + +const teams = new Teams(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.teams.createMembership('[TEAM_ID]', 'email@example.com', [], 'https://example.com'); +const promise = teams.createMembership('[TEAM_ID]', 'email@example.com', [], 'https://example.com'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/teams/create.md b/docs/examples/0.15.x/console-web/examples/teams/create.md index c0b5e6aa06..2c40c9017d 100644 --- a/docs/examples/0.15.x/console-web/examples/teams/create.md +++ b/docs/examples/0.15.x/console-web/examples/teams/create.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Teams } from "appwrite"; -sdk +const client = new Client(); + +const teams = new Teams(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.teams.create('[TEAM_ID]', '[NAME]'); +const promise = teams.create('[TEAM_ID]', '[NAME]'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/teams/delete-membership.md b/docs/examples/0.15.x/console-web/examples/teams/delete-membership.md index 46916ab1f4..828674a86f 100644 --- a/docs/examples/0.15.x/console-web/examples/teams/delete-membership.md +++ b/docs/examples/0.15.x/console-web/examples/teams/delete-membership.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Teams } from "appwrite"; -sdk +const client = new Client(); + +const teams = new Teams(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.teams.deleteMembership('[TEAM_ID]', '[MEMBERSHIP_ID]'); +const promise = teams.deleteMembership('[TEAM_ID]', '[MEMBERSHIP_ID]'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/teams/delete.md b/docs/examples/0.15.x/console-web/examples/teams/delete.md index e04f9f505a..b9b79ed1b7 100644 --- a/docs/examples/0.15.x/console-web/examples/teams/delete.md +++ b/docs/examples/0.15.x/console-web/examples/teams/delete.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Teams } from "appwrite"; -sdk +const client = new Client(); + +const teams = new Teams(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.teams.delete('[TEAM_ID]'); +const promise = teams.delete('[TEAM_ID]'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/teams/get-membership.md b/docs/examples/0.15.x/console-web/examples/teams/get-membership.md index 0ff21ca48e..cce63e7fba 100644 --- a/docs/examples/0.15.x/console-web/examples/teams/get-membership.md +++ b/docs/examples/0.15.x/console-web/examples/teams/get-membership.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Teams } from "appwrite"; -sdk +const client = new Client(); + +const teams = new Teams(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.teams.getMembership('[TEAM_ID]', '[MEMBERSHIP_ID]'); +const promise = teams.getMembership('[TEAM_ID]', '[MEMBERSHIP_ID]'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/teams/get-memberships.md b/docs/examples/0.15.x/console-web/examples/teams/get-memberships.md index c23f190cbe..41c1df2867 100644 --- a/docs/examples/0.15.x/console-web/examples/teams/get-memberships.md +++ b/docs/examples/0.15.x/console-web/examples/teams/get-memberships.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Teams } from "appwrite"; -sdk +const client = new Client(); + +const teams = new Teams(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.teams.getMemberships('[TEAM_ID]'); +const promise = teams.getMemberships('[TEAM_ID]'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/teams/get.md b/docs/examples/0.15.x/console-web/examples/teams/get.md index c05bd59a0b..3a7185319a 100644 --- a/docs/examples/0.15.x/console-web/examples/teams/get.md +++ b/docs/examples/0.15.x/console-web/examples/teams/get.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Teams } from "appwrite"; -sdk +const client = new Client(); + +const teams = new Teams(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.teams.get('[TEAM_ID]'); +const promise = teams.get('[TEAM_ID]'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/teams/list-logs.md b/docs/examples/0.15.x/console-web/examples/teams/list-logs.md index 79ee8e965f..f5120d5b21 100644 --- a/docs/examples/0.15.x/console-web/examples/teams/list-logs.md +++ b/docs/examples/0.15.x/console-web/examples/teams/list-logs.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Teams } from "appwrite"; -sdk +const client = new Client(); + +const teams = new Teams(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.teams.listLogs('[TEAM_ID]'); +const promise = teams.listLogs('[TEAM_ID]'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/teams/list.md b/docs/examples/0.15.x/console-web/examples/teams/list.md index 1e1a974d80..1aea267038 100644 --- a/docs/examples/0.15.x/console-web/examples/teams/list.md +++ b/docs/examples/0.15.x/console-web/examples/teams/list.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Teams } from "appwrite"; -sdk +const client = new Client(); + +const teams = new Teams(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.teams.list(); +const promise = teams.list(); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/teams/update-membership-roles.md b/docs/examples/0.15.x/console-web/examples/teams/update-membership-roles.md index 1d25e2601e..ca76ead1d6 100644 --- a/docs/examples/0.15.x/console-web/examples/teams/update-membership-roles.md +++ b/docs/examples/0.15.x/console-web/examples/teams/update-membership-roles.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Teams } from "appwrite"; -sdk +const client = new Client(); + +const teams = new Teams(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.teams.updateMembershipRoles('[TEAM_ID]', '[MEMBERSHIP_ID]', []); +const promise = teams.updateMembershipRoles('[TEAM_ID]', '[MEMBERSHIP_ID]', []); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/teams/update-membership-status.md b/docs/examples/0.15.x/console-web/examples/teams/update-membership-status.md index 032f162501..4a29cdc116 100644 --- a/docs/examples/0.15.x/console-web/examples/teams/update-membership-status.md +++ b/docs/examples/0.15.x/console-web/examples/teams/update-membership-status.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Teams } from "appwrite"; -sdk +const client = new Client(); + +const teams = new Teams(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.teams.updateMembershipStatus('[TEAM_ID]', '[MEMBERSHIP_ID]', '[USER_ID]', '[SECRET]'); +const promise = teams.updateMembershipStatus('[TEAM_ID]', '[MEMBERSHIP_ID]', '[USER_ID]', '[SECRET]'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/teams/update.md b/docs/examples/0.15.x/console-web/examples/teams/update.md index bcf53d1605..a59cc80000 100644 --- a/docs/examples/0.15.x/console-web/examples/teams/update.md +++ b/docs/examples/0.15.x/console-web/examples/teams/update.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Teams } from "appwrite"; -sdk +const client = new Client(); + +const teams = new Teams(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.teams.update('[TEAM_ID]', '[NAME]'); +const promise = teams.update('[TEAM_ID]', '[NAME]'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/users/create.md b/docs/examples/0.15.x/console-web/examples/users/create.md index 180589f554..8ae12a8581 100644 --- a/docs/examples/0.15.x/console-web/examples/users/create.md +++ b/docs/examples/0.15.x/console-web/examples/users/create.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Users } from "appwrite"; -sdk +const client = new Client(); + +const users = new Users(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.users.create('[USER_ID]', 'email@example.com', 'password'); +const promise = users.create('[USER_ID]', 'email@example.com', 'password'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/users/delete-session.md b/docs/examples/0.15.x/console-web/examples/users/delete-session.md index 12e225032f..90f0f301ff 100644 --- a/docs/examples/0.15.x/console-web/examples/users/delete-session.md +++ b/docs/examples/0.15.x/console-web/examples/users/delete-session.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Users } from "appwrite"; -sdk +const client = new Client(); + +const users = new Users(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.users.deleteSession('[USER_ID]', '[SESSION_ID]'); +const promise = users.deleteSession('[USER_ID]', '[SESSION_ID]'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/users/delete-sessions.md b/docs/examples/0.15.x/console-web/examples/users/delete-sessions.md index df330210fe..3df8c7bdb6 100644 --- a/docs/examples/0.15.x/console-web/examples/users/delete-sessions.md +++ b/docs/examples/0.15.x/console-web/examples/users/delete-sessions.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Users } from "appwrite"; -sdk +const client = new Client(); + +const users = new Users(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.users.deleteSessions('[USER_ID]'); +const promise = users.deleteSessions('[USER_ID]'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/users/delete.md b/docs/examples/0.15.x/console-web/examples/users/delete.md index f9cb4c0e0e..f7c21f3d55 100644 --- a/docs/examples/0.15.x/console-web/examples/users/delete.md +++ b/docs/examples/0.15.x/console-web/examples/users/delete.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Users } from "appwrite"; -sdk +const client = new Client(); + +const users = new Users(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.users.delete('[USER_ID]'); +const promise = users.delete('[USER_ID]'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/users/get-logs.md b/docs/examples/0.15.x/console-web/examples/users/get-logs.md index 7ad392a78b..c75e8bdf89 100644 --- a/docs/examples/0.15.x/console-web/examples/users/get-logs.md +++ b/docs/examples/0.15.x/console-web/examples/users/get-logs.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Users } from "appwrite"; -sdk +const client = new Client(); + +const users = new Users(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.users.getLogs('[USER_ID]'); +const promise = users.getLogs('[USER_ID]'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/users/get-memberships.md b/docs/examples/0.15.x/console-web/examples/users/get-memberships.md index b421e59afc..33571733b0 100644 --- a/docs/examples/0.15.x/console-web/examples/users/get-memberships.md +++ b/docs/examples/0.15.x/console-web/examples/users/get-memberships.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Users } from "appwrite"; -sdk +const client = new Client(); + +const users = new Users(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.users.getMemberships('[USER_ID]'); +const promise = users.getMemberships('[USER_ID]'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/users/get-prefs.md b/docs/examples/0.15.x/console-web/examples/users/get-prefs.md index f3f5d6a3db..959c68c7c0 100644 --- a/docs/examples/0.15.x/console-web/examples/users/get-prefs.md +++ b/docs/examples/0.15.x/console-web/examples/users/get-prefs.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Users } from "appwrite"; -sdk +const client = new Client(); + +const users = new Users(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.users.getPrefs('[USER_ID]'); +const promise = users.getPrefs('[USER_ID]'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/users/get-sessions.md b/docs/examples/0.15.x/console-web/examples/users/get-sessions.md index f50f5221eb..f68b21277b 100644 --- a/docs/examples/0.15.x/console-web/examples/users/get-sessions.md +++ b/docs/examples/0.15.x/console-web/examples/users/get-sessions.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Users } from "appwrite"; -sdk +const client = new Client(); + +const users = new Users(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.users.getSessions('[USER_ID]'); +const promise = users.getSessions('[USER_ID]'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/users/get-usage.md b/docs/examples/0.15.x/console-web/examples/users/get-usage.md index 15464df92a..cca80da32d 100644 --- a/docs/examples/0.15.x/console-web/examples/users/get-usage.md +++ b/docs/examples/0.15.x/console-web/examples/users/get-usage.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Users } from "appwrite"; -sdk +const client = new Client(); + +const users = new Users(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.users.getUsage(); +const promise = users.getUsage(); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/users/get.md b/docs/examples/0.15.x/console-web/examples/users/get.md index 48069a70f2..500263dad6 100644 --- a/docs/examples/0.15.x/console-web/examples/users/get.md +++ b/docs/examples/0.15.x/console-web/examples/users/get.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Users } from "appwrite"; -sdk +const client = new Client(); + +const users = new Users(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.users.get('[USER_ID]'); +const promise = users.get('[USER_ID]'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/users/list.md b/docs/examples/0.15.x/console-web/examples/users/list.md index 4a37dd985d..49838da24d 100644 --- a/docs/examples/0.15.x/console-web/examples/users/list.md +++ b/docs/examples/0.15.x/console-web/examples/users/list.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Users } from "appwrite"; -sdk +const client = new Client(); + +const users = new Users(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.users.list(); +const promise = users.list(); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/users/update-email-verification.md b/docs/examples/0.15.x/console-web/examples/users/update-email-verification.md index 7113d3b053..2abfff8244 100644 --- a/docs/examples/0.15.x/console-web/examples/users/update-email-verification.md +++ b/docs/examples/0.15.x/console-web/examples/users/update-email-verification.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Users } from "appwrite"; -sdk +const client = new Client(); + +const users = new Users(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.users.updateEmailVerification('[USER_ID]', false); +const promise = users.updateEmailVerification('[USER_ID]', false); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/users/update-email.md b/docs/examples/0.15.x/console-web/examples/users/update-email.md index 97236c4b7c..c0427ac6af 100644 --- a/docs/examples/0.15.x/console-web/examples/users/update-email.md +++ b/docs/examples/0.15.x/console-web/examples/users/update-email.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Users } from "appwrite"; -sdk +const client = new Client(); + +const users = new Users(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.users.updateEmail('[USER_ID]', 'email@example.com'); +const promise = users.updateEmail('[USER_ID]', 'email@example.com'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/users/update-name.md b/docs/examples/0.15.x/console-web/examples/users/update-name.md index 332f076fb6..ed13672a5c 100644 --- a/docs/examples/0.15.x/console-web/examples/users/update-name.md +++ b/docs/examples/0.15.x/console-web/examples/users/update-name.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Users } from "appwrite"; -sdk +const client = new Client(); + +const users = new Users(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.users.updateName('[USER_ID]', '[NAME]'); +const promise = users.updateName('[USER_ID]', '[NAME]'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/users/update-password.md b/docs/examples/0.15.x/console-web/examples/users/update-password.md index d2647ca200..e13d9bcafa 100644 --- a/docs/examples/0.15.x/console-web/examples/users/update-password.md +++ b/docs/examples/0.15.x/console-web/examples/users/update-password.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Users } from "appwrite"; -sdk +const client = new Client(); + +const users = new Users(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.users.updatePassword('[USER_ID]', 'password'); +const promise = users.updatePassword('[USER_ID]', 'password'); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/users/update-phone-verification.md b/docs/examples/0.15.x/console-web/examples/users/update-phone-verification.md index c48736fa34..63edc56cab 100644 --- a/docs/examples/0.15.x/console-web/examples/users/update-phone-verification.md +++ b/docs/examples/0.15.x/console-web/examples/users/update-phone-verification.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Users } from "appwrite"; -sdk +const client = new Client(); + +const users = new Users(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.users.updatePhoneVerification('[USER_ID]', false); +const promise = users.updatePhoneVerification('[USER_ID]', false); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/users/update-phone.md b/docs/examples/0.15.x/console-web/examples/users/update-phone.md index 654ffb038a..593570d73b 100644 --- a/docs/examples/0.15.x/console-web/examples/users/update-phone.md +++ b/docs/examples/0.15.x/console-web/examples/users/update-phone.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Users } from "appwrite"; -sdk +const client = new Client(); + +const users = new Users(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.users.updatePhone('[USER_ID]', ''); +const promise = users.updatePhone('[USER_ID]', ''); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/users/update-prefs.md b/docs/examples/0.15.x/console-web/examples/users/update-prefs.md index d6abb5914d..d1d0a8b1ec 100644 --- a/docs/examples/0.15.x/console-web/examples/users/update-prefs.md +++ b/docs/examples/0.15.x/console-web/examples/users/update-prefs.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Users } from "appwrite"; -sdk +const client = new Client(); + +const users = new Users(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.users.updatePrefs('[USER_ID]', {}); +const promise = users.updatePrefs('[USER_ID]', {}); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/users/update-status.md b/docs/examples/0.15.x/console-web/examples/users/update-status.md index 00b94ba3eb..189cbca6d4 100644 --- a/docs/examples/0.15.x/console-web/examples/users/update-status.md +++ b/docs/examples/0.15.x/console-web/examples/users/update-status.md @@ -1,11 +1,15 @@ -const sdk = new Appwrite(); +import { Client, Users } from "appwrite"; -sdk +const client = new Client(); + +const users = new Users(client); + +client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; -let promise = sdk.users.updateStatus('[USER_ID]', false); +const promise = users.updateStatus('[USER_ID]', false); promise.then(function (response) { console.log(response); // Success diff --git a/docs/examples/0.15.x/console-web/examples/users/update-verification.md b/docs/examples/0.15.x/console-web/examples/users/update-verification.md deleted file mode 100644 index a07f9e8433..0000000000 --- a/docs/examples/0.15.x/console-web/examples/users/update-verification.md +++ /dev/null @@ -1,14 +0,0 @@ -const sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.users.updateVerification('[USER_ID]', false); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/docs/examples/0.15.x/server-dart/examples/database/create-boolean-attribute.md b/docs/examples/0.15.x/server-dart/examples/database/create-boolean-attribute.md deleted file mode 100644 index 81e66e1ab6..0000000000 --- a/docs/examples/0.15.x/server-dart/examples/database/create-boolean-attribute.md +++ /dev/null @@ -1,25 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Database database = Database(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key - ; - - Future result = database.createBooleanAttribute( - collectionId: '[COLLECTION_ID]', - key: '', - required: false, - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/docs/examples/0.15.x/server-dart/examples/database/create-collection.md b/docs/examples/0.15.x/server-dart/examples/database/create-collection.md deleted file mode 100644 index aff5643ff5..0000000000 --- a/docs/examples/0.15.x/server-dart/examples/database/create-collection.md +++ /dev/null @@ -1,27 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Database database = Database(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key - ; - - Future result = database.createCollection( - collectionId: '[COLLECTION_ID]', - name: '[NAME]', - permission: 'document', - read: ["role:all"], - write: ["role:all"], - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/docs/examples/0.15.x/server-dart/examples/database/create-document.md b/docs/examples/0.15.x/server-dart/examples/database/create-document.md deleted file mode 100644 index 2775f740ab..0000000000 --- a/docs/examples/0.15.x/server-dart/examples/database/create-document.md +++ /dev/null @@ -1,25 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Database database = Database(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key - ; - - Future result = database.createDocument( - collectionId: '[COLLECTION_ID]', - documentId: '[DOCUMENT_ID]', - data: {}, - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/docs/examples/0.15.x/server-dart/examples/database/create-email-attribute.md b/docs/examples/0.15.x/server-dart/examples/database/create-email-attribute.md deleted file mode 100644 index d0eca5cc73..0000000000 --- a/docs/examples/0.15.x/server-dart/examples/database/create-email-attribute.md +++ /dev/null @@ -1,25 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Database database = Database(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key - ; - - Future result = database.createEmailAttribute( - collectionId: '[COLLECTION_ID]', - key: '', - required: false, - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/docs/examples/0.15.x/server-dart/examples/database/create-enum-attribute.md b/docs/examples/0.15.x/server-dart/examples/database/create-enum-attribute.md deleted file mode 100644 index d50c76efb3..0000000000 --- a/docs/examples/0.15.x/server-dart/examples/database/create-enum-attribute.md +++ /dev/null @@ -1,26 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Database database = Database(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key - ; - - Future result = database.createEnumAttribute( - collectionId: '[COLLECTION_ID]', - key: '', - elements: [], - required: false, - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/docs/examples/0.15.x/server-dart/examples/database/create-float-attribute.md b/docs/examples/0.15.x/server-dart/examples/database/create-float-attribute.md deleted file mode 100644 index 5fa831b682..0000000000 --- a/docs/examples/0.15.x/server-dart/examples/database/create-float-attribute.md +++ /dev/null @@ -1,25 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Database database = Database(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key - ; - - Future result = database.createFloatAttribute( - collectionId: '[COLLECTION_ID]', - key: '', - required: false, - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/docs/examples/0.15.x/server-dart/examples/database/create-index.md b/docs/examples/0.15.x/server-dart/examples/database/create-index.md deleted file mode 100644 index 41b118d6af..0000000000 --- a/docs/examples/0.15.x/server-dart/examples/database/create-index.md +++ /dev/null @@ -1,26 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Database database = Database(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key - ; - - Future result = database.createIndex( - collectionId: '[COLLECTION_ID]', - key: '', - type: 'key', - attributes: [], - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/docs/examples/0.15.x/server-dart/examples/database/create-integer-attribute.md b/docs/examples/0.15.x/server-dart/examples/database/create-integer-attribute.md deleted file mode 100644 index 161a5c9812..0000000000 --- a/docs/examples/0.15.x/server-dart/examples/database/create-integer-attribute.md +++ /dev/null @@ -1,25 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Database database = Database(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key - ; - - Future result = database.createIntegerAttribute( - collectionId: '[COLLECTION_ID]', - key: '', - required: false, - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/docs/examples/0.15.x/server-dart/examples/database/create-ip-attribute.md b/docs/examples/0.15.x/server-dart/examples/database/create-ip-attribute.md deleted file mode 100644 index 94990f9cf1..0000000000 --- a/docs/examples/0.15.x/server-dart/examples/database/create-ip-attribute.md +++ /dev/null @@ -1,25 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Database database = Database(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key - ; - - Future result = database.createIpAttribute( - collectionId: '[COLLECTION_ID]', - key: '', - required: false, - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/docs/examples/0.15.x/server-dart/examples/database/create-string-attribute.md b/docs/examples/0.15.x/server-dart/examples/database/create-string-attribute.md deleted file mode 100644 index e9119e11c0..0000000000 --- a/docs/examples/0.15.x/server-dart/examples/database/create-string-attribute.md +++ /dev/null @@ -1,26 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Database database = Database(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key - ; - - Future result = database.createStringAttribute( - collectionId: '[COLLECTION_ID]', - key: '', - size: 1, - required: false, - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/docs/examples/0.15.x/server-dart/examples/database/create-url-attribute.md b/docs/examples/0.15.x/server-dart/examples/database/create-url-attribute.md deleted file mode 100644 index 3bea728890..0000000000 --- a/docs/examples/0.15.x/server-dart/examples/database/create-url-attribute.md +++ /dev/null @@ -1,25 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Database database = Database(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key - ; - - Future result = database.createUrlAttribute( - collectionId: '[COLLECTION_ID]', - key: '', - required: false, - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/docs/examples/0.15.x/server-dart/examples/database/delete-attribute.md b/docs/examples/0.15.x/server-dart/examples/database/delete-attribute.md deleted file mode 100644 index 50d5f345c7..0000000000 --- a/docs/examples/0.15.x/server-dart/examples/database/delete-attribute.md +++ /dev/null @@ -1,24 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Database database = Database(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key - ; - - Future result = database.deleteAttribute( - collectionId: '[COLLECTION_ID]', - key: '', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/docs/examples/0.15.x/server-dart/examples/database/delete-collection.md b/docs/examples/0.15.x/server-dart/examples/database/delete-collection.md deleted file mode 100644 index 6543cc1491..0000000000 --- a/docs/examples/0.15.x/server-dart/examples/database/delete-collection.md +++ /dev/null @@ -1,23 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Database database = Database(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key - ; - - Future result = database.deleteCollection( - collectionId: '[COLLECTION_ID]', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/docs/examples/0.15.x/server-dart/examples/database/delete-document.md b/docs/examples/0.15.x/server-dart/examples/database/delete-document.md deleted file mode 100644 index 89204f6d81..0000000000 --- a/docs/examples/0.15.x/server-dart/examples/database/delete-document.md +++ /dev/null @@ -1,24 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Database database = Database(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key - ; - - Future result = database.deleteDocument( - collectionId: '[COLLECTION_ID]', - documentId: '[DOCUMENT_ID]', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/docs/examples/0.15.x/server-dart/examples/database/delete-index.md b/docs/examples/0.15.x/server-dart/examples/database/delete-index.md deleted file mode 100644 index fe6cd43f11..0000000000 --- a/docs/examples/0.15.x/server-dart/examples/database/delete-index.md +++ /dev/null @@ -1,24 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Database database = Database(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key - ; - - Future result = database.deleteIndex( - collectionId: '[COLLECTION_ID]', - key: '', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/docs/examples/0.15.x/server-dart/examples/database/get-attribute.md b/docs/examples/0.15.x/server-dart/examples/database/get-attribute.md deleted file mode 100644 index 41a0fbee21..0000000000 --- a/docs/examples/0.15.x/server-dart/examples/database/get-attribute.md +++ /dev/null @@ -1,24 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Database database = Database(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key - ; - - Future result = database.getAttribute( - collectionId: '[COLLECTION_ID]', - key: '', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/docs/examples/0.15.x/server-dart/examples/database/get-collection.md b/docs/examples/0.15.x/server-dart/examples/database/get-collection.md deleted file mode 100644 index 6b0cb526ca..0000000000 --- a/docs/examples/0.15.x/server-dart/examples/database/get-collection.md +++ /dev/null @@ -1,23 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Database database = Database(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key - ; - - Future result = database.getCollection( - collectionId: '[COLLECTION_ID]', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/docs/examples/0.15.x/server-dart/examples/database/get-document.md b/docs/examples/0.15.x/server-dart/examples/database/get-document.md deleted file mode 100644 index efe007aadf..0000000000 --- a/docs/examples/0.15.x/server-dart/examples/database/get-document.md +++ /dev/null @@ -1,24 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Database database = Database(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key - ; - - Future result = database.getDocument( - collectionId: '[COLLECTION_ID]', - documentId: '[DOCUMENT_ID]', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/docs/examples/0.15.x/server-dart/examples/database/get-index.md b/docs/examples/0.15.x/server-dart/examples/database/get-index.md deleted file mode 100644 index 736e860f30..0000000000 --- a/docs/examples/0.15.x/server-dart/examples/database/get-index.md +++ /dev/null @@ -1,24 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Database database = Database(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key - ; - - Future result = database.getIndex( - collectionId: '[COLLECTION_ID]', - key: '', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/docs/examples/0.15.x/server-dart/examples/database/list-attributes.md b/docs/examples/0.15.x/server-dart/examples/database/list-attributes.md deleted file mode 100644 index ffbc556e71..0000000000 --- a/docs/examples/0.15.x/server-dart/examples/database/list-attributes.md +++ /dev/null @@ -1,23 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Database database = Database(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key - ; - - Future result = database.listAttributes( - collectionId: '[COLLECTION_ID]', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/docs/examples/0.15.x/server-dart/examples/database/list-collections.md b/docs/examples/0.15.x/server-dart/examples/database/list-collections.md deleted file mode 100644 index aecd08a54a..0000000000 --- a/docs/examples/0.15.x/server-dart/examples/database/list-collections.md +++ /dev/null @@ -1,22 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Database database = Database(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key - ; - - Future result = database.listCollections( - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/docs/examples/0.15.x/server-dart/examples/database/list-documents.md b/docs/examples/0.15.x/server-dart/examples/database/list-documents.md deleted file mode 100644 index 9323fd34be..0000000000 --- a/docs/examples/0.15.x/server-dart/examples/database/list-documents.md +++ /dev/null @@ -1,23 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Database database = Database(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key - ; - - Future result = database.listDocuments( - collectionId: '[COLLECTION_ID]', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/docs/examples/0.15.x/server-dart/examples/database/list-indexes.md b/docs/examples/0.15.x/server-dart/examples/database/list-indexes.md deleted file mode 100644 index 3f22632bc7..0000000000 --- a/docs/examples/0.15.x/server-dart/examples/database/list-indexes.md +++ /dev/null @@ -1,23 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Database database = Database(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key - ; - - Future result = database.listIndexes( - collectionId: '[COLLECTION_ID]', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/docs/examples/0.15.x/server-dart/examples/database/update-collection.md b/docs/examples/0.15.x/server-dart/examples/database/update-collection.md deleted file mode 100644 index 7430ef8673..0000000000 --- a/docs/examples/0.15.x/server-dart/examples/database/update-collection.md +++ /dev/null @@ -1,25 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Database database = Database(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key - ; - - Future result = database.updateCollection( - collectionId: '[COLLECTION_ID]', - name: '[NAME]', - permission: 'document', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/docs/examples/0.15.x/server-dart/examples/database/update-document.md b/docs/examples/0.15.x/server-dart/examples/database/update-document.md deleted file mode 100644 index b2c78752e5..0000000000 --- a/docs/examples/0.15.x/server-dart/examples/database/update-document.md +++ /dev/null @@ -1,25 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Database database = Database(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key - ; - - Future result = database.updateDocument( - collectionId: '[COLLECTION_ID]', - documentId: '[DOCUMENT_ID]', - data: {}, - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/docs/examples/0.15.x/server-deno/examples/database/create-boolean-attribute.md b/docs/examples/0.15.x/server-deno/examples/database/create-boolean-attribute.md deleted file mode 100644 index b332758ef3..0000000000 --- a/docs/examples/0.15.x/server-deno/examples/database/create-boolean-attribute.md +++ /dev/null @@ -1,21 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let database = new sdk.Database(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = database.createBooleanAttribute('[COLLECTION_ID]', '', false); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/docs/examples/0.15.x/server-deno/examples/database/create-collection.md b/docs/examples/0.15.x/server-deno/examples/database/create-collection.md deleted file mode 100644 index 9646b8c0a4..0000000000 --- a/docs/examples/0.15.x/server-deno/examples/database/create-collection.md +++ /dev/null @@ -1,21 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let database = new sdk.Database(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = database.createCollection('[COLLECTION_ID]', '[NAME]', 'document', ["role:all"], ["role:all"]); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/docs/examples/0.15.x/server-deno/examples/database/create-document.md b/docs/examples/0.15.x/server-deno/examples/database/create-document.md deleted file mode 100644 index 5180caf05c..0000000000 --- a/docs/examples/0.15.x/server-deno/examples/database/create-document.md +++ /dev/null @@ -1,21 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let database = new sdk.Database(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = database.createDocument('[COLLECTION_ID]', '[DOCUMENT_ID]', {}); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/docs/examples/0.15.x/server-deno/examples/database/create-email-attribute.md b/docs/examples/0.15.x/server-deno/examples/database/create-email-attribute.md deleted file mode 100644 index 0b192f60cc..0000000000 --- a/docs/examples/0.15.x/server-deno/examples/database/create-email-attribute.md +++ /dev/null @@ -1,21 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let database = new sdk.Database(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = database.createEmailAttribute('[COLLECTION_ID]', '', false); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/docs/examples/0.15.x/server-deno/examples/database/create-enum-attribute.md b/docs/examples/0.15.x/server-deno/examples/database/create-enum-attribute.md deleted file mode 100644 index 7b30a6139f..0000000000 --- a/docs/examples/0.15.x/server-deno/examples/database/create-enum-attribute.md +++ /dev/null @@ -1,21 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let database = new sdk.Database(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = database.createEnumAttribute('[COLLECTION_ID]', '', [], false); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/docs/examples/0.15.x/server-deno/examples/database/create-float-attribute.md b/docs/examples/0.15.x/server-deno/examples/database/create-float-attribute.md deleted file mode 100644 index 75a8afc0a5..0000000000 --- a/docs/examples/0.15.x/server-deno/examples/database/create-float-attribute.md +++ /dev/null @@ -1,21 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let database = new sdk.Database(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = database.createFloatAttribute('[COLLECTION_ID]', '', false); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/docs/examples/0.15.x/server-deno/examples/database/create-index.md b/docs/examples/0.15.x/server-deno/examples/database/create-index.md deleted file mode 100644 index f519d1f4bb..0000000000 --- a/docs/examples/0.15.x/server-deno/examples/database/create-index.md +++ /dev/null @@ -1,21 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let database = new sdk.Database(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = database.createIndex('[COLLECTION_ID]', '', 'key', []); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/docs/examples/0.15.x/server-deno/examples/database/create-integer-attribute.md b/docs/examples/0.15.x/server-deno/examples/database/create-integer-attribute.md deleted file mode 100644 index ef09167d6f..0000000000 --- a/docs/examples/0.15.x/server-deno/examples/database/create-integer-attribute.md +++ /dev/null @@ -1,21 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let database = new sdk.Database(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = database.createIntegerAttribute('[COLLECTION_ID]', '', false); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/docs/examples/0.15.x/server-deno/examples/database/create-ip-attribute.md b/docs/examples/0.15.x/server-deno/examples/database/create-ip-attribute.md deleted file mode 100644 index c4daa5508e..0000000000 --- a/docs/examples/0.15.x/server-deno/examples/database/create-ip-attribute.md +++ /dev/null @@ -1,21 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let database = new sdk.Database(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = database.createIpAttribute('[COLLECTION_ID]', '', false); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/docs/examples/0.15.x/server-deno/examples/database/create-string-attribute.md b/docs/examples/0.15.x/server-deno/examples/database/create-string-attribute.md deleted file mode 100644 index 57b310105f..0000000000 --- a/docs/examples/0.15.x/server-deno/examples/database/create-string-attribute.md +++ /dev/null @@ -1,21 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let database = new sdk.Database(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = database.createStringAttribute('[COLLECTION_ID]', '', 1, false); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/docs/examples/0.15.x/server-deno/examples/database/create-url-attribute.md b/docs/examples/0.15.x/server-deno/examples/database/create-url-attribute.md deleted file mode 100644 index f298e07baa..0000000000 --- a/docs/examples/0.15.x/server-deno/examples/database/create-url-attribute.md +++ /dev/null @@ -1,21 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let database = new sdk.Database(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = database.createUrlAttribute('[COLLECTION_ID]', '', false); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/docs/examples/0.15.x/server-deno/examples/database/delete-attribute.md b/docs/examples/0.15.x/server-deno/examples/database/delete-attribute.md deleted file mode 100644 index e817850cc9..0000000000 --- a/docs/examples/0.15.x/server-deno/examples/database/delete-attribute.md +++ /dev/null @@ -1,21 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let database = new sdk.Database(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = database.deleteAttribute('[COLLECTION_ID]', ''); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/docs/examples/0.15.x/server-deno/examples/database/delete-collection.md b/docs/examples/0.15.x/server-deno/examples/database/delete-collection.md deleted file mode 100644 index d62c8d0974..0000000000 --- a/docs/examples/0.15.x/server-deno/examples/database/delete-collection.md +++ /dev/null @@ -1,21 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let database = new sdk.Database(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = database.deleteCollection('[COLLECTION_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/docs/examples/0.15.x/server-deno/examples/database/delete-document.md b/docs/examples/0.15.x/server-deno/examples/database/delete-document.md deleted file mode 100644 index 558a4bbe67..0000000000 --- a/docs/examples/0.15.x/server-deno/examples/database/delete-document.md +++ /dev/null @@ -1,21 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let database = new sdk.Database(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = database.deleteDocument('[COLLECTION_ID]', '[DOCUMENT_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/docs/examples/0.15.x/server-deno/examples/database/delete-index.md b/docs/examples/0.15.x/server-deno/examples/database/delete-index.md deleted file mode 100644 index 87bf839b82..0000000000 --- a/docs/examples/0.15.x/server-deno/examples/database/delete-index.md +++ /dev/null @@ -1,21 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let database = new sdk.Database(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = database.deleteIndex('[COLLECTION_ID]', ''); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/docs/examples/0.15.x/server-deno/examples/database/get-attribute.md b/docs/examples/0.15.x/server-deno/examples/database/get-attribute.md deleted file mode 100644 index fc2e6227c6..0000000000 --- a/docs/examples/0.15.x/server-deno/examples/database/get-attribute.md +++ /dev/null @@ -1,21 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let database = new sdk.Database(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = database.getAttribute('[COLLECTION_ID]', ''); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/docs/examples/0.15.x/server-deno/examples/database/get-collection.md b/docs/examples/0.15.x/server-deno/examples/database/get-collection.md deleted file mode 100644 index 0ca917a3c3..0000000000 --- a/docs/examples/0.15.x/server-deno/examples/database/get-collection.md +++ /dev/null @@ -1,21 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let database = new sdk.Database(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = database.getCollection('[COLLECTION_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/docs/examples/0.15.x/server-deno/examples/database/get-document.md b/docs/examples/0.15.x/server-deno/examples/database/get-document.md deleted file mode 100644 index 59ec5e4141..0000000000 --- a/docs/examples/0.15.x/server-deno/examples/database/get-document.md +++ /dev/null @@ -1,21 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let database = new sdk.Database(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = database.getDocument('[COLLECTION_ID]', '[DOCUMENT_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/docs/examples/0.15.x/server-deno/examples/database/get-index.md b/docs/examples/0.15.x/server-deno/examples/database/get-index.md deleted file mode 100644 index af51b343fe..0000000000 --- a/docs/examples/0.15.x/server-deno/examples/database/get-index.md +++ /dev/null @@ -1,21 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let database = new sdk.Database(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = database.getIndex('[COLLECTION_ID]', ''); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/docs/examples/0.15.x/server-deno/examples/database/list-attributes.md b/docs/examples/0.15.x/server-deno/examples/database/list-attributes.md deleted file mode 100644 index 65ad1b197e..0000000000 --- a/docs/examples/0.15.x/server-deno/examples/database/list-attributes.md +++ /dev/null @@ -1,21 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let database = new sdk.Database(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = database.listAttributes('[COLLECTION_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/docs/examples/0.15.x/server-deno/examples/database/list-collections.md b/docs/examples/0.15.x/server-deno/examples/database/list-collections.md deleted file mode 100644 index 0bb6bf1679..0000000000 --- a/docs/examples/0.15.x/server-deno/examples/database/list-collections.md +++ /dev/null @@ -1,21 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let database = new sdk.Database(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = database.listCollections(); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/docs/examples/0.15.x/server-deno/examples/database/list-documents.md b/docs/examples/0.15.x/server-deno/examples/database/list-documents.md deleted file mode 100644 index ead202aaa9..0000000000 --- a/docs/examples/0.15.x/server-deno/examples/database/list-documents.md +++ /dev/null @@ -1,21 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let database = new sdk.Database(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = database.listDocuments('[COLLECTION_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/docs/examples/0.15.x/server-deno/examples/database/list-indexes.md b/docs/examples/0.15.x/server-deno/examples/database/list-indexes.md deleted file mode 100644 index aff6da5698..0000000000 --- a/docs/examples/0.15.x/server-deno/examples/database/list-indexes.md +++ /dev/null @@ -1,21 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let database = new sdk.Database(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = database.listIndexes('[COLLECTION_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/docs/examples/0.15.x/server-deno/examples/database/update-collection.md b/docs/examples/0.15.x/server-deno/examples/database/update-collection.md deleted file mode 100644 index c105fe1204..0000000000 --- a/docs/examples/0.15.x/server-deno/examples/database/update-collection.md +++ /dev/null @@ -1,21 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let database = new sdk.Database(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = database.updateCollection('[COLLECTION_ID]', '[NAME]', 'document'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/docs/examples/0.15.x/server-deno/examples/database/update-document.md b/docs/examples/0.15.x/server-deno/examples/database/update-document.md deleted file mode 100644 index de19da7f7d..0000000000 --- a/docs/examples/0.15.x/server-deno/examples/database/update-document.md +++ /dev/null @@ -1,21 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let database = new sdk.Database(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = database.updateDocument('[COLLECTION_ID]', '[DOCUMENT_ID]', {}); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/docs/examples/0.15.x/server-kotlin/java/database/create-boolean-attribute.md b/docs/examples/0.15.x/server-kotlin/java/database/create-boolean-attribute.md deleted file mode 100644 index 1ab665e341..0000000000 --- a/docs/examples/0.15.x/server-kotlin/java/database/create-boolean-attribute.md +++ /dev/null @@ -1,38 +0,0 @@ -import io.appwrite.Client -import io.appwrite.services.Database - -public void main() { - Client client = Client(context) - .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject("5df5acd0d48c2") // Your project ID - .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key - - Database database = new Database(client); - database.createBooleanAttribute( - collectionId = "[COLLECTION_ID]", - key = "", - required = false, - new Continuation() { - @NotNull - @Override - public CoroutineContext getContext() { - return EmptyCoroutineContext.INSTANCE; - } - - @Override - public void resumeWith(@NotNull Object o) { - String json = ""; - try { - if (o instanceof Result.Failure) { - Result.Failure failure = (Result.Failure) o; - throw failure.exception; - } else { - Response response = (Response) o; - } - } catch (Throwable th) { - Log.e("ERROR", th.toString()); - } - } - } - ); -} \ No newline at end of file diff --git a/docs/examples/0.15.x/server-kotlin/java/database/create-collection.md b/docs/examples/0.15.x/server-kotlin/java/database/create-collection.md deleted file mode 100644 index c028333c88..0000000000 --- a/docs/examples/0.15.x/server-kotlin/java/database/create-collection.md +++ /dev/null @@ -1,40 +0,0 @@ -import io.appwrite.Client -import io.appwrite.services.Database - -public void main() { - Client client = Client(context) - .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject("5df5acd0d48c2") // Your project ID - .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key - - Database database = new Database(client); - database.createCollection( - collectionId = "[COLLECTION_ID]", - name = "[NAME]", - permission = "document", - read = ["role:all"], - write = ["role:all"] - new Continuation() { - @NotNull - @Override - public CoroutineContext getContext() { - return EmptyCoroutineContext.INSTANCE; - } - - @Override - public void resumeWith(@NotNull Object o) { - String json = ""; - try { - if (o instanceof Result.Failure) { - Result.Failure failure = (Result.Failure) o; - throw failure.exception; - } else { - Response response = (Response) o; - } - } catch (Throwable th) { - Log.e("ERROR", th.toString()); - } - } - } - ); -} \ No newline at end of file diff --git a/docs/examples/0.15.x/server-kotlin/java/database/create-document.md b/docs/examples/0.15.x/server-kotlin/java/database/create-document.md deleted file mode 100644 index 45d80217d1..0000000000 --- a/docs/examples/0.15.x/server-kotlin/java/database/create-document.md +++ /dev/null @@ -1,38 +0,0 @@ -import io.appwrite.Client -import io.appwrite.services.Database - -public void main() { - Client client = Client(context) - .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject("5df5acd0d48c2") // Your project ID - .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key - - Database database = new Database(client); - database.createDocument( - collectionId = "[COLLECTION_ID]", - documentId = "[DOCUMENT_ID]", - data = mapOf( "a" to "b" ), - new Continuation() { - @NotNull - @Override - public CoroutineContext getContext() { - return EmptyCoroutineContext.INSTANCE; - } - - @Override - public void resumeWith(@NotNull Object o) { - String json = ""; - try { - if (o instanceof Result.Failure) { - Result.Failure failure = (Result.Failure) o; - throw failure.exception; - } else { - Response response = (Response) o; - } - } catch (Throwable th) { - Log.e("ERROR", th.toString()); - } - } - } - ); -} \ No newline at end of file diff --git a/docs/examples/0.15.x/server-kotlin/java/database/create-email-attribute.md b/docs/examples/0.15.x/server-kotlin/java/database/create-email-attribute.md deleted file mode 100644 index 82d5b3f891..0000000000 --- a/docs/examples/0.15.x/server-kotlin/java/database/create-email-attribute.md +++ /dev/null @@ -1,38 +0,0 @@ -import io.appwrite.Client -import io.appwrite.services.Database - -public void main() { - Client client = Client(context) - .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject("5df5acd0d48c2") // Your project ID - .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key - - Database database = new Database(client); - database.createEmailAttribute( - collectionId = "[COLLECTION_ID]", - key = "", - required = false, - new Continuation() { - @NotNull - @Override - public CoroutineContext getContext() { - return EmptyCoroutineContext.INSTANCE; - } - - @Override - public void resumeWith(@NotNull Object o) { - String json = ""; - try { - if (o instanceof Result.Failure) { - Result.Failure failure = (Result.Failure) o; - throw failure.exception; - } else { - Response response = (Response) o; - } - } catch (Throwable th) { - Log.e("ERROR", th.toString()); - } - } - } - ); -} \ No newline at end of file diff --git a/docs/examples/0.15.x/server-kotlin/java/database/create-enum-attribute.md b/docs/examples/0.15.x/server-kotlin/java/database/create-enum-attribute.md deleted file mode 100644 index 37c1a760b0..0000000000 --- a/docs/examples/0.15.x/server-kotlin/java/database/create-enum-attribute.md +++ /dev/null @@ -1,39 +0,0 @@ -import io.appwrite.Client -import io.appwrite.services.Database - -public void main() { - Client client = Client(context) - .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject("5df5acd0d48c2") // Your project ID - .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key - - Database database = new Database(client); - database.createEnumAttribute( - collectionId = "[COLLECTION_ID]", - key = "", - elements = listOf(), - required = false, - new Continuation() { - @NotNull - @Override - public CoroutineContext getContext() { - return EmptyCoroutineContext.INSTANCE; - } - - @Override - public void resumeWith(@NotNull Object o) { - String json = ""; - try { - if (o instanceof Result.Failure) { - Result.Failure failure = (Result.Failure) o; - throw failure.exception; - } else { - Response response = (Response) o; - } - } catch (Throwable th) { - Log.e("ERROR", th.toString()); - } - } - } - ); -} \ No newline at end of file diff --git a/docs/examples/0.15.x/server-kotlin/java/database/create-float-attribute.md b/docs/examples/0.15.x/server-kotlin/java/database/create-float-attribute.md deleted file mode 100644 index 57014cfb1c..0000000000 --- a/docs/examples/0.15.x/server-kotlin/java/database/create-float-attribute.md +++ /dev/null @@ -1,38 +0,0 @@ -import io.appwrite.Client -import io.appwrite.services.Database - -public void main() { - Client client = Client(context) - .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject("5df5acd0d48c2") // Your project ID - .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key - - Database database = new Database(client); - database.createFloatAttribute( - collectionId = "[COLLECTION_ID]", - key = "", - required = false, - new Continuation() { - @NotNull - @Override - public CoroutineContext getContext() { - return EmptyCoroutineContext.INSTANCE; - } - - @Override - public void resumeWith(@NotNull Object o) { - String json = ""; - try { - if (o instanceof Result.Failure) { - Result.Failure failure = (Result.Failure) o; - throw failure.exception; - } else { - Response response = (Response) o; - } - } catch (Throwable th) { - Log.e("ERROR", th.toString()); - } - } - } - ); -} \ No newline at end of file diff --git a/docs/examples/0.15.x/server-kotlin/java/database/create-index.md b/docs/examples/0.15.x/server-kotlin/java/database/create-index.md deleted file mode 100644 index fd1cbfe992..0000000000 --- a/docs/examples/0.15.x/server-kotlin/java/database/create-index.md +++ /dev/null @@ -1,39 +0,0 @@ -import io.appwrite.Client -import io.appwrite.services.Database - -public void main() { - Client client = Client(context) - .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject("5df5acd0d48c2") // Your project ID - .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key - - Database database = new Database(client); - database.createIndex( - collectionId = "[COLLECTION_ID]", - key = "", - type = "key", - attributes = listOf(), - new Continuation() { - @NotNull - @Override - public CoroutineContext getContext() { - return EmptyCoroutineContext.INSTANCE; - } - - @Override - public void resumeWith(@NotNull Object o) { - String json = ""; - try { - if (o instanceof Result.Failure) { - Result.Failure failure = (Result.Failure) o; - throw failure.exception; - } else { - Response response = (Response) o; - } - } catch (Throwable th) { - Log.e("ERROR", th.toString()); - } - } - } - ); -} \ No newline at end of file diff --git a/docs/examples/0.15.x/server-kotlin/java/database/create-integer-attribute.md b/docs/examples/0.15.x/server-kotlin/java/database/create-integer-attribute.md deleted file mode 100644 index b3aef2296b..0000000000 --- a/docs/examples/0.15.x/server-kotlin/java/database/create-integer-attribute.md +++ /dev/null @@ -1,38 +0,0 @@ -import io.appwrite.Client -import io.appwrite.services.Database - -public void main() { - Client client = Client(context) - .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject("5df5acd0d48c2") // Your project ID - .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key - - Database database = new Database(client); - database.createIntegerAttribute( - collectionId = "[COLLECTION_ID]", - key = "", - required = false, - new Continuation() { - @NotNull - @Override - public CoroutineContext getContext() { - return EmptyCoroutineContext.INSTANCE; - } - - @Override - public void resumeWith(@NotNull Object o) { - String json = ""; - try { - if (o instanceof Result.Failure) { - Result.Failure failure = (Result.Failure) o; - throw failure.exception; - } else { - Response response = (Response) o; - } - } catch (Throwable th) { - Log.e("ERROR", th.toString()); - } - } - } - ); -} \ No newline at end of file diff --git a/docs/examples/0.15.x/server-kotlin/java/database/create-ip-attribute.md b/docs/examples/0.15.x/server-kotlin/java/database/create-ip-attribute.md deleted file mode 100644 index 6cf941f05a..0000000000 --- a/docs/examples/0.15.x/server-kotlin/java/database/create-ip-attribute.md +++ /dev/null @@ -1,38 +0,0 @@ -import io.appwrite.Client -import io.appwrite.services.Database - -public void main() { - Client client = Client(context) - .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject("5df5acd0d48c2") // Your project ID - .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key - - Database database = new Database(client); - database.createIpAttribute( - collectionId = "[COLLECTION_ID]", - key = "", - required = false, - new Continuation() { - @NotNull - @Override - public CoroutineContext getContext() { - return EmptyCoroutineContext.INSTANCE; - } - - @Override - public void resumeWith(@NotNull Object o) { - String json = ""; - try { - if (o instanceof Result.Failure) { - Result.Failure failure = (Result.Failure) o; - throw failure.exception; - } else { - Response response = (Response) o; - } - } catch (Throwable th) { - Log.e("ERROR", th.toString()); - } - } - } - ); -} \ No newline at end of file diff --git a/docs/examples/0.15.x/server-kotlin/java/database/create-string-attribute.md b/docs/examples/0.15.x/server-kotlin/java/database/create-string-attribute.md deleted file mode 100644 index 05492e9f76..0000000000 --- a/docs/examples/0.15.x/server-kotlin/java/database/create-string-attribute.md +++ /dev/null @@ -1,39 +0,0 @@ -import io.appwrite.Client -import io.appwrite.services.Database - -public void main() { - Client client = Client(context) - .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject("5df5acd0d48c2") // Your project ID - .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key - - Database database = new Database(client); - database.createStringAttribute( - collectionId = "[COLLECTION_ID]", - key = "", - size = 1, - required = false, - new Continuation() { - @NotNull - @Override - public CoroutineContext getContext() { - return EmptyCoroutineContext.INSTANCE; - } - - @Override - public void resumeWith(@NotNull Object o) { - String json = ""; - try { - if (o instanceof Result.Failure) { - Result.Failure failure = (Result.Failure) o; - throw failure.exception; - } else { - Response response = (Response) o; - } - } catch (Throwable th) { - Log.e("ERROR", th.toString()); - } - } - } - ); -} \ No newline at end of file diff --git a/docs/examples/0.15.x/server-kotlin/java/database/create-url-attribute.md b/docs/examples/0.15.x/server-kotlin/java/database/create-url-attribute.md deleted file mode 100644 index cb94279946..0000000000 --- a/docs/examples/0.15.x/server-kotlin/java/database/create-url-attribute.md +++ /dev/null @@ -1,38 +0,0 @@ -import io.appwrite.Client -import io.appwrite.services.Database - -public void main() { - Client client = Client(context) - .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject("5df5acd0d48c2") // Your project ID - .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key - - Database database = new Database(client); - database.createUrlAttribute( - collectionId = "[COLLECTION_ID]", - key = "", - required = false, - new Continuation() { - @NotNull - @Override - public CoroutineContext getContext() { - return EmptyCoroutineContext.INSTANCE; - } - - @Override - public void resumeWith(@NotNull Object o) { - String json = ""; - try { - if (o instanceof Result.Failure) { - Result.Failure failure = (Result.Failure) o; - throw failure.exception; - } else { - Response response = (Response) o; - } - } catch (Throwable th) { - Log.e("ERROR", th.toString()); - } - } - } - ); -} \ No newline at end of file diff --git a/docs/examples/0.15.x/server-kotlin/java/database/delete-attribute.md b/docs/examples/0.15.x/server-kotlin/java/database/delete-attribute.md deleted file mode 100644 index 46689fc559..0000000000 --- a/docs/examples/0.15.x/server-kotlin/java/database/delete-attribute.md +++ /dev/null @@ -1,37 +0,0 @@ -import io.appwrite.Client -import io.appwrite.services.Database - -public void main() { - Client client = Client(context) - .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject("5df5acd0d48c2") // Your project ID - .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key - - Database database = new Database(client); - database.deleteAttribute( - collectionId = "[COLLECTION_ID]", - key = "" - new Continuation() { - @NotNull - @Override - public CoroutineContext getContext() { - return EmptyCoroutineContext.INSTANCE; - } - - @Override - public void resumeWith(@NotNull Object o) { - String json = ""; - try { - if (o instanceof Result.Failure) { - Result.Failure failure = (Result.Failure) o; - throw failure.exception; - } else { - Response response = (Response) o; - } - } catch (Throwable th) { - Log.e("ERROR", th.toString()); - } - } - } - ); -} \ No newline at end of file diff --git a/docs/examples/0.15.x/server-kotlin/java/database/delete-collection.md b/docs/examples/0.15.x/server-kotlin/java/database/delete-collection.md deleted file mode 100644 index ea666ca565..0000000000 --- a/docs/examples/0.15.x/server-kotlin/java/database/delete-collection.md +++ /dev/null @@ -1,36 +0,0 @@ -import io.appwrite.Client -import io.appwrite.services.Database - -public void main() { - Client client = Client(context) - .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject("5df5acd0d48c2") // Your project ID - .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key - - Database database = new Database(client); - database.deleteCollection( - collectionId = "[COLLECTION_ID]" - new Continuation() { - @NotNull - @Override - public CoroutineContext getContext() { - return EmptyCoroutineContext.INSTANCE; - } - - @Override - public void resumeWith(@NotNull Object o) { - String json = ""; - try { - if (o instanceof Result.Failure) { - Result.Failure failure = (Result.Failure) o; - throw failure.exception; - } else { - Response response = (Response) o; - } - } catch (Throwable th) { - Log.e("ERROR", th.toString()); - } - } - } - ); -} \ No newline at end of file diff --git a/docs/examples/0.15.x/server-kotlin/java/database/delete-document.md b/docs/examples/0.15.x/server-kotlin/java/database/delete-document.md deleted file mode 100644 index 9bc26e85f0..0000000000 --- a/docs/examples/0.15.x/server-kotlin/java/database/delete-document.md +++ /dev/null @@ -1,37 +0,0 @@ -import io.appwrite.Client -import io.appwrite.services.Database - -public void main() { - Client client = Client(context) - .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject("5df5acd0d48c2") // Your project ID - .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key - - Database database = new Database(client); - database.deleteDocument( - collectionId = "[COLLECTION_ID]", - documentId = "[DOCUMENT_ID]" - new Continuation() { - @NotNull - @Override - public CoroutineContext getContext() { - return EmptyCoroutineContext.INSTANCE; - } - - @Override - public void resumeWith(@NotNull Object o) { - String json = ""; - try { - if (o instanceof Result.Failure) { - Result.Failure failure = (Result.Failure) o; - throw failure.exception; - } else { - Response response = (Response) o; - } - } catch (Throwable th) { - Log.e("ERROR", th.toString()); - } - } - } - ); -} \ No newline at end of file diff --git a/docs/examples/0.15.x/server-kotlin/java/database/delete-index.md b/docs/examples/0.15.x/server-kotlin/java/database/delete-index.md deleted file mode 100644 index 1845609def..0000000000 --- a/docs/examples/0.15.x/server-kotlin/java/database/delete-index.md +++ /dev/null @@ -1,37 +0,0 @@ -import io.appwrite.Client -import io.appwrite.services.Database - -public void main() { - Client client = Client(context) - .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject("5df5acd0d48c2") // Your project ID - .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key - - Database database = new Database(client); - database.deleteIndex( - collectionId = "[COLLECTION_ID]", - key = "" - new Continuation() { - @NotNull - @Override - public CoroutineContext getContext() { - return EmptyCoroutineContext.INSTANCE; - } - - @Override - public void resumeWith(@NotNull Object o) { - String json = ""; - try { - if (o instanceof Result.Failure) { - Result.Failure failure = (Result.Failure) o; - throw failure.exception; - } else { - Response response = (Response) o; - } - } catch (Throwable th) { - Log.e("ERROR", th.toString()); - } - } - } - ); -} \ No newline at end of file diff --git a/docs/examples/0.15.x/server-kotlin/java/database/get-attribute.md b/docs/examples/0.15.x/server-kotlin/java/database/get-attribute.md deleted file mode 100644 index 699e933601..0000000000 --- a/docs/examples/0.15.x/server-kotlin/java/database/get-attribute.md +++ /dev/null @@ -1,37 +0,0 @@ -import io.appwrite.Client -import io.appwrite.services.Database - -public void main() { - Client client = Client(context) - .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject("5df5acd0d48c2") // Your project ID - .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key - - Database database = new Database(client); - database.getAttribute( - collectionId = "[COLLECTION_ID]", - key = "" - new Continuation() { - @NotNull - @Override - public CoroutineContext getContext() { - return EmptyCoroutineContext.INSTANCE; - } - - @Override - public void resumeWith(@NotNull Object o) { - String json = ""; - try { - if (o instanceof Result.Failure) { - Result.Failure failure = (Result.Failure) o; - throw failure.exception; - } else { - Response response = (Response) o; - } - } catch (Throwable th) { - Log.e("ERROR", th.toString()); - } - } - } - ); -} \ No newline at end of file diff --git a/docs/examples/0.15.x/server-kotlin/java/database/get-collection.md b/docs/examples/0.15.x/server-kotlin/java/database/get-collection.md deleted file mode 100644 index 1d6e96e45d..0000000000 --- a/docs/examples/0.15.x/server-kotlin/java/database/get-collection.md +++ /dev/null @@ -1,36 +0,0 @@ -import io.appwrite.Client -import io.appwrite.services.Database - -public void main() { - Client client = Client(context) - .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject("5df5acd0d48c2") // Your project ID - .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key - - Database database = new Database(client); - database.getCollection( - collectionId = "[COLLECTION_ID]" - new Continuation() { - @NotNull - @Override - public CoroutineContext getContext() { - return EmptyCoroutineContext.INSTANCE; - } - - @Override - public void resumeWith(@NotNull Object o) { - String json = ""; - try { - if (o instanceof Result.Failure) { - Result.Failure failure = (Result.Failure) o; - throw failure.exception; - } else { - Response response = (Response) o; - } - } catch (Throwable th) { - Log.e("ERROR", th.toString()); - } - } - } - ); -} \ No newline at end of file diff --git a/docs/examples/0.15.x/server-kotlin/java/database/get-document.md b/docs/examples/0.15.x/server-kotlin/java/database/get-document.md deleted file mode 100644 index 4ed6fe7ff9..0000000000 --- a/docs/examples/0.15.x/server-kotlin/java/database/get-document.md +++ /dev/null @@ -1,37 +0,0 @@ -import io.appwrite.Client -import io.appwrite.services.Database - -public void main() { - Client client = Client(context) - .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject("5df5acd0d48c2") // Your project ID - .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key - - Database database = new Database(client); - database.getDocument( - collectionId = "[COLLECTION_ID]", - documentId = "[DOCUMENT_ID]" - new Continuation() { - @NotNull - @Override - public CoroutineContext getContext() { - return EmptyCoroutineContext.INSTANCE; - } - - @Override - public void resumeWith(@NotNull Object o) { - String json = ""; - try { - if (o instanceof Result.Failure) { - Result.Failure failure = (Result.Failure) o; - throw failure.exception; - } else { - Response response = (Response) o; - } - } catch (Throwable th) { - Log.e("ERROR", th.toString()); - } - } - } - ); -} \ No newline at end of file diff --git a/docs/examples/0.15.x/server-kotlin/java/database/get-index.md b/docs/examples/0.15.x/server-kotlin/java/database/get-index.md deleted file mode 100644 index 5399ec431b..0000000000 --- a/docs/examples/0.15.x/server-kotlin/java/database/get-index.md +++ /dev/null @@ -1,37 +0,0 @@ -import io.appwrite.Client -import io.appwrite.services.Database - -public void main() { - Client client = Client(context) - .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject("5df5acd0d48c2") // Your project ID - .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key - - Database database = new Database(client); - database.getIndex( - collectionId = "[COLLECTION_ID]", - key = "" - new Continuation() { - @NotNull - @Override - public CoroutineContext getContext() { - return EmptyCoroutineContext.INSTANCE; - } - - @Override - public void resumeWith(@NotNull Object o) { - String json = ""; - try { - if (o instanceof Result.Failure) { - Result.Failure failure = (Result.Failure) o; - throw failure.exception; - } else { - Response response = (Response) o; - } - } catch (Throwable th) { - Log.e("ERROR", th.toString()); - } - } - } - ); -} \ No newline at end of file diff --git a/docs/examples/0.15.x/server-kotlin/java/database/list-attributes.md b/docs/examples/0.15.x/server-kotlin/java/database/list-attributes.md deleted file mode 100644 index 98a6c21732..0000000000 --- a/docs/examples/0.15.x/server-kotlin/java/database/list-attributes.md +++ /dev/null @@ -1,36 +0,0 @@ -import io.appwrite.Client -import io.appwrite.services.Database - -public void main() { - Client client = Client(context) - .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject("5df5acd0d48c2") // Your project ID - .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key - - Database database = new Database(client); - database.listAttributes( - collectionId = "[COLLECTION_ID]" - new Continuation() { - @NotNull - @Override - public CoroutineContext getContext() { - return EmptyCoroutineContext.INSTANCE; - } - - @Override - public void resumeWith(@NotNull Object o) { - String json = ""; - try { - if (o instanceof Result.Failure) { - Result.Failure failure = (Result.Failure) o; - throw failure.exception; - } else { - Response response = (Response) o; - } - } catch (Throwable th) { - Log.e("ERROR", th.toString()); - } - } - } - ); -} \ No newline at end of file diff --git a/docs/examples/0.15.x/server-kotlin/java/database/list-collections.md b/docs/examples/0.15.x/server-kotlin/java/database/list-collections.md deleted file mode 100644 index 9fbda9f9c6..0000000000 --- a/docs/examples/0.15.x/server-kotlin/java/database/list-collections.md +++ /dev/null @@ -1,35 +0,0 @@ -import io.appwrite.Client -import io.appwrite.services.Database - -public void main() { - Client client = Client(context) - .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject("5df5acd0d48c2") // Your project ID - .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key - - Database database = new Database(client); - database.listCollections( - new Continuation() { - @NotNull - @Override - public CoroutineContext getContext() { - return EmptyCoroutineContext.INSTANCE; - } - - @Override - public void resumeWith(@NotNull Object o) { - String json = ""; - try { - if (o instanceof Result.Failure) { - Result.Failure failure = (Result.Failure) o; - throw failure.exception; - } else { - Response response = (Response) o; - } - } catch (Throwable th) { - Log.e("ERROR", th.toString()); - } - } - } - ); -} \ No newline at end of file diff --git a/docs/examples/0.15.x/server-kotlin/java/database/list-documents.md b/docs/examples/0.15.x/server-kotlin/java/database/list-documents.md deleted file mode 100644 index 05e890783a..0000000000 --- a/docs/examples/0.15.x/server-kotlin/java/database/list-documents.md +++ /dev/null @@ -1,36 +0,0 @@ -import io.appwrite.Client -import io.appwrite.services.Database - -public void main() { - Client client = Client(context) - .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject("5df5acd0d48c2") // Your project ID - .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key - - Database database = new Database(client); - database.listDocuments( - collectionId = "[COLLECTION_ID]", - new Continuation() { - @NotNull - @Override - public CoroutineContext getContext() { - return EmptyCoroutineContext.INSTANCE; - } - - @Override - public void resumeWith(@NotNull Object o) { - String json = ""; - try { - if (o instanceof Result.Failure) { - Result.Failure failure = (Result.Failure) o; - throw failure.exception; - } else { - Response response = (Response) o; - } - } catch (Throwable th) { - Log.e("ERROR", th.toString()); - } - } - } - ); -} \ No newline at end of file diff --git a/docs/examples/0.15.x/server-kotlin/java/database/list-indexes.md b/docs/examples/0.15.x/server-kotlin/java/database/list-indexes.md deleted file mode 100644 index 394b661630..0000000000 --- a/docs/examples/0.15.x/server-kotlin/java/database/list-indexes.md +++ /dev/null @@ -1,36 +0,0 @@ -import io.appwrite.Client -import io.appwrite.services.Database - -public void main() { - Client client = Client(context) - .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject("5df5acd0d48c2") // Your project ID - .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key - - Database database = new Database(client); - database.listIndexes( - collectionId = "[COLLECTION_ID]" - new Continuation() { - @NotNull - @Override - public CoroutineContext getContext() { - return EmptyCoroutineContext.INSTANCE; - } - - @Override - public void resumeWith(@NotNull Object o) { - String json = ""; - try { - if (o instanceof Result.Failure) { - Result.Failure failure = (Result.Failure) o; - throw failure.exception; - } else { - Response response = (Response) o; - } - } catch (Throwable th) { - Log.e("ERROR", th.toString()); - } - } - } - ); -} \ No newline at end of file diff --git a/docs/examples/0.15.x/server-kotlin/java/database/update-collection.md b/docs/examples/0.15.x/server-kotlin/java/database/update-collection.md deleted file mode 100644 index f6319e0603..0000000000 --- a/docs/examples/0.15.x/server-kotlin/java/database/update-collection.md +++ /dev/null @@ -1,38 +0,0 @@ -import io.appwrite.Client -import io.appwrite.services.Database - -public void main() { - Client client = Client(context) - .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject("5df5acd0d48c2") // Your project ID - .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key - - Database database = new Database(client); - database.updateCollection( - collectionId = "[COLLECTION_ID]", - name = "[NAME]", - permission = "document", - new Continuation() { - @NotNull - @Override - public CoroutineContext getContext() { - return EmptyCoroutineContext.INSTANCE; - } - - @Override - public void resumeWith(@NotNull Object o) { - String json = ""; - try { - if (o instanceof Result.Failure) { - Result.Failure failure = (Result.Failure) o; - throw failure.exception; - } else { - Response response = (Response) o; - } - } catch (Throwable th) { - Log.e("ERROR", th.toString()); - } - } - } - ); -} \ No newline at end of file diff --git a/docs/examples/0.15.x/server-kotlin/java/database/update-document.md b/docs/examples/0.15.x/server-kotlin/java/database/update-document.md deleted file mode 100644 index 9c06624d4b..0000000000 --- a/docs/examples/0.15.x/server-kotlin/java/database/update-document.md +++ /dev/null @@ -1,38 +0,0 @@ -import io.appwrite.Client -import io.appwrite.services.Database - -public void main() { - Client client = Client(context) - .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject("5df5acd0d48c2") // Your project ID - .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key - - Database database = new Database(client); - database.updateDocument( - collectionId = "[COLLECTION_ID]", - documentId = "[DOCUMENT_ID]", - data = mapOf( "a" to "b" ), - new Continuation() { - @NotNull - @Override - public CoroutineContext getContext() { - return EmptyCoroutineContext.INSTANCE; - } - - @Override - public void resumeWith(@NotNull Object o) { - String json = ""; - try { - if (o instanceof Result.Failure) { - Result.Failure failure = (Result.Failure) o; - throw failure.exception; - } else { - Response response = (Response) o; - } - } catch (Throwable th) { - Log.e("ERROR", th.toString()); - } - } - } - ); -} \ No newline at end of file diff --git a/docs/examples/0.15.x/server-kotlin/kotlin/database/create-boolean-attribute.md b/docs/examples/0.15.x/server-kotlin/kotlin/database/create-boolean-attribute.md deleted file mode 100644 index 0d5cb9f9ef..0000000000 --- a/docs/examples/0.15.x/server-kotlin/kotlin/database/create-boolean-attribute.md +++ /dev/null @@ -1,17 +0,0 @@ -import io.appwrite.Client -import io.appwrite.services.Database - -suspend fun main() { - val client = Client(context) - .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject("5df5acd0d48c2") // Your project ID - .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - val database = Database(client) - val response = database.createBooleanAttribute( - collectionId = "[COLLECTION_ID]", - key = "", - required = false, - ) - val json = response.body?.string() -} \ No newline at end of file diff --git a/docs/examples/0.15.x/server-kotlin/kotlin/database/create-collection.md b/docs/examples/0.15.x/server-kotlin/kotlin/database/create-collection.md deleted file mode 100644 index 2c54cff28e..0000000000 --- a/docs/examples/0.15.x/server-kotlin/kotlin/database/create-collection.md +++ /dev/null @@ -1,19 +0,0 @@ -import io.appwrite.Client -import io.appwrite.services.Database - -suspend fun main() { - val client = Client(context) - .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject("5df5acd0d48c2") // Your project ID - .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - val database = Database(client) - val response = database.createCollection( - collectionId = "[COLLECTION_ID]", - name = "[NAME]", - permission = "document", - read = ["role:all"], - write = ["role:all"] - ) - val json = response.body?.string() -} \ No newline at end of file diff --git a/docs/examples/0.15.x/server-kotlin/kotlin/database/create-document.md b/docs/examples/0.15.x/server-kotlin/kotlin/database/create-document.md deleted file mode 100644 index 34e7718ac2..0000000000 --- a/docs/examples/0.15.x/server-kotlin/kotlin/database/create-document.md +++ /dev/null @@ -1,17 +0,0 @@ -import io.appwrite.Client -import io.appwrite.services.Database - -suspend fun main() { - val client = Client(context) - .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject("5df5acd0d48c2") // Your project ID - .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - val database = Database(client) - val response = database.createDocument( - collectionId = "[COLLECTION_ID]", - documentId = "[DOCUMENT_ID]", - data = mapOf( "a" to "b" ), - ) - val json = response.body?.string() -} \ No newline at end of file diff --git a/docs/examples/0.15.x/server-kotlin/kotlin/database/create-email-attribute.md b/docs/examples/0.15.x/server-kotlin/kotlin/database/create-email-attribute.md deleted file mode 100644 index 8b89e8e3ee..0000000000 --- a/docs/examples/0.15.x/server-kotlin/kotlin/database/create-email-attribute.md +++ /dev/null @@ -1,17 +0,0 @@ -import io.appwrite.Client -import io.appwrite.services.Database - -suspend fun main() { - val client = Client(context) - .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject("5df5acd0d48c2") // Your project ID - .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - val database = Database(client) - val response = database.createEmailAttribute( - collectionId = "[COLLECTION_ID]", - key = "", - required = false, - ) - val json = response.body?.string() -} \ No newline at end of file diff --git a/docs/examples/0.15.x/server-kotlin/kotlin/database/create-enum-attribute.md b/docs/examples/0.15.x/server-kotlin/kotlin/database/create-enum-attribute.md deleted file mode 100644 index ceef6b79d4..0000000000 --- a/docs/examples/0.15.x/server-kotlin/kotlin/database/create-enum-attribute.md +++ /dev/null @@ -1,18 +0,0 @@ -import io.appwrite.Client -import io.appwrite.services.Database - -suspend fun main() { - val client = Client(context) - .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject("5df5acd0d48c2") // Your project ID - .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - val database = Database(client) - val response = database.createEnumAttribute( - collectionId = "[COLLECTION_ID]", - key = "", - elements = listOf(), - required = false, - ) - val json = response.body?.string() -} \ No newline at end of file diff --git a/docs/examples/0.15.x/server-kotlin/kotlin/database/create-float-attribute.md b/docs/examples/0.15.x/server-kotlin/kotlin/database/create-float-attribute.md deleted file mode 100644 index 1304096185..0000000000 --- a/docs/examples/0.15.x/server-kotlin/kotlin/database/create-float-attribute.md +++ /dev/null @@ -1,17 +0,0 @@ -import io.appwrite.Client -import io.appwrite.services.Database - -suspend fun main() { - val client = Client(context) - .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject("5df5acd0d48c2") // Your project ID - .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - val database = Database(client) - val response = database.createFloatAttribute( - collectionId = "[COLLECTION_ID]", - key = "", - required = false, - ) - val json = response.body?.string() -} \ No newline at end of file diff --git a/docs/examples/0.15.x/server-kotlin/kotlin/database/create-index.md b/docs/examples/0.15.x/server-kotlin/kotlin/database/create-index.md deleted file mode 100644 index 53432cef33..0000000000 --- a/docs/examples/0.15.x/server-kotlin/kotlin/database/create-index.md +++ /dev/null @@ -1,18 +0,0 @@ -import io.appwrite.Client -import io.appwrite.services.Database - -suspend fun main() { - val client = Client(context) - .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject("5df5acd0d48c2") // Your project ID - .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - val database = Database(client) - val response = database.createIndex( - collectionId = "[COLLECTION_ID]", - key = "", - type = "key", - attributes = listOf(), - ) - val json = response.body?.string() -} \ No newline at end of file diff --git a/docs/examples/0.15.x/server-kotlin/kotlin/database/create-integer-attribute.md b/docs/examples/0.15.x/server-kotlin/kotlin/database/create-integer-attribute.md deleted file mode 100644 index 2f00c8d858..0000000000 --- a/docs/examples/0.15.x/server-kotlin/kotlin/database/create-integer-attribute.md +++ /dev/null @@ -1,17 +0,0 @@ -import io.appwrite.Client -import io.appwrite.services.Database - -suspend fun main() { - val client = Client(context) - .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject("5df5acd0d48c2") // Your project ID - .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - val database = Database(client) - val response = database.createIntegerAttribute( - collectionId = "[COLLECTION_ID]", - key = "", - required = false, - ) - val json = response.body?.string() -} \ No newline at end of file diff --git a/docs/examples/0.15.x/server-kotlin/kotlin/database/create-ip-attribute.md b/docs/examples/0.15.x/server-kotlin/kotlin/database/create-ip-attribute.md deleted file mode 100644 index c0d49b0a94..0000000000 --- a/docs/examples/0.15.x/server-kotlin/kotlin/database/create-ip-attribute.md +++ /dev/null @@ -1,17 +0,0 @@ -import io.appwrite.Client -import io.appwrite.services.Database - -suspend fun main() { - val client = Client(context) - .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject("5df5acd0d48c2") // Your project ID - .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - val database = Database(client) - val response = database.createIpAttribute( - collectionId = "[COLLECTION_ID]", - key = "", - required = false, - ) - val json = response.body?.string() -} \ No newline at end of file diff --git a/docs/examples/0.15.x/server-kotlin/kotlin/database/create-string-attribute.md b/docs/examples/0.15.x/server-kotlin/kotlin/database/create-string-attribute.md deleted file mode 100644 index da95ee02f6..0000000000 --- a/docs/examples/0.15.x/server-kotlin/kotlin/database/create-string-attribute.md +++ /dev/null @@ -1,18 +0,0 @@ -import io.appwrite.Client -import io.appwrite.services.Database - -suspend fun main() { - val client = Client(context) - .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject("5df5acd0d48c2") // Your project ID - .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - val database = Database(client) - val response = database.createStringAttribute( - collectionId = "[COLLECTION_ID]", - key = "", - size = 1, - required = false, - ) - val json = response.body?.string() -} \ No newline at end of file diff --git a/docs/examples/0.15.x/server-kotlin/kotlin/database/create-url-attribute.md b/docs/examples/0.15.x/server-kotlin/kotlin/database/create-url-attribute.md deleted file mode 100644 index 3f151b6690..0000000000 --- a/docs/examples/0.15.x/server-kotlin/kotlin/database/create-url-attribute.md +++ /dev/null @@ -1,17 +0,0 @@ -import io.appwrite.Client -import io.appwrite.services.Database - -suspend fun main() { - val client = Client(context) - .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject("5df5acd0d48c2") // Your project ID - .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - val database = Database(client) - val response = database.createUrlAttribute( - collectionId = "[COLLECTION_ID]", - key = "", - required = false, - ) - val json = response.body?.string() -} \ No newline at end of file diff --git a/docs/examples/0.15.x/server-kotlin/kotlin/database/delete-attribute.md b/docs/examples/0.15.x/server-kotlin/kotlin/database/delete-attribute.md deleted file mode 100644 index a2d1746d78..0000000000 --- a/docs/examples/0.15.x/server-kotlin/kotlin/database/delete-attribute.md +++ /dev/null @@ -1,16 +0,0 @@ -import io.appwrite.Client -import io.appwrite.services.Database - -suspend fun main() { - val client = Client(context) - .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject("5df5acd0d48c2") // Your project ID - .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - val database = Database(client) - val response = database.deleteAttribute( - collectionId = "[COLLECTION_ID]", - key = "" - ) - val json = response.body?.string() -} \ No newline at end of file diff --git a/docs/examples/0.15.x/server-kotlin/kotlin/database/delete-collection.md b/docs/examples/0.15.x/server-kotlin/kotlin/database/delete-collection.md deleted file mode 100644 index a535003ce8..0000000000 --- a/docs/examples/0.15.x/server-kotlin/kotlin/database/delete-collection.md +++ /dev/null @@ -1,15 +0,0 @@ -import io.appwrite.Client -import io.appwrite.services.Database - -suspend fun main() { - val client = Client(context) - .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject("5df5acd0d48c2") // Your project ID - .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - val database = Database(client) - val response = database.deleteCollection( - collectionId = "[COLLECTION_ID]" - ) - val json = response.body?.string() -} \ No newline at end of file diff --git a/docs/examples/0.15.x/server-kotlin/kotlin/database/delete-document.md b/docs/examples/0.15.x/server-kotlin/kotlin/database/delete-document.md deleted file mode 100644 index 16f652b822..0000000000 --- a/docs/examples/0.15.x/server-kotlin/kotlin/database/delete-document.md +++ /dev/null @@ -1,16 +0,0 @@ -import io.appwrite.Client -import io.appwrite.services.Database - -suspend fun main() { - val client = Client(context) - .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject("5df5acd0d48c2") // Your project ID - .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - val database = Database(client) - val response = database.deleteDocument( - collectionId = "[COLLECTION_ID]", - documentId = "[DOCUMENT_ID]" - ) - val json = response.body?.string() -} \ No newline at end of file diff --git a/docs/examples/0.15.x/server-kotlin/kotlin/database/delete-index.md b/docs/examples/0.15.x/server-kotlin/kotlin/database/delete-index.md deleted file mode 100644 index e73ce5ea46..0000000000 --- a/docs/examples/0.15.x/server-kotlin/kotlin/database/delete-index.md +++ /dev/null @@ -1,16 +0,0 @@ -import io.appwrite.Client -import io.appwrite.services.Database - -suspend fun main() { - val client = Client(context) - .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject("5df5acd0d48c2") // Your project ID - .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - val database = Database(client) - val response = database.deleteIndex( - collectionId = "[COLLECTION_ID]", - key = "" - ) - val json = response.body?.string() -} \ No newline at end of file diff --git a/docs/examples/0.15.x/server-kotlin/kotlin/database/get-attribute.md b/docs/examples/0.15.x/server-kotlin/kotlin/database/get-attribute.md deleted file mode 100644 index 43a9a8f793..0000000000 --- a/docs/examples/0.15.x/server-kotlin/kotlin/database/get-attribute.md +++ /dev/null @@ -1,16 +0,0 @@ -import io.appwrite.Client -import io.appwrite.services.Database - -suspend fun main() { - val client = Client(context) - .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject("5df5acd0d48c2") // Your project ID - .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - val database = Database(client) - val response = database.getAttribute( - collectionId = "[COLLECTION_ID]", - key = "" - ) - val json = response.body?.string() -} \ No newline at end of file diff --git a/docs/examples/0.15.x/server-kotlin/kotlin/database/get-collection.md b/docs/examples/0.15.x/server-kotlin/kotlin/database/get-collection.md deleted file mode 100644 index df4b735c66..0000000000 --- a/docs/examples/0.15.x/server-kotlin/kotlin/database/get-collection.md +++ /dev/null @@ -1,15 +0,0 @@ -import io.appwrite.Client -import io.appwrite.services.Database - -suspend fun main() { - val client = Client(context) - .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject("5df5acd0d48c2") // Your project ID - .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - val database = Database(client) - val response = database.getCollection( - collectionId = "[COLLECTION_ID]" - ) - val json = response.body?.string() -} \ No newline at end of file diff --git a/docs/examples/0.15.x/server-kotlin/kotlin/database/get-document.md b/docs/examples/0.15.x/server-kotlin/kotlin/database/get-document.md deleted file mode 100644 index e4fd93ca6e..0000000000 --- a/docs/examples/0.15.x/server-kotlin/kotlin/database/get-document.md +++ /dev/null @@ -1,16 +0,0 @@ -import io.appwrite.Client -import io.appwrite.services.Database - -suspend fun main() { - val client = Client(context) - .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject("5df5acd0d48c2") // Your project ID - .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - val database = Database(client) - val response = database.getDocument( - collectionId = "[COLLECTION_ID]", - documentId = "[DOCUMENT_ID]" - ) - val json = response.body?.string() -} \ No newline at end of file diff --git a/docs/examples/0.15.x/server-kotlin/kotlin/database/get-index.md b/docs/examples/0.15.x/server-kotlin/kotlin/database/get-index.md deleted file mode 100644 index 225cc26d67..0000000000 --- a/docs/examples/0.15.x/server-kotlin/kotlin/database/get-index.md +++ /dev/null @@ -1,16 +0,0 @@ -import io.appwrite.Client -import io.appwrite.services.Database - -suspend fun main() { - val client = Client(context) - .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject("5df5acd0d48c2") // Your project ID - .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - val database = Database(client) - val response = database.getIndex( - collectionId = "[COLLECTION_ID]", - key = "" - ) - val json = response.body?.string() -} \ No newline at end of file diff --git a/docs/examples/0.15.x/server-kotlin/kotlin/database/list-attributes.md b/docs/examples/0.15.x/server-kotlin/kotlin/database/list-attributes.md deleted file mode 100644 index 7e93658a72..0000000000 --- a/docs/examples/0.15.x/server-kotlin/kotlin/database/list-attributes.md +++ /dev/null @@ -1,15 +0,0 @@ -import io.appwrite.Client -import io.appwrite.services.Database - -suspend fun main() { - val client = Client(context) - .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject("5df5acd0d48c2") // Your project ID - .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - val database = Database(client) - val response = database.listAttributes( - collectionId = "[COLLECTION_ID]" - ) - val json = response.body?.string() -} \ No newline at end of file diff --git a/docs/examples/0.15.x/server-kotlin/kotlin/database/list-collections.md b/docs/examples/0.15.x/server-kotlin/kotlin/database/list-collections.md deleted file mode 100644 index 731fac6a31..0000000000 --- a/docs/examples/0.15.x/server-kotlin/kotlin/database/list-collections.md +++ /dev/null @@ -1,14 +0,0 @@ -import io.appwrite.Client -import io.appwrite.services.Database - -suspend fun main() { - val client = Client(context) - .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject("5df5acd0d48c2") // Your project ID - .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - val database = Database(client) - val response = database.listCollections( - ) - val json = response.body?.string() -} \ No newline at end of file diff --git a/docs/examples/0.15.x/server-kotlin/kotlin/database/list-documents.md b/docs/examples/0.15.x/server-kotlin/kotlin/database/list-documents.md deleted file mode 100644 index 45719af073..0000000000 --- a/docs/examples/0.15.x/server-kotlin/kotlin/database/list-documents.md +++ /dev/null @@ -1,15 +0,0 @@ -import io.appwrite.Client -import io.appwrite.services.Database - -suspend fun main() { - val client = Client(context) - .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject("5df5acd0d48c2") // Your project ID - .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - val database = Database(client) - val response = database.listDocuments( - collectionId = "[COLLECTION_ID]", - ) - val json = response.body?.string() -} \ No newline at end of file diff --git a/docs/examples/0.15.x/server-kotlin/kotlin/database/list-indexes.md b/docs/examples/0.15.x/server-kotlin/kotlin/database/list-indexes.md deleted file mode 100644 index df971f9957..0000000000 --- a/docs/examples/0.15.x/server-kotlin/kotlin/database/list-indexes.md +++ /dev/null @@ -1,15 +0,0 @@ -import io.appwrite.Client -import io.appwrite.services.Database - -suspend fun main() { - val client = Client(context) - .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject("5df5acd0d48c2") // Your project ID - .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - val database = Database(client) - val response = database.listIndexes( - collectionId = "[COLLECTION_ID]" - ) - val json = response.body?.string() -} \ No newline at end of file diff --git a/docs/examples/0.15.x/server-kotlin/kotlin/database/update-collection.md b/docs/examples/0.15.x/server-kotlin/kotlin/database/update-collection.md deleted file mode 100644 index 35a8f52866..0000000000 --- a/docs/examples/0.15.x/server-kotlin/kotlin/database/update-collection.md +++ /dev/null @@ -1,17 +0,0 @@ -import io.appwrite.Client -import io.appwrite.services.Database - -suspend fun main() { - val client = Client(context) - .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject("5df5acd0d48c2") // Your project ID - .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - val database = Database(client) - val response = database.updateCollection( - collectionId = "[COLLECTION_ID]", - name = "[NAME]", - permission = "document", - ) - val json = response.body?.string() -} \ No newline at end of file diff --git a/docs/examples/0.15.x/server-kotlin/kotlin/database/update-document.md b/docs/examples/0.15.x/server-kotlin/kotlin/database/update-document.md deleted file mode 100644 index 921a3a4b5f..0000000000 --- a/docs/examples/0.15.x/server-kotlin/kotlin/database/update-document.md +++ /dev/null @@ -1,17 +0,0 @@ -import io.appwrite.Client -import io.appwrite.services.Database - -suspend fun main() { - val client = Client(context) - .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject("5df5acd0d48c2") // Your project ID - .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - val database = Database(client) - val response = database.updateDocument( - collectionId = "[COLLECTION_ID]", - documentId = "[DOCUMENT_ID]", - data = mapOf( "a" to "b" ), - ) - val json = response.body?.string() -} \ No newline at end of file diff --git a/docs/examples/0.15.x/server-nodejs/examples/account/create-phone-verification.md b/docs/examples/0.15.x/server-nodejs/examples/account/create-phone-verification.md index ff259472d3..4ed86de6f4 100644 --- a/docs/examples/0.15.x/server-nodejs/examples/account/create-phone-verification.md +++ b/docs/examples/0.15.x/server-nodejs/examples/account/create-phone-verification.md @@ -1,9 +1,9 @@ const sdk = require('node-appwrite'); // Init SDK -let client = new sdk.Client(); +const client = new sdk.Client(); -let account = new sdk.Account(client); +const account = new sdk.Account(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint @@ -11,7 +11,7 @@ client .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token ; -let promise = account.createPhoneVerification(); +const promise = account.createPhoneVerification(); promise.then(function (response) { console.log(response); diff --git a/docs/examples/0.15.x/server-nodejs/examples/account/create-recovery.md b/docs/examples/0.15.x/server-nodejs/examples/account/create-recovery.md index 8d86e0fbab..2c445584fb 100644 --- a/docs/examples/0.15.x/server-nodejs/examples/account/create-recovery.md +++ b/docs/examples/0.15.x/server-nodejs/examples/account/create-recovery.md @@ -1,9 +1,9 @@ const sdk = require('node-appwrite'); // Init SDK -let client = new sdk.Client(); +const client = new sdk.Client(); -let account = new sdk.Account(client); +const account = new sdk.Account(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint @@ -11,7 +11,7 @@ client .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token ; -let promise = account.createRecovery('email@example.com', 'https://example.com'); +const promise = account.createRecovery('email@example.com', 'https://example.com'); promise.then(function (response) { console.log(response); diff --git a/docs/examples/0.15.x/server-nodejs/examples/account/create-verification.md b/docs/examples/0.15.x/server-nodejs/examples/account/create-verification.md index 8ec31eb060..520af2ece8 100644 --- a/docs/examples/0.15.x/server-nodejs/examples/account/create-verification.md +++ b/docs/examples/0.15.x/server-nodejs/examples/account/create-verification.md @@ -1,9 +1,9 @@ const sdk = require('node-appwrite'); // Init SDK -let client = new sdk.Client(); +const client = new sdk.Client(); -let account = new sdk.Account(client); +const account = new sdk.Account(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint @@ -11,7 +11,7 @@ client .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token ; -let promise = account.createVerification('https://example.com'); +const promise = account.createVerification('https://example.com'); promise.then(function (response) { console.log(response); diff --git a/docs/examples/0.15.x/server-nodejs/examples/account/delete-session.md b/docs/examples/0.15.x/server-nodejs/examples/account/delete-session.md index 4bcd2d2ce2..fbfa985b5d 100644 --- a/docs/examples/0.15.x/server-nodejs/examples/account/delete-session.md +++ b/docs/examples/0.15.x/server-nodejs/examples/account/delete-session.md @@ -1,9 +1,9 @@ const sdk = require('node-appwrite'); // Init SDK -let client = new sdk.Client(); +const client = new sdk.Client(); -let account = new sdk.Account(client); +const account = new sdk.Account(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint @@ -11,7 +11,7 @@ client .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token ; -let promise = account.deleteSession('[SESSION_ID]'); +const promise = account.deleteSession('[SESSION_ID]'); promise.then(function (response) { console.log(response); diff --git a/docs/examples/0.15.x/server-nodejs/examples/account/delete-sessions.md b/docs/examples/0.15.x/server-nodejs/examples/account/delete-sessions.md index 3ccc6556b3..2dce206215 100644 --- a/docs/examples/0.15.x/server-nodejs/examples/account/delete-sessions.md +++ b/docs/examples/0.15.x/server-nodejs/examples/account/delete-sessions.md @@ -1,9 +1,9 @@ const sdk = require('node-appwrite'); // Init SDK -let client = new sdk.Client(); +const client = new sdk.Client(); -let account = new sdk.Account(client); +const account = new sdk.Account(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint @@ -11,7 +11,7 @@ client .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token ; -let promise = account.deleteSessions(); +const promise = account.deleteSessions(); promise.then(function (response) { console.log(response); diff --git a/docs/examples/0.15.x/server-nodejs/examples/account/get-logs.md b/docs/examples/0.15.x/server-nodejs/examples/account/get-logs.md index dd8e26a045..7e99f07f05 100644 --- a/docs/examples/0.15.x/server-nodejs/examples/account/get-logs.md +++ b/docs/examples/0.15.x/server-nodejs/examples/account/get-logs.md @@ -1,9 +1,9 @@ const sdk = require('node-appwrite'); // Init SDK -let client = new sdk.Client(); +const client = new sdk.Client(); -let account = new sdk.Account(client); +const account = new sdk.Account(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint @@ -11,7 +11,7 @@ client .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token ; -let promise = account.getLogs(); +const promise = account.getLogs(); promise.then(function (response) { console.log(response); diff --git a/docs/examples/0.15.x/server-nodejs/examples/account/get-prefs.md b/docs/examples/0.15.x/server-nodejs/examples/account/get-prefs.md index a10879ddd5..2b11f4a399 100644 --- a/docs/examples/0.15.x/server-nodejs/examples/account/get-prefs.md +++ b/docs/examples/0.15.x/server-nodejs/examples/account/get-prefs.md @@ -1,9 +1,9 @@ const sdk = require('node-appwrite'); // Init SDK -let client = new sdk.Client(); +const client = new sdk.Client(); -let account = new sdk.Account(client); +const account = new sdk.Account(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint @@ -11,7 +11,7 @@ client .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token ; -let promise = account.getPrefs(); +const promise = account.getPrefs(); promise.then(function (response) { console.log(response); diff --git a/docs/examples/0.15.x/server-nodejs/examples/account/get-session.md b/docs/examples/0.15.x/server-nodejs/examples/account/get-session.md index c6dac22365..e83d97f198 100644 --- a/docs/examples/0.15.x/server-nodejs/examples/account/get-session.md +++ b/docs/examples/0.15.x/server-nodejs/examples/account/get-session.md @@ -1,9 +1,9 @@ const sdk = require('node-appwrite'); // Init SDK -let client = new sdk.Client(); +const client = new sdk.Client(); -let account = new sdk.Account(client); +const account = new sdk.Account(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint @@ -11,7 +11,7 @@ client .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token ; -let promise = account.getSession('[SESSION_ID]'); +const promise = account.getSession('[SESSION_ID]'); promise.then(function (response) { console.log(response); diff --git a/docs/examples/0.15.x/server-nodejs/examples/account/get-sessions.md b/docs/examples/0.15.x/server-nodejs/examples/account/get-sessions.md index b25b91cfe6..05acf87e9f 100644 --- a/docs/examples/0.15.x/server-nodejs/examples/account/get-sessions.md +++ b/docs/examples/0.15.x/server-nodejs/examples/account/get-sessions.md @@ -1,9 +1,9 @@ const sdk = require('node-appwrite'); // Init SDK -let client = new sdk.Client(); +const client = new sdk.Client(); -let account = new sdk.Account(client); +const account = new sdk.Account(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint @@ -11,7 +11,7 @@ client .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token ; -let promise = account.getSessions(); +const promise = account.getSessions(); promise.then(function (response) { console.log(response); diff --git a/docs/examples/0.15.x/server-nodejs/examples/account/get.md b/docs/examples/0.15.x/server-nodejs/examples/account/get.md index 862cfd3cd3..f1ebc9e921 100644 --- a/docs/examples/0.15.x/server-nodejs/examples/account/get.md +++ b/docs/examples/0.15.x/server-nodejs/examples/account/get.md @@ -1,9 +1,9 @@ const sdk = require('node-appwrite'); // Init SDK -let client = new sdk.Client(); +const client = new sdk.Client(); -let account = new sdk.Account(client); +const account = new sdk.Account(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint @@ -11,7 +11,7 @@ client .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token ; -let promise = account.get(); +const promise = account.get(); promise.then(function (response) { console.log(response); diff --git a/docs/examples/0.15.x/server-nodejs/examples/account/update-email.md b/docs/examples/0.15.x/server-nodejs/examples/account/update-email.md index 493bad30f5..b550142d13 100644 --- a/docs/examples/0.15.x/server-nodejs/examples/account/update-email.md +++ b/docs/examples/0.15.x/server-nodejs/examples/account/update-email.md @@ -1,9 +1,9 @@ const sdk = require('node-appwrite'); // Init SDK -let client = new sdk.Client(); +const client = new sdk.Client(); -let account = new sdk.Account(client); +const account = new sdk.Account(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint @@ -11,7 +11,7 @@ client .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token ; -let promise = account.updateEmail('email@example.com', 'password'); +const promise = account.updateEmail('email@example.com', 'password'); promise.then(function (response) { console.log(response); diff --git a/docs/examples/0.15.x/server-nodejs/examples/account/update-name.md b/docs/examples/0.15.x/server-nodejs/examples/account/update-name.md index ef4b47a3d8..196a9b272e 100644 --- a/docs/examples/0.15.x/server-nodejs/examples/account/update-name.md +++ b/docs/examples/0.15.x/server-nodejs/examples/account/update-name.md @@ -1,9 +1,9 @@ const sdk = require('node-appwrite'); // Init SDK -let client = new sdk.Client(); +const client = new sdk.Client(); -let account = new sdk.Account(client); +const account = new sdk.Account(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint @@ -11,7 +11,7 @@ client .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token ; -let promise = account.updateName('[NAME]'); +const promise = account.updateName('[NAME]'); promise.then(function (response) { console.log(response); diff --git a/docs/examples/0.15.x/server-nodejs/examples/account/update-password.md b/docs/examples/0.15.x/server-nodejs/examples/account/update-password.md index 59db404cc1..bc7fb758d1 100644 --- a/docs/examples/0.15.x/server-nodejs/examples/account/update-password.md +++ b/docs/examples/0.15.x/server-nodejs/examples/account/update-password.md @@ -1,9 +1,9 @@ const sdk = require('node-appwrite'); // Init SDK -let client = new sdk.Client(); +const client = new sdk.Client(); -let account = new sdk.Account(client); +const account = new sdk.Account(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint @@ -11,7 +11,7 @@ client .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token ; -let promise = account.updatePassword('password'); +const promise = account.updatePassword('password'); promise.then(function (response) { console.log(response); diff --git a/docs/examples/0.15.x/server-nodejs/examples/account/update-phone-verification.md b/docs/examples/0.15.x/server-nodejs/examples/account/update-phone-verification.md index f21a1d58f3..4bedf42b8d 100644 --- a/docs/examples/0.15.x/server-nodejs/examples/account/update-phone-verification.md +++ b/docs/examples/0.15.x/server-nodejs/examples/account/update-phone-verification.md @@ -1,9 +1,9 @@ const sdk = require('node-appwrite'); // Init SDK -let client = new sdk.Client(); +const client = new sdk.Client(); -let account = new sdk.Account(client); +const account = new sdk.Account(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint @@ -11,7 +11,7 @@ client .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token ; -let promise = account.updatePhoneVerification('[USER_ID]', '[SECRET]'); +const promise = account.updatePhoneVerification('[USER_ID]', '[SECRET]'); promise.then(function (response) { console.log(response); diff --git a/docs/examples/0.15.x/server-nodejs/examples/account/update-phone.md b/docs/examples/0.15.x/server-nodejs/examples/account/update-phone.md index 3d7806b0d6..81b64290cd 100644 --- a/docs/examples/0.15.x/server-nodejs/examples/account/update-phone.md +++ b/docs/examples/0.15.x/server-nodejs/examples/account/update-phone.md @@ -1,9 +1,9 @@ const sdk = require('node-appwrite'); // Init SDK -let client = new sdk.Client(); +const client = new sdk.Client(); -let account = new sdk.Account(client); +const account = new sdk.Account(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint @@ -11,7 +11,7 @@ client .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token ; -let promise = account.updatePhone('', 'password'); +const promise = account.updatePhone('', 'password'); promise.then(function (response) { console.log(response); diff --git a/docs/examples/0.15.x/server-nodejs/examples/account/update-prefs.md b/docs/examples/0.15.x/server-nodejs/examples/account/update-prefs.md index d9c518f1a2..f8a2bcb797 100644 --- a/docs/examples/0.15.x/server-nodejs/examples/account/update-prefs.md +++ b/docs/examples/0.15.x/server-nodejs/examples/account/update-prefs.md @@ -1,9 +1,9 @@ const sdk = require('node-appwrite'); // Init SDK -let client = new sdk.Client(); +const client = new sdk.Client(); -let account = new sdk.Account(client); +const account = new sdk.Account(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint @@ -11,7 +11,7 @@ client .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token ; -let promise = account.updatePrefs({}); +const promise = account.updatePrefs({}); promise.then(function (response) { console.log(response); diff --git a/docs/examples/0.15.x/server-nodejs/examples/account/update-recovery.md b/docs/examples/0.15.x/server-nodejs/examples/account/update-recovery.md index 796c88ad9c..1e1fb8d708 100644 --- a/docs/examples/0.15.x/server-nodejs/examples/account/update-recovery.md +++ b/docs/examples/0.15.x/server-nodejs/examples/account/update-recovery.md @@ -1,9 +1,9 @@ const sdk = require('node-appwrite'); // Init SDK -let client = new sdk.Client(); +const client = new sdk.Client(); -let account = new sdk.Account(client); +const account = new sdk.Account(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint @@ -11,7 +11,7 @@ client .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token ; -let promise = account.updateRecovery('[USER_ID]', '[SECRET]', 'password', 'password'); +const promise = account.updateRecovery('[USER_ID]', '[SECRET]', 'password', 'password'); promise.then(function (response) { console.log(response); diff --git a/docs/examples/0.15.x/server-nodejs/examples/account/update-session.md b/docs/examples/0.15.x/server-nodejs/examples/account/update-session.md index 8d19064d12..d9e1853884 100644 --- a/docs/examples/0.15.x/server-nodejs/examples/account/update-session.md +++ b/docs/examples/0.15.x/server-nodejs/examples/account/update-session.md @@ -1,9 +1,9 @@ const sdk = require('node-appwrite'); // Init SDK -let client = new sdk.Client(); +const client = new sdk.Client(); -let account = new sdk.Account(client); +const account = new sdk.Account(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint @@ -11,7 +11,7 @@ client .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token ; -let promise = account.updateSession('[SESSION_ID]'); +const promise = account.updateSession('[SESSION_ID]'); promise.then(function (response) { console.log(response); diff --git a/docs/examples/0.15.x/server-nodejs/examples/account/update-status.md b/docs/examples/0.15.x/server-nodejs/examples/account/update-status.md index e4af6e9828..adde842881 100644 --- a/docs/examples/0.15.x/server-nodejs/examples/account/update-status.md +++ b/docs/examples/0.15.x/server-nodejs/examples/account/update-status.md @@ -1,9 +1,9 @@ const sdk = require('node-appwrite'); // Init SDK -let client = new sdk.Client(); +const client = new sdk.Client(); -let account = new sdk.Account(client); +const account = new sdk.Account(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint @@ -11,7 +11,7 @@ client .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token ; -let promise = account.updateStatus(); +const promise = account.updateStatus(); promise.then(function (response) { console.log(response); diff --git a/docs/examples/0.15.x/server-nodejs/examples/account/update-verification.md b/docs/examples/0.15.x/server-nodejs/examples/account/update-verification.md index 1e264ecdc7..c5b7356414 100644 --- a/docs/examples/0.15.x/server-nodejs/examples/account/update-verification.md +++ b/docs/examples/0.15.x/server-nodejs/examples/account/update-verification.md @@ -1,9 +1,9 @@ const sdk = require('node-appwrite'); // Init SDK -let client = new sdk.Client(); +const client = new sdk.Client(); -let account = new sdk.Account(client); +const account = new sdk.Account(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint @@ -11,7 +11,7 @@ client .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token ; -let promise = account.updateVerification('[USER_ID]', '[SECRET]'); +const promise = account.updateVerification('[USER_ID]', '[SECRET]'); promise.then(function (response) { console.log(response); diff --git a/docs/examples/0.15.x/server-nodejs/examples/avatars/get-browser.md b/docs/examples/0.15.x/server-nodejs/examples/avatars/get-browser.md index 2a670ce08b..350d154894 100644 --- a/docs/examples/0.15.x/server-nodejs/examples/avatars/get-browser.md +++ b/docs/examples/0.15.x/server-nodejs/examples/avatars/get-browser.md @@ -1,9 +1,9 @@ const sdk = require('node-appwrite'); // Init SDK -let client = new sdk.Client(); +const client = new sdk.Client(); -let avatars = new sdk.Avatars(client); +const avatars = new sdk.Avatars(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint @@ -11,7 +11,7 @@ client .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; -let promise = avatars.getBrowser('aa'); +const promise = avatars.getBrowser('aa'); promise.then(function (response) { console.log(response); diff --git a/docs/examples/0.15.x/server-nodejs/examples/avatars/get-credit-card.md b/docs/examples/0.15.x/server-nodejs/examples/avatars/get-credit-card.md index afd38f5a97..3f685ff39c 100644 --- a/docs/examples/0.15.x/server-nodejs/examples/avatars/get-credit-card.md +++ b/docs/examples/0.15.x/server-nodejs/examples/avatars/get-credit-card.md @@ -1,9 +1,9 @@ const sdk = require('node-appwrite'); // Init SDK -let client = new sdk.Client(); +const client = new sdk.Client(); -let avatars = new sdk.Avatars(client); +const avatars = new sdk.Avatars(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint @@ -11,7 +11,7 @@ client .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; -let promise = avatars.getCreditCard('amex'); +const promise = avatars.getCreditCard('amex'); promise.then(function (response) { console.log(response); diff --git a/docs/examples/0.15.x/server-nodejs/examples/avatars/get-favicon.md b/docs/examples/0.15.x/server-nodejs/examples/avatars/get-favicon.md index bb347371d4..89a496aaa4 100644 --- a/docs/examples/0.15.x/server-nodejs/examples/avatars/get-favicon.md +++ b/docs/examples/0.15.x/server-nodejs/examples/avatars/get-favicon.md @@ -1,9 +1,9 @@ const sdk = require('node-appwrite'); // Init SDK -let client = new sdk.Client(); +const client = new sdk.Client(); -let avatars = new sdk.Avatars(client); +const avatars = new sdk.Avatars(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint @@ -11,7 +11,7 @@ client .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; -let promise = avatars.getFavicon('https://example.com'); +const promise = avatars.getFavicon('https://example.com'); promise.then(function (response) { console.log(response); diff --git a/docs/examples/0.15.x/server-nodejs/examples/avatars/get-flag.md b/docs/examples/0.15.x/server-nodejs/examples/avatars/get-flag.md index db677bc4f8..53fde28188 100644 --- a/docs/examples/0.15.x/server-nodejs/examples/avatars/get-flag.md +++ b/docs/examples/0.15.x/server-nodejs/examples/avatars/get-flag.md @@ -1,9 +1,9 @@ const sdk = require('node-appwrite'); // Init SDK -let client = new sdk.Client(); +const client = new sdk.Client(); -let avatars = new sdk.Avatars(client); +const avatars = new sdk.Avatars(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint @@ -11,7 +11,7 @@ client .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; -let promise = avatars.getFlag('af'); +const promise = avatars.getFlag('af'); promise.then(function (response) { console.log(response); diff --git a/docs/examples/0.15.x/server-nodejs/examples/avatars/get-image.md b/docs/examples/0.15.x/server-nodejs/examples/avatars/get-image.md index efa871ea63..2b07d62411 100644 --- a/docs/examples/0.15.x/server-nodejs/examples/avatars/get-image.md +++ b/docs/examples/0.15.x/server-nodejs/examples/avatars/get-image.md @@ -1,9 +1,9 @@ const sdk = require('node-appwrite'); // Init SDK -let client = new sdk.Client(); +const client = new sdk.Client(); -let avatars = new sdk.Avatars(client); +const avatars = new sdk.Avatars(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint @@ -11,7 +11,7 @@ client .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; -let promise = avatars.getImage('https://example.com'); +const promise = avatars.getImage('https://example.com'); promise.then(function (response) { console.log(response); diff --git a/docs/examples/0.15.x/server-nodejs/examples/avatars/get-initials.md b/docs/examples/0.15.x/server-nodejs/examples/avatars/get-initials.md index d6175bff13..fc00f8fbbc 100644 --- a/docs/examples/0.15.x/server-nodejs/examples/avatars/get-initials.md +++ b/docs/examples/0.15.x/server-nodejs/examples/avatars/get-initials.md @@ -1,9 +1,9 @@ const sdk = require('node-appwrite'); // Init SDK -let client = new sdk.Client(); +const client = new sdk.Client(); -let avatars = new sdk.Avatars(client); +const avatars = new sdk.Avatars(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint @@ -11,7 +11,7 @@ client .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; -let promise = avatars.getInitials(); +const promise = avatars.getInitials(); promise.then(function (response) { console.log(response); diff --git a/docs/examples/0.15.x/server-nodejs/examples/avatars/get-q-r.md b/docs/examples/0.15.x/server-nodejs/examples/avatars/get-q-r.md index e79b3235af..63cac53562 100644 --- a/docs/examples/0.15.x/server-nodejs/examples/avatars/get-q-r.md +++ b/docs/examples/0.15.x/server-nodejs/examples/avatars/get-q-r.md @@ -1,9 +1,9 @@ const sdk = require('node-appwrite'); // Init SDK -let client = new sdk.Client(); +const client = new sdk.Client(); -let avatars = new sdk.Avatars(client); +const avatars = new sdk.Avatars(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint @@ -11,7 +11,7 @@ client .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; -let promise = avatars.getQR('[TEXT]'); +const promise = avatars.getQR('[TEXT]'); promise.then(function (response) { console.log(response); diff --git a/docs/examples/0.15.x/server-nodejs/examples/database/create-boolean-attribute.md b/docs/examples/0.15.x/server-nodejs/examples/database/create-boolean-attribute.md deleted file mode 100644 index 1f6db6a604..0000000000 --- a/docs/examples/0.15.x/server-nodejs/examples/database/create-boolean-attribute.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let database = new sdk.Database(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = database.createBooleanAttribute('[COLLECTION_ID]', '', false); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/docs/examples/0.15.x/server-nodejs/examples/database/create-collection.md b/docs/examples/0.15.x/server-nodejs/examples/database/create-collection.md deleted file mode 100644 index b39336e4f5..0000000000 --- a/docs/examples/0.15.x/server-nodejs/examples/database/create-collection.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let database = new sdk.Database(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = database.createCollection('[COLLECTION_ID]', '[NAME]', 'document', ["role:all"], ["role:all"]); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/docs/examples/0.15.x/server-nodejs/examples/database/create-document.md b/docs/examples/0.15.x/server-nodejs/examples/database/create-document.md deleted file mode 100644 index 6ba0670838..0000000000 --- a/docs/examples/0.15.x/server-nodejs/examples/database/create-document.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let database = new sdk.Database(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = database.createDocument('[COLLECTION_ID]', '[DOCUMENT_ID]', {}); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/docs/examples/0.15.x/server-nodejs/examples/database/create-email-attribute.md b/docs/examples/0.15.x/server-nodejs/examples/database/create-email-attribute.md deleted file mode 100644 index cf49202552..0000000000 --- a/docs/examples/0.15.x/server-nodejs/examples/database/create-email-attribute.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let database = new sdk.Database(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = database.createEmailAttribute('[COLLECTION_ID]', '', false); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/docs/examples/0.15.x/server-nodejs/examples/database/create-enum-attribute.md b/docs/examples/0.15.x/server-nodejs/examples/database/create-enum-attribute.md deleted file mode 100644 index 64629ec6ce..0000000000 --- a/docs/examples/0.15.x/server-nodejs/examples/database/create-enum-attribute.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let database = new sdk.Database(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = database.createEnumAttribute('[COLLECTION_ID]', '', [], false); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/docs/examples/0.15.x/server-nodejs/examples/database/create-float-attribute.md b/docs/examples/0.15.x/server-nodejs/examples/database/create-float-attribute.md deleted file mode 100644 index ec362226aa..0000000000 --- a/docs/examples/0.15.x/server-nodejs/examples/database/create-float-attribute.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let database = new sdk.Database(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = database.createFloatAttribute('[COLLECTION_ID]', '', false); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/docs/examples/0.15.x/server-nodejs/examples/database/create-index.md b/docs/examples/0.15.x/server-nodejs/examples/database/create-index.md deleted file mode 100644 index e23eca2292..0000000000 --- a/docs/examples/0.15.x/server-nodejs/examples/database/create-index.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let database = new sdk.Database(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = database.createIndex('[COLLECTION_ID]', '', 'key', []); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/docs/examples/0.15.x/server-nodejs/examples/database/create-integer-attribute.md b/docs/examples/0.15.x/server-nodejs/examples/database/create-integer-attribute.md deleted file mode 100644 index b05d0b35c5..0000000000 --- a/docs/examples/0.15.x/server-nodejs/examples/database/create-integer-attribute.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let database = new sdk.Database(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = database.createIntegerAttribute('[COLLECTION_ID]', '', false); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/docs/examples/0.15.x/server-nodejs/examples/database/create-ip-attribute.md b/docs/examples/0.15.x/server-nodejs/examples/database/create-ip-attribute.md deleted file mode 100644 index 6048a2acbe..0000000000 --- a/docs/examples/0.15.x/server-nodejs/examples/database/create-ip-attribute.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let database = new sdk.Database(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = database.createIpAttribute('[COLLECTION_ID]', '', false); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/docs/examples/0.15.x/server-nodejs/examples/database/create-string-attribute.md b/docs/examples/0.15.x/server-nodejs/examples/database/create-string-attribute.md deleted file mode 100644 index ad176de552..0000000000 --- a/docs/examples/0.15.x/server-nodejs/examples/database/create-string-attribute.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let database = new sdk.Database(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = database.createStringAttribute('[COLLECTION_ID]', '', 1, false); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/docs/examples/0.15.x/server-nodejs/examples/database/create-url-attribute.md b/docs/examples/0.15.x/server-nodejs/examples/database/create-url-attribute.md deleted file mode 100644 index 6461cb2c31..0000000000 --- a/docs/examples/0.15.x/server-nodejs/examples/database/create-url-attribute.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let database = new sdk.Database(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = database.createUrlAttribute('[COLLECTION_ID]', '', false); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/docs/examples/0.15.x/server-nodejs/examples/database/delete-attribute.md b/docs/examples/0.15.x/server-nodejs/examples/database/delete-attribute.md deleted file mode 100644 index 8704ff6d73..0000000000 --- a/docs/examples/0.15.x/server-nodejs/examples/database/delete-attribute.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let database = new sdk.Database(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = database.deleteAttribute('[COLLECTION_ID]', ''); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/docs/examples/0.15.x/server-nodejs/examples/database/delete-collection.md b/docs/examples/0.15.x/server-nodejs/examples/database/delete-collection.md deleted file mode 100644 index 503da98a73..0000000000 --- a/docs/examples/0.15.x/server-nodejs/examples/database/delete-collection.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let database = new sdk.Database(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = database.deleteCollection('[COLLECTION_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/docs/examples/0.15.x/server-nodejs/examples/database/delete-document.md b/docs/examples/0.15.x/server-nodejs/examples/database/delete-document.md deleted file mode 100644 index f14c985e83..0000000000 --- a/docs/examples/0.15.x/server-nodejs/examples/database/delete-document.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let database = new sdk.Database(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = database.deleteDocument('[COLLECTION_ID]', '[DOCUMENT_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/docs/examples/0.15.x/server-nodejs/examples/database/delete-index.md b/docs/examples/0.15.x/server-nodejs/examples/database/delete-index.md deleted file mode 100644 index 8e61399e3e..0000000000 --- a/docs/examples/0.15.x/server-nodejs/examples/database/delete-index.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let database = new sdk.Database(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = database.deleteIndex('[COLLECTION_ID]', ''); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/docs/examples/0.15.x/server-nodejs/examples/database/get-attribute.md b/docs/examples/0.15.x/server-nodejs/examples/database/get-attribute.md deleted file mode 100644 index 60c08084ab..0000000000 --- a/docs/examples/0.15.x/server-nodejs/examples/database/get-attribute.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let database = new sdk.Database(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = database.getAttribute('[COLLECTION_ID]', ''); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/docs/examples/0.15.x/server-nodejs/examples/database/get-collection.md b/docs/examples/0.15.x/server-nodejs/examples/database/get-collection.md deleted file mode 100644 index a14ce0d49a..0000000000 --- a/docs/examples/0.15.x/server-nodejs/examples/database/get-collection.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let database = new sdk.Database(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = database.getCollection('[COLLECTION_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/docs/examples/0.15.x/server-nodejs/examples/database/get-document.md b/docs/examples/0.15.x/server-nodejs/examples/database/get-document.md deleted file mode 100644 index 55cce32b9b..0000000000 --- a/docs/examples/0.15.x/server-nodejs/examples/database/get-document.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let database = new sdk.Database(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = database.getDocument('[COLLECTION_ID]', '[DOCUMENT_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/docs/examples/0.15.x/server-nodejs/examples/database/get-index.md b/docs/examples/0.15.x/server-nodejs/examples/database/get-index.md deleted file mode 100644 index 799eef88f7..0000000000 --- a/docs/examples/0.15.x/server-nodejs/examples/database/get-index.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let database = new sdk.Database(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = database.getIndex('[COLLECTION_ID]', ''); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/docs/examples/0.15.x/server-nodejs/examples/database/list-attributes.md b/docs/examples/0.15.x/server-nodejs/examples/database/list-attributes.md deleted file mode 100644 index 23475ea654..0000000000 --- a/docs/examples/0.15.x/server-nodejs/examples/database/list-attributes.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let database = new sdk.Database(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = database.listAttributes('[COLLECTION_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/docs/examples/0.15.x/server-nodejs/examples/database/list-collections.md b/docs/examples/0.15.x/server-nodejs/examples/database/list-collections.md deleted file mode 100644 index bacfdb062c..0000000000 --- a/docs/examples/0.15.x/server-nodejs/examples/database/list-collections.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let database = new sdk.Database(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = database.listCollections(); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/docs/examples/0.15.x/server-nodejs/examples/database/list-documents.md b/docs/examples/0.15.x/server-nodejs/examples/database/list-documents.md deleted file mode 100644 index ad02d05e2a..0000000000 --- a/docs/examples/0.15.x/server-nodejs/examples/database/list-documents.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let database = new sdk.Database(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = database.listDocuments('[COLLECTION_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/docs/examples/0.15.x/server-nodejs/examples/database/list-indexes.md b/docs/examples/0.15.x/server-nodejs/examples/database/list-indexes.md deleted file mode 100644 index 85b2d1f227..0000000000 --- a/docs/examples/0.15.x/server-nodejs/examples/database/list-indexes.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let database = new sdk.Database(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = database.listIndexes('[COLLECTION_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/docs/examples/0.15.x/server-nodejs/examples/database/update-collection.md b/docs/examples/0.15.x/server-nodejs/examples/database/update-collection.md deleted file mode 100644 index bed47c3613..0000000000 --- a/docs/examples/0.15.x/server-nodejs/examples/database/update-collection.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let database = new sdk.Database(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = database.updateCollection('[COLLECTION_ID]', '[NAME]', 'document'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/docs/examples/0.15.x/server-nodejs/examples/database/update-document.md b/docs/examples/0.15.x/server-nodejs/examples/database/update-document.md deleted file mode 100644 index 40e9488a6b..0000000000 --- a/docs/examples/0.15.x/server-nodejs/examples/database/update-document.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let database = new sdk.Database(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = database.updateDocument('[COLLECTION_ID]', '[DOCUMENT_ID]', {}); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/docs/examples/0.15.x/server-nodejs/examples/functions/create-deployment.md b/docs/examples/0.15.x/server-nodejs/examples/functions/create-deployment.md index 00717651f9..ce8e480215 100644 --- a/docs/examples/0.15.x/server-nodejs/examples/functions/create-deployment.md +++ b/docs/examples/0.15.x/server-nodejs/examples/functions/create-deployment.md @@ -2,9 +2,9 @@ const sdk = require('node-appwrite'); const fs = require('fs'); // Init SDK -let client = new sdk.Client(); +const client = new sdk.Client(); -let functions = new sdk.Functions(client); +const functions = new sdk.Functions(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint @@ -12,7 +12,7 @@ client .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; -let promise = functions.createDeployment('[FUNCTION_ID]', '[ENTRYPOINT]', 'file.png', false); +const promise = functions.createDeployment('[FUNCTION_ID]', '[ENTRYPOINT]', 'file.png', false); promise.then(function (response) { console.log(response); diff --git a/docs/examples/0.15.x/server-nodejs/examples/functions/create-execution.md b/docs/examples/0.15.x/server-nodejs/examples/functions/create-execution.md index 895b70cd1b..35114aa170 100644 --- a/docs/examples/0.15.x/server-nodejs/examples/functions/create-execution.md +++ b/docs/examples/0.15.x/server-nodejs/examples/functions/create-execution.md @@ -1,9 +1,9 @@ const sdk = require('node-appwrite'); // Init SDK -let client = new sdk.Client(); +const client = new sdk.Client(); -let functions = new sdk.Functions(client); +const functions = new sdk.Functions(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint @@ -11,7 +11,7 @@ client .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; -let promise = functions.createExecution('[FUNCTION_ID]'); +const promise = functions.createExecution('[FUNCTION_ID]'); promise.then(function (response) { console.log(response); diff --git a/docs/examples/0.15.x/server-nodejs/examples/functions/create.md b/docs/examples/0.15.x/server-nodejs/examples/functions/create.md index d1df9635f6..47865bc107 100644 --- a/docs/examples/0.15.x/server-nodejs/examples/functions/create.md +++ b/docs/examples/0.15.x/server-nodejs/examples/functions/create.md @@ -1,9 +1,9 @@ const sdk = require('node-appwrite'); // Init SDK -let client = new sdk.Client(); +const client = new sdk.Client(); -let functions = new sdk.Functions(client); +const functions = new sdk.Functions(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint @@ -11,7 +11,7 @@ client .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; -let promise = functions.create('[FUNCTION_ID]', '[NAME]', [], 'node-14.5'); +const promise = functions.create('[FUNCTION_ID]', '[NAME]', [], 'node-14.5'); promise.then(function (response) { console.log(response); diff --git a/docs/examples/0.15.x/server-nodejs/examples/functions/delete-deployment.md b/docs/examples/0.15.x/server-nodejs/examples/functions/delete-deployment.md index cab6ffde0b..536e5c530b 100644 --- a/docs/examples/0.15.x/server-nodejs/examples/functions/delete-deployment.md +++ b/docs/examples/0.15.x/server-nodejs/examples/functions/delete-deployment.md @@ -1,9 +1,9 @@ const sdk = require('node-appwrite'); // Init SDK -let client = new sdk.Client(); +const client = new sdk.Client(); -let functions = new sdk.Functions(client); +const functions = new sdk.Functions(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint @@ -11,7 +11,7 @@ client .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; -let promise = functions.deleteDeployment('[FUNCTION_ID]', '[DEPLOYMENT_ID]'); +const promise = functions.deleteDeployment('[FUNCTION_ID]', '[DEPLOYMENT_ID]'); promise.then(function (response) { console.log(response); diff --git a/docs/examples/0.15.x/server-nodejs/examples/functions/delete.md b/docs/examples/0.15.x/server-nodejs/examples/functions/delete.md index 6f079cb7f7..1362dd5ac7 100644 --- a/docs/examples/0.15.x/server-nodejs/examples/functions/delete.md +++ b/docs/examples/0.15.x/server-nodejs/examples/functions/delete.md @@ -1,9 +1,9 @@ const sdk = require('node-appwrite'); // Init SDK -let client = new sdk.Client(); +const client = new sdk.Client(); -let functions = new sdk.Functions(client); +const functions = new sdk.Functions(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint @@ -11,7 +11,7 @@ client .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; -let promise = functions.delete('[FUNCTION_ID]'); +const promise = functions.delete('[FUNCTION_ID]'); promise.then(function (response) { console.log(response); diff --git a/docs/examples/0.15.x/server-nodejs/examples/functions/get-deployment.md b/docs/examples/0.15.x/server-nodejs/examples/functions/get-deployment.md index dad6cf9aa7..c4256a6b64 100644 --- a/docs/examples/0.15.x/server-nodejs/examples/functions/get-deployment.md +++ b/docs/examples/0.15.x/server-nodejs/examples/functions/get-deployment.md @@ -1,9 +1,9 @@ const sdk = require('node-appwrite'); // Init SDK -let client = new sdk.Client(); +const client = new sdk.Client(); -let functions = new sdk.Functions(client); +const functions = new sdk.Functions(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint @@ -11,7 +11,7 @@ client .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; -let promise = functions.getDeployment('[FUNCTION_ID]', '[DEPLOYMENT_ID]'); +const promise = functions.getDeployment('[FUNCTION_ID]', '[DEPLOYMENT_ID]'); promise.then(function (response) { console.log(response); diff --git a/docs/examples/0.15.x/server-nodejs/examples/functions/get-execution.md b/docs/examples/0.15.x/server-nodejs/examples/functions/get-execution.md index 1e2f5ea88a..f3370ecc5d 100644 --- a/docs/examples/0.15.x/server-nodejs/examples/functions/get-execution.md +++ b/docs/examples/0.15.x/server-nodejs/examples/functions/get-execution.md @@ -1,9 +1,9 @@ const sdk = require('node-appwrite'); // Init SDK -let client = new sdk.Client(); +const client = new sdk.Client(); -let functions = new sdk.Functions(client); +const functions = new sdk.Functions(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint @@ -11,7 +11,7 @@ client .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; -let promise = functions.getExecution('[FUNCTION_ID]', '[EXECUTION_ID]'); +const promise = functions.getExecution('[FUNCTION_ID]', '[EXECUTION_ID]'); promise.then(function (response) { console.log(response); diff --git a/docs/examples/0.15.x/server-nodejs/examples/functions/get.md b/docs/examples/0.15.x/server-nodejs/examples/functions/get.md index 620deec88c..5b35a3ddb1 100644 --- a/docs/examples/0.15.x/server-nodejs/examples/functions/get.md +++ b/docs/examples/0.15.x/server-nodejs/examples/functions/get.md @@ -1,9 +1,9 @@ const sdk = require('node-appwrite'); // Init SDK -let client = new sdk.Client(); +const client = new sdk.Client(); -let functions = new sdk.Functions(client); +const functions = new sdk.Functions(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint @@ -11,7 +11,7 @@ client .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; -let promise = functions.get('[FUNCTION_ID]'); +const promise = functions.get('[FUNCTION_ID]'); promise.then(function (response) { console.log(response); diff --git a/docs/examples/0.15.x/server-nodejs/examples/functions/list-deployments.md b/docs/examples/0.15.x/server-nodejs/examples/functions/list-deployments.md index b2bc8853c2..354c157f13 100644 --- a/docs/examples/0.15.x/server-nodejs/examples/functions/list-deployments.md +++ b/docs/examples/0.15.x/server-nodejs/examples/functions/list-deployments.md @@ -1,9 +1,9 @@ const sdk = require('node-appwrite'); // Init SDK -let client = new sdk.Client(); +const client = new sdk.Client(); -let functions = new sdk.Functions(client); +const functions = new sdk.Functions(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint @@ -11,7 +11,7 @@ client .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; -let promise = functions.listDeployments('[FUNCTION_ID]'); +const promise = functions.listDeployments('[FUNCTION_ID]'); promise.then(function (response) { console.log(response); diff --git a/docs/examples/0.15.x/server-nodejs/examples/functions/list-executions.md b/docs/examples/0.15.x/server-nodejs/examples/functions/list-executions.md index 40c44b12e5..21ee1f65df 100644 --- a/docs/examples/0.15.x/server-nodejs/examples/functions/list-executions.md +++ b/docs/examples/0.15.x/server-nodejs/examples/functions/list-executions.md @@ -1,9 +1,9 @@ const sdk = require('node-appwrite'); // Init SDK -let client = new sdk.Client(); +const client = new sdk.Client(); -let functions = new sdk.Functions(client); +const functions = new sdk.Functions(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint @@ -11,7 +11,7 @@ client .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; -let promise = functions.listExecutions('[FUNCTION_ID]'); +const promise = functions.listExecutions('[FUNCTION_ID]'); promise.then(function (response) { console.log(response); diff --git a/docs/examples/0.15.x/server-nodejs/examples/functions/list-runtimes.md b/docs/examples/0.15.x/server-nodejs/examples/functions/list-runtimes.md index e2aa34abfe..bab36ebff3 100644 --- a/docs/examples/0.15.x/server-nodejs/examples/functions/list-runtimes.md +++ b/docs/examples/0.15.x/server-nodejs/examples/functions/list-runtimes.md @@ -1,9 +1,9 @@ const sdk = require('node-appwrite'); // Init SDK -let client = new sdk.Client(); +const client = new sdk.Client(); -let functions = new sdk.Functions(client); +const functions = new sdk.Functions(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint @@ -11,7 +11,7 @@ client .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; -let promise = functions.listRuntimes(); +const promise = functions.listRuntimes(); promise.then(function (response) { console.log(response); diff --git a/docs/examples/0.15.x/server-nodejs/examples/functions/list.md b/docs/examples/0.15.x/server-nodejs/examples/functions/list.md index 9ecd37237d..98343cbf07 100644 --- a/docs/examples/0.15.x/server-nodejs/examples/functions/list.md +++ b/docs/examples/0.15.x/server-nodejs/examples/functions/list.md @@ -1,9 +1,9 @@ const sdk = require('node-appwrite'); // Init SDK -let client = new sdk.Client(); +const client = new sdk.Client(); -let functions = new sdk.Functions(client); +const functions = new sdk.Functions(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint @@ -11,7 +11,7 @@ client .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; -let promise = functions.list(); +const promise = functions.list(); promise.then(function (response) { console.log(response); diff --git a/docs/examples/0.15.x/server-nodejs/examples/functions/retry-build.md b/docs/examples/0.15.x/server-nodejs/examples/functions/retry-build.md index aa1daccc86..322306efa4 100644 --- a/docs/examples/0.15.x/server-nodejs/examples/functions/retry-build.md +++ b/docs/examples/0.15.x/server-nodejs/examples/functions/retry-build.md @@ -1,9 +1,9 @@ const sdk = require('node-appwrite'); // Init SDK -let client = new sdk.Client(); +const client = new sdk.Client(); -let functions = new sdk.Functions(client); +const functions = new sdk.Functions(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint @@ -11,7 +11,7 @@ client .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; -let promise = functions.retryBuild('[FUNCTION_ID]', '[DEPLOYMENT_ID]', '[BUILD_ID]'); +const promise = functions.retryBuild('[FUNCTION_ID]', '[DEPLOYMENT_ID]', '[BUILD_ID]'); promise.then(function (response) { console.log(response); diff --git a/docs/examples/0.15.x/server-nodejs/examples/functions/update-deployment.md b/docs/examples/0.15.x/server-nodejs/examples/functions/update-deployment.md index 67ba6f94f9..f6f2dc293a 100644 --- a/docs/examples/0.15.x/server-nodejs/examples/functions/update-deployment.md +++ b/docs/examples/0.15.x/server-nodejs/examples/functions/update-deployment.md @@ -1,9 +1,9 @@ const sdk = require('node-appwrite'); // Init SDK -let client = new sdk.Client(); +const client = new sdk.Client(); -let functions = new sdk.Functions(client); +const functions = new sdk.Functions(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint @@ -11,7 +11,7 @@ client .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; -let promise = functions.updateDeployment('[FUNCTION_ID]', '[DEPLOYMENT_ID]'); +const promise = functions.updateDeployment('[FUNCTION_ID]', '[DEPLOYMENT_ID]'); promise.then(function (response) { console.log(response); diff --git a/docs/examples/0.15.x/server-nodejs/examples/functions/update.md b/docs/examples/0.15.x/server-nodejs/examples/functions/update.md index 83e25b9cdc..b7f3a4d7f6 100644 --- a/docs/examples/0.15.x/server-nodejs/examples/functions/update.md +++ b/docs/examples/0.15.x/server-nodejs/examples/functions/update.md @@ -1,9 +1,9 @@ const sdk = require('node-appwrite'); // Init SDK -let client = new sdk.Client(); +const client = new sdk.Client(); -let functions = new sdk.Functions(client); +const functions = new sdk.Functions(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint @@ -11,7 +11,7 @@ client .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; -let promise = functions.update('[FUNCTION_ID]', '[NAME]', []); +const promise = functions.update('[FUNCTION_ID]', '[NAME]', []); promise.then(function (response) { console.log(response); diff --git a/docs/examples/0.15.x/server-nodejs/examples/health/get-antivirus.md b/docs/examples/0.15.x/server-nodejs/examples/health/get-antivirus.md index 2df53eb37f..66886e3454 100644 --- a/docs/examples/0.15.x/server-nodejs/examples/health/get-antivirus.md +++ b/docs/examples/0.15.x/server-nodejs/examples/health/get-antivirus.md @@ -1,9 +1,9 @@ const sdk = require('node-appwrite'); // Init SDK -let client = new sdk.Client(); +const client = new sdk.Client(); -let health = new sdk.Health(client); +const health = new sdk.Health(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint @@ -11,7 +11,7 @@ client .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; -let promise = health.getAntivirus(); +const promise = health.getAntivirus(); promise.then(function (response) { console.log(response); diff --git a/docs/examples/0.15.x/server-nodejs/examples/health/get-cache.md b/docs/examples/0.15.x/server-nodejs/examples/health/get-cache.md index d19cc8abd5..af57c75309 100644 --- a/docs/examples/0.15.x/server-nodejs/examples/health/get-cache.md +++ b/docs/examples/0.15.x/server-nodejs/examples/health/get-cache.md @@ -1,9 +1,9 @@ const sdk = require('node-appwrite'); // Init SDK -let client = new sdk.Client(); +const client = new sdk.Client(); -let health = new sdk.Health(client); +const health = new sdk.Health(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint @@ -11,7 +11,7 @@ client .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; -let promise = health.getCache(); +const promise = health.getCache(); promise.then(function (response) { console.log(response); diff --git a/docs/examples/0.15.x/server-nodejs/examples/health/get-d-b.md b/docs/examples/0.15.x/server-nodejs/examples/health/get-d-b.md index 08505367d4..d871648ab5 100644 --- a/docs/examples/0.15.x/server-nodejs/examples/health/get-d-b.md +++ b/docs/examples/0.15.x/server-nodejs/examples/health/get-d-b.md @@ -1,9 +1,9 @@ const sdk = require('node-appwrite'); // Init SDK -let client = new sdk.Client(); +const client = new sdk.Client(); -let health = new sdk.Health(client); +const health = new sdk.Health(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint @@ -11,7 +11,7 @@ client .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; -let promise = health.getDB(); +const promise = health.getDB(); promise.then(function (response) { console.log(response); diff --git a/docs/examples/0.15.x/server-nodejs/examples/health/get-queue-certificates.md b/docs/examples/0.15.x/server-nodejs/examples/health/get-queue-certificates.md index 2eb69e0126..ef0ecefe69 100644 --- a/docs/examples/0.15.x/server-nodejs/examples/health/get-queue-certificates.md +++ b/docs/examples/0.15.x/server-nodejs/examples/health/get-queue-certificates.md @@ -1,9 +1,9 @@ const sdk = require('node-appwrite'); // Init SDK -let client = new sdk.Client(); +const client = new sdk.Client(); -let health = new sdk.Health(client); +const health = new sdk.Health(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint @@ -11,7 +11,7 @@ client .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; -let promise = health.getQueueCertificates(); +const promise = health.getQueueCertificates(); promise.then(function (response) { console.log(response); diff --git a/docs/examples/0.15.x/server-nodejs/examples/health/get-queue-functions.md b/docs/examples/0.15.x/server-nodejs/examples/health/get-queue-functions.md index 9470e11646..6ba0265f26 100644 --- a/docs/examples/0.15.x/server-nodejs/examples/health/get-queue-functions.md +++ b/docs/examples/0.15.x/server-nodejs/examples/health/get-queue-functions.md @@ -1,9 +1,9 @@ const sdk = require('node-appwrite'); // Init SDK -let client = new sdk.Client(); +const client = new sdk.Client(); -let health = new sdk.Health(client); +const health = new sdk.Health(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint @@ -11,7 +11,7 @@ client .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; -let promise = health.getQueueFunctions(); +const promise = health.getQueueFunctions(); promise.then(function (response) { console.log(response); diff --git a/docs/examples/0.15.x/server-nodejs/examples/health/get-queue-logs.md b/docs/examples/0.15.x/server-nodejs/examples/health/get-queue-logs.md index 10f1cb24e3..82f48a7adb 100644 --- a/docs/examples/0.15.x/server-nodejs/examples/health/get-queue-logs.md +++ b/docs/examples/0.15.x/server-nodejs/examples/health/get-queue-logs.md @@ -1,9 +1,9 @@ const sdk = require('node-appwrite'); // Init SDK -let client = new sdk.Client(); +const client = new sdk.Client(); -let health = new sdk.Health(client); +const health = new sdk.Health(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint @@ -11,7 +11,7 @@ client .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; -let promise = health.getQueueLogs(); +const promise = health.getQueueLogs(); promise.then(function (response) { console.log(response); diff --git a/docs/examples/0.15.x/server-nodejs/examples/health/get-queue-webhooks.md b/docs/examples/0.15.x/server-nodejs/examples/health/get-queue-webhooks.md index 3a788eb895..e46403c751 100644 --- a/docs/examples/0.15.x/server-nodejs/examples/health/get-queue-webhooks.md +++ b/docs/examples/0.15.x/server-nodejs/examples/health/get-queue-webhooks.md @@ -1,9 +1,9 @@ const sdk = require('node-appwrite'); // Init SDK -let client = new sdk.Client(); +const client = new sdk.Client(); -let health = new sdk.Health(client); +const health = new sdk.Health(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint @@ -11,7 +11,7 @@ client .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; -let promise = health.getQueueWebhooks(); +const promise = health.getQueueWebhooks(); promise.then(function (response) { console.log(response); diff --git a/docs/examples/0.15.x/server-nodejs/examples/health/get-storage-local.md b/docs/examples/0.15.x/server-nodejs/examples/health/get-storage-local.md index 84b8fb47a6..9d65f712e1 100644 --- a/docs/examples/0.15.x/server-nodejs/examples/health/get-storage-local.md +++ b/docs/examples/0.15.x/server-nodejs/examples/health/get-storage-local.md @@ -1,9 +1,9 @@ const sdk = require('node-appwrite'); // Init SDK -let client = new sdk.Client(); +const client = new sdk.Client(); -let health = new sdk.Health(client); +const health = new sdk.Health(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint @@ -11,7 +11,7 @@ client .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; -let promise = health.getStorageLocal(); +const promise = health.getStorageLocal(); promise.then(function (response) { console.log(response); diff --git a/docs/examples/0.15.x/server-nodejs/examples/health/get-time.md b/docs/examples/0.15.x/server-nodejs/examples/health/get-time.md index 563bf2fb52..143885f0fa 100644 --- a/docs/examples/0.15.x/server-nodejs/examples/health/get-time.md +++ b/docs/examples/0.15.x/server-nodejs/examples/health/get-time.md @@ -1,9 +1,9 @@ const sdk = require('node-appwrite'); // Init SDK -let client = new sdk.Client(); +const client = new sdk.Client(); -let health = new sdk.Health(client); +const health = new sdk.Health(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint @@ -11,7 +11,7 @@ client .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; -let promise = health.getTime(); +const promise = health.getTime(); promise.then(function (response) { console.log(response); diff --git a/docs/examples/0.15.x/server-nodejs/examples/health/get.md b/docs/examples/0.15.x/server-nodejs/examples/health/get.md index 20c3d40801..fc6d1b9f5d 100644 --- a/docs/examples/0.15.x/server-nodejs/examples/health/get.md +++ b/docs/examples/0.15.x/server-nodejs/examples/health/get.md @@ -1,9 +1,9 @@ const sdk = require('node-appwrite'); // Init SDK -let client = new sdk.Client(); +const client = new sdk.Client(); -let health = new sdk.Health(client); +const health = new sdk.Health(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint @@ -11,7 +11,7 @@ client .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; -let promise = health.get(); +const promise = health.get(); promise.then(function (response) { console.log(response); diff --git a/docs/examples/0.15.x/server-nodejs/examples/locale/get-continents.md b/docs/examples/0.15.x/server-nodejs/examples/locale/get-continents.md index 323237b4ab..b8a0966a0e 100644 --- a/docs/examples/0.15.x/server-nodejs/examples/locale/get-continents.md +++ b/docs/examples/0.15.x/server-nodejs/examples/locale/get-continents.md @@ -1,9 +1,9 @@ const sdk = require('node-appwrite'); // Init SDK -let client = new sdk.Client(); +const client = new sdk.Client(); -let locale = new sdk.Locale(client); +const locale = new sdk.Locale(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint @@ -11,7 +11,7 @@ client .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; -let promise = locale.getContinents(); +const promise = locale.getContinents(); promise.then(function (response) { console.log(response); diff --git a/docs/examples/0.15.x/server-nodejs/examples/locale/get-countries-e-u.md b/docs/examples/0.15.x/server-nodejs/examples/locale/get-countries-e-u.md index fc9170dba4..bb48ad45a8 100644 --- a/docs/examples/0.15.x/server-nodejs/examples/locale/get-countries-e-u.md +++ b/docs/examples/0.15.x/server-nodejs/examples/locale/get-countries-e-u.md @@ -1,9 +1,9 @@ const sdk = require('node-appwrite'); // Init SDK -let client = new sdk.Client(); +const client = new sdk.Client(); -let locale = new sdk.Locale(client); +const locale = new sdk.Locale(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint @@ -11,7 +11,7 @@ client .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; -let promise = locale.getCountriesEU(); +const promise = locale.getCountriesEU(); promise.then(function (response) { console.log(response); diff --git a/docs/examples/0.15.x/server-nodejs/examples/locale/get-countries-phones.md b/docs/examples/0.15.x/server-nodejs/examples/locale/get-countries-phones.md index 42be901677..d0f1d1119a 100644 --- a/docs/examples/0.15.x/server-nodejs/examples/locale/get-countries-phones.md +++ b/docs/examples/0.15.x/server-nodejs/examples/locale/get-countries-phones.md @@ -1,9 +1,9 @@ const sdk = require('node-appwrite'); // Init SDK -let client = new sdk.Client(); +const client = new sdk.Client(); -let locale = new sdk.Locale(client); +const locale = new sdk.Locale(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint @@ -11,7 +11,7 @@ client .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; -let promise = locale.getCountriesPhones(); +const promise = locale.getCountriesPhones(); promise.then(function (response) { console.log(response); diff --git a/docs/examples/0.15.x/server-nodejs/examples/locale/get-countries.md b/docs/examples/0.15.x/server-nodejs/examples/locale/get-countries.md index 437c9bb502..9d46699d31 100644 --- a/docs/examples/0.15.x/server-nodejs/examples/locale/get-countries.md +++ b/docs/examples/0.15.x/server-nodejs/examples/locale/get-countries.md @@ -1,9 +1,9 @@ const sdk = require('node-appwrite'); // Init SDK -let client = new sdk.Client(); +const client = new sdk.Client(); -let locale = new sdk.Locale(client); +const locale = new sdk.Locale(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint @@ -11,7 +11,7 @@ client .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; -let promise = locale.getCountries(); +const promise = locale.getCountries(); promise.then(function (response) { console.log(response); diff --git a/docs/examples/0.15.x/server-nodejs/examples/locale/get-currencies.md b/docs/examples/0.15.x/server-nodejs/examples/locale/get-currencies.md index 1b7d605760..6dc13bf3b4 100644 --- a/docs/examples/0.15.x/server-nodejs/examples/locale/get-currencies.md +++ b/docs/examples/0.15.x/server-nodejs/examples/locale/get-currencies.md @@ -1,9 +1,9 @@ const sdk = require('node-appwrite'); // Init SDK -let client = new sdk.Client(); +const client = new sdk.Client(); -let locale = new sdk.Locale(client); +const locale = new sdk.Locale(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint @@ -11,7 +11,7 @@ client .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; -let promise = locale.getCurrencies(); +const promise = locale.getCurrencies(); promise.then(function (response) { console.log(response); diff --git a/docs/examples/0.15.x/server-nodejs/examples/locale/get-languages.md b/docs/examples/0.15.x/server-nodejs/examples/locale/get-languages.md index b6f45311b3..f1e51988dd 100644 --- a/docs/examples/0.15.x/server-nodejs/examples/locale/get-languages.md +++ b/docs/examples/0.15.x/server-nodejs/examples/locale/get-languages.md @@ -1,9 +1,9 @@ const sdk = require('node-appwrite'); // Init SDK -let client = new sdk.Client(); +const client = new sdk.Client(); -let locale = new sdk.Locale(client); +const locale = new sdk.Locale(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint @@ -11,7 +11,7 @@ client .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; -let promise = locale.getLanguages(); +const promise = locale.getLanguages(); promise.then(function (response) { console.log(response); diff --git a/docs/examples/0.15.x/server-nodejs/examples/locale/get.md b/docs/examples/0.15.x/server-nodejs/examples/locale/get.md index 2f2eb95d90..79ceda7e5b 100644 --- a/docs/examples/0.15.x/server-nodejs/examples/locale/get.md +++ b/docs/examples/0.15.x/server-nodejs/examples/locale/get.md @@ -1,9 +1,9 @@ const sdk = require('node-appwrite'); // Init SDK -let client = new sdk.Client(); +const client = new sdk.Client(); -let locale = new sdk.Locale(client); +const locale = new sdk.Locale(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint @@ -11,7 +11,7 @@ client .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; -let promise = locale.get(); +const promise = locale.get(); promise.then(function (response) { console.log(response); diff --git a/docs/examples/0.15.x/server-nodejs/examples/storage/create-bucket.md b/docs/examples/0.15.x/server-nodejs/examples/storage/create-bucket.md index c55f512606..c95c15407d 100644 --- a/docs/examples/0.15.x/server-nodejs/examples/storage/create-bucket.md +++ b/docs/examples/0.15.x/server-nodejs/examples/storage/create-bucket.md @@ -1,9 +1,9 @@ const sdk = require('node-appwrite'); // Init SDK -let client = new sdk.Client(); +const client = new sdk.Client(); -let storage = new sdk.Storage(client); +const storage = new sdk.Storage(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint @@ -11,7 +11,7 @@ client .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; -let promise = storage.createBucket('[BUCKET_ID]', '[NAME]', 'file'); +const promise = storage.createBucket('[BUCKET_ID]', '[NAME]', 'file'); promise.then(function (response) { console.log(response); diff --git a/docs/examples/0.15.x/server-nodejs/examples/storage/create-file.md b/docs/examples/0.15.x/server-nodejs/examples/storage/create-file.md index 185a9147c4..d74cfd9edd 100644 --- a/docs/examples/0.15.x/server-nodejs/examples/storage/create-file.md +++ b/docs/examples/0.15.x/server-nodejs/examples/storage/create-file.md @@ -2,9 +2,9 @@ const sdk = require('node-appwrite'); const fs = require('fs'); // Init SDK -let client = new sdk.Client(); +const client = new sdk.Client(); -let storage = new sdk.Storage(client); +const storage = new sdk.Storage(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint @@ -12,7 +12,7 @@ client .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; -let promise = storage.createFile('[BUCKET_ID]', '[FILE_ID]', 'file.png'); +const promise = storage.createFile('[BUCKET_ID]', '[FILE_ID]', 'file.png'); promise.then(function (response) { console.log(response); diff --git a/docs/examples/0.15.x/server-nodejs/examples/storage/delete-bucket.md b/docs/examples/0.15.x/server-nodejs/examples/storage/delete-bucket.md index f11a5a54a6..f755d7471a 100644 --- a/docs/examples/0.15.x/server-nodejs/examples/storage/delete-bucket.md +++ b/docs/examples/0.15.x/server-nodejs/examples/storage/delete-bucket.md @@ -1,9 +1,9 @@ const sdk = require('node-appwrite'); // Init SDK -let client = new sdk.Client(); +const client = new sdk.Client(); -let storage = new sdk.Storage(client); +const storage = new sdk.Storage(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint @@ -11,7 +11,7 @@ client .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; -let promise = storage.deleteBucket('[BUCKET_ID]'); +const promise = storage.deleteBucket('[BUCKET_ID]'); promise.then(function (response) { console.log(response); diff --git a/docs/examples/0.15.x/server-nodejs/examples/storage/delete-file.md b/docs/examples/0.15.x/server-nodejs/examples/storage/delete-file.md index 88797c0695..4e39b047b7 100644 --- a/docs/examples/0.15.x/server-nodejs/examples/storage/delete-file.md +++ b/docs/examples/0.15.x/server-nodejs/examples/storage/delete-file.md @@ -1,9 +1,9 @@ const sdk = require('node-appwrite'); // Init SDK -let client = new sdk.Client(); +const client = new sdk.Client(); -let storage = new sdk.Storage(client); +const storage = new sdk.Storage(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint @@ -11,7 +11,7 @@ client .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; -let promise = storage.deleteFile('[BUCKET_ID]', '[FILE_ID]'); +const promise = storage.deleteFile('[BUCKET_ID]', '[FILE_ID]'); promise.then(function (response) { console.log(response); diff --git a/docs/examples/0.15.x/server-nodejs/examples/storage/get-bucket.md b/docs/examples/0.15.x/server-nodejs/examples/storage/get-bucket.md index 3afe5b49cd..4a00412e66 100644 --- a/docs/examples/0.15.x/server-nodejs/examples/storage/get-bucket.md +++ b/docs/examples/0.15.x/server-nodejs/examples/storage/get-bucket.md @@ -1,9 +1,9 @@ const sdk = require('node-appwrite'); // Init SDK -let client = new sdk.Client(); +const client = new sdk.Client(); -let storage = new sdk.Storage(client); +const storage = new sdk.Storage(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint @@ -11,7 +11,7 @@ client .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; -let promise = storage.getBucket('[BUCKET_ID]'); +const promise = storage.getBucket('[BUCKET_ID]'); promise.then(function (response) { console.log(response); diff --git a/docs/examples/0.15.x/server-nodejs/examples/storage/get-file-download.md b/docs/examples/0.15.x/server-nodejs/examples/storage/get-file-download.md index 6e902150ac..b14988c3a9 100644 --- a/docs/examples/0.15.x/server-nodejs/examples/storage/get-file-download.md +++ b/docs/examples/0.15.x/server-nodejs/examples/storage/get-file-download.md @@ -1,9 +1,9 @@ const sdk = require('node-appwrite'); // Init SDK -let client = new sdk.Client(); +const client = new sdk.Client(); -let storage = new sdk.Storage(client); +const storage = new sdk.Storage(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint @@ -11,7 +11,7 @@ client .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; -let promise = storage.getFileDownload('[BUCKET_ID]', '[FILE_ID]'); +const promise = storage.getFileDownload('[BUCKET_ID]', '[FILE_ID]'); promise.then(function (response) { console.log(response); diff --git a/docs/examples/0.15.x/server-nodejs/examples/storage/get-file-preview.md b/docs/examples/0.15.x/server-nodejs/examples/storage/get-file-preview.md index 81007a2e44..f3c46dc7ab 100644 --- a/docs/examples/0.15.x/server-nodejs/examples/storage/get-file-preview.md +++ b/docs/examples/0.15.x/server-nodejs/examples/storage/get-file-preview.md @@ -1,9 +1,9 @@ const sdk = require('node-appwrite'); // Init SDK -let client = new sdk.Client(); +const client = new sdk.Client(); -let storage = new sdk.Storage(client); +const storage = new sdk.Storage(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint @@ -11,7 +11,7 @@ client .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; -let promise = storage.getFilePreview('[BUCKET_ID]', '[FILE_ID]'); +const promise = storage.getFilePreview('[BUCKET_ID]', '[FILE_ID]'); promise.then(function (response) { console.log(response); diff --git a/docs/examples/0.15.x/server-nodejs/examples/storage/get-file-view.md b/docs/examples/0.15.x/server-nodejs/examples/storage/get-file-view.md index 91e5318d14..fdaa77eba0 100644 --- a/docs/examples/0.15.x/server-nodejs/examples/storage/get-file-view.md +++ b/docs/examples/0.15.x/server-nodejs/examples/storage/get-file-view.md @@ -1,9 +1,9 @@ const sdk = require('node-appwrite'); // Init SDK -let client = new sdk.Client(); +const client = new sdk.Client(); -let storage = new sdk.Storage(client); +const storage = new sdk.Storage(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint @@ -11,7 +11,7 @@ client .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; -let promise = storage.getFileView('[BUCKET_ID]', '[FILE_ID]'); +const promise = storage.getFileView('[BUCKET_ID]', '[FILE_ID]'); promise.then(function (response) { console.log(response); diff --git a/docs/examples/0.15.x/server-nodejs/examples/storage/get-file.md b/docs/examples/0.15.x/server-nodejs/examples/storage/get-file.md index de5efacb14..181bfcfcdf 100644 --- a/docs/examples/0.15.x/server-nodejs/examples/storage/get-file.md +++ b/docs/examples/0.15.x/server-nodejs/examples/storage/get-file.md @@ -1,9 +1,9 @@ const sdk = require('node-appwrite'); // Init SDK -let client = new sdk.Client(); +const client = new sdk.Client(); -let storage = new sdk.Storage(client); +const storage = new sdk.Storage(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint @@ -11,7 +11,7 @@ client .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; -let promise = storage.getFile('[BUCKET_ID]', '[FILE_ID]'); +const promise = storage.getFile('[BUCKET_ID]', '[FILE_ID]'); promise.then(function (response) { console.log(response); diff --git a/docs/examples/0.15.x/server-nodejs/examples/storage/list-buckets.md b/docs/examples/0.15.x/server-nodejs/examples/storage/list-buckets.md index 21edaeb226..f8aae65a87 100644 --- a/docs/examples/0.15.x/server-nodejs/examples/storage/list-buckets.md +++ b/docs/examples/0.15.x/server-nodejs/examples/storage/list-buckets.md @@ -1,9 +1,9 @@ const sdk = require('node-appwrite'); // Init SDK -let client = new sdk.Client(); +const client = new sdk.Client(); -let storage = new sdk.Storage(client); +const storage = new sdk.Storage(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint @@ -11,7 +11,7 @@ client .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; -let promise = storage.listBuckets(); +const promise = storage.listBuckets(); promise.then(function (response) { console.log(response); diff --git a/docs/examples/0.15.x/server-nodejs/examples/storage/list-files.md b/docs/examples/0.15.x/server-nodejs/examples/storage/list-files.md index 8ceada8d0f..2cab3df3ae 100644 --- a/docs/examples/0.15.x/server-nodejs/examples/storage/list-files.md +++ b/docs/examples/0.15.x/server-nodejs/examples/storage/list-files.md @@ -1,9 +1,9 @@ const sdk = require('node-appwrite'); // Init SDK -let client = new sdk.Client(); +const client = new sdk.Client(); -let storage = new sdk.Storage(client); +const storage = new sdk.Storage(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint @@ -11,7 +11,7 @@ client .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; -let promise = storage.listFiles('[BUCKET_ID]'); +const promise = storage.listFiles('[BUCKET_ID]'); promise.then(function (response) { console.log(response); diff --git a/docs/examples/0.15.x/server-nodejs/examples/storage/update-bucket.md b/docs/examples/0.15.x/server-nodejs/examples/storage/update-bucket.md index 804ae0dd0a..70863a84be 100644 --- a/docs/examples/0.15.x/server-nodejs/examples/storage/update-bucket.md +++ b/docs/examples/0.15.x/server-nodejs/examples/storage/update-bucket.md @@ -1,9 +1,9 @@ const sdk = require('node-appwrite'); // Init SDK -let client = new sdk.Client(); +const client = new sdk.Client(); -let storage = new sdk.Storage(client); +const storage = new sdk.Storage(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint @@ -11,7 +11,7 @@ client .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; -let promise = storage.updateBucket('[BUCKET_ID]', '[NAME]', 'file'); +const promise = storage.updateBucket('[BUCKET_ID]', '[NAME]', 'file'); promise.then(function (response) { console.log(response); diff --git a/docs/examples/0.15.x/server-nodejs/examples/storage/update-file.md b/docs/examples/0.15.x/server-nodejs/examples/storage/update-file.md index 9fa83780c9..2bca7e90a0 100644 --- a/docs/examples/0.15.x/server-nodejs/examples/storage/update-file.md +++ b/docs/examples/0.15.x/server-nodejs/examples/storage/update-file.md @@ -1,9 +1,9 @@ const sdk = require('node-appwrite'); // Init SDK -let client = new sdk.Client(); +const client = new sdk.Client(); -let storage = new sdk.Storage(client); +const storage = new sdk.Storage(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint @@ -11,7 +11,7 @@ client .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; -let promise = storage.updateFile('[BUCKET_ID]', '[FILE_ID]'); +const promise = storage.updateFile('[BUCKET_ID]', '[FILE_ID]'); promise.then(function (response) { console.log(response); diff --git a/docs/examples/0.15.x/server-nodejs/examples/teams/create-membership.md b/docs/examples/0.15.x/server-nodejs/examples/teams/create-membership.md index cd17042e58..e36ff45235 100644 --- a/docs/examples/0.15.x/server-nodejs/examples/teams/create-membership.md +++ b/docs/examples/0.15.x/server-nodejs/examples/teams/create-membership.md @@ -1,9 +1,9 @@ const sdk = require('node-appwrite'); // Init SDK -let client = new sdk.Client(); +const client = new sdk.Client(); -let teams = new sdk.Teams(client); +const teams = new sdk.Teams(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint @@ -11,7 +11,7 @@ client .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; -let promise = teams.createMembership('[TEAM_ID]', 'email@example.com', [], 'https://example.com'); +const promise = teams.createMembership('[TEAM_ID]', 'email@example.com', [], 'https://example.com'); promise.then(function (response) { console.log(response); diff --git a/docs/examples/0.15.x/server-nodejs/examples/teams/create.md b/docs/examples/0.15.x/server-nodejs/examples/teams/create.md index 2c2739bb1e..9d53f883d4 100644 --- a/docs/examples/0.15.x/server-nodejs/examples/teams/create.md +++ b/docs/examples/0.15.x/server-nodejs/examples/teams/create.md @@ -1,9 +1,9 @@ const sdk = require('node-appwrite'); // Init SDK -let client = new sdk.Client(); +const client = new sdk.Client(); -let teams = new sdk.Teams(client); +const teams = new sdk.Teams(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint @@ -11,7 +11,7 @@ client .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; -let promise = teams.create('[TEAM_ID]', '[NAME]'); +const promise = teams.create('[TEAM_ID]', '[NAME]'); promise.then(function (response) { console.log(response); diff --git a/docs/examples/0.15.x/server-nodejs/examples/teams/delete-membership.md b/docs/examples/0.15.x/server-nodejs/examples/teams/delete-membership.md index 82df7161f8..4a5576dc60 100644 --- a/docs/examples/0.15.x/server-nodejs/examples/teams/delete-membership.md +++ b/docs/examples/0.15.x/server-nodejs/examples/teams/delete-membership.md @@ -1,9 +1,9 @@ const sdk = require('node-appwrite'); // Init SDK -let client = new sdk.Client(); +const client = new sdk.Client(); -let teams = new sdk.Teams(client); +const teams = new sdk.Teams(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint @@ -11,7 +11,7 @@ client .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; -let promise = teams.deleteMembership('[TEAM_ID]', '[MEMBERSHIP_ID]'); +const promise = teams.deleteMembership('[TEAM_ID]', '[MEMBERSHIP_ID]'); promise.then(function (response) { console.log(response); diff --git a/docs/examples/0.15.x/server-nodejs/examples/teams/delete.md b/docs/examples/0.15.x/server-nodejs/examples/teams/delete.md index e833fdfb9b..3af8ad3fdc 100644 --- a/docs/examples/0.15.x/server-nodejs/examples/teams/delete.md +++ b/docs/examples/0.15.x/server-nodejs/examples/teams/delete.md @@ -1,9 +1,9 @@ const sdk = require('node-appwrite'); // Init SDK -let client = new sdk.Client(); +const client = new sdk.Client(); -let teams = new sdk.Teams(client); +const teams = new sdk.Teams(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint @@ -11,7 +11,7 @@ client .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; -let promise = teams.delete('[TEAM_ID]'); +const promise = teams.delete('[TEAM_ID]'); promise.then(function (response) { console.log(response); diff --git a/docs/examples/0.15.x/server-nodejs/examples/teams/get-membership.md b/docs/examples/0.15.x/server-nodejs/examples/teams/get-membership.md index 920b6de0fd..895bcdd3a0 100644 --- a/docs/examples/0.15.x/server-nodejs/examples/teams/get-membership.md +++ b/docs/examples/0.15.x/server-nodejs/examples/teams/get-membership.md @@ -1,9 +1,9 @@ const sdk = require('node-appwrite'); // Init SDK -let client = new sdk.Client(); +const client = new sdk.Client(); -let teams = new sdk.Teams(client); +const teams = new sdk.Teams(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint @@ -11,7 +11,7 @@ client .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; -let promise = teams.getMembership('[TEAM_ID]', '[MEMBERSHIP_ID]'); +const promise = teams.getMembership('[TEAM_ID]', '[MEMBERSHIP_ID]'); promise.then(function (response) { console.log(response); diff --git a/docs/examples/0.15.x/server-nodejs/examples/teams/get-memberships.md b/docs/examples/0.15.x/server-nodejs/examples/teams/get-memberships.md index 75cdf38e5c..7b2ac99449 100644 --- a/docs/examples/0.15.x/server-nodejs/examples/teams/get-memberships.md +++ b/docs/examples/0.15.x/server-nodejs/examples/teams/get-memberships.md @@ -1,9 +1,9 @@ const sdk = require('node-appwrite'); // Init SDK -let client = new sdk.Client(); +const client = new sdk.Client(); -let teams = new sdk.Teams(client); +const teams = new sdk.Teams(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint @@ -11,7 +11,7 @@ client .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; -let promise = teams.getMemberships('[TEAM_ID]'); +const promise = teams.getMemberships('[TEAM_ID]'); promise.then(function (response) { console.log(response); diff --git a/docs/examples/0.15.x/server-nodejs/examples/teams/get.md b/docs/examples/0.15.x/server-nodejs/examples/teams/get.md index a51322df27..ef25505520 100644 --- a/docs/examples/0.15.x/server-nodejs/examples/teams/get.md +++ b/docs/examples/0.15.x/server-nodejs/examples/teams/get.md @@ -1,9 +1,9 @@ const sdk = require('node-appwrite'); // Init SDK -let client = new sdk.Client(); +const client = new sdk.Client(); -let teams = new sdk.Teams(client); +const teams = new sdk.Teams(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint @@ -11,7 +11,7 @@ client .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; -let promise = teams.get('[TEAM_ID]'); +const promise = teams.get('[TEAM_ID]'); promise.then(function (response) { console.log(response); diff --git a/docs/examples/0.15.x/server-nodejs/examples/teams/list.md b/docs/examples/0.15.x/server-nodejs/examples/teams/list.md index 259bbd22b2..209b6a1605 100644 --- a/docs/examples/0.15.x/server-nodejs/examples/teams/list.md +++ b/docs/examples/0.15.x/server-nodejs/examples/teams/list.md @@ -1,9 +1,9 @@ const sdk = require('node-appwrite'); // Init SDK -let client = new sdk.Client(); +const client = new sdk.Client(); -let teams = new sdk.Teams(client); +const teams = new sdk.Teams(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint @@ -11,7 +11,7 @@ client .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; -let promise = teams.list(); +const promise = teams.list(); promise.then(function (response) { console.log(response); diff --git a/docs/examples/0.15.x/server-nodejs/examples/teams/update-membership-roles.md b/docs/examples/0.15.x/server-nodejs/examples/teams/update-membership-roles.md index dc78af59f8..44deb3bbe0 100644 --- a/docs/examples/0.15.x/server-nodejs/examples/teams/update-membership-roles.md +++ b/docs/examples/0.15.x/server-nodejs/examples/teams/update-membership-roles.md @@ -1,9 +1,9 @@ const sdk = require('node-appwrite'); // Init SDK -let client = new sdk.Client(); +const client = new sdk.Client(); -let teams = new sdk.Teams(client); +const teams = new sdk.Teams(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint @@ -11,7 +11,7 @@ client .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; -let promise = teams.updateMembershipRoles('[TEAM_ID]', '[MEMBERSHIP_ID]', []); +const promise = teams.updateMembershipRoles('[TEAM_ID]', '[MEMBERSHIP_ID]', []); promise.then(function (response) { console.log(response); diff --git a/docs/examples/0.15.x/server-nodejs/examples/teams/update-membership-status.md b/docs/examples/0.15.x/server-nodejs/examples/teams/update-membership-status.md index 13f8578037..0020e6f555 100644 --- a/docs/examples/0.15.x/server-nodejs/examples/teams/update-membership-status.md +++ b/docs/examples/0.15.x/server-nodejs/examples/teams/update-membership-status.md @@ -1,9 +1,9 @@ const sdk = require('node-appwrite'); // Init SDK -let client = new sdk.Client(); +const client = new sdk.Client(); -let teams = new sdk.Teams(client); +const teams = new sdk.Teams(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint @@ -11,7 +11,7 @@ client .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token ; -let promise = teams.updateMembershipStatus('[TEAM_ID]', '[MEMBERSHIP_ID]', '[USER_ID]', '[SECRET]'); +const promise = teams.updateMembershipStatus('[TEAM_ID]', '[MEMBERSHIP_ID]', '[USER_ID]', '[SECRET]'); promise.then(function (response) { console.log(response); diff --git a/docs/examples/0.15.x/server-nodejs/examples/teams/update.md b/docs/examples/0.15.x/server-nodejs/examples/teams/update.md index 2118e8a90f..fea84c5c0b 100644 --- a/docs/examples/0.15.x/server-nodejs/examples/teams/update.md +++ b/docs/examples/0.15.x/server-nodejs/examples/teams/update.md @@ -1,9 +1,9 @@ const sdk = require('node-appwrite'); // Init SDK -let client = new sdk.Client(); +const client = new sdk.Client(); -let teams = new sdk.Teams(client); +const teams = new sdk.Teams(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint @@ -11,7 +11,7 @@ client .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; -let promise = teams.update('[TEAM_ID]', '[NAME]'); +const promise = teams.update('[TEAM_ID]', '[NAME]'); promise.then(function (response) { console.log(response); diff --git a/docs/examples/0.15.x/server-nodejs/examples/users/create.md b/docs/examples/0.15.x/server-nodejs/examples/users/create.md index a4a2febca9..d7a5406be9 100644 --- a/docs/examples/0.15.x/server-nodejs/examples/users/create.md +++ b/docs/examples/0.15.x/server-nodejs/examples/users/create.md @@ -1,9 +1,9 @@ const sdk = require('node-appwrite'); // Init SDK -let client = new sdk.Client(); +const client = new sdk.Client(); -let users = new sdk.Users(client); +const users = new sdk.Users(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint @@ -11,7 +11,7 @@ client .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; -let promise = users.create('[USER_ID]', 'email@example.com', 'password'); +const promise = users.create('[USER_ID]', 'email@example.com', 'password'); promise.then(function (response) { console.log(response); diff --git a/docs/examples/0.15.x/server-nodejs/examples/users/delete-session.md b/docs/examples/0.15.x/server-nodejs/examples/users/delete-session.md index 22308d4fa6..ed161dcc89 100644 --- a/docs/examples/0.15.x/server-nodejs/examples/users/delete-session.md +++ b/docs/examples/0.15.x/server-nodejs/examples/users/delete-session.md @@ -1,9 +1,9 @@ const sdk = require('node-appwrite'); // Init SDK -let client = new sdk.Client(); +const client = new sdk.Client(); -let users = new sdk.Users(client); +const users = new sdk.Users(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint @@ -11,7 +11,7 @@ client .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; -let promise = users.deleteSession('[USER_ID]', '[SESSION_ID]'); +const promise = users.deleteSession('[USER_ID]', '[SESSION_ID]'); promise.then(function (response) { console.log(response); diff --git a/docs/examples/0.15.x/server-nodejs/examples/users/delete-sessions.md b/docs/examples/0.15.x/server-nodejs/examples/users/delete-sessions.md index 75f8f96bda..9b6abfcb02 100644 --- a/docs/examples/0.15.x/server-nodejs/examples/users/delete-sessions.md +++ b/docs/examples/0.15.x/server-nodejs/examples/users/delete-sessions.md @@ -1,9 +1,9 @@ const sdk = require('node-appwrite'); // Init SDK -let client = new sdk.Client(); +const client = new sdk.Client(); -let users = new sdk.Users(client); +const users = new sdk.Users(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint @@ -11,7 +11,7 @@ client .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; -let promise = users.deleteSessions('[USER_ID]'); +const promise = users.deleteSessions('[USER_ID]'); promise.then(function (response) { console.log(response); diff --git a/docs/examples/0.15.x/server-nodejs/examples/users/delete.md b/docs/examples/0.15.x/server-nodejs/examples/users/delete.md index 3d834c33e3..65ed7187b6 100644 --- a/docs/examples/0.15.x/server-nodejs/examples/users/delete.md +++ b/docs/examples/0.15.x/server-nodejs/examples/users/delete.md @@ -1,9 +1,9 @@ const sdk = require('node-appwrite'); // Init SDK -let client = new sdk.Client(); +const client = new sdk.Client(); -let users = new sdk.Users(client); +const users = new sdk.Users(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint @@ -11,7 +11,7 @@ client .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; -let promise = users.delete('[USER_ID]'); +const promise = users.delete('[USER_ID]'); promise.then(function (response) { console.log(response); diff --git a/docs/examples/0.15.x/server-nodejs/examples/users/get-logs.md b/docs/examples/0.15.x/server-nodejs/examples/users/get-logs.md index 1287b5ef5f..5bc20b7c4e 100644 --- a/docs/examples/0.15.x/server-nodejs/examples/users/get-logs.md +++ b/docs/examples/0.15.x/server-nodejs/examples/users/get-logs.md @@ -1,9 +1,9 @@ const sdk = require('node-appwrite'); // Init SDK -let client = new sdk.Client(); +const client = new sdk.Client(); -let users = new sdk.Users(client); +const users = new sdk.Users(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint @@ -11,7 +11,7 @@ client .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; -let promise = users.getLogs('[USER_ID]'); +const promise = users.getLogs('[USER_ID]'); promise.then(function (response) { console.log(response); diff --git a/docs/examples/0.15.x/server-nodejs/examples/users/get-memberships.md b/docs/examples/0.15.x/server-nodejs/examples/users/get-memberships.md index 116ae92cac..8c26b12b7b 100644 --- a/docs/examples/0.15.x/server-nodejs/examples/users/get-memberships.md +++ b/docs/examples/0.15.x/server-nodejs/examples/users/get-memberships.md @@ -1,9 +1,9 @@ const sdk = require('node-appwrite'); // Init SDK -let client = new sdk.Client(); +const client = new sdk.Client(); -let users = new sdk.Users(client); +const users = new sdk.Users(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint @@ -11,7 +11,7 @@ client .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; -let promise = users.getMemberships('[USER_ID]'); +const promise = users.getMemberships('[USER_ID]'); promise.then(function (response) { console.log(response); diff --git a/docs/examples/0.15.x/server-nodejs/examples/users/get-prefs.md b/docs/examples/0.15.x/server-nodejs/examples/users/get-prefs.md index 088e6b0811..bac42c8da7 100644 --- a/docs/examples/0.15.x/server-nodejs/examples/users/get-prefs.md +++ b/docs/examples/0.15.x/server-nodejs/examples/users/get-prefs.md @@ -1,9 +1,9 @@ const sdk = require('node-appwrite'); // Init SDK -let client = new sdk.Client(); +const client = new sdk.Client(); -let users = new sdk.Users(client); +const users = new sdk.Users(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint @@ -11,7 +11,7 @@ client .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; -let promise = users.getPrefs('[USER_ID]'); +const promise = users.getPrefs('[USER_ID]'); promise.then(function (response) { console.log(response); diff --git a/docs/examples/0.15.x/server-nodejs/examples/users/get-sessions.md b/docs/examples/0.15.x/server-nodejs/examples/users/get-sessions.md index f5ad029ebe..1b3e7d3e86 100644 --- a/docs/examples/0.15.x/server-nodejs/examples/users/get-sessions.md +++ b/docs/examples/0.15.x/server-nodejs/examples/users/get-sessions.md @@ -1,9 +1,9 @@ const sdk = require('node-appwrite'); // Init SDK -let client = new sdk.Client(); +const client = new sdk.Client(); -let users = new sdk.Users(client); +const users = new sdk.Users(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint @@ -11,7 +11,7 @@ client .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; -let promise = users.getSessions('[USER_ID]'); +const promise = users.getSessions('[USER_ID]'); promise.then(function (response) { console.log(response); diff --git a/docs/examples/0.15.x/server-nodejs/examples/users/get.md b/docs/examples/0.15.x/server-nodejs/examples/users/get.md index 5b91577284..fa1579ec44 100644 --- a/docs/examples/0.15.x/server-nodejs/examples/users/get.md +++ b/docs/examples/0.15.x/server-nodejs/examples/users/get.md @@ -1,9 +1,9 @@ const sdk = require('node-appwrite'); // Init SDK -let client = new sdk.Client(); +const client = new sdk.Client(); -let users = new sdk.Users(client); +const users = new sdk.Users(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint @@ -11,7 +11,7 @@ client .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; -let promise = users.get('[USER_ID]'); +const promise = users.get('[USER_ID]'); promise.then(function (response) { console.log(response); diff --git a/docs/examples/0.15.x/server-nodejs/examples/users/list.md b/docs/examples/0.15.x/server-nodejs/examples/users/list.md index 0bc83b06bf..bddb2e7fa3 100644 --- a/docs/examples/0.15.x/server-nodejs/examples/users/list.md +++ b/docs/examples/0.15.x/server-nodejs/examples/users/list.md @@ -1,9 +1,9 @@ const sdk = require('node-appwrite'); // Init SDK -let client = new sdk.Client(); +const client = new sdk.Client(); -let users = new sdk.Users(client); +const users = new sdk.Users(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint @@ -11,7 +11,7 @@ client .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; -let promise = users.list(); +const promise = users.list(); promise.then(function (response) { console.log(response); diff --git a/docs/examples/0.15.x/server-nodejs/examples/users/update-email-verification.md b/docs/examples/0.15.x/server-nodejs/examples/users/update-email-verification.md index 3cff4c3808..c80a7816b9 100644 --- a/docs/examples/0.15.x/server-nodejs/examples/users/update-email-verification.md +++ b/docs/examples/0.15.x/server-nodejs/examples/users/update-email-verification.md @@ -1,9 +1,9 @@ const sdk = require('node-appwrite'); // Init SDK -let client = new sdk.Client(); +const client = new sdk.Client(); -let users = new sdk.Users(client); +const users = new sdk.Users(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint @@ -11,7 +11,7 @@ client .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; -let promise = users.updateEmailVerification('[USER_ID]', false); +const promise = users.updateEmailVerification('[USER_ID]', false); promise.then(function (response) { console.log(response); diff --git a/docs/examples/0.15.x/server-nodejs/examples/users/update-email.md b/docs/examples/0.15.x/server-nodejs/examples/users/update-email.md index 7e9477656b..627de271b6 100644 --- a/docs/examples/0.15.x/server-nodejs/examples/users/update-email.md +++ b/docs/examples/0.15.x/server-nodejs/examples/users/update-email.md @@ -1,9 +1,9 @@ const sdk = require('node-appwrite'); // Init SDK -let client = new sdk.Client(); +const client = new sdk.Client(); -let users = new sdk.Users(client); +const users = new sdk.Users(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint @@ -11,7 +11,7 @@ client .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; -let promise = users.updateEmail('[USER_ID]', 'email@example.com'); +const promise = users.updateEmail('[USER_ID]', 'email@example.com'); promise.then(function (response) { console.log(response); diff --git a/docs/examples/0.15.x/server-nodejs/examples/users/update-name.md b/docs/examples/0.15.x/server-nodejs/examples/users/update-name.md index 31366a7652..cd515cb522 100644 --- a/docs/examples/0.15.x/server-nodejs/examples/users/update-name.md +++ b/docs/examples/0.15.x/server-nodejs/examples/users/update-name.md @@ -1,9 +1,9 @@ const sdk = require('node-appwrite'); // Init SDK -let client = new sdk.Client(); +const client = new sdk.Client(); -let users = new sdk.Users(client); +const users = new sdk.Users(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint @@ -11,7 +11,7 @@ client .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; -let promise = users.updateName('[USER_ID]', '[NAME]'); +const promise = users.updateName('[USER_ID]', '[NAME]'); promise.then(function (response) { console.log(response); diff --git a/docs/examples/0.15.x/server-nodejs/examples/users/update-password.md b/docs/examples/0.15.x/server-nodejs/examples/users/update-password.md index afee0b3732..6348c7d8e7 100644 --- a/docs/examples/0.15.x/server-nodejs/examples/users/update-password.md +++ b/docs/examples/0.15.x/server-nodejs/examples/users/update-password.md @@ -1,9 +1,9 @@ const sdk = require('node-appwrite'); // Init SDK -let client = new sdk.Client(); +const client = new sdk.Client(); -let users = new sdk.Users(client); +const users = new sdk.Users(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint @@ -11,7 +11,7 @@ client .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; -let promise = users.updatePassword('[USER_ID]', 'password'); +const promise = users.updatePassword('[USER_ID]', 'password'); promise.then(function (response) { console.log(response); diff --git a/docs/examples/0.15.x/server-nodejs/examples/users/update-phone-verification.md b/docs/examples/0.15.x/server-nodejs/examples/users/update-phone-verification.md index c13b6eb949..7c88651ce6 100644 --- a/docs/examples/0.15.x/server-nodejs/examples/users/update-phone-verification.md +++ b/docs/examples/0.15.x/server-nodejs/examples/users/update-phone-verification.md @@ -1,9 +1,9 @@ const sdk = require('node-appwrite'); // Init SDK -let client = new sdk.Client(); +const client = new sdk.Client(); -let users = new sdk.Users(client); +const users = new sdk.Users(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint @@ -11,7 +11,7 @@ client .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; -let promise = users.updatePhoneVerification('[USER_ID]', false); +const promise = users.updatePhoneVerification('[USER_ID]', false); promise.then(function (response) { console.log(response); diff --git a/docs/examples/0.15.x/server-nodejs/examples/users/update-phone.md b/docs/examples/0.15.x/server-nodejs/examples/users/update-phone.md index d5b7b24eb8..acb7bbb2d6 100644 --- a/docs/examples/0.15.x/server-nodejs/examples/users/update-phone.md +++ b/docs/examples/0.15.x/server-nodejs/examples/users/update-phone.md @@ -1,9 +1,9 @@ const sdk = require('node-appwrite'); // Init SDK -let client = new sdk.Client(); +const client = new sdk.Client(); -let users = new sdk.Users(client); +const users = new sdk.Users(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint @@ -11,7 +11,7 @@ client .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; -let promise = users.updatePhone('[USER_ID]', ''); +const promise = users.updatePhone('[USER_ID]', ''); promise.then(function (response) { console.log(response); diff --git a/docs/examples/0.15.x/server-nodejs/examples/users/update-prefs.md b/docs/examples/0.15.x/server-nodejs/examples/users/update-prefs.md index 7d1011d6be..f9e16da0b7 100644 --- a/docs/examples/0.15.x/server-nodejs/examples/users/update-prefs.md +++ b/docs/examples/0.15.x/server-nodejs/examples/users/update-prefs.md @@ -1,9 +1,9 @@ const sdk = require('node-appwrite'); // Init SDK -let client = new sdk.Client(); +const client = new sdk.Client(); -let users = new sdk.Users(client); +const users = new sdk.Users(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint @@ -11,7 +11,7 @@ client .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; -let promise = users.updatePrefs('[USER_ID]', {}); +const promise = users.updatePrefs('[USER_ID]', {}); promise.then(function (response) { console.log(response); diff --git a/docs/examples/0.15.x/server-nodejs/examples/users/update-status.md b/docs/examples/0.15.x/server-nodejs/examples/users/update-status.md index 02aa2d33ae..08c79ef63f 100644 --- a/docs/examples/0.15.x/server-nodejs/examples/users/update-status.md +++ b/docs/examples/0.15.x/server-nodejs/examples/users/update-status.md @@ -1,9 +1,9 @@ const sdk = require('node-appwrite'); // Init SDK -let client = new sdk.Client(); +const client = new sdk.Client(); -let users = new sdk.Users(client); +const users = new sdk.Users(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint @@ -11,7 +11,7 @@ client .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; -let promise = users.updateStatus('[USER_ID]', false); +const promise = users.updateStatus('[USER_ID]', false); promise.then(function (response) { console.log(response); diff --git a/docs/examples/0.15.x/server-php/examples/database/create-boolean-attribute.md b/docs/examples/0.15.x/server-php/examples/database/create-boolean-attribute.md deleted file mode 100644 index dcbb8e2ccb..0000000000 --- a/docs/examples/0.15.x/server-php/examples/database/create-boolean-attribute.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$database = new Database($client); - -$result = $database->createBooleanAttribute('[COLLECTION_ID]', '', false); \ No newline at end of file diff --git a/docs/examples/0.15.x/server-php/examples/database/create-collection.md b/docs/examples/0.15.x/server-php/examples/database/create-collection.md deleted file mode 100644 index 66ee4f1264..0000000000 --- a/docs/examples/0.15.x/server-php/examples/database/create-collection.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$database = new Database($client); - -$result = $database->createCollection('[COLLECTION_ID]', '[NAME]', 'document', ["role:all"], ["role:all"]); \ No newline at end of file diff --git a/docs/examples/0.15.x/server-php/examples/database/create-document.md b/docs/examples/0.15.x/server-php/examples/database/create-document.md deleted file mode 100644 index e3c15abc65..0000000000 --- a/docs/examples/0.15.x/server-php/examples/database/create-document.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$database = new Database($client); - -$result = $database->createDocument('[COLLECTION_ID]', '[DOCUMENT_ID]', []); \ No newline at end of file diff --git a/docs/examples/0.15.x/server-php/examples/database/create-email-attribute.md b/docs/examples/0.15.x/server-php/examples/database/create-email-attribute.md deleted file mode 100644 index cc7c82290f..0000000000 --- a/docs/examples/0.15.x/server-php/examples/database/create-email-attribute.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$database = new Database($client); - -$result = $database->createEmailAttribute('[COLLECTION_ID]', '', false); \ No newline at end of file diff --git a/docs/examples/0.15.x/server-php/examples/database/create-enum-attribute.md b/docs/examples/0.15.x/server-php/examples/database/create-enum-attribute.md deleted file mode 100644 index 92f3294a10..0000000000 --- a/docs/examples/0.15.x/server-php/examples/database/create-enum-attribute.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$database = new Database($client); - -$result = $database->createEnumAttribute('[COLLECTION_ID]', '', [], false); \ No newline at end of file diff --git a/docs/examples/0.15.x/server-php/examples/database/create-float-attribute.md b/docs/examples/0.15.x/server-php/examples/database/create-float-attribute.md deleted file mode 100644 index 0d9e9656dd..0000000000 --- a/docs/examples/0.15.x/server-php/examples/database/create-float-attribute.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$database = new Database($client); - -$result = $database->createFloatAttribute('[COLLECTION_ID]', '', false); \ No newline at end of file diff --git a/docs/examples/0.15.x/server-php/examples/database/create-index.md b/docs/examples/0.15.x/server-php/examples/database/create-index.md deleted file mode 100644 index 2ca255242c..0000000000 --- a/docs/examples/0.15.x/server-php/examples/database/create-index.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$database = new Database($client); - -$result = $database->createIndex('[COLLECTION_ID]', '', 'key', []); \ No newline at end of file diff --git a/docs/examples/0.15.x/server-php/examples/database/create-integer-attribute.md b/docs/examples/0.15.x/server-php/examples/database/create-integer-attribute.md deleted file mode 100644 index 9c64c4d7e3..0000000000 --- a/docs/examples/0.15.x/server-php/examples/database/create-integer-attribute.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$database = new Database($client); - -$result = $database->createIntegerAttribute('[COLLECTION_ID]', '', false); \ No newline at end of file diff --git a/docs/examples/0.15.x/server-php/examples/database/create-ip-attribute.md b/docs/examples/0.15.x/server-php/examples/database/create-ip-attribute.md deleted file mode 100644 index aee0526df8..0000000000 --- a/docs/examples/0.15.x/server-php/examples/database/create-ip-attribute.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$database = new Database($client); - -$result = $database->createIpAttribute('[COLLECTION_ID]', '', false); \ No newline at end of file diff --git a/docs/examples/0.15.x/server-php/examples/database/create-string-attribute.md b/docs/examples/0.15.x/server-php/examples/database/create-string-attribute.md deleted file mode 100644 index e6f8b1252a..0000000000 --- a/docs/examples/0.15.x/server-php/examples/database/create-string-attribute.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$database = new Database($client); - -$result = $database->createStringAttribute('[COLLECTION_ID]', '', 1, false); \ No newline at end of file diff --git a/docs/examples/0.15.x/server-php/examples/database/create-url-attribute.md b/docs/examples/0.15.x/server-php/examples/database/create-url-attribute.md deleted file mode 100644 index fe8ed393e2..0000000000 --- a/docs/examples/0.15.x/server-php/examples/database/create-url-attribute.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$database = new Database($client); - -$result = $database->createUrlAttribute('[COLLECTION_ID]', '', false); \ No newline at end of file diff --git a/docs/examples/0.15.x/server-php/examples/database/delete-attribute.md b/docs/examples/0.15.x/server-php/examples/database/delete-attribute.md deleted file mode 100644 index 036dc7304a..0000000000 --- a/docs/examples/0.15.x/server-php/examples/database/delete-attribute.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$database = new Database($client); - -$result = $database->deleteAttribute('[COLLECTION_ID]', ''); \ No newline at end of file diff --git a/docs/examples/0.15.x/server-php/examples/database/delete-collection.md b/docs/examples/0.15.x/server-php/examples/database/delete-collection.md deleted file mode 100644 index 4018420188..0000000000 --- a/docs/examples/0.15.x/server-php/examples/database/delete-collection.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$database = new Database($client); - -$result = $database->deleteCollection('[COLLECTION_ID]'); \ No newline at end of file diff --git a/docs/examples/0.15.x/server-php/examples/database/delete-document.md b/docs/examples/0.15.x/server-php/examples/database/delete-document.md deleted file mode 100644 index 3ed45d6ee1..0000000000 --- a/docs/examples/0.15.x/server-php/examples/database/delete-document.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$database = new Database($client); - -$result = $database->deleteDocument('[COLLECTION_ID]', '[DOCUMENT_ID]'); \ No newline at end of file diff --git a/docs/examples/0.15.x/server-php/examples/database/delete-index.md b/docs/examples/0.15.x/server-php/examples/database/delete-index.md deleted file mode 100644 index 353c03c8c0..0000000000 --- a/docs/examples/0.15.x/server-php/examples/database/delete-index.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$database = new Database($client); - -$result = $database->deleteIndex('[COLLECTION_ID]', ''); \ No newline at end of file diff --git a/docs/examples/0.15.x/server-php/examples/database/get-attribute.md b/docs/examples/0.15.x/server-php/examples/database/get-attribute.md deleted file mode 100644 index 020f91597a..0000000000 --- a/docs/examples/0.15.x/server-php/examples/database/get-attribute.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$database = new Database($client); - -$result = $database->getAttribute('[COLLECTION_ID]', ''); \ No newline at end of file diff --git a/docs/examples/0.15.x/server-php/examples/database/get-collection.md b/docs/examples/0.15.x/server-php/examples/database/get-collection.md deleted file mode 100644 index a088b24bb6..0000000000 --- a/docs/examples/0.15.x/server-php/examples/database/get-collection.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$database = new Database($client); - -$result = $database->getCollection('[COLLECTION_ID]'); \ No newline at end of file diff --git a/docs/examples/0.15.x/server-php/examples/database/get-document.md b/docs/examples/0.15.x/server-php/examples/database/get-document.md deleted file mode 100644 index d506bd8414..0000000000 --- a/docs/examples/0.15.x/server-php/examples/database/get-document.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$database = new Database($client); - -$result = $database->getDocument('[COLLECTION_ID]', '[DOCUMENT_ID]'); \ No newline at end of file diff --git a/docs/examples/0.15.x/server-php/examples/database/get-index.md b/docs/examples/0.15.x/server-php/examples/database/get-index.md deleted file mode 100644 index af700b7184..0000000000 --- a/docs/examples/0.15.x/server-php/examples/database/get-index.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$database = new Database($client); - -$result = $database->getIndex('[COLLECTION_ID]', ''); \ No newline at end of file diff --git a/docs/examples/0.15.x/server-php/examples/database/list-attributes.md b/docs/examples/0.15.x/server-php/examples/database/list-attributes.md deleted file mode 100644 index 8d0e2b6fc5..0000000000 --- a/docs/examples/0.15.x/server-php/examples/database/list-attributes.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$database = new Database($client); - -$result = $database->listAttributes('[COLLECTION_ID]'); \ No newline at end of file diff --git a/docs/examples/0.15.x/server-php/examples/database/list-collections.md b/docs/examples/0.15.x/server-php/examples/database/list-collections.md deleted file mode 100644 index 4f4aa1b775..0000000000 --- a/docs/examples/0.15.x/server-php/examples/database/list-collections.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$database = new Database($client); - -$result = $database->listCollections(); \ No newline at end of file diff --git a/docs/examples/0.15.x/server-php/examples/database/list-documents.md b/docs/examples/0.15.x/server-php/examples/database/list-documents.md deleted file mode 100644 index 359da4ce33..0000000000 --- a/docs/examples/0.15.x/server-php/examples/database/list-documents.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$database = new Database($client); - -$result = $database->listDocuments('[COLLECTION_ID]'); \ No newline at end of file diff --git a/docs/examples/0.15.x/server-php/examples/database/list-indexes.md b/docs/examples/0.15.x/server-php/examples/database/list-indexes.md deleted file mode 100644 index ab8e40753c..0000000000 --- a/docs/examples/0.15.x/server-php/examples/database/list-indexes.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$database = new Database($client); - -$result = $database->listIndexes('[COLLECTION_ID]'); \ No newline at end of file diff --git a/docs/examples/0.15.x/server-php/examples/database/update-collection.md b/docs/examples/0.15.x/server-php/examples/database/update-collection.md deleted file mode 100644 index 190838b949..0000000000 --- a/docs/examples/0.15.x/server-php/examples/database/update-collection.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$database = new Database($client); - -$result = $database->updateCollection('[COLLECTION_ID]', '[NAME]', 'document'); \ No newline at end of file diff --git a/docs/examples/0.15.x/server-php/examples/database/update-document.md b/docs/examples/0.15.x/server-php/examples/database/update-document.md deleted file mode 100644 index b4c2eac092..0000000000 --- a/docs/examples/0.15.x/server-php/examples/database/update-document.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$database = new Database($client); - -$result = $database->updateDocument('[COLLECTION_ID]', '[DOCUMENT_ID]', []); \ No newline at end of file diff --git a/docs/examples/0.15.x/server-python/examples/database/create-boolean-attribute.md b/docs/examples/0.15.x/server-python/examples/database/create-boolean-attribute.md deleted file mode 100644 index ca3d549876..0000000000 --- a/docs/examples/0.15.x/server-python/examples/database/create-boolean-attribute.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.database import Database - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -database = Database(client) - -result = database.create_boolean_attribute('[COLLECTION_ID]', '', False) diff --git a/docs/examples/0.15.x/server-python/examples/database/create-collection.md b/docs/examples/0.15.x/server-python/examples/database/create-collection.md deleted file mode 100644 index c1bf0b4082..0000000000 --- a/docs/examples/0.15.x/server-python/examples/database/create-collection.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.database import Database - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -database = Database(client) - -result = database.create_collection('[COLLECTION_ID]', '[NAME]', 'document', ["role:all"], ["role:all"]) diff --git a/docs/examples/0.15.x/server-python/examples/database/create-document.md b/docs/examples/0.15.x/server-python/examples/database/create-document.md deleted file mode 100644 index 8cef31cfd6..0000000000 --- a/docs/examples/0.15.x/server-python/examples/database/create-document.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.database import Database - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -database = Database(client) - -result = database.create_document('[COLLECTION_ID]', '[DOCUMENT_ID]', {}) diff --git a/docs/examples/0.15.x/server-python/examples/database/create-email-attribute.md b/docs/examples/0.15.x/server-python/examples/database/create-email-attribute.md deleted file mode 100644 index 339b4b7b13..0000000000 --- a/docs/examples/0.15.x/server-python/examples/database/create-email-attribute.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.database import Database - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -database = Database(client) - -result = database.create_email_attribute('[COLLECTION_ID]', '', False) diff --git a/docs/examples/0.15.x/server-python/examples/database/create-enum-attribute.md b/docs/examples/0.15.x/server-python/examples/database/create-enum-attribute.md deleted file mode 100644 index e9014ef2ce..0000000000 --- a/docs/examples/0.15.x/server-python/examples/database/create-enum-attribute.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.database import Database - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -database = Database(client) - -result = database.create_enum_attribute('[COLLECTION_ID]', '', [], False) diff --git a/docs/examples/0.15.x/server-python/examples/database/create-float-attribute.md b/docs/examples/0.15.x/server-python/examples/database/create-float-attribute.md deleted file mode 100644 index 22d6ed37c5..0000000000 --- a/docs/examples/0.15.x/server-python/examples/database/create-float-attribute.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.database import Database - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -database = Database(client) - -result = database.create_float_attribute('[COLLECTION_ID]', '', False) diff --git a/docs/examples/0.15.x/server-python/examples/database/create-index.md b/docs/examples/0.15.x/server-python/examples/database/create-index.md deleted file mode 100644 index 7553e75392..0000000000 --- a/docs/examples/0.15.x/server-python/examples/database/create-index.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.database import Database - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -database = Database(client) - -result = database.create_index('[COLLECTION_ID]', '', 'key', []) diff --git a/docs/examples/0.15.x/server-python/examples/database/create-integer-attribute.md b/docs/examples/0.15.x/server-python/examples/database/create-integer-attribute.md deleted file mode 100644 index 5b4ae60f24..0000000000 --- a/docs/examples/0.15.x/server-python/examples/database/create-integer-attribute.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.database import Database - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -database = Database(client) - -result = database.create_integer_attribute('[COLLECTION_ID]', '', False) diff --git a/docs/examples/0.15.x/server-python/examples/database/create-ip-attribute.md b/docs/examples/0.15.x/server-python/examples/database/create-ip-attribute.md deleted file mode 100644 index 6e79f0b147..0000000000 --- a/docs/examples/0.15.x/server-python/examples/database/create-ip-attribute.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.database import Database - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -database = Database(client) - -result = database.create_ip_attribute('[COLLECTION_ID]', '', False) diff --git a/docs/examples/0.15.x/server-python/examples/database/create-string-attribute.md b/docs/examples/0.15.x/server-python/examples/database/create-string-attribute.md deleted file mode 100644 index 96f3410fde..0000000000 --- a/docs/examples/0.15.x/server-python/examples/database/create-string-attribute.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.database import Database - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -database = Database(client) - -result = database.create_string_attribute('[COLLECTION_ID]', '', 1, False) diff --git a/docs/examples/0.15.x/server-python/examples/database/create-url-attribute.md b/docs/examples/0.15.x/server-python/examples/database/create-url-attribute.md deleted file mode 100644 index dc8efd5beb..0000000000 --- a/docs/examples/0.15.x/server-python/examples/database/create-url-attribute.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.database import Database - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -database = Database(client) - -result = database.create_url_attribute('[COLLECTION_ID]', '', False) diff --git a/docs/examples/0.15.x/server-python/examples/database/delete-attribute.md b/docs/examples/0.15.x/server-python/examples/database/delete-attribute.md deleted file mode 100644 index 9cc8b4cefb..0000000000 --- a/docs/examples/0.15.x/server-python/examples/database/delete-attribute.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.database import Database - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -database = Database(client) - -result = database.delete_attribute('[COLLECTION_ID]', '') diff --git a/docs/examples/0.15.x/server-python/examples/database/delete-collection.md b/docs/examples/0.15.x/server-python/examples/database/delete-collection.md deleted file mode 100644 index 0e188ade41..0000000000 --- a/docs/examples/0.15.x/server-python/examples/database/delete-collection.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.database import Database - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -database = Database(client) - -result = database.delete_collection('[COLLECTION_ID]') diff --git a/docs/examples/0.15.x/server-python/examples/database/delete-document.md b/docs/examples/0.15.x/server-python/examples/database/delete-document.md deleted file mode 100644 index c085547c16..0000000000 --- a/docs/examples/0.15.x/server-python/examples/database/delete-document.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.database import Database - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -database = Database(client) - -result = database.delete_document('[COLLECTION_ID]', '[DOCUMENT_ID]') diff --git a/docs/examples/0.15.x/server-python/examples/database/delete-index.md b/docs/examples/0.15.x/server-python/examples/database/delete-index.md deleted file mode 100644 index 5289b13fef..0000000000 --- a/docs/examples/0.15.x/server-python/examples/database/delete-index.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.database import Database - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -database = Database(client) - -result = database.delete_index('[COLLECTION_ID]', '') diff --git a/docs/examples/0.15.x/server-python/examples/database/get-attribute.md b/docs/examples/0.15.x/server-python/examples/database/get-attribute.md deleted file mode 100644 index 584a51c77e..0000000000 --- a/docs/examples/0.15.x/server-python/examples/database/get-attribute.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.database import Database - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -database = Database(client) - -result = database.get_attribute('[COLLECTION_ID]', '') diff --git a/docs/examples/0.15.x/server-python/examples/database/get-collection.md b/docs/examples/0.15.x/server-python/examples/database/get-collection.md deleted file mode 100644 index f90f51f48b..0000000000 --- a/docs/examples/0.15.x/server-python/examples/database/get-collection.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.database import Database - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -database = Database(client) - -result = database.get_collection('[COLLECTION_ID]') diff --git a/docs/examples/0.15.x/server-python/examples/database/get-document.md b/docs/examples/0.15.x/server-python/examples/database/get-document.md deleted file mode 100644 index 79891709d1..0000000000 --- a/docs/examples/0.15.x/server-python/examples/database/get-document.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.database import Database - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -database = Database(client) - -result = database.get_document('[COLLECTION_ID]', '[DOCUMENT_ID]') diff --git a/docs/examples/0.15.x/server-python/examples/database/get-index.md b/docs/examples/0.15.x/server-python/examples/database/get-index.md deleted file mode 100644 index 0a492e1050..0000000000 --- a/docs/examples/0.15.x/server-python/examples/database/get-index.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.database import Database - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -database = Database(client) - -result = database.get_index('[COLLECTION_ID]', '') diff --git a/docs/examples/0.15.x/server-python/examples/database/list-attributes.md b/docs/examples/0.15.x/server-python/examples/database/list-attributes.md deleted file mode 100644 index ba69433b72..0000000000 --- a/docs/examples/0.15.x/server-python/examples/database/list-attributes.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.database import Database - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -database = Database(client) - -result = database.list_attributes('[COLLECTION_ID]') diff --git a/docs/examples/0.15.x/server-python/examples/database/list-collections.md b/docs/examples/0.15.x/server-python/examples/database/list-collections.md deleted file mode 100644 index f60d4b90e5..0000000000 --- a/docs/examples/0.15.x/server-python/examples/database/list-collections.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.database import Database - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -database = Database(client) - -result = database.list_collections() diff --git a/docs/examples/0.15.x/server-python/examples/database/list-documents.md b/docs/examples/0.15.x/server-python/examples/database/list-documents.md deleted file mode 100644 index cecb57d2fa..0000000000 --- a/docs/examples/0.15.x/server-python/examples/database/list-documents.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.database import Database - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -database = Database(client) - -result = database.list_documents('[COLLECTION_ID]') diff --git a/docs/examples/0.15.x/server-python/examples/database/list-indexes.md b/docs/examples/0.15.x/server-python/examples/database/list-indexes.md deleted file mode 100644 index 0c7b7dbd51..0000000000 --- a/docs/examples/0.15.x/server-python/examples/database/list-indexes.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.database import Database - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -database = Database(client) - -result = database.list_indexes('[COLLECTION_ID]') diff --git a/docs/examples/0.15.x/server-python/examples/database/update-collection.md b/docs/examples/0.15.x/server-python/examples/database/update-collection.md deleted file mode 100644 index adb809c942..0000000000 --- a/docs/examples/0.15.x/server-python/examples/database/update-collection.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.database import Database - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -database = Database(client) - -result = database.update_collection('[COLLECTION_ID]', '[NAME]', 'document') diff --git a/docs/examples/0.15.x/server-python/examples/database/update-document.md b/docs/examples/0.15.x/server-python/examples/database/update-document.md deleted file mode 100644 index 2f4f89fc14..0000000000 --- a/docs/examples/0.15.x/server-python/examples/database/update-document.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.database import Database - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -database = Database(client) - -result = database.update_document('[COLLECTION_ID]', '[DOCUMENT_ID]', {}) diff --git a/docs/examples/0.15.x/server-ruby/examples/database/create-boolean-attribute.md b/docs/examples/0.15.x/server-ruby/examples/database/create-boolean-attribute.md deleted file mode 100644 index b3228f27fe..0000000000 --- a/docs/examples/0.15.x/server-ruby/examples/database/create-boolean-attribute.md +++ /dev/null @@ -1,14 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key - -database = Appwrite::Database.new(client) - -response = database.create_boolean_attribute(collection_id: '[COLLECTION_ID]', key: '', required: false) - -puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.15.x/server-ruby/examples/database/create-collection.md b/docs/examples/0.15.x/server-ruby/examples/database/create-collection.md deleted file mode 100644 index 81325a8b79..0000000000 --- a/docs/examples/0.15.x/server-ruby/examples/database/create-collection.md +++ /dev/null @@ -1,14 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key - -database = Appwrite::Database.new(client) - -response = database.create_collection(collection_id: '[COLLECTION_ID]', name: '[NAME]', permission: 'document', read: ["role:all"], write: ["role:all"]) - -puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.15.x/server-ruby/examples/database/create-document.md b/docs/examples/0.15.x/server-ruby/examples/database/create-document.md deleted file mode 100644 index 97300f92d8..0000000000 --- a/docs/examples/0.15.x/server-ruby/examples/database/create-document.md +++ /dev/null @@ -1,14 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key - -database = Appwrite::Database.new(client) - -response = database.create_document(collection_id: '[COLLECTION_ID]', document_id: '[DOCUMENT_ID]', data: {}) - -puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.15.x/server-ruby/examples/database/create-email-attribute.md b/docs/examples/0.15.x/server-ruby/examples/database/create-email-attribute.md deleted file mode 100644 index fbf9d4fbe0..0000000000 --- a/docs/examples/0.15.x/server-ruby/examples/database/create-email-attribute.md +++ /dev/null @@ -1,14 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key - -database = Appwrite::Database.new(client) - -response = database.create_email_attribute(collection_id: '[COLLECTION_ID]', key: '', required: false) - -puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.15.x/server-ruby/examples/database/create-enum-attribute.md b/docs/examples/0.15.x/server-ruby/examples/database/create-enum-attribute.md deleted file mode 100644 index 9d0c372f4c..0000000000 --- a/docs/examples/0.15.x/server-ruby/examples/database/create-enum-attribute.md +++ /dev/null @@ -1,14 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key - -database = Appwrite::Database.new(client) - -response = database.create_enum_attribute(collection_id: '[COLLECTION_ID]', key: '', elements: [], required: false) - -puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.15.x/server-ruby/examples/database/create-float-attribute.md b/docs/examples/0.15.x/server-ruby/examples/database/create-float-attribute.md deleted file mode 100644 index 753191b586..0000000000 --- a/docs/examples/0.15.x/server-ruby/examples/database/create-float-attribute.md +++ /dev/null @@ -1,14 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key - -database = Appwrite::Database.new(client) - -response = database.create_float_attribute(collection_id: '[COLLECTION_ID]', key: '', required: false) - -puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.15.x/server-ruby/examples/database/create-index.md b/docs/examples/0.15.x/server-ruby/examples/database/create-index.md deleted file mode 100644 index 3404c76763..0000000000 --- a/docs/examples/0.15.x/server-ruby/examples/database/create-index.md +++ /dev/null @@ -1,14 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key - -database = Appwrite::Database.new(client) - -response = database.create_index(collection_id: '[COLLECTION_ID]', key: '', type: 'key', attributes: []) - -puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.15.x/server-ruby/examples/database/create-integer-attribute.md b/docs/examples/0.15.x/server-ruby/examples/database/create-integer-attribute.md deleted file mode 100644 index 870405e478..0000000000 --- a/docs/examples/0.15.x/server-ruby/examples/database/create-integer-attribute.md +++ /dev/null @@ -1,14 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key - -database = Appwrite::Database.new(client) - -response = database.create_integer_attribute(collection_id: '[COLLECTION_ID]', key: '', required: false) - -puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.15.x/server-ruby/examples/database/create-ip-attribute.md b/docs/examples/0.15.x/server-ruby/examples/database/create-ip-attribute.md deleted file mode 100644 index f956cb1eb8..0000000000 --- a/docs/examples/0.15.x/server-ruby/examples/database/create-ip-attribute.md +++ /dev/null @@ -1,14 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key - -database = Appwrite::Database.new(client) - -response = database.create_ip_attribute(collection_id: '[COLLECTION_ID]', key: '', required: false) - -puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.15.x/server-ruby/examples/database/create-string-attribute.md b/docs/examples/0.15.x/server-ruby/examples/database/create-string-attribute.md deleted file mode 100644 index 5d42170fa4..0000000000 --- a/docs/examples/0.15.x/server-ruby/examples/database/create-string-attribute.md +++ /dev/null @@ -1,14 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key - -database = Appwrite::Database.new(client) - -response = database.create_string_attribute(collection_id: '[COLLECTION_ID]', key: '', size: 1, required: false) - -puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.15.x/server-ruby/examples/database/create-url-attribute.md b/docs/examples/0.15.x/server-ruby/examples/database/create-url-attribute.md deleted file mode 100644 index a91948f1d5..0000000000 --- a/docs/examples/0.15.x/server-ruby/examples/database/create-url-attribute.md +++ /dev/null @@ -1,14 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key - -database = Appwrite::Database.new(client) - -response = database.create_url_attribute(collection_id: '[COLLECTION_ID]', key: '', required: false) - -puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.15.x/server-ruby/examples/database/delete-attribute.md b/docs/examples/0.15.x/server-ruby/examples/database/delete-attribute.md deleted file mode 100644 index 2b38d31bea..0000000000 --- a/docs/examples/0.15.x/server-ruby/examples/database/delete-attribute.md +++ /dev/null @@ -1,14 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key - -database = Appwrite::Database.new(client) - -response = database.delete_attribute(collection_id: '[COLLECTION_ID]', key: '') - -puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.15.x/server-ruby/examples/database/delete-collection.md b/docs/examples/0.15.x/server-ruby/examples/database/delete-collection.md deleted file mode 100644 index 9694d36cc0..0000000000 --- a/docs/examples/0.15.x/server-ruby/examples/database/delete-collection.md +++ /dev/null @@ -1,14 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key - -database = Appwrite::Database.new(client) - -response = database.delete_collection(collection_id: '[COLLECTION_ID]') - -puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.15.x/server-ruby/examples/database/delete-document.md b/docs/examples/0.15.x/server-ruby/examples/database/delete-document.md deleted file mode 100644 index 87a6436550..0000000000 --- a/docs/examples/0.15.x/server-ruby/examples/database/delete-document.md +++ /dev/null @@ -1,14 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key - -database = Appwrite::Database.new(client) - -response = database.delete_document(collection_id: '[COLLECTION_ID]', document_id: '[DOCUMENT_ID]') - -puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.15.x/server-ruby/examples/database/delete-index.md b/docs/examples/0.15.x/server-ruby/examples/database/delete-index.md deleted file mode 100644 index 50b8a8d1f4..0000000000 --- a/docs/examples/0.15.x/server-ruby/examples/database/delete-index.md +++ /dev/null @@ -1,14 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key - -database = Appwrite::Database.new(client) - -response = database.delete_index(collection_id: '[COLLECTION_ID]', key: '') - -puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.15.x/server-ruby/examples/database/get-attribute.md b/docs/examples/0.15.x/server-ruby/examples/database/get-attribute.md deleted file mode 100644 index 7315a50ae3..0000000000 --- a/docs/examples/0.15.x/server-ruby/examples/database/get-attribute.md +++ /dev/null @@ -1,14 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key - -database = Appwrite::Database.new(client) - -response = database.get_attribute(collection_id: '[COLLECTION_ID]', key: '') - -puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.15.x/server-ruby/examples/database/get-collection.md b/docs/examples/0.15.x/server-ruby/examples/database/get-collection.md deleted file mode 100644 index 213c19cc7f..0000000000 --- a/docs/examples/0.15.x/server-ruby/examples/database/get-collection.md +++ /dev/null @@ -1,14 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key - -database = Appwrite::Database.new(client) - -response = database.get_collection(collection_id: '[COLLECTION_ID]') - -puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.15.x/server-ruby/examples/database/get-document.md b/docs/examples/0.15.x/server-ruby/examples/database/get-document.md deleted file mode 100644 index c2d3da2a78..0000000000 --- a/docs/examples/0.15.x/server-ruby/examples/database/get-document.md +++ /dev/null @@ -1,14 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key - -database = Appwrite::Database.new(client) - -response = database.get_document(collection_id: '[COLLECTION_ID]', document_id: '[DOCUMENT_ID]') - -puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.15.x/server-ruby/examples/database/get-index.md b/docs/examples/0.15.x/server-ruby/examples/database/get-index.md deleted file mode 100644 index 69d190d8fd..0000000000 --- a/docs/examples/0.15.x/server-ruby/examples/database/get-index.md +++ /dev/null @@ -1,14 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key - -database = Appwrite::Database.new(client) - -response = database.get_index(collection_id: '[COLLECTION_ID]', key: '') - -puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.15.x/server-ruby/examples/database/list-attributes.md b/docs/examples/0.15.x/server-ruby/examples/database/list-attributes.md deleted file mode 100644 index 84162b9087..0000000000 --- a/docs/examples/0.15.x/server-ruby/examples/database/list-attributes.md +++ /dev/null @@ -1,14 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key - -database = Appwrite::Database.new(client) - -response = database.list_attributes(collection_id: '[COLLECTION_ID]') - -puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.15.x/server-ruby/examples/database/list-collections.md b/docs/examples/0.15.x/server-ruby/examples/database/list-collections.md deleted file mode 100644 index f26ad8f281..0000000000 --- a/docs/examples/0.15.x/server-ruby/examples/database/list-collections.md +++ /dev/null @@ -1,14 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key - -database = Appwrite::Database.new(client) - -response = database.list_collections() - -puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.15.x/server-ruby/examples/database/list-documents.md b/docs/examples/0.15.x/server-ruby/examples/database/list-documents.md deleted file mode 100644 index 4e4e9ab5ab..0000000000 --- a/docs/examples/0.15.x/server-ruby/examples/database/list-documents.md +++ /dev/null @@ -1,14 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key - -database = Appwrite::Database.new(client) - -response = database.list_documents(collection_id: '[COLLECTION_ID]') - -puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.15.x/server-ruby/examples/database/list-indexes.md b/docs/examples/0.15.x/server-ruby/examples/database/list-indexes.md deleted file mode 100644 index bf6df474f4..0000000000 --- a/docs/examples/0.15.x/server-ruby/examples/database/list-indexes.md +++ /dev/null @@ -1,14 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key - -database = Appwrite::Database.new(client) - -response = database.list_indexes(collection_id: '[COLLECTION_ID]') - -puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.15.x/server-ruby/examples/database/update-collection.md b/docs/examples/0.15.x/server-ruby/examples/database/update-collection.md deleted file mode 100644 index 0cbda72a3f..0000000000 --- a/docs/examples/0.15.x/server-ruby/examples/database/update-collection.md +++ /dev/null @@ -1,14 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key - -database = Appwrite::Database.new(client) - -response = database.update_collection(collection_id: '[COLLECTION_ID]', name: '[NAME]', permission: 'document') - -puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.15.x/server-ruby/examples/database/update-document.md b/docs/examples/0.15.x/server-ruby/examples/database/update-document.md deleted file mode 100644 index 4b5344b5d7..0000000000 --- a/docs/examples/0.15.x/server-ruby/examples/database/update-document.md +++ /dev/null @@ -1,14 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key - -database = Appwrite::Database.new(client) - -response = database.update_document(collection_id: '[COLLECTION_ID]', document_id: '[DOCUMENT_ID]', data: {}) - -puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.15.x/server-swift/examples/account/update-prefs.md b/docs/examples/0.15.x/server-swift/examples/account/update-prefs.md index 95de4632dd..6d98f351cb 100644 --- a/docs/examples/0.15.x/server-swift/examples/account/update-prefs.md +++ b/docs/examples/0.15.x/server-swift/examples/account/update-prefs.md @@ -7,7 +7,7 @@ func main() async throws { .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token let account = Account(client) let user = try await account.updatePrefs( - prefs: + prefs: [:] ) print(String(describing: user) diff --git a/docs/examples/0.15.x/server-swift/examples/database/create-boolean-attribute.md b/docs/examples/0.15.x/server-swift/examples/database/create-boolean-attribute.md deleted file mode 100644 index 1a59923305..0000000000 --- a/docs/examples/0.15.x/server-swift/examples/database/create-boolean-attribute.md +++ /dev/null @@ -1,16 +0,0 @@ -import Appwrite - -func main() async throws { - let client = Client() - .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject("5df5acd0d48c2") // Your project ID - .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let database = Database(client) - let attributeBoolean = try await database.createBooleanAttribute( - collectionId: "[COLLECTION_ID]", - key: "", - required: xfalse - ) - - print(String(describing: attributeBoolean) -} diff --git a/docs/examples/0.15.x/server-swift/examples/database/create-collection.md b/docs/examples/0.15.x/server-swift/examples/database/create-collection.md deleted file mode 100644 index 4c5e2987a5..0000000000 --- a/docs/examples/0.15.x/server-swift/examples/database/create-collection.md +++ /dev/null @@ -1,18 +0,0 @@ -import Appwrite - -func main() async throws { - let client = Client() - .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject("5df5acd0d48c2") // Your project ID - .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let database = Database(client) - let collection = try await database.createCollection( - collectionId: "[COLLECTION_ID]", - name: "[NAME]", - permission: "document", - read: ["role:all"], - write: ["role:all"] - ) - - print(String(describing: collection) -} diff --git a/docs/examples/0.15.x/server-swift/examples/database/create-document.md b/docs/examples/0.15.x/server-swift/examples/database/create-document.md deleted file mode 100644 index c2b4c47759..0000000000 --- a/docs/examples/0.15.x/server-swift/examples/database/create-document.md +++ /dev/null @@ -1,16 +0,0 @@ -import Appwrite - -func main() async throws { - let client = Client() - .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject("5df5acd0d48c2") // Your project ID - .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let database = Database(client) - let document = try await database.createDocument( - collectionId: "[COLLECTION_ID]", - documentId: "[DOCUMENT_ID]", - data: - ) - - print(String(describing: document) -} diff --git a/docs/examples/0.15.x/server-swift/examples/database/create-email-attribute.md b/docs/examples/0.15.x/server-swift/examples/database/create-email-attribute.md deleted file mode 100644 index 90ce11c6e4..0000000000 --- a/docs/examples/0.15.x/server-swift/examples/database/create-email-attribute.md +++ /dev/null @@ -1,16 +0,0 @@ -import Appwrite - -func main() async throws { - let client = Client() - .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject("5df5acd0d48c2") // Your project ID - .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let database = Database(client) - let attributeEmail = try await database.createEmailAttribute( - collectionId: "[COLLECTION_ID]", - key: "", - required: xfalse - ) - - print(String(describing: attributeEmail) -} diff --git a/docs/examples/0.15.x/server-swift/examples/database/create-enum-attribute.md b/docs/examples/0.15.x/server-swift/examples/database/create-enum-attribute.md deleted file mode 100644 index 6595e2b002..0000000000 --- a/docs/examples/0.15.x/server-swift/examples/database/create-enum-attribute.md +++ /dev/null @@ -1,17 +0,0 @@ -import Appwrite - -func main() async throws { - let client = Client() - .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject("5df5acd0d48c2") // Your project ID - .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let database = Database(client) - let attributeEnum = try await database.createEnumAttribute( - collectionId: "[COLLECTION_ID]", - key: "", - elements: [], - required: xfalse - ) - - print(String(describing: attributeEnum) -} diff --git a/docs/examples/0.15.x/server-swift/examples/database/create-float-attribute.md b/docs/examples/0.15.x/server-swift/examples/database/create-float-attribute.md deleted file mode 100644 index 573e201648..0000000000 --- a/docs/examples/0.15.x/server-swift/examples/database/create-float-attribute.md +++ /dev/null @@ -1,16 +0,0 @@ -import Appwrite - -func main() async throws { - let client = Client() - .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject("5df5acd0d48c2") // Your project ID - .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let database = Database(client) - let attributeFloat = try await database.createFloatAttribute( - collectionId: "[COLLECTION_ID]", - key: "", - required: xfalse - ) - - print(String(describing: attributeFloat) -} diff --git a/docs/examples/0.15.x/server-swift/examples/database/create-index.md b/docs/examples/0.15.x/server-swift/examples/database/create-index.md deleted file mode 100644 index 0ee0ceb9a0..0000000000 --- a/docs/examples/0.15.x/server-swift/examples/database/create-index.md +++ /dev/null @@ -1,17 +0,0 @@ -import Appwrite - -func main() async throws { - let client = Client() - .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject("5df5acd0d48c2") // Your project ID - .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let database = Database(client) - let index = try await database.createIndex( - collectionId: "[COLLECTION_ID]", - key: "", - type: "key", - attributes: [] - ) - - print(String(describing: index) -} diff --git a/docs/examples/0.15.x/server-swift/examples/database/create-integer-attribute.md b/docs/examples/0.15.x/server-swift/examples/database/create-integer-attribute.md deleted file mode 100644 index a893203994..0000000000 --- a/docs/examples/0.15.x/server-swift/examples/database/create-integer-attribute.md +++ /dev/null @@ -1,16 +0,0 @@ -import Appwrite - -func main() async throws { - let client = Client() - .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject("5df5acd0d48c2") // Your project ID - .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let database = Database(client) - let attributeInteger = try await database.createIntegerAttribute( - collectionId: "[COLLECTION_ID]", - key: "", - required: xfalse - ) - - print(String(describing: attributeInteger) -} diff --git a/docs/examples/0.15.x/server-swift/examples/database/create-ip-attribute.md b/docs/examples/0.15.x/server-swift/examples/database/create-ip-attribute.md deleted file mode 100644 index 26b14ab126..0000000000 --- a/docs/examples/0.15.x/server-swift/examples/database/create-ip-attribute.md +++ /dev/null @@ -1,16 +0,0 @@ -import Appwrite - -func main() async throws { - let client = Client() - .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject("5df5acd0d48c2") // Your project ID - .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let database = Database(client) - let attributeIp = try await database.createIpAttribute( - collectionId: "[COLLECTION_ID]", - key: "", - required: xfalse - ) - - print(String(describing: attributeIp) -} diff --git a/docs/examples/0.15.x/server-swift/examples/database/create-string-attribute.md b/docs/examples/0.15.x/server-swift/examples/database/create-string-attribute.md deleted file mode 100644 index 126415bac0..0000000000 --- a/docs/examples/0.15.x/server-swift/examples/database/create-string-attribute.md +++ /dev/null @@ -1,17 +0,0 @@ -import Appwrite - -func main() async throws { - let client = Client() - .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject("5df5acd0d48c2") // Your project ID - .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let database = Database(client) - let attributeString = try await database.createStringAttribute( - collectionId: "[COLLECTION_ID]", - key: "", - size: 1, - required: xfalse - ) - - print(String(describing: attributeString) -} diff --git a/docs/examples/0.15.x/server-swift/examples/database/create-url-attribute.md b/docs/examples/0.15.x/server-swift/examples/database/create-url-attribute.md deleted file mode 100644 index 24d7f668af..0000000000 --- a/docs/examples/0.15.x/server-swift/examples/database/create-url-attribute.md +++ /dev/null @@ -1,16 +0,0 @@ -import Appwrite - -func main() async throws { - let client = Client() - .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject("5df5acd0d48c2") // Your project ID - .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let database = Database(client) - let attributeUrl = try await database.createUrlAttribute( - collectionId: "[COLLECTION_ID]", - key: "", - required: xfalse - ) - - print(String(describing: attributeUrl) -} diff --git a/docs/examples/0.15.x/server-swift/examples/database/delete-attribute.md b/docs/examples/0.15.x/server-swift/examples/database/delete-attribute.md deleted file mode 100644 index 1202fd4147..0000000000 --- a/docs/examples/0.15.x/server-swift/examples/database/delete-attribute.md +++ /dev/null @@ -1,15 +0,0 @@ -import Appwrite - -func main() async throws { - let client = Client() - .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject("5df5acd0d48c2") // Your project ID - .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let database = Database(client) - let result = try await database.deleteAttribute( - collectionId: "[COLLECTION_ID]", - key: "" - ) - - print(String(describing: result) -} diff --git a/docs/examples/0.15.x/server-swift/examples/database/delete-collection.md b/docs/examples/0.15.x/server-swift/examples/database/delete-collection.md deleted file mode 100644 index 63c7261758..0000000000 --- a/docs/examples/0.15.x/server-swift/examples/database/delete-collection.md +++ /dev/null @@ -1,14 +0,0 @@ -import Appwrite - -func main() async throws { - let client = Client() - .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject("5df5acd0d48c2") // Your project ID - .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let database = Database(client) - let result = try await database.deleteCollection( - collectionId: "[COLLECTION_ID]" - ) - - print(String(describing: result) -} diff --git a/docs/examples/0.15.x/server-swift/examples/database/delete-document.md b/docs/examples/0.15.x/server-swift/examples/database/delete-document.md deleted file mode 100644 index d481ca5828..0000000000 --- a/docs/examples/0.15.x/server-swift/examples/database/delete-document.md +++ /dev/null @@ -1,15 +0,0 @@ -import Appwrite - -func main() async throws { - let client = Client() - .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject("5df5acd0d48c2") // Your project ID - .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let database = Database(client) - let result = try await database.deleteDocument( - collectionId: "[COLLECTION_ID]", - documentId: "[DOCUMENT_ID]" - ) - - print(String(describing: result) -} diff --git a/docs/examples/0.15.x/server-swift/examples/database/delete-index.md b/docs/examples/0.15.x/server-swift/examples/database/delete-index.md deleted file mode 100644 index 317de6a3df..0000000000 --- a/docs/examples/0.15.x/server-swift/examples/database/delete-index.md +++ /dev/null @@ -1,15 +0,0 @@ -import Appwrite - -func main() async throws { - let client = Client() - .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject("5df5acd0d48c2") // Your project ID - .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let database = Database(client) - let result = try await database.deleteIndex( - collectionId: "[COLLECTION_ID]", - key: "" - ) - - print(String(describing: result) -} diff --git a/docs/examples/0.15.x/server-swift/examples/database/get-attribute.md b/docs/examples/0.15.x/server-swift/examples/database/get-attribute.md deleted file mode 100644 index 9bcbf53f61..0000000000 --- a/docs/examples/0.15.x/server-swift/examples/database/get-attribute.md +++ /dev/null @@ -1,15 +0,0 @@ -import Appwrite - -func main() async throws { - let client = Client() - .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject("5df5acd0d48c2") // Your project ID - .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let database = Database(client) - let result = try await database.getAttribute( - collectionId: "[COLLECTION_ID]", - key: "" - ) - - print(String(describing: result) -} diff --git a/docs/examples/0.15.x/server-swift/examples/database/get-collection.md b/docs/examples/0.15.x/server-swift/examples/database/get-collection.md deleted file mode 100644 index 08206a8241..0000000000 --- a/docs/examples/0.15.x/server-swift/examples/database/get-collection.md +++ /dev/null @@ -1,14 +0,0 @@ -import Appwrite - -func main() async throws { - let client = Client() - .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject("5df5acd0d48c2") // Your project ID - .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let database = Database(client) - let collection = try await database.getCollection( - collectionId: "[COLLECTION_ID]" - ) - - print(String(describing: collection) -} diff --git a/docs/examples/0.15.x/server-swift/examples/database/get-document.md b/docs/examples/0.15.x/server-swift/examples/database/get-document.md deleted file mode 100644 index f10b7da615..0000000000 --- a/docs/examples/0.15.x/server-swift/examples/database/get-document.md +++ /dev/null @@ -1,15 +0,0 @@ -import Appwrite - -func main() async throws { - let client = Client() - .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject("5df5acd0d48c2") // Your project ID - .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let database = Database(client) - let document = try await database.getDocument( - collectionId: "[COLLECTION_ID]", - documentId: "[DOCUMENT_ID]" - ) - - print(String(describing: document) -} diff --git a/docs/examples/0.15.x/server-swift/examples/database/get-index.md b/docs/examples/0.15.x/server-swift/examples/database/get-index.md deleted file mode 100644 index c7ef827359..0000000000 --- a/docs/examples/0.15.x/server-swift/examples/database/get-index.md +++ /dev/null @@ -1,15 +0,0 @@ -import Appwrite - -func main() async throws { - let client = Client() - .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject("5df5acd0d48c2") // Your project ID - .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let database = Database(client) - let index = try await database.getIndex( - collectionId: "[COLLECTION_ID]", - key: "" - ) - - print(String(describing: index) -} diff --git a/docs/examples/0.15.x/server-swift/examples/database/list-attributes.md b/docs/examples/0.15.x/server-swift/examples/database/list-attributes.md deleted file mode 100644 index d51bb9577b..0000000000 --- a/docs/examples/0.15.x/server-swift/examples/database/list-attributes.md +++ /dev/null @@ -1,14 +0,0 @@ -import Appwrite - -func main() async throws { - let client = Client() - .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject("5df5acd0d48c2") // Your project ID - .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let database = Database(client) - let attributeList = try await database.listAttributes( - collectionId: "[COLLECTION_ID]" - ) - - print(String(describing: attributeList) -} diff --git a/docs/examples/0.15.x/server-swift/examples/database/list-collections.md b/docs/examples/0.15.x/server-swift/examples/database/list-collections.md deleted file mode 100644 index 87dc2386ed..0000000000 --- a/docs/examples/0.15.x/server-swift/examples/database/list-collections.md +++ /dev/null @@ -1,12 +0,0 @@ -import Appwrite - -func main() async throws { - let client = Client() - .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject("5df5acd0d48c2") // Your project ID - .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let database = Database(client) - let collectionList = try await database.listCollections() - - print(String(describing: collectionList) -} diff --git a/docs/examples/0.15.x/server-swift/examples/database/list-documents.md b/docs/examples/0.15.x/server-swift/examples/database/list-documents.md deleted file mode 100644 index 27c32f5e27..0000000000 --- a/docs/examples/0.15.x/server-swift/examples/database/list-documents.md +++ /dev/null @@ -1,14 +0,0 @@ -import Appwrite - -func main() async throws { - let client = Client() - .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject("5df5acd0d48c2") // Your project ID - .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let database = Database(client) - let documentList = try await database.listDocuments( - collectionId: "[COLLECTION_ID]" - ) - - print(String(describing: documentList) -} diff --git a/docs/examples/0.15.x/server-swift/examples/database/list-indexes.md b/docs/examples/0.15.x/server-swift/examples/database/list-indexes.md deleted file mode 100644 index 6210d6f79c..0000000000 --- a/docs/examples/0.15.x/server-swift/examples/database/list-indexes.md +++ /dev/null @@ -1,14 +0,0 @@ -import Appwrite - -func main() async throws { - let client = Client() - .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject("5df5acd0d48c2") // Your project ID - .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let database = Database(client) - let indexList = try await database.listIndexes( - collectionId: "[COLLECTION_ID]" - ) - - print(String(describing: indexList) -} diff --git a/docs/examples/0.15.x/server-swift/examples/database/update-collection.md b/docs/examples/0.15.x/server-swift/examples/database/update-collection.md deleted file mode 100644 index 817be46374..0000000000 --- a/docs/examples/0.15.x/server-swift/examples/database/update-collection.md +++ /dev/null @@ -1,16 +0,0 @@ -import Appwrite - -func main() async throws { - let client = Client() - .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject("5df5acd0d48c2") // Your project ID - .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let database = Database(client) - let collection = try await database.updateCollection( - collectionId: "[COLLECTION_ID]", - name: "[NAME]", - permission: "document" - ) - - print(String(describing: collection) -} diff --git a/docs/examples/0.15.x/server-swift/examples/database/update-document.md b/docs/examples/0.15.x/server-swift/examples/database/update-document.md deleted file mode 100644 index 82222ddb20..0000000000 --- a/docs/examples/0.15.x/server-swift/examples/database/update-document.md +++ /dev/null @@ -1,16 +0,0 @@ -import Appwrite - -func main() async throws { - let client = Client() - .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject("5df5acd0d48c2") // Your project ID - .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let database = Database(client) - let document = try await database.updateDocument( - collectionId: "[COLLECTION_ID]", - documentId: "[DOCUMENT_ID]", - data: - ) - - print(String(describing: document) -} diff --git a/docs/examples/0.15.x/server-swift/examples/users/update-prefs.md b/docs/examples/0.15.x/server-swift/examples/users/update-prefs.md index 9fee0fc012..78e8bc274e 100644 --- a/docs/examples/0.15.x/server-swift/examples/users/update-prefs.md +++ b/docs/examples/0.15.x/server-swift/examples/users/update-prefs.md @@ -8,7 +8,7 @@ func main() async throws { let users = Users(client) let preferences = try await users.updatePrefs( userId: "[USER_ID]", - prefs: + prefs: [:] ) print(String(describing: preferences)