diff --git a/README.md b/README.md index 54203a93..aba15176 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![pub package](https://img.shields.io/pub/v/dart_appwrite.svg?style=flat-square)](https://pub.dartlang.org/packages/dart_appwrite) ![License](https://img.shields.io/github/license/appwrite/sdk-for-dart.svg?style=flat-square) -![Version](https://img.shields.io/badge/api%20version-1.3.0-blue.svg?style=flat-square) +![Version](https://img.shields.io/badge/api%20version-1.3.x-blue.svg?style=flat-square) [![Build Status](https://img.shields.io/travis/com/appwrite/sdk-generator?style=flat-square)](https://travis-ci.com/appwrite/sdk-generator) [![Twitter Account](https://img.shields.io/twitter/follow/appwrite?color=00acee&label=twitter&style=flat-square)](https://twitter.com/appwrite) [![Discord](https://img.shields.io/discord/564160730845151244?label=discord&style=flat-square)](https://appwrite.io/discord) diff --git a/docs/examples/account/create-phone-verification.md b/docs/examples/account/create-phone-verification.md index de0389f7..912f8c3b 100644 --- a/docs/examples/account/create-phone-verification.md +++ b/docs/examples/account/create-phone-verification.md @@ -5,7 +5,7 @@ void main() { // Init SDK Account account = Account(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token ; diff --git a/docs/examples/account/create-recovery.md b/docs/examples/account/create-recovery.md index 1d6c7fca..d9f13957 100644 --- a/docs/examples/account/create-recovery.md +++ b/docs/examples/account/create-recovery.md @@ -5,7 +5,7 @@ void main() { // Init SDK Account account = Account(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token ; diff --git a/docs/examples/account/create-verification.md b/docs/examples/account/create-verification.md index a46c1cf5..cca3c7b7 100644 --- a/docs/examples/account/create-verification.md +++ b/docs/examples/account/create-verification.md @@ -5,7 +5,7 @@ void main() { // Init SDK Account account = Account(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token ; diff --git a/docs/examples/account/delete-session.md b/docs/examples/account/delete-session.md index 7e2c59b6..9486ec9b 100644 --- a/docs/examples/account/delete-session.md +++ b/docs/examples/account/delete-session.md @@ -5,7 +5,7 @@ void main() { // Init SDK Account account = Account(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token ; diff --git a/docs/examples/account/delete-sessions.md b/docs/examples/account/delete-sessions.md index 8647d09f..a5732cb6 100644 --- a/docs/examples/account/delete-sessions.md +++ b/docs/examples/account/delete-sessions.md @@ -5,7 +5,7 @@ void main() { // Init SDK Account account = Account(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token ; diff --git a/docs/examples/account/get-prefs.md b/docs/examples/account/get-prefs.md index 911e8681..527a71f3 100644 --- a/docs/examples/account/get-prefs.md +++ b/docs/examples/account/get-prefs.md @@ -5,7 +5,7 @@ void main() { // Init SDK Account account = Account(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token ; diff --git a/docs/examples/account/get-session.md b/docs/examples/account/get-session.md index ef78a529..6eb711ab 100644 --- a/docs/examples/account/get-session.md +++ b/docs/examples/account/get-session.md @@ -5,7 +5,7 @@ void main() { // Init SDK Account account = Account(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token ; diff --git a/docs/examples/account/get.md b/docs/examples/account/get.md index 040dad64..c72fdddb 100644 --- a/docs/examples/account/get.md +++ b/docs/examples/account/get.md @@ -5,7 +5,7 @@ void main() { // Init SDK Account account = Account(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token ; diff --git a/docs/examples/account/list-logs.md b/docs/examples/account/list-logs.md index 83735ecc..68d2c49f 100644 --- a/docs/examples/account/list-logs.md +++ b/docs/examples/account/list-logs.md @@ -5,7 +5,7 @@ void main() { // Init SDK Account account = Account(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token ; diff --git a/docs/examples/account/list-sessions.md b/docs/examples/account/list-sessions.md index 914c3dd7..0d6567b5 100644 --- a/docs/examples/account/list-sessions.md +++ b/docs/examples/account/list-sessions.md @@ -5,7 +5,7 @@ void main() { // Init SDK Account account = Account(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token ; diff --git a/docs/examples/account/update-email.md b/docs/examples/account/update-email.md index 85b5950b..b83f7d86 100644 --- a/docs/examples/account/update-email.md +++ b/docs/examples/account/update-email.md @@ -5,7 +5,7 @@ void main() { // Init SDK Account account = Account(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token ; diff --git a/docs/examples/account/update-name.md b/docs/examples/account/update-name.md index 026206d1..0bd27cf2 100644 --- a/docs/examples/account/update-name.md +++ b/docs/examples/account/update-name.md @@ -5,7 +5,7 @@ void main() { // Init SDK Account account = Account(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token ; diff --git a/docs/examples/account/update-password.md b/docs/examples/account/update-password.md index 4e6994c9..d5e27a75 100644 --- a/docs/examples/account/update-password.md +++ b/docs/examples/account/update-password.md @@ -5,7 +5,7 @@ void main() { // Init SDK Account account = Account(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token ; diff --git a/docs/examples/account/update-phone-verification.md b/docs/examples/account/update-phone-verification.md index 257cc9b4..f2995b9b 100644 --- a/docs/examples/account/update-phone-verification.md +++ b/docs/examples/account/update-phone-verification.md @@ -5,7 +5,7 @@ void main() { // Init SDK Account account = Account(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token ; diff --git a/docs/examples/account/update-phone.md b/docs/examples/account/update-phone.md index 04380338..5848da5d 100644 --- a/docs/examples/account/update-phone.md +++ b/docs/examples/account/update-phone.md @@ -5,7 +5,7 @@ void main() { // Init SDK Account account = Account(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token ; diff --git a/docs/examples/account/update-prefs.md b/docs/examples/account/update-prefs.md index 8bcb83e7..ffbe7002 100644 --- a/docs/examples/account/update-prefs.md +++ b/docs/examples/account/update-prefs.md @@ -5,7 +5,7 @@ void main() { // Init SDK Account account = Account(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token ; diff --git a/docs/examples/account/update-recovery.md b/docs/examples/account/update-recovery.md index 5840fbec..c2cf9d23 100644 --- a/docs/examples/account/update-recovery.md +++ b/docs/examples/account/update-recovery.md @@ -5,7 +5,7 @@ void main() { // Init SDK Account account = Account(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token ; diff --git a/docs/examples/account/update-session.md b/docs/examples/account/update-session.md index c689dda9..61e11e27 100644 --- a/docs/examples/account/update-session.md +++ b/docs/examples/account/update-session.md @@ -5,7 +5,7 @@ void main() { // Init SDK Account account = Account(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token ; diff --git a/docs/examples/account/update-status.md b/docs/examples/account/update-status.md index 025ef777..12f73333 100644 --- a/docs/examples/account/update-status.md +++ b/docs/examples/account/update-status.md @@ -5,7 +5,7 @@ void main() { // Init SDK Account account = Account(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token ; diff --git a/docs/examples/account/update-verification.md b/docs/examples/account/update-verification.md index c9707936..40e36426 100644 --- a/docs/examples/account/update-verification.md +++ b/docs/examples/account/update-verification.md @@ -5,7 +5,7 @@ void main() { // Init SDK Account account = Account(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token ; diff --git a/docs/examples/avatars/get-browser.md b/docs/examples/avatars/get-browser.md index c924ae43..0bac9df4 100644 --- a/docs/examples/avatars/get-browser.md +++ b/docs/examples/avatars/get-browser.md @@ -5,7 +5,7 @@ void main() { // Init SDK Avatars avatars = Avatars(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/avatars/get-credit-card.md b/docs/examples/avatars/get-credit-card.md index 5d01d690..b9a8166e 100644 --- a/docs/examples/avatars/get-credit-card.md +++ b/docs/examples/avatars/get-credit-card.md @@ -5,7 +5,7 @@ void main() { // Init SDK Avatars avatars = Avatars(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/avatars/get-favicon.md b/docs/examples/avatars/get-favicon.md index 3308f5c5..6a728e77 100644 --- a/docs/examples/avatars/get-favicon.md +++ b/docs/examples/avatars/get-favicon.md @@ -5,7 +5,7 @@ void main() { // Init SDK Avatars avatars = Avatars(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/avatars/get-flag.md b/docs/examples/avatars/get-flag.md index 5da4aaf2..02e48809 100644 --- a/docs/examples/avatars/get-flag.md +++ b/docs/examples/avatars/get-flag.md @@ -5,7 +5,7 @@ void main() { // Init SDK Avatars avatars = Avatars(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/avatars/get-image.md b/docs/examples/avatars/get-image.md index 196c6ded..b1d5e338 100644 --- a/docs/examples/avatars/get-image.md +++ b/docs/examples/avatars/get-image.md @@ -5,7 +5,7 @@ void main() { // Init SDK Avatars avatars = Avatars(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/avatars/get-initials.md b/docs/examples/avatars/get-initials.md index c40a54b7..5a68caf1 100644 --- a/docs/examples/avatars/get-initials.md +++ b/docs/examples/avatars/get-initials.md @@ -5,7 +5,7 @@ void main() { // Init SDK Avatars avatars = Avatars(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/avatars/get-q-r.md b/docs/examples/avatars/get-q-r.md index bef31b34..8283b9bd 100644 --- a/docs/examples/avatars/get-q-r.md +++ b/docs/examples/avatars/get-q-r.md @@ -5,7 +5,7 @@ void main() { // Init SDK Avatars avatars = Avatars(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/databases/create-boolean-attribute.md b/docs/examples/databases/create-boolean-attribute.md index fd1223d3..22471968 100644 --- a/docs/examples/databases/create-boolean-attribute.md +++ b/docs/examples/databases/create-boolean-attribute.md @@ -5,7 +5,7 @@ void main() { // Init SDK Databases databases = Databases(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/databases/create-collection.md b/docs/examples/databases/create-collection.md index 5783e595..c90183de 100644 --- a/docs/examples/databases/create-collection.md +++ b/docs/examples/databases/create-collection.md @@ -5,7 +5,7 @@ void main() { // Init SDK Databases databases = Databases(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/databases/create-datetime-attribute.md b/docs/examples/databases/create-datetime-attribute.md index da3cf104..24c44088 100644 --- a/docs/examples/databases/create-datetime-attribute.md +++ b/docs/examples/databases/create-datetime-attribute.md @@ -5,7 +5,7 @@ void main() { // Init SDK Databases databases = Databases(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/databases/create-document.md b/docs/examples/databases/create-document.md index 6d88d9c7..00d844da 100644 --- a/docs/examples/databases/create-document.md +++ b/docs/examples/databases/create-document.md @@ -5,7 +5,7 @@ void main() { // Init SDK Databases databases = Databases(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/databases/create-email-attribute.md b/docs/examples/databases/create-email-attribute.md index d3443b57..92fd3203 100644 --- a/docs/examples/databases/create-email-attribute.md +++ b/docs/examples/databases/create-email-attribute.md @@ -5,7 +5,7 @@ void main() { // Init SDK Databases databases = Databases(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/databases/create-enum-attribute.md b/docs/examples/databases/create-enum-attribute.md index da413a1d..fa8ad920 100644 --- a/docs/examples/databases/create-enum-attribute.md +++ b/docs/examples/databases/create-enum-attribute.md @@ -5,7 +5,7 @@ void main() { // Init SDK Databases databases = Databases(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/databases/create-float-attribute.md b/docs/examples/databases/create-float-attribute.md index c2d6ad4a..96047bf2 100644 --- a/docs/examples/databases/create-float-attribute.md +++ b/docs/examples/databases/create-float-attribute.md @@ -5,7 +5,7 @@ void main() { // Init SDK Databases databases = Databases(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/databases/create-index.md b/docs/examples/databases/create-index.md index e0d04e77..c16a0271 100644 --- a/docs/examples/databases/create-index.md +++ b/docs/examples/databases/create-index.md @@ -5,7 +5,7 @@ void main() { // Init SDK Databases databases = Databases(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/databases/create-integer-attribute.md b/docs/examples/databases/create-integer-attribute.md index 701ed4ee..bc4f12f0 100644 --- a/docs/examples/databases/create-integer-attribute.md +++ b/docs/examples/databases/create-integer-attribute.md @@ -5,7 +5,7 @@ void main() { // Init SDK Databases databases = Databases(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/databases/create-ip-attribute.md b/docs/examples/databases/create-ip-attribute.md index 925a5d5d..ef3e985a 100644 --- a/docs/examples/databases/create-ip-attribute.md +++ b/docs/examples/databases/create-ip-attribute.md @@ -5,7 +5,7 @@ void main() { // Init SDK Databases databases = Databases(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/databases/create-relationship-attribute.md b/docs/examples/databases/create-relationship-attribute.md index 674a0005..01f2b42f 100644 --- a/docs/examples/databases/create-relationship-attribute.md +++ b/docs/examples/databases/create-relationship-attribute.md @@ -5,7 +5,7 @@ void main() { // Init SDK Databases databases = Databases(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/databases/create-string-attribute.md b/docs/examples/databases/create-string-attribute.md index 8178ece3..14f2769d 100644 --- a/docs/examples/databases/create-string-attribute.md +++ b/docs/examples/databases/create-string-attribute.md @@ -5,7 +5,7 @@ void main() { // Init SDK Databases databases = Databases(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/databases/create-url-attribute.md b/docs/examples/databases/create-url-attribute.md index 8c117cbf..4cf3e99a 100644 --- a/docs/examples/databases/create-url-attribute.md +++ b/docs/examples/databases/create-url-attribute.md @@ -5,7 +5,7 @@ void main() { // Init SDK Databases databases = Databases(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/databases/create.md b/docs/examples/databases/create.md index 7c9cc537..cbaf3b74 100644 --- a/docs/examples/databases/create.md +++ b/docs/examples/databases/create.md @@ -5,7 +5,7 @@ void main() { // Init SDK Databases databases = Databases(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/databases/delete-attribute.md b/docs/examples/databases/delete-attribute.md index 113f80da..e9865bfe 100644 --- a/docs/examples/databases/delete-attribute.md +++ b/docs/examples/databases/delete-attribute.md @@ -5,7 +5,7 @@ void main() { // Init SDK Databases databases = Databases(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/databases/delete-collection.md b/docs/examples/databases/delete-collection.md index 05425529..58869201 100644 --- a/docs/examples/databases/delete-collection.md +++ b/docs/examples/databases/delete-collection.md @@ -5,7 +5,7 @@ void main() { // Init SDK Databases databases = Databases(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/databases/delete-document.md b/docs/examples/databases/delete-document.md index 5985c933..0d298f3b 100644 --- a/docs/examples/databases/delete-document.md +++ b/docs/examples/databases/delete-document.md @@ -5,7 +5,7 @@ void main() { // Init SDK Databases databases = Databases(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/databases/delete-index.md b/docs/examples/databases/delete-index.md index 8efc981d..be5b2a5c 100644 --- a/docs/examples/databases/delete-index.md +++ b/docs/examples/databases/delete-index.md @@ -5,7 +5,7 @@ void main() { // Init SDK Databases databases = Databases(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/databases/delete.md b/docs/examples/databases/delete.md index 78f70bbc..ff19beea 100644 --- a/docs/examples/databases/delete.md +++ b/docs/examples/databases/delete.md @@ -5,7 +5,7 @@ void main() { // Init SDK Databases databases = Databases(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/databases/get-attribute.md b/docs/examples/databases/get-attribute.md index 32bb0955..c27ddb64 100644 --- a/docs/examples/databases/get-attribute.md +++ b/docs/examples/databases/get-attribute.md @@ -5,7 +5,7 @@ void main() { // Init SDK Databases databases = Databases(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/databases/get-collection.md b/docs/examples/databases/get-collection.md index 33b7913e..359f0df8 100644 --- a/docs/examples/databases/get-collection.md +++ b/docs/examples/databases/get-collection.md @@ -5,7 +5,7 @@ void main() { // Init SDK Databases databases = Databases(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/databases/get-document.md b/docs/examples/databases/get-document.md index 58fde417..2141abf4 100644 --- a/docs/examples/databases/get-document.md +++ b/docs/examples/databases/get-document.md @@ -5,7 +5,7 @@ void main() { // Init SDK Databases databases = Databases(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/databases/get-index.md b/docs/examples/databases/get-index.md index 64b03c48..2b8a9031 100644 --- a/docs/examples/databases/get-index.md +++ b/docs/examples/databases/get-index.md @@ -5,7 +5,7 @@ void main() { // Init SDK Databases databases = Databases(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/databases/get.md b/docs/examples/databases/get.md index c85a5c70..f0cc118b 100644 --- a/docs/examples/databases/get.md +++ b/docs/examples/databases/get.md @@ -5,7 +5,7 @@ void main() { // Init SDK Databases databases = Databases(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/databases/list-attributes.md b/docs/examples/databases/list-attributes.md index c13a9d70..60ca58f3 100644 --- a/docs/examples/databases/list-attributes.md +++ b/docs/examples/databases/list-attributes.md @@ -5,7 +5,7 @@ void main() { // Init SDK Databases databases = Databases(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/databases/list-collections.md b/docs/examples/databases/list-collections.md index 098a3272..a10038db 100644 --- a/docs/examples/databases/list-collections.md +++ b/docs/examples/databases/list-collections.md @@ -5,7 +5,7 @@ void main() { // Init SDK Databases databases = Databases(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/databases/list-documents.md b/docs/examples/databases/list-documents.md index ba10a984..70299774 100644 --- a/docs/examples/databases/list-documents.md +++ b/docs/examples/databases/list-documents.md @@ -5,7 +5,7 @@ void main() { // Init SDK Databases databases = Databases(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/databases/list-indexes.md b/docs/examples/databases/list-indexes.md index bc957cad..6703ebf3 100644 --- a/docs/examples/databases/list-indexes.md +++ b/docs/examples/databases/list-indexes.md @@ -5,7 +5,7 @@ void main() { // Init SDK Databases databases = Databases(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/databases/list.md b/docs/examples/databases/list.md index 6b103349..d9bd06ad 100644 --- a/docs/examples/databases/list.md +++ b/docs/examples/databases/list.md @@ -5,7 +5,7 @@ void main() { // Init SDK Databases databases = Databases(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/databases/update-boolean-attribute.md b/docs/examples/databases/update-boolean-attribute.md index 1a296aaf..94853d28 100644 --- a/docs/examples/databases/update-boolean-attribute.md +++ b/docs/examples/databases/update-boolean-attribute.md @@ -5,7 +5,7 @@ void main() { // Init SDK Databases databases = Databases(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/databases/update-collection.md b/docs/examples/databases/update-collection.md index 515c4fe7..a5f32dea 100644 --- a/docs/examples/databases/update-collection.md +++ b/docs/examples/databases/update-collection.md @@ -5,7 +5,7 @@ void main() { // Init SDK Databases databases = Databases(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/databases/update-datetime-attribute.md b/docs/examples/databases/update-datetime-attribute.md index 1c33ae7d..f93aa815 100644 --- a/docs/examples/databases/update-datetime-attribute.md +++ b/docs/examples/databases/update-datetime-attribute.md @@ -5,7 +5,7 @@ void main() { // Init SDK Databases databases = Databases(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/databases/update-document.md b/docs/examples/databases/update-document.md index 41e1bff1..fb08413f 100644 --- a/docs/examples/databases/update-document.md +++ b/docs/examples/databases/update-document.md @@ -5,7 +5,7 @@ void main() { // Init SDK Databases databases = Databases(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/databases/update-email-attribute.md b/docs/examples/databases/update-email-attribute.md index ff255508..8fd104db 100644 --- a/docs/examples/databases/update-email-attribute.md +++ b/docs/examples/databases/update-email-attribute.md @@ -5,7 +5,7 @@ void main() { // Init SDK Databases databases = Databases(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/databases/update-enum-attribute.md b/docs/examples/databases/update-enum-attribute.md index fc6e9dc8..20c44817 100644 --- a/docs/examples/databases/update-enum-attribute.md +++ b/docs/examples/databases/update-enum-attribute.md @@ -5,7 +5,7 @@ void main() { // Init SDK Databases databases = Databases(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/databases/update-float-attribute.md b/docs/examples/databases/update-float-attribute.md index 8822f2bb..50432542 100644 --- a/docs/examples/databases/update-float-attribute.md +++ b/docs/examples/databases/update-float-attribute.md @@ -5,7 +5,7 @@ void main() { // Init SDK Databases databases = Databases(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/databases/update-integer-attribute.md b/docs/examples/databases/update-integer-attribute.md index c1125a7b..2d3da6ce 100644 --- a/docs/examples/databases/update-integer-attribute.md +++ b/docs/examples/databases/update-integer-attribute.md @@ -5,7 +5,7 @@ void main() { // Init SDK Databases databases = Databases(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/databases/update-ip-attribute.md b/docs/examples/databases/update-ip-attribute.md index ec0cc2bd..8c4cf4f3 100644 --- a/docs/examples/databases/update-ip-attribute.md +++ b/docs/examples/databases/update-ip-attribute.md @@ -5,7 +5,7 @@ void main() { // Init SDK Databases databases = Databases(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/databases/update-relationship-attribute.md b/docs/examples/databases/update-relationship-attribute.md index 7da90061..239e23da 100644 --- a/docs/examples/databases/update-relationship-attribute.md +++ b/docs/examples/databases/update-relationship-attribute.md @@ -5,7 +5,7 @@ void main() { // Init SDK Databases databases = Databases(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/databases/update-string-attribute.md b/docs/examples/databases/update-string-attribute.md index 96e68836..7f24507a 100644 --- a/docs/examples/databases/update-string-attribute.md +++ b/docs/examples/databases/update-string-attribute.md @@ -5,7 +5,7 @@ void main() { // Init SDK Databases databases = Databases(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/databases/update-url-attribute.md b/docs/examples/databases/update-url-attribute.md index a9635595..d7dd6758 100644 --- a/docs/examples/databases/update-url-attribute.md +++ b/docs/examples/databases/update-url-attribute.md @@ -5,7 +5,7 @@ void main() { // Init SDK Databases databases = Databases(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/databases/update.md b/docs/examples/databases/update.md index 080d88a1..59070cef 100644 --- a/docs/examples/databases/update.md +++ b/docs/examples/databases/update.md @@ -5,7 +5,7 @@ void main() { // Init SDK Databases databases = Databases(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/functions/create-build.md b/docs/examples/functions/create-build.md index 82f71e2d..530ba6de 100644 --- a/docs/examples/functions/create-build.md +++ b/docs/examples/functions/create-build.md @@ -5,7 +5,7 @@ void main() { // Init SDK Functions functions = Functions(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/functions/create-deployment.md b/docs/examples/functions/create-deployment.md index a407622f..d646680d 100644 --- a/docs/examples/functions/create-deployment.md +++ b/docs/examples/functions/create-deployment.md @@ -5,7 +5,7 @@ void main() { // Init SDK Functions functions = Functions(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/functions/create-execution.md b/docs/examples/functions/create-execution.md index 572b54ff..f5de49f7 100644 --- a/docs/examples/functions/create-execution.md +++ b/docs/examples/functions/create-execution.md @@ -5,7 +5,7 @@ void main() { // Init SDK Functions functions = Functions(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/functions/create-variable.md b/docs/examples/functions/create-variable.md index c4d300f4..50cd063c 100644 --- a/docs/examples/functions/create-variable.md +++ b/docs/examples/functions/create-variable.md @@ -5,7 +5,7 @@ void main() { // Init SDK Functions functions = Functions(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/functions/create.md b/docs/examples/functions/create.md index 2e8e8faf..839c6f6e 100644 --- a/docs/examples/functions/create.md +++ b/docs/examples/functions/create.md @@ -5,7 +5,7 @@ void main() { // Init SDK Functions functions = Functions(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/functions/delete-deployment.md b/docs/examples/functions/delete-deployment.md index 495b5b6c..e65380c5 100644 --- a/docs/examples/functions/delete-deployment.md +++ b/docs/examples/functions/delete-deployment.md @@ -5,7 +5,7 @@ void main() { // Init SDK Functions functions = Functions(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/functions/delete-variable.md b/docs/examples/functions/delete-variable.md index 23546874..87c7f407 100644 --- a/docs/examples/functions/delete-variable.md +++ b/docs/examples/functions/delete-variable.md @@ -5,7 +5,7 @@ void main() { // Init SDK Functions functions = Functions(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/functions/delete.md b/docs/examples/functions/delete.md index 36694658..51633669 100644 --- a/docs/examples/functions/delete.md +++ b/docs/examples/functions/delete.md @@ -5,7 +5,7 @@ void main() { // Init SDK Functions functions = Functions(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/functions/get-deployment.md b/docs/examples/functions/get-deployment.md index 7e529df7..9cab571e 100644 --- a/docs/examples/functions/get-deployment.md +++ b/docs/examples/functions/get-deployment.md @@ -5,7 +5,7 @@ void main() { // Init SDK Functions functions = Functions(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/functions/get-execution.md b/docs/examples/functions/get-execution.md index 7854e7f7..6cadde64 100644 --- a/docs/examples/functions/get-execution.md +++ b/docs/examples/functions/get-execution.md @@ -5,7 +5,7 @@ void main() { // Init SDK Functions functions = Functions(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/functions/get-variable.md b/docs/examples/functions/get-variable.md index 29c90745..924bee2b 100644 --- a/docs/examples/functions/get-variable.md +++ b/docs/examples/functions/get-variable.md @@ -5,7 +5,7 @@ void main() { // Init SDK Functions functions = Functions(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/functions/get.md b/docs/examples/functions/get.md index 261ffef3..503ab207 100644 --- a/docs/examples/functions/get.md +++ b/docs/examples/functions/get.md @@ -5,7 +5,7 @@ void main() { // Init SDK Functions functions = Functions(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/functions/list-deployments.md b/docs/examples/functions/list-deployments.md index 071c1a7f..b12f9eba 100644 --- a/docs/examples/functions/list-deployments.md +++ b/docs/examples/functions/list-deployments.md @@ -5,7 +5,7 @@ void main() { // Init SDK Functions functions = Functions(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/functions/list-executions.md b/docs/examples/functions/list-executions.md index a0af0d16..3d66a449 100644 --- a/docs/examples/functions/list-executions.md +++ b/docs/examples/functions/list-executions.md @@ -5,7 +5,7 @@ void main() { // Init SDK Functions functions = Functions(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/functions/list-runtimes.md b/docs/examples/functions/list-runtimes.md index da474ff7..091a1116 100644 --- a/docs/examples/functions/list-runtimes.md +++ b/docs/examples/functions/list-runtimes.md @@ -5,7 +5,7 @@ void main() { // Init SDK Functions functions = Functions(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/functions/list-variables.md b/docs/examples/functions/list-variables.md index dc14c932..f3c6655b 100644 --- a/docs/examples/functions/list-variables.md +++ b/docs/examples/functions/list-variables.md @@ -5,7 +5,7 @@ void main() { // Init SDK Functions functions = Functions(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/functions/list.md b/docs/examples/functions/list.md index a530d00f..4f2b1140 100644 --- a/docs/examples/functions/list.md +++ b/docs/examples/functions/list.md @@ -5,7 +5,7 @@ void main() { // Init SDK Functions functions = Functions(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/functions/update-deployment.md b/docs/examples/functions/update-deployment.md index 633b6265..d503aecb 100644 --- a/docs/examples/functions/update-deployment.md +++ b/docs/examples/functions/update-deployment.md @@ -5,7 +5,7 @@ void main() { // Init SDK Functions functions = Functions(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/functions/update-variable.md b/docs/examples/functions/update-variable.md index eeeeaf12..126d2644 100644 --- a/docs/examples/functions/update-variable.md +++ b/docs/examples/functions/update-variable.md @@ -5,7 +5,7 @@ void main() { // Init SDK Functions functions = Functions(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/functions/update.md b/docs/examples/functions/update.md index f91ad606..2b92f553 100644 --- a/docs/examples/functions/update.md +++ b/docs/examples/functions/update.md @@ -5,7 +5,7 @@ void main() { // Init SDK Functions functions = Functions(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/graphql/mutation.md b/docs/examples/graphql/mutation.md index 0c14c9ca..780ee09f 100644 --- a/docs/examples/graphql/mutation.md +++ b/docs/examples/graphql/mutation.md @@ -5,7 +5,7 @@ void main() { // Init SDK Graphql graphql = Graphql(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/graphql/query.md b/docs/examples/graphql/query.md index 8b093367..7f22f536 100644 --- a/docs/examples/graphql/query.md +++ b/docs/examples/graphql/query.md @@ -5,7 +5,7 @@ void main() { // Init SDK Graphql graphql = Graphql(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/health/get-antivirus.md b/docs/examples/health/get-antivirus.md index 974a29bd..922dcfa1 100644 --- a/docs/examples/health/get-antivirus.md +++ b/docs/examples/health/get-antivirus.md @@ -5,7 +5,7 @@ void main() { // Init SDK Health health = Health(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/health/get-cache.md b/docs/examples/health/get-cache.md index 322939d7..4b63edee 100644 --- a/docs/examples/health/get-cache.md +++ b/docs/examples/health/get-cache.md @@ -5,7 +5,7 @@ void main() { // Init SDK Health health = Health(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/health/get-d-b.md b/docs/examples/health/get-d-b.md index e3447550..65188c09 100644 --- a/docs/examples/health/get-d-b.md +++ b/docs/examples/health/get-d-b.md @@ -5,7 +5,7 @@ void main() { // Init SDK Health health = Health(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/health/get-queue-certificates.md b/docs/examples/health/get-queue-certificates.md index 7c605154..4063ab35 100644 --- a/docs/examples/health/get-queue-certificates.md +++ b/docs/examples/health/get-queue-certificates.md @@ -5,7 +5,7 @@ void main() { // Init SDK Health health = Health(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/health/get-queue-functions.md b/docs/examples/health/get-queue-functions.md index c06cda91..5ebaad64 100644 --- a/docs/examples/health/get-queue-functions.md +++ b/docs/examples/health/get-queue-functions.md @@ -5,7 +5,7 @@ void main() { // Init SDK Health health = Health(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/health/get-queue-logs.md b/docs/examples/health/get-queue-logs.md index 807a04fb..11a52854 100644 --- a/docs/examples/health/get-queue-logs.md +++ b/docs/examples/health/get-queue-logs.md @@ -5,7 +5,7 @@ void main() { // Init SDK Health health = Health(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/health/get-queue-webhooks.md b/docs/examples/health/get-queue-webhooks.md index 7c159ac8..a43f5f84 100644 --- a/docs/examples/health/get-queue-webhooks.md +++ b/docs/examples/health/get-queue-webhooks.md @@ -5,7 +5,7 @@ void main() { // Init SDK Health health = Health(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/health/get-storage-local.md b/docs/examples/health/get-storage-local.md index 7f172bf8..4a586690 100644 --- a/docs/examples/health/get-storage-local.md +++ b/docs/examples/health/get-storage-local.md @@ -5,7 +5,7 @@ void main() { // Init SDK Health health = Health(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/health/get-time.md b/docs/examples/health/get-time.md index 65861d3c..d8166dd3 100644 --- a/docs/examples/health/get-time.md +++ b/docs/examples/health/get-time.md @@ -5,7 +5,7 @@ void main() { // Init SDK Health health = Health(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/health/get.md b/docs/examples/health/get.md index 0c9d3921..1be37e5a 100644 --- a/docs/examples/health/get.md +++ b/docs/examples/health/get.md @@ -5,7 +5,7 @@ void main() { // Init SDK Health health = Health(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/locale/get.md b/docs/examples/locale/get.md index d2900630..9ecb18c5 100644 --- a/docs/examples/locale/get.md +++ b/docs/examples/locale/get.md @@ -5,7 +5,7 @@ void main() { // Init SDK Locale locale = Locale(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/locale/list-continents.md b/docs/examples/locale/list-continents.md index 4b17da4c..e6849303 100644 --- a/docs/examples/locale/list-continents.md +++ b/docs/examples/locale/list-continents.md @@ -5,7 +5,7 @@ void main() { // Init SDK Locale locale = Locale(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/locale/list-countries-e-u.md b/docs/examples/locale/list-countries-e-u.md index 41f8e83e..2d1ddcf8 100644 --- a/docs/examples/locale/list-countries-e-u.md +++ b/docs/examples/locale/list-countries-e-u.md @@ -5,7 +5,7 @@ void main() { // Init SDK Locale locale = Locale(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/locale/list-countries-phones.md b/docs/examples/locale/list-countries-phones.md index 5cf2db93..23057013 100644 --- a/docs/examples/locale/list-countries-phones.md +++ b/docs/examples/locale/list-countries-phones.md @@ -5,7 +5,7 @@ void main() { // Init SDK Locale locale = Locale(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/locale/list-countries.md b/docs/examples/locale/list-countries.md index d55d0fe1..ef115833 100644 --- a/docs/examples/locale/list-countries.md +++ b/docs/examples/locale/list-countries.md @@ -5,7 +5,7 @@ void main() { // Init SDK Locale locale = Locale(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/locale/list-currencies.md b/docs/examples/locale/list-currencies.md index e36775de..0810f3da 100644 --- a/docs/examples/locale/list-currencies.md +++ b/docs/examples/locale/list-currencies.md @@ -5,7 +5,7 @@ void main() { // Init SDK Locale locale = Locale(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/locale/list-languages.md b/docs/examples/locale/list-languages.md index b019ae4a..f3d642cc 100644 --- a/docs/examples/locale/list-languages.md +++ b/docs/examples/locale/list-languages.md @@ -5,7 +5,7 @@ void main() { // Init SDK Locale locale = Locale(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/storage/create-bucket.md b/docs/examples/storage/create-bucket.md index 90882fe4..745a6b50 100644 --- a/docs/examples/storage/create-bucket.md +++ b/docs/examples/storage/create-bucket.md @@ -5,7 +5,7 @@ void main() { // Init SDK Storage storage = Storage(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/storage/create-file.md b/docs/examples/storage/create-file.md index ef596fcc..ab4c661a 100644 --- a/docs/examples/storage/create-file.md +++ b/docs/examples/storage/create-file.md @@ -6,7 +6,7 @@ void main() { // Init SDK Storage storage = Storage(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/storage/delete-bucket.md b/docs/examples/storage/delete-bucket.md index 786084a1..de516561 100644 --- a/docs/examples/storage/delete-bucket.md +++ b/docs/examples/storage/delete-bucket.md @@ -5,7 +5,7 @@ void main() { // Init SDK Storage storage = Storage(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/storage/delete-file.md b/docs/examples/storage/delete-file.md index 574532c1..8e4460bb 100644 --- a/docs/examples/storage/delete-file.md +++ b/docs/examples/storage/delete-file.md @@ -5,7 +5,7 @@ void main() { // Init SDK Storage storage = Storage(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/storage/get-bucket.md b/docs/examples/storage/get-bucket.md index 22360826..9e39076e 100644 --- a/docs/examples/storage/get-bucket.md +++ b/docs/examples/storage/get-bucket.md @@ -5,7 +5,7 @@ void main() { // Init SDK Storage storage = Storage(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/storage/get-file-download.md b/docs/examples/storage/get-file-download.md index 6a87cafe..6534fe33 100644 --- a/docs/examples/storage/get-file-download.md +++ b/docs/examples/storage/get-file-download.md @@ -5,7 +5,7 @@ void main() { // Init SDK Storage storage = Storage(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/storage/get-file-preview.md b/docs/examples/storage/get-file-preview.md index f678eacb..ca16d635 100644 --- a/docs/examples/storage/get-file-preview.md +++ b/docs/examples/storage/get-file-preview.md @@ -5,7 +5,7 @@ void main() { // Init SDK Storage storage = Storage(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/storage/get-file-view.md b/docs/examples/storage/get-file-view.md index 2be352fe..5c3d69dc 100644 --- a/docs/examples/storage/get-file-view.md +++ b/docs/examples/storage/get-file-view.md @@ -5,7 +5,7 @@ void main() { // Init SDK Storage storage = Storage(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/storage/get-file.md b/docs/examples/storage/get-file.md index 7ecdcf9e..bc45c3f1 100644 --- a/docs/examples/storage/get-file.md +++ b/docs/examples/storage/get-file.md @@ -5,7 +5,7 @@ void main() { // Init SDK Storage storage = Storage(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/storage/list-buckets.md b/docs/examples/storage/list-buckets.md index fa5607a8..6a35febb 100644 --- a/docs/examples/storage/list-buckets.md +++ b/docs/examples/storage/list-buckets.md @@ -5,7 +5,7 @@ void main() { // Init SDK Storage storage = Storage(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/storage/list-files.md b/docs/examples/storage/list-files.md index 519a002c..40b8d3bc 100644 --- a/docs/examples/storage/list-files.md +++ b/docs/examples/storage/list-files.md @@ -5,7 +5,7 @@ void main() { // Init SDK Storage storage = Storage(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/storage/update-bucket.md b/docs/examples/storage/update-bucket.md index 6352ff7c..064d2f2e 100644 --- a/docs/examples/storage/update-bucket.md +++ b/docs/examples/storage/update-bucket.md @@ -5,7 +5,7 @@ void main() { // Init SDK Storage storage = Storage(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/storage/update-file.md b/docs/examples/storage/update-file.md index 77d43afb..2fa999a5 100644 --- a/docs/examples/storage/update-file.md +++ b/docs/examples/storage/update-file.md @@ -5,7 +5,7 @@ void main() { // Init SDK Storage storage = Storage(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/teams/create-membership.md b/docs/examples/teams/create-membership.md index e89c2bf3..6a98fea0 100644 --- a/docs/examples/teams/create-membership.md +++ b/docs/examples/teams/create-membership.md @@ -5,7 +5,7 @@ void main() { // Init SDK Teams teams = Teams(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/teams/create.md b/docs/examples/teams/create.md index fd89a481..74895b23 100644 --- a/docs/examples/teams/create.md +++ b/docs/examples/teams/create.md @@ -5,7 +5,7 @@ void main() { // Init SDK Teams teams = Teams(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/teams/delete-membership.md b/docs/examples/teams/delete-membership.md index 28069ad0..8c135994 100644 --- a/docs/examples/teams/delete-membership.md +++ b/docs/examples/teams/delete-membership.md @@ -5,7 +5,7 @@ void main() { // Init SDK Teams teams = Teams(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/teams/delete.md b/docs/examples/teams/delete.md index a006e8f3..a5fee4d0 100644 --- a/docs/examples/teams/delete.md +++ b/docs/examples/teams/delete.md @@ -5,7 +5,7 @@ void main() { // Init SDK Teams teams = Teams(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/teams/get-membership.md b/docs/examples/teams/get-membership.md index 1beceeb3..4193b245 100644 --- a/docs/examples/teams/get-membership.md +++ b/docs/examples/teams/get-membership.md @@ -5,7 +5,7 @@ void main() { // Init SDK Teams teams = Teams(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/teams/get-prefs.md b/docs/examples/teams/get-prefs.md index d176392e..27f2ef15 100644 --- a/docs/examples/teams/get-prefs.md +++ b/docs/examples/teams/get-prefs.md @@ -5,7 +5,7 @@ void main() { // Init SDK Teams teams = Teams(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token ; diff --git a/docs/examples/teams/get.md b/docs/examples/teams/get.md index a1bfe8e7..daa67c4e 100644 --- a/docs/examples/teams/get.md +++ b/docs/examples/teams/get.md @@ -5,7 +5,7 @@ void main() { // Init SDK Teams teams = Teams(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/teams/list-memberships.md b/docs/examples/teams/list-memberships.md index 6f993910..74c66c03 100644 --- a/docs/examples/teams/list-memberships.md +++ b/docs/examples/teams/list-memberships.md @@ -5,7 +5,7 @@ void main() { // Init SDK Teams teams = Teams(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/teams/list.md b/docs/examples/teams/list.md index d55e58e3..11033f33 100644 --- a/docs/examples/teams/list.md +++ b/docs/examples/teams/list.md @@ -5,7 +5,7 @@ void main() { // Init SDK Teams teams = Teams(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/teams/update-membership-roles.md b/docs/examples/teams/update-membership-roles.md index e3488768..dcbef5c9 100644 --- a/docs/examples/teams/update-membership-roles.md +++ b/docs/examples/teams/update-membership-roles.md @@ -5,7 +5,7 @@ void main() { // Init SDK Teams teams = Teams(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/teams/update-membership-status.md b/docs/examples/teams/update-membership-status.md index 2a3f1e10..ca704e0f 100644 --- a/docs/examples/teams/update-membership-status.md +++ b/docs/examples/teams/update-membership-status.md @@ -5,7 +5,7 @@ void main() { // Init SDK Teams teams = Teams(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token ; diff --git a/docs/examples/teams/update-name.md b/docs/examples/teams/update-name.md index 17d2c5eb..088a5cfb 100644 --- a/docs/examples/teams/update-name.md +++ b/docs/examples/teams/update-name.md @@ -5,7 +5,7 @@ void main() { // Init SDK Teams teams = Teams(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/teams/update-prefs.md b/docs/examples/teams/update-prefs.md index cb171e20..d99e8217 100644 --- a/docs/examples/teams/update-prefs.md +++ b/docs/examples/teams/update-prefs.md @@ -5,7 +5,7 @@ void main() { // Init SDK Teams teams = Teams(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token ; diff --git a/docs/examples/users/create-argon2user.md b/docs/examples/users/create-argon2user.md index f2ece2b2..a40b3afd 100644 --- a/docs/examples/users/create-argon2user.md +++ b/docs/examples/users/create-argon2user.md @@ -5,7 +5,7 @@ void main() { // Init SDK Users users = Users(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/users/create-bcrypt-user.md b/docs/examples/users/create-bcrypt-user.md index b4951a94..8b55d656 100644 --- a/docs/examples/users/create-bcrypt-user.md +++ b/docs/examples/users/create-bcrypt-user.md @@ -5,7 +5,7 @@ void main() { // Init SDK Users users = Users(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/users/create-m-d5user.md b/docs/examples/users/create-m-d5user.md index 95f6e539..3ab8901f 100644 --- a/docs/examples/users/create-m-d5user.md +++ b/docs/examples/users/create-m-d5user.md @@ -5,7 +5,7 @@ void main() { // Init SDK Users users = Users(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/users/create-p-h-pass-user.md b/docs/examples/users/create-p-h-pass-user.md index 9013ccc9..bedb44f4 100644 --- a/docs/examples/users/create-p-h-pass-user.md +++ b/docs/examples/users/create-p-h-pass-user.md @@ -5,7 +5,7 @@ void main() { // Init SDK Users users = Users(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/users/create-s-h-a-user.md b/docs/examples/users/create-s-h-a-user.md index 44887650..361f309a 100644 --- a/docs/examples/users/create-s-h-a-user.md +++ b/docs/examples/users/create-s-h-a-user.md @@ -5,7 +5,7 @@ void main() { // Init SDK Users users = Users(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/users/create-scrypt-modified-user.md b/docs/examples/users/create-scrypt-modified-user.md index e1187488..fa5b8051 100644 --- a/docs/examples/users/create-scrypt-modified-user.md +++ b/docs/examples/users/create-scrypt-modified-user.md @@ -5,7 +5,7 @@ void main() { // Init SDK Users users = Users(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/users/create-scrypt-user.md b/docs/examples/users/create-scrypt-user.md index 01a11bbe..91e1f7dc 100644 --- a/docs/examples/users/create-scrypt-user.md +++ b/docs/examples/users/create-scrypt-user.md @@ -5,7 +5,7 @@ void main() { // Init SDK Users users = Users(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/users/create.md b/docs/examples/users/create.md index 6effead3..517cd22f 100644 --- a/docs/examples/users/create.md +++ b/docs/examples/users/create.md @@ -5,7 +5,7 @@ void main() { // Init SDK Users users = Users(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/users/delete-session.md b/docs/examples/users/delete-session.md index eaa98c17..3f761187 100644 --- a/docs/examples/users/delete-session.md +++ b/docs/examples/users/delete-session.md @@ -5,7 +5,7 @@ void main() { // Init SDK Users users = Users(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/users/delete-sessions.md b/docs/examples/users/delete-sessions.md index 8c889aad..69cbc5e8 100644 --- a/docs/examples/users/delete-sessions.md +++ b/docs/examples/users/delete-sessions.md @@ -5,7 +5,7 @@ void main() { // Init SDK Users users = Users(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/users/delete.md b/docs/examples/users/delete.md index b45f398b..1e1311d5 100644 --- a/docs/examples/users/delete.md +++ b/docs/examples/users/delete.md @@ -5,7 +5,7 @@ void main() { // Init SDK Users users = Users(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/users/get-prefs.md b/docs/examples/users/get-prefs.md index e5909422..eb33ae65 100644 --- a/docs/examples/users/get-prefs.md +++ b/docs/examples/users/get-prefs.md @@ -5,7 +5,7 @@ void main() { // Init SDK Users users = Users(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/users/get.md b/docs/examples/users/get.md index be582d52..c5685293 100644 --- a/docs/examples/users/get.md +++ b/docs/examples/users/get.md @@ -5,7 +5,7 @@ void main() { // Init SDK Users users = Users(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/users/list-logs.md b/docs/examples/users/list-logs.md index 35f78fb7..0d2143ad 100644 --- a/docs/examples/users/list-logs.md +++ b/docs/examples/users/list-logs.md @@ -5,7 +5,7 @@ void main() { // Init SDK Users users = Users(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/users/list-memberships.md b/docs/examples/users/list-memberships.md index 774f1b88..36a83ede 100644 --- a/docs/examples/users/list-memberships.md +++ b/docs/examples/users/list-memberships.md @@ -5,7 +5,7 @@ void main() { // Init SDK Users users = Users(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/users/list-sessions.md b/docs/examples/users/list-sessions.md index e69f59a7..5f77fdbf 100644 --- a/docs/examples/users/list-sessions.md +++ b/docs/examples/users/list-sessions.md @@ -5,7 +5,7 @@ void main() { // Init SDK Users users = Users(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/users/list.md b/docs/examples/users/list.md index e0ecf7ad..34498c00 100644 --- a/docs/examples/users/list.md +++ b/docs/examples/users/list.md @@ -5,7 +5,7 @@ void main() { // Init SDK Users users = Users(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/users/update-email-verification.md b/docs/examples/users/update-email-verification.md index fbbe2859..8853f865 100644 --- a/docs/examples/users/update-email-verification.md +++ b/docs/examples/users/update-email-verification.md @@ -5,7 +5,7 @@ void main() { // Init SDK Users users = Users(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/users/update-email.md b/docs/examples/users/update-email.md index dc3e063a..8813e110 100644 --- a/docs/examples/users/update-email.md +++ b/docs/examples/users/update-email.md @@ -5,7 +5,7 @@ void main() { // Init SDK Users users = Users(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/users/update-name.md b/docs/examples/users/update-name.md index 192add91..56797d58 100644 --- a/docs/examples/users/update-name.md +++ b/docs/examples/users/update-name.md @@ -5,7 +5,7 @@ void main() { // Init SDK Users users = Users(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/users/update-password.md b/docs/examples/users/update-password.md index 076e0e2c..3dfedb4d 100644 --- a/docs/examples/users/update-password.md +++ b/docs/examples/users/update-password.md @@ -5,7 +5,7 @@ void main() { // Init SDK Users users = Users(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/users/update-phone-verification.md b/docs/examples/users/update-phone-verification.md index 6993c0f3..37c3ced6 100644 --- a/docs/examples/users/update-phone-verification.md +++ b/docs/examples/users/update-phone-verification.md @@ -5,7 +5,7 @@ void main() { // Init SDK Users users = Users(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/users/update-phone.md b/docs/examples/users/update-phone.md index 00d4945b..4d5e3110 100644 --- a/docs/examples/users/update-phone.md +++ b/docs/examples/users/update-phone.md @@ -5,7 +5,7 @@ void main() { // Init SDK Users users = Users(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/users/update-prefs.md b/docs/examples/users/update-prefs.md index d148e52f..c6c1bbed 100644 --- a/docs/examples/users/update-prefs.md +++ b/docs/examples/users/update-prefs.md @@ -5,7 +5,7 @@ void main() { // Init SDK Users users = Users(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/users/update-status.md b/docs/examples/users/update-status.md index 43921889..6f80745a 100644 --- a/docs/examples/users/update-status.md +++ b/docs/examples/users/update-status.md @@ -5,7 +5,7 @@ void main() { // Init SDK Users users = Users(client); client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/lib/dart_appwrite.dart b/lib/dart_appwrite.dart index e90eaa3a..25a07d30 100644 --- a/lib/dart_appwrite.dart +++ b/lib/dart_appwrite.dart @@ -1,3 +1,8 @@ +/// Appwrite Dart SDK +/// +/// This SDK is compatible with Appwrite server version 1.3.x. +/// For older versions, please check +/// [previous releases](https://github.com/appwrite/sdk-for-dart/releases). library dart_appwrite; import 'dart:async'; diff --git a/lib/id.dart b/lib/id.dart index b7518828..ae9028ef 100644 --- a/lib/id.dart +++ b/lib/id.dart @@ -1,13 +1,16 @@ part of dart_appwrite; +/// Helper class to generate ID strings for resources. class ID { - ID._(); - - static String unique() { - return 'unique()'; - } + ID._(); - static String custom(String id) { - return id; - } + /// Have Appwrite generate a unique ID for you. + static String unique() { + return 'unique()'; + } + + /// Uses [id] as the ID for the resource. + static String custom(String id) { + return id; + } } \ No newline at end of file diff --git a/lib/models.dart b/lib/models.dart index d7a0a2da..f7bdc0af 100644 --- a/lib/models.dart +++ b/lib/models.dart @@ -1,3 +1,4 @@ +/// Appwrite Models library dart_appwrite.models; part 'src/models/model.dart'; diff --git a/lib/permission.dart b/lib/permission.dart index 0da10f62..ca3a6d01 100644 --- a/lib/permission.dart +++ b/lib/permission.dart @@ -1,21 +1,34 @@ part of dart_appwrite; +/// Helper class to generate permission strings for resources. class Permission { - Permission._(); + Permission._(); - static String read(String role) { - return 'read("$role")'; - } - static String write(String role) { - return 'write("$role")'; - } - static String create(String role) { - return 'create("$role")'; - } - static String update(String role) { - return 'update("$role")'; - } - static String delete(String role) { - return 'delete("$role")'; - } + /// Read permission for provided [role] + static String read(String role) { + return 'read("$role")'; + } + + /// Write permission for provided [role] + /// + /// This is an alias of update, delete, and possibly create. + /// Don't use write in combination with update, delete, or create. + static String write(String role) { + return 'write("$role")'; + } + + /// Update permission for provided [role] + static String create(String role) { + return 'create("$role")'; + } + + /// Update permission for provided [role] + static String update(String role) { + return 'update("$role")'; + } + + /// Delete permission for provided [role] + static String delete(String role) { + return 'delete("$role")'; + } } diff --git a/lib/query.dart b/lib/query.dart index 91350530..66a8e3b7 100644 --- a/lib/query.dart +++ b/lib/query.dart @@ -1,61 +1,97 @@ part of dart_appwrite; +/// Helper class to generate query strings. class Query { - Query._(); - + Query._(); + + /// Filter resources where [attribute] is equal to [value]. + /// + /// [value] can be a single value or a list. If a list is used + /// the query will return resources where [attribute] is equal + /// to any of the values in the list. static String equal(String attribute, dynamic value) => _addQuery(attribute, 'equal', value); + /// Filter resources where [attribute] is not equal to [value]. static String notEqual(String attribute, dynamic value) => _addQuery(attribute, 'notEqual', value); + /// Filter resources where [attribute] is less than [value]. static String lessThan(String attribute, dynamic value) => _addQuery(attribute, 'lessThan', value); + /// Filter resources where [attribute] is less than or equal to [value]. static String lessThanEqual(String attribute, dynamic value) => _addQuery(attribute, 'lessThanEqual', value); + /// Filter resources where [attribute] is greater than [value]. static String greaterThan(String attribute, dynamic value) => _addQuery(attribute, 'greaterThan', value); + /// Filter resources where [attribute] is greater than or equal to [value]. static String greaterThanEqual(String attribute, dynamic value) => _addQuery(attribute, 'greaterThanEqual', value); + /// Filter resources where by searching [attribute] for [value]. + /// + /// A fulltext index on [attribute] is required for this query to work. static String search(String attribute, String value) => _addQuery(attribute, 'search', value); + /// Filter resources where [attribute] is null. static String isNull(String attribute) => 'isNull("$attribute")'; + /// Filter resources where [attribute] is not null. static String isNotNull(String attribute) => 'isNotNull("$attribute")'; + /// Filter resources where [attribute] is between [start] and [end] (inclusive). static String between(String attribute, dynamic start, dynamic end) => _addQuery(attribute, 'between', [start, end]); + /// Filter resources where [attribute] starts with [value]. static String startsWith(String attribute, String value) => _addQuery(attribute, 'startsWith', value); + /// Filter resources where [attribute] ends with [value]. static String endsWith(String attribute, String value) => _addQuery(attribute, 'endsWith', value); - static String select(List attributes) => 'select([${attributes.map((attr) => "\"$attr\"").join(",")}])'; + /// Specify which attributes should be returned by the API call. + static String select(List attributes) => + 'select([${attributes.map((attr) => "\"$attr\"").join(",")}])'; + /// Sort results by [attribute] ascending. static String orderAsc(String attribute) => 'orderAsc("$attribute")'; + /// Sort results by [attribute] descending. static String orderDesc(String attribute) => 'orderDesc("$attribute")'; + /// Return results before [id]. + /// + /// Refer to the [Cursor Based Pagination](https://appwrite.io/docs/pagination#cursor-pagination) + /// docs for more information. static String cursorBefore(String id) => 'cursorBefore("$id")'; + /// Return results after [id]. + /// + /// Refer to the [Cursor Based Pagination](https://appwrite.io/docs/pagination#cursor-pagination) + /// docs for more information. static String cursorAfter(String id) => 'cursorAfter("$id")'; + /// Return only [limit] results. static String limit(int limit) => 'limit($limit)'; + /// Return results from [offset]. + /// + /// Refer to the [Offset Pagination](https://appwrite.io/docs/pagination#offset-pagination) + /// docs for more information. static String offset(int offset) => 'offset($offset)'; static String _addQuery(String attribute, String method, dynamic value) => (value is List) - ? '$method("$attribute", [${value.map((item) => parseValues(item)).join(",")}])' - : '$method("$attribute", [${parseValues(value)}])'; + ? '$method("$attribute", [${value.map((item) => _parseValues(item)).join(",")}])' + : '$method("$attribute", [${_parseValues(value)}])'; - static String parseValues(dynamic value) => + static String _parseValues(dynamic value) => (value is String) ? '"$value"' : '$value'; -} +} \ No newline at end of file diff --git a/lib/role.dart b/lib/role.dart index 25ac1fea..8ba5cd70 100644 --- a/lib/role.dart +++ b/lib/role.dart @@ -1,12 +1,20 @@ part of dart_appwrite; +/// Helper class to generate role strings for [Permission]. class Role { Role._(); + /// Grants access to anyone. + /// + /// This includes authenticated and unauthenticated users. static String any() { return 'any'; } + /// Grants access to a specific user by user ID. + /// + /// You can optionally pass verified or unverified for + /// [status] to target specific types of users. static String user(String id, [String status = '']) { if(status.isEmpty) { return 'user:$id'; @@ -14,6 +22,10 @@ class Role { return 'user:$id/$status'; } + /// Grants access to any authenticated or anonymous user. + /// + /// You can optionally pass verified or unverified for + /// [status] to target specific types of users. static String users([String status = '']) { if(status.isEmpty) { return 'users'; @@ -21,10 +33,17 @@ class Role { return 'users/$status'; } + /// Grants access to any guest user without a session. + /// + /// Authenticated users don't have access to this role. static String guests() { return 'guests'; } + /// Grants access to a team by team ID. + /// + /// You can optionally pass a role for [role] to target + /// team members with the specified role. static String team(String id, [String role = '']) { if(role.isEmpty) { return 'team:$id'; @@ -32,6 +51,10 @@ class Role { return 'team:$id/$role'; } + /// Grants access to a specific member of a team. + /// + /// When the member is removed from the team, they will + /// no longer have access. static String member(String id) { return 'member:$id'; } diff --git a/lib/services/account.dart b/lib/services/account.dart index c4bdf410..a5aca239 100644 --- a/lib/services/account.dart +++ b/lib/services/account.dart @@ -1,13 +1,12 @@ part of dart_appwrite; - /// The Account service allows you to authenticate and manage a user account. +/// The Account service allows you to authenticate and manage a user account. class Account extends Service { Account(super.client); /// Get Account /// /// Get currently logged in user data as JSON object. - /// Future get() async { final String path = '/account'; @@ -25,8 +24,8 @@ class Account extends Service { return models.User.fromMap(res.data); - } + /// Update Email /// /// Update currently logged in user account email address. After changing user @@ -37,7 +36,6 @@ class Account extends Service { /// This endpoint can also be used to convert an anonymous account to a normal /// one, by passing an email address and a new password. /// - /// Future updateEmail({required String email, required String password}) async { final String path = '/account/email'; @@ -57,13 +55,12 @@ class Account extends Service { return models.User.fromMap(res.data); - } + /// List Logs /// /// Get currently logged in user list of latest security activity logs. Each /// log returns user IP address, location and date and time of log. - /// Future listLogs({List? queries}) async { final String path = '/account/logs'; @@ -82,12 +79,11 @@ class Account extends Service { return models.LogList.fromMap(res.data); - } + /// Update Name /// /// Update currently logged in user account name. - /// Future updateName({required String name}) async { final String path = '/account/name'; @@ -106,14 +102,13 @@ class Account extends Service { return models.User.fromMap(res.data); - } + /// Update Password /// /// Update currently logged in user password. For validation, user is required /// to pass in the new password, and the old password. For users created with /// OAuth, Team Invites and Magic URL, oldPassword is optional. - /// Future updatePassword({required String password, String? oldPassword}) async { final String path = '/account/password'; @@ -133,8 +128,8 @@ class Account extends Service { return models.User.fromMap(res.data); - } + /// Update Phone /// /// Update the currently logged in user's phone number. After updating the @@ -142,7 +137,6 @@ class Account extends Service { /// SMS is not sent automatically, however you can use the [POST /// /account/verification/phone](/docs/client/account#accountCreatePhoneVerification) /// endpoint to send a confirmation SMS. - /// Future updatePhone({required String phone, required String password}) async { final String path = '/account/phone'; @@ -162,12 +156,11 @@ class Account extends Service { return models.User.fromMap(res.data); - } + /// Get Account Preferences /// /// Get currently logged in user preferences as a key-value object. - /// Future getPrefs() async { final String path = '/account/prefs'; @@ -185,14 +178,13 @@ class Account extends Service { return models.Preferences.fromMap(res.data); - } + /// Update Preferences /// /// Update currently logged in user account preferences. The object you pass is /// stored as is, and replaces any previous value. The maximum allowed prefs /// size is 64kB and throws error if exceeded. - /// Future updatePrefs({required Map prefs}) async { final String path = '/account/prefs'; @@ -211,8 +203,8 @@ class Account extends Service { return models.User.fromMap(res.data); - } + /// Create Password Recovery /// /// Sends the user an email with a temporary secret key for password reset. @@ -223,7 +215,6 @@ class Account extends Service { /// /account/recovery](/docs/client/account#accountUpdateRecovery) endpoint to /// complete the process. The verification link sent to the user's email /// address is valid for 1 hour. - /// Future createRecovery({required String email, required String url}) async { final String path = '/account/recovery'; @@ -243,8 +234,8 @@ class Account extends Service { return models.Token.fromMap(res.data); - } + /// Create Password Recovery (confirmation) /// /// Use this endpoint to complete the user account password reset. Both the @@ -256,7 +247,6 @@ class Account extends Service { /// Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) /// the only valid redirect URLs are the ones from domains you have set when /// adding your platforms in the console interface. - /// Future updateRecovery({required String userId, required String secret, required String password, required String passwordAgain}) async { final String path = '/account/recovery'; @@ -278,13 +268,12 @@ class Account extends Service { return models.Token.fromMap(res.data); - } + /// List Sessions /// /// Get currently logged in user list of active sessions across different /// devices. - /// Future listSessions() async { final String path = '/account/sessions'; @@ -302,13 +291,12 @@ class Account extends Service { return models.SessionList.fromMap(res.data); - } + /// Delete Sessions /// /// Delete all sessions from the user account and remove any sessions cookies /// from the end client. - /// Future deleteSessions() async { final String path = '/account/sessions'; @@ -326,13 +314,12 @@ class Account extends Service { return res.data; - } + /// Get Session /// /// Use this endpoint to get a logged in user's session using a Session ID. /// Inputting 'current' will return the current session being used. - /// Future getSession({required String sessionId}) async { final String path = '/account/sessions/{sessionId}'.replaceAll('{sessionId}', sessionId); @@ -350,14 +337,13 @@ class Account extends Service { return models.Session.fromMap(res.data); - } + /// Update OAuth Session (Refresh Tokens) /// /// Access tokens have limited lifespan and expire to mitigate security risks. /// If session was created using an OAuth provider, this route can be used to /// "refresh" the access token. - /// Future updateSession({required String sessionId}) async { final String path = '/account/sessions/{sessionId}'.replaceAll('{sessionId}', sessionId); @@ -375,15 +361,14 @@ class Account extends Service { return models.Session.fromMap(res.data); - } + /// Delete Session /// /// Use this endpoint to log out the currently logged in user from all their /// account sessions across all of their different devices. When using the /// Session ID argument, only the unique session ID provided is deleted. /// - /// Future deleteSession({required String sessionId}) async { final String path = '/account/sessions/{sessionId}'.replaceAll('{sessionId}', sessionId); @@ -401,14 +386,13 @@ class Account extends Service { return res.data; - } + /// Update Status /// /// Block the currently logged in user account. Behind the scene, the user /// record is not deleted but permanently blocked from any access. To /// completely delete a user, use the Users API instead. - /// Future updateStatus() async { final String path = '/account/status'; @@ -426,8 +410,8 @@ class Account extends Service { return models.User.fromMap(res.data); - } + /// Create Email Verification /// /// Use this endpoint to send a verification message to your user email address @@ -445,7 +429,6 @@ class Account extends Service { /// the only valid redirect URLs are the ones from domains you have set when /// adding your platforms in the console interface. /// - /// Future createVerification({required String url}) async { final String path = '/account/verification'; @@ -464,15 +447,14 @@ class Account extends Service { return models.Token.fromMap(res.data); - } + /// Create Email Verification (confirmation) /// /// Use this endpoint to complete the user email verification process. Use both /// the **userId** and **secret** parameters that were attached to your app URL /// to verify the user email ownership. If confirmed this route will return a /// 200 status code. - /// Future updateVerification({required String userId, required String secret}) async { final String path = '/account/verification'; @@ -492,8 +474,8 @@ class Account extends Service { return models.Token.fromMap(res.data); - } + /// Create Phone Verification /// /// Use this endpoint to send a verification SMS to the currently logged in @@ -502,7 +484,6 @@ class Account extends Service { /// endpoint. Learn more about how to [complete the verification /// process](/docs/client/account#accountUpdatePhoneVerification). The /// verification code sent to the user's phone number is valid for 15 minutes. - /// Future createPhoneVerification() async { final String path = '/account/verification/phone'; @@ -520,15 +501,14 @@ class Account extends Service { return models.Token.fromMap(res.data); - } + /// Create Phone Verification (confirmation) /// /// Use this endpoint to complete the user phone verification process. Use the /// **userId** and **secret** that were sent to your user's phone number to /// verify the user email ownership. If confirmed this route will return a 200 /// status code. - /// Future updatePhoneVerification({required String userId, required String secret}) async { final String path = '/account/verification/phone'; @@ -548,6 +528,5 @@ class Account extends Service { return models.Token.fromMap(res.data); - } } \ No newline at end of file diff --git a/lib/services/avatars.dart b/lib/services/avatars.dart index 12c5d819..200ab77d 100644 --- a/lib/services/avatars.dart +++ b/lib/services/avatars.dart @@ -1,7 +1,7 @@ part of dart_appwrite; - /// The Avatars service aims to help you complete everyday tasks related to - /// your app image, icons, and avatars. +/// The Avatars service aims to help you complete everyday tasks related to +/// your app image, icons, and avatars. class Avatars extends Service { Avatars(super.client); @@ -16,7 +16,6 @@ class Avatars extends Service { /// with preserved aspect ratio. If both dimensions are 0, the API provides an /// image at source quality. If dimensions are not specified, the default size /// of image returned is 100x100px. - /// Future getBrowser({required String code, int? width, int? height, int? quality}) async { final String path = '/avatars/browsers/{code}'.replaceAll('{code}', code); @@ -32,8 +31,8 @@ class Avatars extends Service { final res = await client.call(HttpMethod.get, path: path, params: params, responseType: ResponseType.bytes); return res.data; - } + /// Get Credit Card Icon /// /// The credit card endpoint will return you the icon of the credit card @@ -45,7 +44,6 @@ class Avatars extends Service { /// image at source quality. If dimensions are not specified, the default size /// of image returned is 100x100px. /// - /// Future getCreditCard({required String code, int? width, int? height, int? quality}) async { final String path = '/avatars/credit-cards/{code}'.replaceAll('{code}', code); @@ -61,14 +59,13 @@ class Avatars extends Service { final res = await client.call(HttpMethod.get, path: path, params: params, responseType: ResponseType.bytes); return res.data; - } + /// Get Favicon /// /// Use this endpoint to fetch the favorite icon (AKA favicon) of any remote /// website URL. /// - /// Future getFavicon({required String url}) async { final String path = '/avatars/favicon'; @@ -82,8 +79,8 @@ class Avatars extends Service { final res = await client.call(HttpMethod.get, path: path, params: params, responseType: ResponseType.bytes); return res.data; - } + /// Get Country Flag /// /// You can use this endpoint to show different country flags icons to your @@ -96,7 +93,6 @@ class Avatars extends Service { /// image at source quality. If dimensions are not specified, the default size /// of image returned is 100x100px. /// - /// Future getFlag({required String code, int? width, int? height, int? quality}) async { final String path = '/avatars/flags/{code}'.replaceAll('{code}', code); @@ -112,8 +108,8 @@ class Avatars extends Service { final res = await client.call(HttpMethod.get, path: path, params: params, responseType: ResponseType.bytes); return res.data; - } + /// Get Image from URL /// /// Use this endpoint to fetch a remote image URL and crop it to any image size @@ -126,7 +122,6 @@ class Avatars extends Service { /// image at source quality. If dimensions are not specified, the default size /// of image returned is 400x400px. /// - /// Future getImage({required String url, int? width, int? height}) async { final String path = '/avatars/image'; @@ -142,8 +137,8 @@ class Avatars extends Service { final res = await client.call(HttpMethod.get, path: path, params: params, responseType: ResponseType.bytes); return res.data; - } + /// Get User Initials /// /// Use this endpoint to show your user initials avatar icon on your website or @@ -162,7 +157,6 @@ class Avatars extends Service { /// image at source quality. If dimensions are not specified, the default size /// of image returned is 100x100px. /// - /// Future getInitials({String? name, int? width, int? height, String? background}) async { final String path = '/avatars/initials'; @@ -179,14 +173,13 @@ class Avatars extends Service { final res = await client.call(HttpMethod.get, path: path, params: params, responseType: ResponseType.bytes); return res.data; - } + /// Get QR Code /// /// Converts a given plain text to a QR code image. You can use the query /// parameters to change the size and style of the resulting image. /// - /// Future getQR({required String text, int? size, int? margin, bool? download}) async { final String path = '/avatars/qr'; @@ -203,6 +196,5 @@ class Avatars extends Service { final res = await client.call(HttpMethod.get, path: path, params: params, responseType: ResponseType.bytes); return res.data; - } } \ No newline at end of file diff --git a/lib/services/databases.dart b/lib/services/databases.dart index dc7727e7..d4e9e586 100644 --- a/lib/services/databases.dart +++ b/lib/services/databases.dart @@ -1,7 +1,7 @@ part of dart_appwrite; - /// The Databases service allows you to create structured collections of - /// documents, query and filter lists of documents +/// The Databases service allows you to create structured collections of +/// documents, query and filter lists of documents class Databases extends Service { Databases(super.client); @@ -9,7 +9,6 @@ class Databases extends Service { /// /// Get a list of all databases from the current Appwrite project. You can use /// the search parameter to filter your results. - /// Future list({List? queries, String? search}) async { final String path = '/databases'; @@ -29,13 +28,12 @@ class Databases extends Service { return models.DatabaseList.fromMap(res.data); - } + /// Create Database /// /// Create a new Database. /// - /// Future create({required String databaseId, required String name}) async { final String path = '/databases'; @@ -55,13 +53,12 @@ class Databases extends Service { return models.Database.fromMap(res.data); - } + /// Get Database /// /// Get a database by its unique ID. This endpoint response returns a JSON /// object with the database metadata. - /// Future get({required String databaseId}) async { final String path = '/databases/{databaseId}'.replaceAll('{databaseId}', databaseId); @@ -79,12 +76,11 @@ class Databases extends Service { return models.Database.fromMap(res.data); - } + /// Update Database /// /// Update a database by its unique ID. - /// Future update({required String databaseId, required String name}) async { final String path = '/databases/{databaseId}'.replaceAll('{databaseId}', databaseId); @@ -103,13 +99,12 @@ class Databases extends Service { return models.Database.fromMap(res.data); - } + /// Delete Database /// /// Delete a database by its unique ID. Only API keys with with databases.write /// scope can delete a database. - /// Future delete({required String databaseId}) async { final String path = '/databases/{databaseId}'.replaceAll('{databaseId}', databaseId); @@ -127,13 +122,12 @@ class Databases extends Service { return res.data; - } + /// List Collections /// /// Get a list of all collections that belong to the provided databaseId. You /// can use the search parameter to filter your results. - /// Future listCollections({required String databaseId, List? queries, String? search}) async { final String path = '/databases/{databaseId}/collections'.replaceAll('{databaseId}', databaseId); @@ -153,15 +147,14 @@ class Databases extends Service { return models.CollectionList.fromMap(res.data); - } + /// Create Collection /// /// Create a new Collection. Before using this route, you should create a new /// database resource using either a [server /// integration](/docs/server/databases#databasesCreateCollection) API or /// directly from your database console. - /// Future createCollection({required String databaseId, required String collectionId, required String name, List? permissions, bool? documentSecurity}) async { final String path = '/databases/{databaseId}/collections'.replaceAll('{databaseId}', databaseId); @@ -183,13 +176,12 @@ class Databases extends Service { return models.Collection.fromMap(res.data); - } + /// Get Collection /// /// Get a collection by its unique ID. This endpoint response returns a JSON /// object with the collection metadata. - /// Future getCollection({required String databaseId, required String collectionId}) async { final String path = '/databases/{databaseId}/collections/{collectionId}'.replaceAll('{databaseId}', databaseId).replaceAll('{collectionId}', collectionId); @@ -207,12 +199,11 @@ class Databases extends Service { return models.Collection.fromMap(res.data); - } + /// Update Collection /// /// Update a collection by its unique ID. - /// Future updateCollection({required String databaseId, required String collectionId, required String name, List? permissions, bool? documentSecurity, bool? enabled}) async { final String path = '/databases/{databaseId}/collections/{collectionId}'.replaceAll('{databaseId}', databaseId).replaceAll('{collectionId}', collectionId); @@ -234,13 +225,12 @@ class Databases extends Service { return models.Collection.fromMap(res.data); - } + /// Delete Collection /// /// Delete a collection by its unique ID. Only users with write permissions /// have access to delete this resource. - /// Future deleteCollection({required String databaseId, required String collectionId}) async { final String path = '/databases/{databaseId}/collections/{collectionId}'.replaceAll('{databaseId}', databaseId).replaceAll('{collectionId}', collectionId); @@ -258,9 +248,10 @@ class Databases extends Service { return res.data; - } + /// List Attributes + /// Future listAttributes({required String databaseId, required String collectionId}) async { final String path = '/databases/{databaseId}/collections/{collectionId}/attributes'.replaceAll('{databaseId}', databaseId).replaceAll('{collectionId}', collectionId); @@ -278,13 +269,12 @@ class Databases extends Service { return models.AttributeList.fromMap(res.data); - } + /// Create Boolean Attribute /// /// Create a boolean attribute. /// - /// Future createBooleanAttribute({required String databaseId, required String collectionId, required String key, required bool xrequired, bool? xdefault, bool? array}) async { final String path = '/databases/{databaseId}/collections/{collectionId}/attributes/boolean'.replaceAll('{databaseId}', databaseId).replaceAll('{collectionId}', collectionId); @@ -306,9 +296,10 @@ class Databases extends Service { return models.AttributeBoolean.fromMap(res.data); - } + /// Update Boolean Attribute + /// Future updateBooleanAttribute({required String databaseId, required String collectionId, required String key, required bool xrequired, required bool? xdefault}) async { final String path = '/databases/{databaseId}/collections/{collectionId}/attributes/boolean/{key}'.replaceAll('{databaseId}', databaseId).replaceAll('{collectionId}', collectionId).replaceAll('{key}', key); @@ -328,9 +319,10 @@ class Databases extends Service { return models.AttributeBoolean.fromMap(res.data); - } + /// Create DateTime Attribute + /// Future createDatetimeAttribute({required String databaseId, required String collectionId, required String key, required bool xrequired, String? xdefault, bool? array}) async { final String path = '/databases/{databaseId}/collections/{collectionId}/attributes/datetime'.replaceAll('{databaseId}', databaseId).replaceAll('{collectionId}', collectionId); @@ -352,9 +344,10 @@ class Databases extends Service { return models.AttributeDatetime.fromMap(res.data); - } + /// Update DateTime Attribute + /// Future updateDatetimeAttribute({required String databaseId, required String collectionId, required String key, required bool xrequired, required String? xdefault}) async { final String path = '/databases/{databaseId}/collections/{collectionId}/attributes/datetime/{key}'.replaceAll('{databaseId}', databaseId).replaceAll('{collectionId}', collectionId).replaceAll('{key}', key); @@ -374,13 +367,12 @@ class Databases extends Service { return models.AttributeDatetime.fromMap(res.data); - } + /// Create Email Attribute /// /// Create an email attribute. /// - /// Future createEmailAttribute({required String databaseId, required String collectionId, required String key, required bool xrequired, String? xdefault, bool? array}) async { final String path = '/databases/{databaseId}/collections/{collectionId}/attributes/email'.replaceAll('{databaseId}', databaseId).replaceAll('{collectionId}', collectionId); @@ -402,14 +394,13 @@ class Databases extends Service { return models.AttributeEmail.fromMap(res.data); - } + /// Update Email Attribute /// /// Update an email attribute. Changing the `default` value will not update /// already existing documents. /// - /// Future updateEmailAttribute({required String databaseId, required String collectionId, required String key, required bool xrequired, required String? xdefault}) async { final String path = '/databases/{databaseId}/collections/{collectionId}/attributes/email/{key}'.replaceAll('{databaseId}', databaseId).replaceAll('{collectionId}', collectionId).replaceAll('{key}', key); @@ -429,9 +420,10 @@ class Databases extends Service { return models.AttributeEmail.fromMap(res.data); - } + /// Create Enum Attribute + /// Future createEnumAttribute({required String databaseId, required String collectionId, required String key, required List elements, required bool xrequired, String? xdefault, bool? array}) async { final String path = '/databases/{databaseId}/collections/{collectionId}/attributes/enum'.replaceAll('{databaseId}', databaseId).replaceAll('{collectionId}', collectionId); @@ -454,14 +446,13 @@ class Databases extends Service { return models.AttributeEnum.fromMap(res.data); - } + /// Update Enum Attribute /// /// Update an enum attribute. Changing the `default` value will not update /// already existing documents. /// - /// Future updateEnumAttribute({required String databaseId, required String collectionId, required String key, required List elements, required bool xrequired, required String? xdefault}) async { final String path = '/databases/{databaseId}/collections/{collectionId}/attributes/enum/{key}'.replaceAll('{databaseId}', databaseId).replaceAll('{collectionId}', collectionId).replaceAll('{key}', key); @@ -482,14 +473,13 @@ class Databases extends Service { return models.AttributeEnum.fromMap(res.data); - } + /// Create Float Attribute /// /// Create a float attribute. Optionally, minimum and maximum values can be /// provided. /// - /// Future createFloatAttribute({required String databaseId, required String collectionId, required String key, required bool xrequired, double? min, double? max, double? xdefault, bool? array}) async { final String path = '/databases/{databaseId}/collections/{collectionId}/attributes/float'.replaceAll('{databaseId}', databaseId).replaceAll('{collectionId}', collectionId); @@ -513,14 +503,13 @@ class Databases extends Service { return models.AttributeFloat.fromMap(res.data); - } + /// Update Float Attribute /// /// Update a float attribute. Changing the `default` value will not update /// already existing documents. /// - /// Future updateFloatAttribute({required String databaseId, required String collectionId, required String key, required bool xrequired, required double min, required double max, required double? xdefault}) async { final String path = '/databases/{databaseId}/collections/{collectionId}/attributes/float/{key}'.replaceAll('{databaseId}', databaseId).replaceAll('{collectionId}', collectionId).replaceAll('{key}', key); @@ -542,14 +531,13 @@ class Databases extends Service { return models.AttributeFloat.fromMap(res.data); - } + /// Create Integer Attribute /// /// Create an integer attribute. Optionally, minimum and maximum values can be /// provided. /// - /// Future createIntegerAttribute({required String databaseId, required String collectionId, required String key, required bool xrequired, int? min, int? max, int? xdefault, bool? array}) async { final String path = '/databases/{databaseId}/collections/{collectionId}/attributes/integer'.replaceAll('{databaseId}', databaseId).replaceAll('{collectionId}', collectionId); @@ -573,14 +561,13 @@ class Databases extends Service { return models.AttributeInteger.fromMap(res.data); - } + /// Update Integer Attribute /// /// Update an integer attribute. Changing the `default` value will not update /// already existing documents. /// - /// Future updateIntegerAttribute({required String databaseId, required String collectionId, required String key, required bool xrequired, required int min, required int max, required int? xdefault}) async { final String path = '/databases/{databaseId}/collections/{collectionId}/attributes/integer/{key}'.replaceAll('{databaseId}', databaseId).replaceAll('{collectionId}', collectionId).replaceAll('{key}', key); @@ -602,13 +589,12 @@ class Databases extends Service { return models.AttributeInteger.fromMap(res.data); - } + /// Create IP Address Attribute /// /// Create IP address attribute. /// - /// Future createIpAttribute({required String databaseId, required String collectionId, required String key, required bool xrequired, String? xdefault, bool? array}) async { final String path = '/databases/{databaseId}/collections/{collectionId}/attributes/ip'.replaceAll('{databaseId}', databaseId).replaceAll('{collectionId}', collectionId); @@ -630,14 +616,13 @@ class Databases extends Service { return models.AttributeIp.fromMap(res.data); - } + /// Update IP Address Attribute /// /// Update an ip attribute. Changing the `default` value will not update /// already existing documents. /// - /// Future updateIpAttribute({required String databaseId, required String collectionId, required String key, required bool xrequired, required String? xdefault}) async { final String path = '/databases/{databaseId}/collections/{collectionId}/attributes/ip/{key}'.replaceAll('{databaseId}', databaseId).replaceAll('{collectionId}', collectionId).replaceAll('{key}', key); @@ -657,14 +642,13 @@ class Databases extends Service { return models.AttributeIp.fromMap(res.data); - } + /// Create Relationship Attribute /// /// Create relationship attribute. [Learn more about relationship - /// attributes](docs/databases-relationships#relationship-attributes). + /// attributes](/docs/databases-relationships#relationship-attributes). /// - /// Future createRelationshipAttribute({required String databaseId, required String collectionId, required String relatedCollectionId, required String type, bool? twoWay, String? key, String? twoWayKey, String? onDelete}) async { final String path = '/databases/{databaseId}/collections/{collectionId}/attributes/relationship'.replaceAll('{databaseId}', databaseId).replaceAll('{collectionId}', collectionId); @@ -688,13 +672,12 @@ class Databases extends Service { return models.AttributeRelationship.fromMap(res.data); - } + /// Create String Attribute /// /// Create a string attribute. /// - /// Future createStringAttribute({required String databaseId, required String collectionId, required String key, required int size, required bool xrequired, String? xdefault, bool? array}) async { final String path = '/databases/{databaseId}/collections/{collectionId}/attributes/string'.replaceAll('{databaseId}', databaseId).replaceAll('{collectionId}', collectionId); @@ -717,14 +700,13 @@ class Databases extends Service { return models.AttributeString.fromMap(res.data); - } + /// Update String Attribute /// /// Update a string attribute. Changing the `default` value will not update /// already existing documents. /// - /// Future updateStringAttribute({required String databaseId, required String collectionId, required String key, required bool xrequired, required String? xdefault}) async { final String path = '/databases/{databaseId}/collections/{collectionId}/attributes/string/{key}'.replaceAll('{databaseId}', databaseId).replaceAll('{collectionId}', collectionId).replaceAll('{key}', key); @@ -744,13 +726,12 @@ class Databases extends Service { return models.AttributeString.fromMap(res.data); - } + /// Create URL Attribute /// /// Create a URL attribute. /// - /// Future createUrlAttribute({required String databaseId, required String collectionId, required String key, required bool xrequired, String? xdefault, bool? array}) async { final String path = '/databases/{databaseId}/collections/{collectionId}/attributes/url'.replaceAll('{databaseId}', databaseId).replaceAll('{collectionId}', collectionId); @@ -772,14 +753,13 @@ class Databases extends Service { return models.AttributeUrl.fromMap(res.data); - } + /// Update URL Attribute /// /// Update an url attribute. Changing the `default` value will not update /// already existing documents. /// - /// Future updateUrlAttribute({required String databaseId, required String collectionId, required String key, required bool xrequired, required String? xdefault}) async { final String path = '/databases/{databaseId}/collections/{collectionId}/attributes/url/{key}'.replaceAll('{databaseId}', databaseId).replaceAll('{collectionId}', collectionId).replaceAll('{key}', key); @@ -799,9 +779,10 @@ class Databases extends Service { return models.AttributeUrl.fromMap(res.data); - } + /// Get Attribute + /// Future getAttribute({required String databaseId, required String collectionId, required String key}) async { final String path = '/databases/{databaseId}/collections/{collectionId}/attributes/{key}'.replaceAll('{databaseId}', databaseId).replaceAll('{collectionId}', collectionId).replaceAll('{key}', key); @@ -819,9 +800,10 @@ class Databases extends Service { return res.data; - } + /// Delete Attribute + /// Future deleteAttribute({required String databaseId, required String collectionId, required String key}) async { final String path = '/databases/{databaseId}/collections/{collectionId}/attributes/{key}'.replaceAll('{databaseId}', databaseId).replaceAll('{collectionId}', collectionId).replaceAll('{key}', key); @@ -839,14 +821,13 @@ class Databases extends Service { return res.data; - } + /// Update Relationship Attribute /// /// Update relationship attribute. [Learn more about relationship - /// attributes](docs/databases-relationships#relationship-attributes). + /// attributes](/docs/databases-relationships#relationship-attributes). /// - /// Future updateRelationshipAttribute({required String databaseId, required String collectionId, required String key, String? onDelete}) async { final String path = '/databases/{databaseId}/collections/{collectionId}/attributes/{key}/relationship'.replaceAll('{databaseId}', databaseId).replaceAll('{collectionId}', collectionId).replaceAll('{key}', key); @@ -865,13 +846,12 @@ class Databases extends Service { return models.AttributeRelationship.fromMap(res.data); - } + /// List Documents /// /// Get a list of all the user's documents in a given collection. You can use /// the query params to filter your results. - /// Future listDocuments({required String databaseId, required String collectionId, List? queries}) async { final String path = '/databases/{databaseId}/collections/{collectionId}/documents'.replaceAll('{databaseId}', databaseId).replaceAll('{collectionId}', collectionId); @@ -890,15 +870,14 @@ class Databases extends Service { return models.DocumentList.fromMap(res.data); - } + /// Create Document /// /// Create a new Document. Before using this route, you should create a new /// collection resource using either a [server /// integration](/docs/server/databases#databasesCreateCollection) API or /// directly from your database console. - /// Future createDocument({required String databaseId, required String collectionId, required String documentId, required Map data, List? permissions}) async { final String path = '/databases/{databaseId}/collections/{collectionId}/documents'.replaceAll('{databaseId}', databaseId).replaceAll('{collectionId}', collectionId); @@ -919,13 +898,12 @@ class Databases extends Service { return models.Document.fromMap(res.data); - } + /// Get Document /// /// Get a document by its unique ID. This endpoint response returns a JSON /// object with the document data. - /// Future getDocument({required String databaseId, required String collectionId, required String documentId, List? queries}) async { final String path = '/databases/{databaseId}/collections/{collectionId}/documents/{documentId}'.replaceAll('{databaseId}', databaseId).replaceAll('{collectionId}', collectionId).replaceAll('{documentId}', documentId); @@ -944,13 +922,12 @@ class Databases extends Service { return models.Document.fromMap(res.data); - } + /// Update Document /// /// Update a document by its unique ID. Using the patch method you can pass /// only specific fields that will get updated. - /// Future updateDocument({required String databaseId, required String collectionId, required String documentId, Map? data, List? permissions}) async { final String path = '/databases/{databaseId}/collections/{collectionId}/documents/{documentId}'.replaceAll('{databaseId}', databaseId).replaceAll('{collectionId}', collectionId).replaceAll('{documentId}', documentId); @@ -970,12 +947,11 @@ class Databases extends Service { return models.Document.fromMap(res.data); - } + /// Delete Document /// /// Delete a document by its unique ID. - /// Future deleteDocument({required String databaseId, required String collectionId, required String documentId}) async { final String path = '/databases/{databaseId}/collections/{collectionId}/documents/{documentId}'.replaceAll('{databaseId}', databaseId).replaceAll('{collectionId}', collectionId).replaceAll('{documentId}', documentId); @@ -993,9 +969,10 @@ class Databases extends Service { return res.data; - } + /// List Indexes + /// Future listIndexes({required String databaseId, required String collectionId}) async { final String path = '/databases/{databaseId}/collections/{collectionId}/indexes'.replaceAll('{databaseId}', databaseId).replaceAll('{collectionId}', collectionId); @@ -1013,9 +990,10 @@ class Databases extends Service { return models.IndexList.fromMap(res.data); - } + /// Create Index + /// Future createIndex({required String databaseId, required String collectionId, required String key, required String type, required List attributes, List? orders}) async { final String path = '/databases/{databaseId}/collections/{collectionId}/indexes'.replaceAll('{databaseId}', databaseId).replaceAll('{collectionId}', collectionId); @@ -1037,9 +1015,10 @@ class Databases extends Service { return models.Index.fromMap(res.data); - } + /// Get Index + /// Future getIndex({required String databaseId, required String collectionId, required String key}) async { final String path = '/databases/{databaseId}/collections/{collectionId}/indexes/{key}'.replaceAll('{databaseId}', databaseId).replaceAll('{collectionId}', collectionId).replaceAll('{key}', key); @@ -1057,9 +1036,10 @@ class Databases extends Service { return models.Index.fromMap(res.data); - } + /// Delete Index + /// Future deleteIndex({required String databaseId, required String collectionId, required String key}) async { final String path = '/databases/{databaseId}/collections/{collectionId}/indexes/{key}'.replaceAll('{databaseId}', databaseId).replaceAll('{collectionId}', collectionId).replaceAll('{key}', key); @@ -1077,6 +1057,5 @@ class Databases extends Service { return res.data; - } } \ No newline at end of file diff --git a/lib/services/functions.dart b/lib/services/functions.dart index 09cd3b8b..ded4947b 100644 --- a/lib/services/functions.dart +++ b/lib/services/functions.dart @@ -1,7 +1,7 @@ part of dart_appwrite; - /// The Functions Service allows you view, create and manage your Cloud - /// Functions. +/// The Functions Service allows you view, create and manage your Cloud +/// Functions. class Functions extends Service { Functions(super.client); @@ -9,7 +9,6 @@ class Functions extends Service { /// /// Get a list of all the project's functions. You can use the query params to /// filter your results. - /// Future list({List? queries, String? search}) async { final String path = '/functions'; @@ -29,14 +28,13 @@ class Functions extends Service { return models.FunctionList.fromMap(res.data); - } + /// Create Function /// /// Create a new function. You can pass a list of /// [permissions](/docs/permissions) to allow different project users or team /// with access to execute the function using the client API. - /// Future create({required String functionId, required String name, required String runtime, List? execute, List? events, String? schedule, int? timeout, bool? enabled}) async { final String path = '/functions'; @@ -62,12 +60,11 @@ class Functions extends Service { return models.Func.fromMap(res.data); - } + /// List runtimes /// /// Get a list of all runtimes that are currently active on your instance. - /// Future listRuntimes() async { final String path = '/functions/runtimes'; @@ -85,12 +82,11 @@ class Functions extends Service { return models.RuntimeList.fromMap(res.data); - } + /// Get Function /// /// Get a function by its unique ID. - /// Future get({required String functionId}) async { final String path = '/functions/{functionId}'.replaceAll('{functionId}', functionId); @@ -108,12 +104,11 @@ class Functions extends Service { return models.Func.fromMap(res.data); - } + /// Update Function /// /// Update function by its unique ID. - /// Future update({required String functionId, required String name, List? execute, List? events, String? schedule, int? timeout, bool? enabled}) async { final String path = '/functions/{functionId}'.replaceAll('{functionId}', functionId); @@ -137,12 +132,11 @@ class Functions extends Service { return models.Func.fromMap(res.data); - } + /// Delete Function /// /// Delete a function by its unique ID. - /// Future delete({required String functionId}) async { final String path = '/functions/{functionId}'.replaceAll('{functionId}', functionId); @@ -160,13 +154,12 @@ class Functions extends Service { return res.data; - } + /// List Deployments /// /// Get a list of all the project's code deployments. You can use the query /// params to filter your results. - /// Future listDeployments({required String functionId, List? queries, String? search}) async { final String path = '/functions/{functionId}/deployments'.replaceAll('{functionId}', functionId); @@ -186,8 +179,8 @@ class Functions extends Service { return models.DeploymentList.fromMap(res.data); - } + /// Create Deployment /// /// Create a new function code deployment. Use this endpoint to upload a new @@ -200,7 +193,6 @@ class Functions extends Service { /// tutorial](/docs/functions). /// /// Use the "command" param to set the entry point used to execute your code. - /// Future createDeployment({required String functionId, required String entrypoint, required InputFile code, required bool activate, Function(UploadProgress)? onProgress}) async { final String path = '/functions/{functionId}/deployments'.replaceAll('{functionId}', functionId); @@ -230,12 +222,11 @@ class Functions extends Service { return models.Deployment.fromMap(res.data); - } + /// Get Deployment /// /// Get a code deployment by its unique ID. - /// Future getDeployment({required String functionId, required String deploymentId}) async { final String path = '/functions/{functionId}/deployments/{deploymentId}'.replaceAll('{functionId}', functionId).replaceAll('{deploymentId}', deploymentId); @@ -253,14 +244,13 @@ class Functions extends Service { return models.Deployment.fromMap(res.data); - } + /// Update Function Deployment /// /// Update the function code deployment ID using the unique function ID. Use /// this endpoint to switch the code deployment that should be executed by the /// execution endpoint. - /// Future updateDeployment({required String functionId, required String deploymentId}) async { final String path = '/functions/{functionId}/deployments/{deploymentId}'.replaceAll('{functionId}', functionId).replaceAll('{deploymentId}', deploymentId); @@ -278,12 +268,11 @@ class Functions extends Service { return models.Func.fromMap(res.data); - } + /// Delete Deployment /// /// Delete a code deployment by its unique ID. - /// Future deleteDeployment({required String functionId, required String deploymentId}) async { final String path = '/functions/{functionId}/deployments/{deploymentId}'.replaceAll('{functionId}', functionId).replaceAll('{deploymentId}', deploymentId); @@ -301,9 +290,10 @@ class Functions extends Service { return res.data; - } + /// Create Build + /// Future createBuild({required String functionId, required String deploymentId, required String buildId}) async { final String path = '/functions/{functionId}/deployments/{deploymentId}/builds/{buildId}'.replaceAll('{functionId}', functionId).replaceAll('{deploymentId}', deploymentId).replaceAll('{buildId}', buildId); @@ -321,13 +311,12 @@ class Functions extends Service { return res.data; - } + /// List Executions /// /// Get a list of all the current user function execution logs. You can use the /// query params to filter your results. - /// Future listExecutions({required String functionId, List? queries, String? search}) async { final String path = '/functions/{functionId}/executions'.replaceAll('{functionId}', functionId); @@ -347,15 +336,14 @@ class Functions extends Service { return models.ExecutionList.fromMap(res.data); - } + /// Create Execution /// /// Trigger a function execution. The returned object will return you the /// current execution status. You can ping the `Get Execution` endpoint to get /// updates on the current execution status. Once this endpoint is called, your /// function execution process will start asynchronously. - /// Future createExecution({required String functionId, String? data, bool? xasync}) async { final String path = '/functions/{functionId}/executions'.replaceAll('{functionId}', functionId); @@ -375,12 +363,11 @@ class Functions extends Service { return models.Execution.fromMap(res.data); - } + /// Get Execution /// /// Get a function execution log by its unique ID. - /// Future getExecution({required String functionId, required String executionId}) async { final String path = '/functions/{functionId}/executions/{executionId}'.replaceAll('{functionId}', functionId).replaceAll('{executionId}', executionId); @@ -398,12 +385,11 @@ class Functions extends Service { return models.Execution.fromMap(res.data); - } + /// List Variables /// /// Get a list of all variables of a specific function. - /// Future listVariables({required String functionId}) async { final String path = '/functions/{functionId}/variables'.replaceAll('{functionId}', functionId); @@ -421,13 +407,12 @@ class Functions extends Service { return models.VariableList.fromMap(res.data); - } + /// Create Variable /// /// Create a new function variable. These variables can be accessed within /// function in the `env` object under the request variable. - /// Future createVariable({required String functionId, required String key, required String value}) async { final String path = '/functions/{functionId}/variables'.replaceAll('{functionId}', functionId); @@ -447,12 +432,11 @@ class Functions extends Service { return models.Variable.fromMap(res.data); - } + /// Get Variable /// /// Get a variable by its unique ID. - /// Future getVariable({required String functionId, required String variableId}) async { final String path = '/functions/{functionId}/variables/{variableId}'.replaceAll('{functionId}', functionId).replaceAll('{variableId}', variableId); @@ -470,12 +454,11 @@ class Functions extends Service { return models.Variable.fromMap(res.data); - } + /// Update Variable /// /// Update variable by its unique ID. - /// Future updateVariable({required String functionId, required String variableId, required String key, String? value}) async { final String path = '/functions/{functionId}/variables/{variableId}'.replaceAll('{functionId}', functionId).replaceAll('{variableId}', variableId); @@ -495,12 +478,11 @@ class Functions extends Service { return models.Variable.fromMap(res.data); - } + /// Delete Variable /// /// Delete a variable by its unique ID. - /// Future deleteVariable({required String functionId, required String variableId}) async { final String path = '/functions/{functionId}/variables/{variableId}'.replaceAll('{functionId}', functionId).replaceAll('{variableId}', variableId); @@ -518,6 +500,5 @@ class Functions extends Service { return res.data; - } } \ No newline at end of file diff --git a/lib/services/graphql.dart b/lib/services/graphql.dart index 45d1ef57..798172bc 100644 --- a/lib/services/graphql.dart +++ b/lib/services/graphql.dart @@ -1,14 +1,13 @@ part of dart_appwrite; - /// The GraphQL API allows you to query and mutate your Appwrite server using - /// GraphQL. +/// The GraphQL API allows you to query and mutate your Appwrite server using +/// GraphQL. class Graphql extends Service { Graphql(super.client); /// GraphQL Endpoint /// /// Execute a GraphQL mutation. - /// Future query({required Map query}) async { final String path = '/graphql'; @@ -28,12 +27,11 @@ class Graphql extends Service { return res.data; - } + /// GraphQL Endpoint /// /// Execute a GraphQL mutation. - /// Future mutation({required Map query}) async { final String path = '/graphql/mutation'; @@ -53,6 +51,5 @@ class Graphql extends Service { return res.data; - } } \ No newline at end of file diff --git a/lib/services/health.dart b/lib/services/health.dart index eae57f6c..2e929727 100644 --- a/lib/services/health.dart +++ b/lib/services/health.dart @@ -1,14 +1,13 @@ part of dart_appwrite; - /// The Health service allows you to both validate and monitor your Appwrite - /// server's health. +/// The Health service allows you to both validate and monitor your Appwrite +/// server's health. class Health extends Service { Health(super.client); /// Get HTTP /// /// Check the Appwrite HTTP server is up and responsive. - /// Future get() async { final String path = '/health'; @@ -26,12 +25,11 @@ class Health extends Service { return models.HealthStatus.fromMap(res.data); - } + /// Get Antivirus /// /// Check the Appwrite Antivirus server is up and connection is successful. - /// Future getAntivirus() async { final String path = '/health/anti-virus'; @@ -49,13 +47,12 @@ class Health extends Service { return models.HealthAntivirus.fromMap(res.data); - } + /// Get Cache /// /// Check the Appwrite in-memory cache server is up and connection is /// successful. - /// Future getCache() async { final String path = '/health/cache'; @@ -73,12 +70,11 @@ class Health extends Service { return models.HealthStatus.fromMap(res.data); - } + /// Get DB /// /// Check the Appwrite database server is up and connection is successful. - /// Future getDB() async { final String path = '/health/db'; @@ -96,14 +92,13 @@ class Health extends Service { return models.HealthStatus.fromMap(res.data); - } + /// Get Certificates Queue /// /// Get the number of certificates that are waiting to be issued against /// [Letsencrypt](https://letsencrypt.org/) in the Appwrite internal queue /// server. - /// Future getQueueCertificates() async { final String path = '/health/queue/certificates'; @@ -121,9 +116,10 @@ class Health extends Service { return models.HealthQueue.fromMap(res.data); - } + /// Get Functions Queue + /// Future getQueueFunctions() async { final String path = '/health/queue/functions'; @@ -141,13 +137,12 @@ class Health extends Service { return models.HealthQueue.fromMap(res.data); - } + /// Get Logs Queue /// /// Get the number of logs that are waiting to be processed in the Appwrite /// internal queue server. - /// Future getQueueLogs() async { final String path = '/health/queue/logs'; @@ -165,13 +160,12 @@ class Health extends Service { return models.HealthQueue.fromMap(res.data); - } + /// Get Webhooks Queue /// /// Get the number of webhooks that are waiting to be processed in the Appwrite /// internal queue server. - /// Future getQueueWebhooks() async { final String path = '/health/queue/webhooks'; @@ -189,12 +183,11 @@ class Health extends Service { return models.HealthQueue.fromMap(res.data); - } + /// Get Local Storage /// /// Check the Appwrite local storage device is up and connection is successful. - /// Future getStorageLocal() async { final String path = '/health/storage/local'; @@ -212,8 +205,8 @@ class Health extends Service { return models.HealthStatus.fromMap(res.data); - } + /// Get Time /// /// Check the Appwrite server time is synced with Google remote NTP server. We @@ -223,7 +216,6 @@ class Health extends Service { /// used by hundreds of millions of computers and devices to synchronize their /// clocks over the Internet. If your computer sets its own clock, it likely /// uses NTP. - /// Future getTime() async { final String path = '/health/time'; @@ -241,6 +233,5 @@ class Health extends Service { return models.HealthTime.fromMap(res.data); - } } \ No newline at end of file diff --git a/lib/services/locale.dart b/lib/services/locale.dart index ca5df563..75944864 100644 --- a/lib/services/locale.dart +++ b/lib/services/locale.dart @@ -1,7 +1,7 @@ part of dart_appwrite; - /// The Locale service allows you to customize your app based on your users' - /// location. +/// The Locale service allows you to customize your app based on your users' +/// location. class Locale extends Service { Locale(super.client); @@ -13,7 +13,6 @@ class Locale extends Service { /// supported language. /// /// ([IP Geolocation by DB-IP](https://db-ip.com)) - /// Future get() async { final String path = '/locale'; @@ -31,13 +30,12 @@ class Locale extends Service { return models.Locale.fromMap(res.data); - } + /// List Continents /// /// List of all continents. You can use the locale header to get the data in a /// supported language. - /// Future listContinents() async { final String path = '/locale/continents'; @@ -55,13 +53,12 @@ class Locale extends Service { return models.ContinentList.fromMap(res.data); - } + /// List Countries /// /// List of all countries. You can use the locale header to get the data in a /// supported language. - /// Future listCountries() async { final String path = '/locale/countries'; @@ -79,13 +76,12 @@ class Locale extends Service { return models.CountryList.fromMap(res.data); - } + /// List EU Countries /// /// List of all countries that are currently members of the EU. You can use the /// locale header to get the data in a supported language. - /// Future listCountriesEU() async { final String path = '/locale/countries/eu'; @@ -103,13 +99,12 @@ class Locale extends Service { return models.CountryList.fromMap(res.data); - } + /// List Countries Phone Codes /// /// List of all countries phone codes. You can use the locale header to get the /// data in a supported language. - /// Future listCountriesPhones() async { final String path = '/locale/countries/phones'; @@ -127,14 +122,13 @@ class Locale extends Service { return models.PhoneList.fromMap(res.data); - } + /// List Currencies /// /// List of all currencies, including currency symbol, name, plural, and /// decimal digits for all major and minor currencies. You can use the locale /// header to get the data in a supported language. - /// Future listCurrencies() async { final String path = '/locale/currencies'; @@ -152,13 +146,12 @@ class Locale extends Service { return models.CurrencyList.fromMap(res.data); - } + /// List Languages /// /// List of all languages classified by ISO 639-1 including 2-letter code, name /// in English, and name in the respective language. - /// Future listLanguages() async { final String path = '/locale/languages'; @@ -176,6 +169,5 @@ class Locale extends Service { return models.LanguageList.fromMap(res.data); - } } \ No newline at end of file diff --git a/lib/services/storage.dart b/lib/services/storage.dart index 9e16b4f5..8e3c1f8f 100644 --- a/lib/services/storage.dart +++ b/lib/services/storage.dart @@ -1,6 +1,6 @@ part of dart_appwrite; - /// The Storage service allows you to manage your project files. +/// The Storage service allows you to manage your project files. class Storage extends Service { Storage(super.client); @@ -8,7 +8,6 @@ class Storage extends Service { /// /// Get a list of all the storage buckets. You can use the query params to /// filter your results. - /// Future listBuckets({List? queries, String? search}) async { final String path = '/storage/buckets'; @@ -28,12 +27,11 @@ class Storage extends Service { return models.BucketList.fromMap(res.data); - } + /// Create bucket /// /// Create a new storage bucket. - /// Future createBucket({required String bucketId, required String name, List? permissions, bool? fileSecurity, bool? enabled, int? maximumFileSize, List? allowedFileExtensions, String? compression, bool? encryption, bool? antivirus}) async { final String path = '/storage/buckets'; @@ -61,13 +59,12 @@ class Storage extends Service { return models.Bucket.fromMap(res.data); - } + /// Get Bucket /// /// Get a storage bucket by its unique ID. This endpoint response returns a /// JSON object with the storage bucket metadata. - /// Future getBucket({required String bucketId}) async { final String path = '/storage/buckets/{bucketId}'.replaceAll('{bucketId}', bucketId); @@ -85,12 +82,11 @@ class Storage extends Service { return models.Bucket.fromMap(res.data); - } + /// Update Bucket /// /// Update a storage bucket by its unique ID. - /// Future updateBucket({required String bucketId, required String name, List? permissions, bool? fileSecurity, bool? enabled, int? maximumFileSize, List? allowedFileExtensions, String? compression, bool? encryption, bool? antivirus}) async { final String path = '/storage/buckets/{bucketId}'.replaceAll('{bucketId}', bucketId); @@ -117,12 +113,11 @@ class Storage extends Service { return models.Bucket.fromMap(res.data); - } + /// Delete Bucket /// /// Delete a storage bucket by its unique ID. - /// Future deleteBucket({required String bucketId}) async { final String path = '/storage/buckets/{bucketId}'.replaceAll('{bucketId}', bucketId); @@ -140,13 +135,12 @@ class Storage extends Service { return res.data; - } + /// List Files /// /// Get a list of all the user files. You can use the query params to filter /// your results. - /// Future listFiles({required String bucketId, List? queries, String? search}) async { final String path = '/storage/buckets/{bucketId}/files'.replaceAll('{bucketId}', bucketId); @@ -166,8 +160,8 @@ class Storage extends Service { return models.FileList.fromMap(res.data); - } + /// Create File /// /// Create a new file. Before using this route, you should create a new bucket @@ -188,7 +182,6 @@ class Storage extends Service { /// If you're creating a new file using one of the Appwrite SDKs, all the /// chunking logic will be managed by the SDK internally. /// - /// Future createFile({required String bucketId, required String fileId, required InputFile file, List? permissions, Function(UploadProgress)? onProgress}) async { final String path = '/storage/buckets/{bucketId}/files'.replaceAll('{bucketId}', bucketId); @@ -219,13 +212,12 @@ class Storage extends Service { return models.File.fromMap(res.data); - } + /// Get File /// /// Get a file by its unique ID. This endpoint response returns a JSON object /// with the file metadata. - /// Future getFile({required String bucketId, required String fileId}) async { final String path = '/storage/buckets/{bucketId}/files/{fileId}'.replaceAll('{bucketId}', bucketId).replaceAll('{fileId}', fileId); @@ -243,13 +235,12 @@ class Storage extends Service { return models.File.fromMap(res.data); - } + /// Update File /// /// Update a file by its unique ID. Only users with write permissions have /// access to update this resource. - /// Future updateFile({required String bucketId, required String fileId, List? permissions}) async { final String path = '/storage/buckets/{bucketId}/files/{fileId}'.replaceAll('{bucketId}', bucketId).replaceAll('{fileId}', fileId); @@ -268,13 +259,12 @@ class Storage extends Service { return models.File.fromMap(res.data); - } + /// Delete File /// /// Delete a file by its unique ID. Only users with write permissions have /// access to delete this resource. - /// Future deleteFile({required String bucketId, required String fileId}) async { final String path = '/storage/buckets/{bucketId}/files/{fileId}'.replaceAll('{bucketId}', bucketId).replaceAll('{fileId}', fileId); @@ -292,14 +282,13 @@ class Storage extends Service { return res.data; - } + /// Get File for Download /// /// Get a file content by its unique ID. The endpoint response return with a /// 'Content-Disposition: attachment' header that tells the browser to start /// downloading the file to user downloads directory. - /// Future getFileDownload({required String bucketId, required String fileId}) async { final String path = '/storage/buckets/{bucketId}/files/{fileId}/download'.replaceAll('{bucketId}', bucketId).replaceAll('{fileId}', fileId); @@ -312,8 +301,8 @@ class Storage extends Service { final res = await client.call(HttpMethod.get, path: path, params: params, responseType: ResponseType.bytes); return res.data; - } + /// Get File Preview /// /// Get a file preview image. Currently, this method supports preview for image @@ -321,7 +310,6 @@ class Storage extends Service { /// and spreadsheets, will return the file icon image. You can also pass query /// string arguments for cutting and resizing your preview image. Preview is /// supported only for image files smaller than 10MB. - /// Future getFilePreview({required String bucketId, required String fileId, int? width, int? height, String? gravity, int? quality, int? borderWidth, String? borderColor, int? borderRadius, double? opacity, int? rotation, String? background, String? output}) async { final String path = '/storage/buckets/{bucketId}/files/{fileId}/preview'.replaceAll('{bucketId}', bucketId).replaceAll('{fileId}', fileId); @@ -345,14 +333,13 @@ class Storage extends Service { final res = await client.call(HttpMethod.get, path: path, params: params, responseType: ResponseType.bytes); return res.data; - } + /// Get File for View /// /// Get a file content by its unique ID. This endpoint is similar to the /// download method but returns with no 'Content-Disposition: attachment' /// header. - /// Future getFileView({required String bucketId, required String fileId}) async { final String path = '/storage/buckets/{bucketId}/files/{fileId}/view'.replaceAll('{bucketId}', bucketId).replaceAll('{fileId}', fileId); @@ -365,6 +352,5 @@ class Storage extends Service { final res = await client.call(HttpMethod.get, path: path, params: params, responseType: ResponseType.bytes); return res.data; - } } \ No newline at end of file diff --git a/lib/services/teams.dart b/lib/services/teams.dart index e319bd13..6f0d47e9 100644 --- a/lib/services/teams.dart +++ b/lib/services/teams.dart @@ -1,7 +1,7 @@ part of dart_appwrite; - /// The Teams service allows you to group users of your project and to enable - /// them to share read and write access to your project resources +/// The Teams service allows you to group users of your project and to enable +/// them to share read and write access to your project resources class Teams extends Service { Teams(super.client); @@ -9,7 +9,6 @@ class Teams extends Service { /// /// Get a list of all the teams in which the current user is a member. You can /// use the parameters to filter your results. - /// Future list({List? queries, String? search}) async { final String path = '/teams'; @@ -29,14 +28,13 @@ class Teams extends Service { return models.TeamList.fromMap(res.data); - } + /// Create Team /// /// Create a new team. The user who creates the team will automatically be /// assigned as the owner of the team. Only the users with the owner role can /// invite new members, add new owners and delete or update the team. - /// Future create({required String teamId, required String name, List? roles}) async { final String path = '/teams'; @@ -57,12 +55,11 @@ class Teams extends Service { return models.Team.fromMap(res.data); - } + /// Get Team /// /// Get a team by its ID. All team members have read access for this resource. - /// Future get({required String teamId}) async { final String path = '/teams/{teamId}'.replaceAll('{teamId}', teamId); @@ -80,12 +77,11 @@ class Teams extends Service { return models.Team.fromMap(res.data); - } + /// Update Name /// /// Update the team's name by its unique ID. - /// Future updateName({required String teamId, required String name}) async { final String path = '/teams/{teamId}'.replaceAll('{teamId}', teamId); @@ -104,13 +100,12 @@ class Teams extends Service { return models.Team.fromMap(res.data); - } + /// Delete Team /// /// Delete a team using its ID. Only team members with the owner role can /// delete the team. - /// Future delete({required String teamId}) async { final String path = '/teams/{teamId}'.replaceAll('{teamId}', teamId); @@ -128,13 +123,12 @@ class Teams extends Service { return res.data; - } + /// List Team Memberships /// /// Use this endpoint to list a team's members using the team's ID. All team /// members have read access to this endpoint. - /// Future listMemberships({required String teamId, List? queries, String? search}) async { final String path = '/teams/{teamId}/memberships'.replaceAll('{teamId}', teamId); @@ -154,8 +148,8 @@ class Teams extends Service { return models.MembershipList.fromMap(res.data); - } + /// Create Team Membership /// /// Invite a new member to join your team. Provide an ID for existing users, or @@ -179,7 +173,6 @@ class Teams extends Service { /// Appwrite will accept the only redirect URLs under the domains you have /// added as a platform on the Appwrite Console. /// - /// Future createMembership({required String teamId, required List roles, required String url, String? email, String? userId, String? phone, String? name}) async { final String path = '/teams/{teamId}/memberships'.replaceAll('{teamId}', teamId); @@ -203,13 +196,12 @@ class Teams extends Service { return models.Membership.fromMap(res.data); - } + /// Get Team Membership /// /// Get a team member by the membership unique id. All team members have read /// access for this resource. - /// Future getMembership({required String teamId, required String membershipId}) async { final String path = '/teams/{teamId}/memberships/{membershipId}'.replaceAll('{teamId}', teamId).replaceAll('{membershipId}', membershipId); @@ -227,14 +219,13 @@ class Teams extends Service { return models.Membership.fromMap(res.data); - } + /// Update Membership Roles /// /// Modify the roles of a team member. Only team members with the owner role /// have access to this endpoint. Learn more about [roles and /// permissions](/docs/permissions). - /// Future updateMembershipRoles({required String teamId, required String membershipId, required List roles}) async { final String path = '/teams/{teamId}/memberships/{membershipId}'.replaceAll('{teamId}', teamId).replaceAll('{membershipId}', membershipId); @@ -253,14 +244,13 @@ class Teams extends Service { return models.Membership.fromMap(res.data); - } + /// Delete Team Membership /// /// This endpoint allows a user to leave a team or for a team owner to delete /// the membership of any other team member. You can also use this endpoint to /// delete a user membership even if it is not accepted. - /// Future deleteMembership({required String teamId, required String membershipId}) async { final String path = '/teams/{teamId}/memberships/{membershipId}'.replaceAll('{teamId}', teamId).replaceAll('{membershipId}', membershipId); @@ -278,8 +268,8 @@ class Teams extends Service { return res.data; - } + /// Update Team Membership Status /// /// Use this endpoint to allow a user to accept an invitation to join a team @@ -289,7 +279,6 @@ class Teams extends Service { /// If the request is successful, a session for the user is automatically /// created. /// - /// Future updateMembershipStatus({required String teamId, required String membershipId, required String userId, required String secret}) async { final String path = '/teams/{teamId}/memberships/{membershipId}/status'.replaceAll('{teamId}', teamId).replaceAll('{membershipId}', membershipId); @@ -309,14 +298,13 @@ class Teams extends Service { return models.Membership.fromMap(res.data); - } + /// Get Team Preferences /// /// Get the team's shared preferences by its unique ID. If a preference doesn't /// need to be shared by all team members, prefer storing them in [user /// preferences](/docs/client/account#accountGetPrefs). - /// Future getPrefs({required String teamId}) async { final String path = '/teams/{teamId}/prefs'.replaceAll('{teamId}', teamId); @@ -334,14 +322,13 @@ class Teams extends Service { return models.Preferences.fromMap(res.data); - } + /// Update Preferences /// /// Update the team's preferences by its unique ID. The object you pass is /// stored as is and replaces any previous value. The maximum allowed prefs /// size is 64kB and throws an error if exceeded. - /// Future updatePrefs({required String teamId, required Map prefs}) async { final String path = '/teams/{teamId}/prefs'.replaceAll('{teamId}', teamId); @@ -360,6 +347,5 @@ class Teams extends Service { return models.Preferences.fromMap(res.data); - } } \ No newline at end of file diff --git a/lib/services/users.dart b/lib/services/users.dart index 5ba721b5..8214131b 100644 --- a/lib/services/users.dart +++ b/lib/services/users.dart @@ -1,6 +1,6 @@ part of dart_appwrite; - /// The Users service allows you to manage your project users. +/// The Users service allows you to manage your project users. class Users extends Service { Users(super.client); @@ -8,7 +8,6 @@ class Users extends Service { /// /// Get a list of all the project's users. You can use the query params to /// filter your results. - /// Future list({List? queries, String? search}) async { final String path = '/users'; @@ -28,12 +27,11 @@ class Users extends Service { return models.UserList.fromMap(res.data); - } + /// Create User /// /// Create a new user. - /// Future create({required String userId, String? email, String? phone, String? password, String? name}) async { final String path = '/users'; @@ -56,15 +54,14 @@ class Users extends Service { return models.User.fromMap(res.data); - } + /// Create User with Argon2 Password /// /// Create a new user. Password provided must be hashed with the /// [Argon2](https://en.wikipedia.org/wiki/Argon2) algorithm. Use the [POST /// /users](/docs/server/users#usersCreate) endpoint to create users with a /// plain text password. - /// Future createArgon2User({required String userId, required String email, required String password, String? name}) async { final String path = '/users/argon2'; @@ -86,15 +83,14 @@ class Users extends Service { return models.User.fromMap(res.data); - } + /// Create User with Bcrypt Password /// /// Create a new user. Password provided must be hashed with the /// [Bcrypt](https://en.wikipedia.org/wiki/Bcrypt) algorithm. Use the [POST /// /users](/docs/server/users#usersCreate) endpoint to create users with a /// plain text password. - /// Future createBcryptUser({required String userId, required String email, required String password, String? name}) async { final String path = '/users/bcrypt'; @@ -116,15 +112,14 @@ class Users extends Service { return models.User.fromMap(res.data); - } + /// Create User with MD5 Password /// /// Create a new user. Password provided must be hashed with the /// [MD5](https://en.wikipedia.org/wiki/MD5) algorithm. Use the [POST /// /users](/docs/server/users#usersCreate) endpoint to create users with a /// plain text password. - /// Future createMD5User({required String userId, required String email, required String password, String? name}) async { final String path = '/users/md5'; @@ -146,15 +141,14 @@ class Users extends Service { return models.User.fromMap(res.data); - } + /// Create User with PHPass Password /// /// Create a new user. Password provided must be hashed with the /// [PHPass](https://www.openwall.com/phpass/) algorithm. Use the [POST /// /users](/docs/server/users#usersCreate) endpoint to create users with a /// plain text password. - /// Future createPHPassUser({required String userId, required String email, required String password, String? name}) async { final String path = '/users/phpass'; @@ -176,15 +170,14 @@ class Users extends Service { return models.User.fromMap(res.data); - } + /// Create User with Scrypt Password /// /// Create a new user. Password provided must be hashed with the /// [Scrypt](https://github.com/Tarsnap/scrypt) algorithm. Use the [POST /// /users](/docs/server/users#usersCreate) endpoint to create users with a /// plain text password. - /// Future createScryptUser({required String userId, required String email, required String password, required String passwordSalt, required int passwordCpu, required int passwordMemory, required int passwordParallel, required int passwordLength, String? name}) async { final String path = '/users/scrypt'; @@ -211,15 +204,14 @@ class Users extends Service { return models.User.fromMap(res.data); - } + /// Create User with Scrypt Modified Password /// /// Create a new user. Password provided must be hashed with the [Scrypt /// Modified](https://gist.github.com/Meldiron/eecf84a0225eccb5a378d45bb27462cc) /// algorithm. Use the [POST /users](/docs/server/users#usersCreate) endpoint /// to create users with a plain text password. - /// Future createScryptModifiedUser({required String userId, required String email, required String password, required String passwordSalt, required String passwordSaltSeparator, required String passwordSignerKey, String? name}) async { final String path = '/users/scrypt-modified'; @@ -244,15 +236,14 @@ class Users extends Service { return models.User.fromMap(res.data); - } + /// Create User with SHA Password /// /// Create a new user. Password provided must be hashed with the /// [SHA](https://en.wikipedia.org/wiki/Secure_Hash_Algorithm) algorithm. Use /// the [POST /users](/docs/server/users#usersCreate) endpoint to create users /// with a plain text password. - /// Future createSHAUser({required String userId, required String email, required String password, String? passwordVersion, String? name}) async { final String path = '/users/sha'; @@ -275,12 +266,11 @@ class Users extends Service { return models.User.fromMap(res.data); - } + /// Get User /// /// Get a user by its unique ID. - /// Future get({required String userId}) async { final String path = '/users/{userId}'.replaceAll('{userId}', userId); @@ -298,8 +288,8 @@ class Users extends Service { return models.User.fromMap(res.data); - } + /// Delete User /// /// Delete a user by its unique ID, thereby releasing it's ID. Since ID is @@ -307,7 +297,6 @@ class Users extends Service { /// storage files should be deleted before user deletion. If you want to keep /// ID reserved, use the [updateStatus](/docs/server/users#usersUpdateStatus) /// endpoint instead. - /// Future delete({required String userId}) async { final String path = '/users/{userId}'.replaceAll('{userId}', userId); @@ -325,12 +314,11 @@ class Users extends Service { return res.data; - } + /// Update Email /// /// Update the user email by its unique ID. - /// Future updateEmail({required String userId, required String email}) async { final String path = '/users/{userId}/email'.replaceAll('{userId}', userId); @@ -349,12 +337,11 @@ class Users extends Service { return models.User.fromMap(res.data); - } + /// List User Logs /// /// Get the user activity logs list by its unique ID. - /// Future listLogs({required String userId, List? queries}) async { final String path = '/users/{userId}/logs'.replaceAll('{userId}', userId); @@ -373,12 +360,11 @@ class Users extends Service { return models.LogList.fromMap(res.data); - } + /// List User Memberships /// /// Get the user membership list by its unique ID. - /// Future listMemberships({required String userId}) async { final String path = '/users/{userId}/memberships'.replaceAll('{userId}', userId); @@ -396,12 +382,11 @@ class Users extends Service { return models.MembershipList.fromMap(res.data); - } + /// Update Name /// /// Update the user name by its unique ID. - /// Future updateName({required String userId, required String name}) async { final String path = '/users/{userId}/name'.replaceAll('{userId}', userId); @@ -420,12 +405,11 @@ class Users extends Service { return models.User.fromMap(res.data); - } + /// Update Password /// /// Update the user password by its unique ID. - /// Future updatePassword({required String userId, required String password}) async { final String path = '/users/{userId}/password'.replaceAll('{userId}', userId); @@ -444,12 +428,11 @@ class Users extends Service { return models.User.fromMap(res.data); - } + /// Update Phone /// /// Update the user phone by its unique ID. - /// Future updatePhone({required String userId, required String number}) async { final String path = '/users/{userId}/phone'.replaceAll('{userId}', userId); @@ -468,12 +451,11 @@ class Users extends Service { return models.User.fromMap(res.data); - } + /// Get User Preferences /// /// Get the user preferences by its unique ID. - /// Future getPrefs({required String userId}) async { final String path = '/users/{userId}/prefs'.replaceAll('{userId}', userId); @@ -491,14 +473,13 @@ class Users extends Service { return models.Preferences.fromMap(res.data); - } + /// Update User Preferences /// /// Update the user preferences by its unique ID. The object you pass is stored /// as is, and replaces any previous value. The maximum allowed prefs size is /// 64kB and throws error if exceeded. - /// Future updatePrefs({required String userId, required Map prefs}) async { final String path = '/users/{userId}/prefs'.replaceAll('{userId}', userId); @@ -517,12 +498,11 @@ class Users extends Service { return models.Preferences.fromMap(res.data); - } + /// List User Sessions /// /// Get the user sessions list by its unique ID. - /// Future listSessions({required String userId}) async { final String path = '/users/{userId}/sessions'.replaceAll('{userId}', userId); @@ -540,12 +520,11 @@ class Users extends Service { return models.SessionList.fromMap(res.data); - } + /// Delete User Sessions /// /// Delete all user's sessions by using the user's unique ID. - /// Future deleteSessions({required String userId}) async { final String path = '/users/{userId}/sessions'.replaceAll('{userId}', userId); @@ -563,12 +542,11 @@ class Users extends Service { return res.data; - } + /// Delete User Session /// /// Delete a user sessions by its unique ID. - /// Future deleteSession({required String userId, required String sessionId}) async { final String path = '/users/{userId}/sessions/{sessionId}'.replaceAll('{userId}', userId).replaceAll('{sessionId}', sessionId); @@ -586,13 +564,12 @@ class Users extends Service { return res.data; - } + /// Update User Status /// /// Update the user status by its unique ID. Use this endpoint as an /// alternative to deleting a user if you want to keep user's ID reserved. - /// Future updateStatus({required String userId, required bool status}) async { final String path = '/users/{userId}/status'.replaceAll('{userId}', userId); @@ -611,12 +588,11 @@ class Users extends Service { return models.User.fromMap(res.data); - } + /// Update Email Verification /// /// Update the user email verification status by its unique ID. - /// Future updateEmailVerification({required String userId, required bool emailVerification}) async { final String path = '/users/{userId}/verification'.replaceAll('{userId}', userId); @@ -635,12 +611,11 @@ class Users extends Service { return models.User.fromMap(res.data); - } + /// Update Phone Verification /// /// Update the user phone verification status by its unique ID. - /// Future updatePhoneVerification({required String userId, required bool phoneVerification}) async { final String path = '/users/{userId}/verification/phone'.replaceAll('{userId}', userId); @@ -659,6 +634,5 @@ class Users extends Service { return models.User.fromMap(res.data); - } } \ No newline at end of file diff --git a/lib/src/client.dart b/lib/src/client.dart index 173062d2..474654d5 100644 --- a/lib/src/client.dart +++ b/lib/src/client.dart @@ -5,32 +5,56 @@ import 'client_stub.dart' import 'response.dart'; import 'upload_progress.dart'; +/// [Client] that handles requests to Appwrite abstract class Client { + /// The size for cunked uploads in bytes. static const int CHUNK_SIZE = 5*1024*1024; + + /// Holds configuration such as project. late Map config; late String _endPoint; + /// Appwrite endpoint. String get endPoint => _endPoint; + /// Initializes a [Client]. factory Client( {String endPoint = 'https://HOSTNAME/v1', bool selfSigned = false}) => createClient(endPoint: endPoint, selfSigned: selfSigned); + /// Set self signed to [status]. + /// + /// If self signed is true, [Client] will ignore invalid certificates. + /// This is helpful in environments where your Appwrite + /// instance does not have a valid SSL certificate. Client setSelfSigned({bool status = true}); + /// Set the Appwrite endpoint. Client setEndpoint(String endPoint); + /// Set Project + /// /// Your project ID Client setProject(value); + + /// Set Key + /// /// Your secret API key Client setKey(value); + + /// Set JWT + /// /// Your secret JSON Web Token Client setJWT(value); + + /// Set Locale Client setLocale(value); + /// Add headers that should be sent with all API calls. Client addHeader(String key, String value); + /// Upload a file in chunks. Future chunkedUpload({ required String path, required Map params, @@ -40,6 +64,7 @@ abstract class Client { Function(UploadProgress)? onProgress, }); + /// Send the API request. Future call(HttpMethod method, { String path = '', Map headers = const {}, diff --git a/lib/src/enums.dart b/lib/src/enums.dart index 9f84bd93..6566f2e1 100644 --- a/lib/src/enums.dart +++ b/lib/src/enums.dart @@ -1,6 +1,8 @@ +/// HTTP methods. enum HttpMethod { get, post, put, delete, patch } extension HttpMethodString on HttpMethod { + /// Returns the HTTP method in all caps. String name() { return toString().split('.').last.toUpperCase(); } diff --git a/lib/src/exception.dart b/lib/src/exception.dart index a5c6a9f2..03870b15 100644 --- a/lib/src/exception.dart +++ b/lib/src/exception.dart @@ -1,11 +1,20 @@ +/// Exception thrown by the dart_appwrite package. class AppwriteException implements Exception { + /// Error message. final String? message; + + /// Error type. + /// + /// See [Error Types](https://appwrite.io/docs/response-codes#errorTypes) + /// for more information. final String? type; final int? code; final dynamic response; + /// Initializes an Appwrite Exception. AppwriteException([this.message = "", this.code, this.type, this.response]); + /// Returns the error type, message, and code. @override String toString() { if (message == null) return "AppwriteException"; diff --git a/lib/src/input_file.dart b/lib/src/input_file.dart index 13c6e752..bb7db00f 100644 --- a/lib/src/input_file.dart +++ b/lib/src/input_file.dart @@ -1,5 +1,6 @@ import 'exception.dart'; +/// Helper class to handle files. class InputFile { late final String? path; late final List? bytes; diff --git a/lib/src/response.dart b/lib/src/response.dart index bf4eea3f..ff7d14b2 100644 --- a/lib/src/response.dart +++ b/lib/src/response.dart @@ -1,8 +1,11 @@ import 'dart:convert'; +/// Appwrite Response class Response { + /// Initializes a [Response] Response({this.data}); + /// HTTP body returned from Appwrite T? data; @override diff --git a/lib/src/upload_progress.dart b/lib/src/upload_progress.dart index 4ed965d2..44cde383 100644 --- a/lib/src/upload_progress.dart +++ b/lib/src/upload_progress.dart @@ -1,11 +1,23 @@ import 'dart:convert'; +/// Progress of a File Upload class UploadProgress { + /// ID of the file. final String $id; + + /// Progress percentage. final double progress; + + /// Size uploaded in bytes. final int sizeUploaded; + + /// Total number of chunks. final int chunksTotal; + + /// Number of chunks uploaded. final int chunksUploaded; + + /// Initializes an [UploadProgress] UploadProgress({ required this.$id, required this.progress, @@ -14,6 +26,7 @@ class UploadProgress { required this.chunksUploaded, }); + /// Initializes an [UploadProgress] from a [Map] factory UploadProgress.fromMap(Map map) { return UploadProgress( $id: map['\$id'] ?? '', @@ -24,6 +37,7 @@ class UploadProgress { ); } + /// Converts an [UploadProgress] to a [Map] Map toMap() { return { "\$id": $id, @@ -34,11 +48,14 @@ class UploadProgress { }; } + /// Converts an [UploadProgress] to a JSON [String] String toJson() => json.encode(toMap()); + /// Initializes an [UploadProgress] from a JSON [String] factory UploadProgress.fromJson(String source) => UploadProgress.fromMap(json.decode(source)); + /// Returns a string representation of an [UploadProgress] @override String toString() { return 'UploadProgress(\$id: ${$id}, progress: $progress, sizeUploaded: $sizeUploaded, chunksTotal: $chunksTotal, chunksUploaded: $chunksUploaded)'; diff --git a/pubspec.yaml b/pubspec.yaml index b515fe7d..3b07fb40 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -8,7 +8,7 @@ documentation: https://appwrite.io/support environment: sdk: '>=2.17.0 <3.0.0' dependencies: - http: ^0.13.5 + http: '>=0.13.6 <1.0.1' dev_dependencies: lints: ^2.0.1