diff --git a/app/sdks/0.6.2/client-flutter-dev/CHANGELOG.md b/app/sdks/0.6.2/client-flutter-dev/CHANGELOG.md deleted file mode 100644 index 2e9b0e0a91..0000000000 --- a/app/sdks/0.6.2/client-flutter-dev/CHANGELOG.md +++ /dev/null @@ -1,64 +0,0 @@ -## 0.3.2 - -- Fixed package namespaces - -## 0.3.1 - -- Downgraded meta package version to 1.1.8 - -## 0.3.0 - -- Updated package dependencies (@lohanidamodar) -- Added Flutter for Web compatibility (@lohanidamodar) - -## 0.2.3 - -- Fixed OAuth2 cookie bug, where a new session cookie couldn't overwrite an old cookie - -## 0.2.2 - -- Fixed an error that happend when the OAuth session creation request was sent before any other API call -- Fixed a bug in the Avatars service where location URL generation had syntax error - -## 0.2.1 - -- Fixed callback scheme - -## 0.2.0 - -- Updated flutter_web_auth plugin to version 0.2.4 -- Added per project unique callback for OAuth2 redirects to aviod conflicts between multiple Appwrite projects - -## 0.1.1 - -- Updated flutter_web_auth version - -## 0.1.0 - -- Added examples file -- Some minor style fixes - -## 0.0.14 - -- Using MultipartFile for file uploads - -## 0.0.13 - -- Fix for file upload method - -## 0.0.12 - -- Added file upload support for storage service - -## 0.0.11 - -- Added integration with web auth plugin to support Appwrite OAuth API - -## 0.0.9 - -- Updated deafult params - -## 0.0.8 - -- Fixed compilation error in Client class -- Shorter description for package \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter-dev/LICENSE b/app/sdks/0.6.2/client-flutter-dev/LICENSE deleted file mode 100644 index fc7c051a91..0000000000 --- a/app/sdks/0.6.2/client-flutter-dev/LICENSE +++ /dev/null @@ -1,12 +0,0 @@ -Copyright (c) 2019 Appwrite (https://appwrite.io) and individual contributors. -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - - 3. Neither the name Appwrite nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter-dev/README.md b/app/sdks/0.6.2/client-flutter-dev/README.md deleted file mode 100644 index 2c0ba754c3..0000000000 --- a/app/sdks/0.6.2/client-flutter-dev/README.md +++ /dev/null @@ -1,38 +0,0 @@ -# Appwrite Flutter (Dev Channel) SDK - -[![pub package](https://img.shields.io/pub/v/appwrite.svg)](https://pub.dartlang.org/packages/appwrite) -![License](https://img.shields.io/github/license/appwrite/sdk-for-flutter-dev.svg?v=1) -![Version](https://img.shields.io/badge/api%20version-0.6.2-blue.svg?v=1) - -**This SDK is compatible with Appwrite server version 0.6.2. For older versions, please check previous releases.** - -Appwrite is an open-source backend as a service server that abstract and simplify complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way. - Use the Flutter (Dev Channel) SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools. - For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs) - - - -![Appwrite](https://appwrite.io/images/github.png) - -## Installation - -Add this to your package's `pubspec.yaml` file: - -```yml -dependencies: - appwrite_dev: ^0.3.2 -``` - -You can install packages from the command line: - -```bash -pub get appwrite_dev -``` - -## Contribution - -This library is auto-generated by Appwrite custom [SDK Generator](https://github.com/appwrite/sdk-generator). To learn more about how you can help us improve this SDK, please check the [contribution guide](https://github.com/appwrite/sdk-generator/blob/master/CONTRIBUTING.md) before sending a pull-request. - -## License - -Please see the [BSD-3-Clause license](https://raw.githubusercontent.com/appwrite/appwrite/master/LICENSE) file for more information. \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter-dev/docs/examples/account/create-o-auth2session.md b/app/sdks/0.6.2/client-flutter-dev/docs/examples/account/create-o-auth2session.md deleted file mode 100644 index aae9d5f9a0..0000000000 --- a/app/sdks/0.6.2/client-flutter-dev/docs/examples/account/create-o-auth2session.md +++ /dev/null @@ -1,22 +0,0 @@ -import 'package:appwrite_dev/appwrite_dev.dart'; - -void main() { // Init SDK - Client client = Client(); - Account account = Account(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = account.createOAuth2Session( - provider: 'bitbucket', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter-dev/docs/examples/account/create-recovery.md b/app/sdks/0.6.2/client-flutter-dev/docs/examples/account/create-recovery.md deleted file mode 100644 index 32fe469cff..0000000000 --- a/app/sdks/0.6.2/client-flutter-dev/docs/examples/account/create-recovery.md +++ /dev/null @@ -1,23 +0,0 @@ -import 'package:appwrite_dev/appwrite_dev.dart'; - -void main() { // Init SDK - Client client = Client(); - Account account = Account(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = account.createRecovery( - email: 'email@example.com', - url: 'https://example.com', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter-dev/docs/examples/account/create-session.md b/app/sdks/0.6.2/client-flutter-dev/docs/examples/account/create-session.md deleted file mode 100644 index a5930877f4..0000000000 --- a/app/sdks/0.6.2/client-flutter-dev/docs/examples/account/create-session.md +++ /dev/null @@ -1,23 +0,0 @@ -import 'package:appwrite_dev/appwrite_dev.dart'; - -void main() { // Init SDK - Client client = Client(); - Account account = Account(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = account.createSession( - email: 'email@example.com', - password: 'password', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter-dev/docs/examples/account/create-verification.md b/app/sdks/0.6.2/client-flutter-dev/docs/examples/account/create-verification.md deleted file mode 100644 index 738f22df42..0000000000 --- a/app/sdks/0.6.2/client-flutter-dev/docs/examples/account/create-verification.md +++ /dev/null @@ -1,22 +0,0 @@ -import 'package:appwrite_dev/appwrite_dev.dart'; - -void main() { // Init SDK - Client client = Client(); - Account account = Account(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = account.createVerification( - url: 'https://example.com', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter-dev/docs/examples/account/create.md b/app/sdks/0.6.2/client-flutter-dev/docs/examples/account/create.md deleted file mode 100644 index 1f92976c39..0000000000 --- a/app/sdks/0.6.2/client-flutter-dev/docs/examples/account/create.md +++ /dev/null @@ -1,23 +0,0 @@ -import 'package:appwrite_dev/appwrite_dev.dart'; - -void main() { // Init SDK - Client client = Client(); - Account account = Account(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = account.create( - email: 'email@example.com', - password: 'password', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter-dev/docs/examples/account/delete-session.md b/app/sdks/0.6.2/client-flutter-dev/docs/examples/account/delete-session.md deleted file mode 100644 index 95b3641387..0000000000 --- a/app/sdks/0.6.2/client-flutter-dev/docs/examples/account/delete-session.md +++ /dev/null @@ -1,22 +0,0 @@ -import 'package:appwrite_dev/appwrite_dev.dart'; - -void main() { // Init SDK - Client client = Client(); - Account account = Account(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = account.deleteSession( - sessionId: '[SESSION_ID]', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter-dev/docs/examples/account/delete-sessions.md b/app/sdks/0.6.2/client-flutter-dev/docs/examples/account/delete-sessions.md deleted file mode 100644 index b9cbb46fd2..0000000000 --- a/app/sdks/0.6.2/client-flutter-dev/docs/examples/account/delete-sessions.md +++ /dev/null @@ -1,20 +0,0 @@ -import 'package:appwrite_dev/appwrite_dev.dart'; - -void main() { // Init SDK - Client client = Client(); - Account account = Account(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = account.deleteSessions( ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter-dev/docs/examples/account/delete.md b/app/sdks/0.6.2/client-flutter-dev/docs/examples/account/delete.md deleted file mode 100644 index 8c99b2ac61..0000000000 --- a/app/sdks/0.6.2/client-flutter-dev/docs/examples/account/delete.md +++ /dev/null @@ -1,20 +0,0 @@ -import 'package:appwrite_dev/appwrite_dev.dart'; - -void main() { // Init SDK - Client client = Client(); - Account account = Account(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = account.delete( ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter-dev/docs/examples/account/get-logs.md b/app/sdks/0.6.2/client-flutter-dev/docs/examples/account/get-logs.md deleted file mode 100644 index 2ed66d88ce..0000000000 --- a/app/sdks/0.6.2/client-flutter-dev/docs/examples/account/get-logs.md +++ /dev/null @@ -1,20 +0,0 @@ -import 'package:appwrite_dev/appwrite_dev.dart'; - -void main() { // Init SDK - Client client = Client(); - Account account = Account(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = account.getLogs( ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter-dev/docs/examples/account/get-prefs.md b/app/sdks/0.6.2/client-flutter-dev/docs/examples/account/get-prefs.md deleted file mode 100644 index 961a24dc19..0000000000 --- a/app/sdks/0.6.2/client-flutter-dev/docs/examples/account/get-prefs.md +++ /dev/null @@ -1,20 +0,0 @@ -import 'package:appwrite_dev/appwrite_dev.dart'; - -void main() { // Init SDK - Client client = Client(); - Account account = Account(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = account.getPrefs( ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter-dev/docs/examples/account/get-sessions.md b/app/sdks/0.6.2/client-flutter-dev/docs/examples/account/get-sessions.md deleted file mode 100644 index 76a566b959..0000000000 --- a/app/sdks/0.6.2/client-flutter-dev/docs/examples/account/get-sessions.md +++ /dev/null @@ -1,20 +0,0 @@ -import 'package:appwrite_dev/appwrite_dev.dart'; - -void main() { // Init SDK - Client client = Client(); - Account account = Account(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = account.getSessions( ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter-dev/docs/examples/account/get.md b/app/sdks/0.6.2/client-flutter-dev/docs/examples/account/get.md deleted file mode 100644 index cd05062a69..0000000000 --- a/app/sdks/0.6.2/client-flutter-dev/docs/examples/account/get.md +++ /dev/null @@ -1,20 +0,0 @@ -import 'package:appwrite_dev/appwrite_dev.dart'; - -void main() { // Init SDK - Client client = Client(); - Account account = Account(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = account.get( ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter-dev/docs/examples/account/update-email.md b/app/sdks/0.6.2/client-flutter-dev/docs/examples/account/update-email.md deleted file mode 100644 index 9fc86a7aae..0000000000 --- a/app/sdks/0.6.2/client-flutter-dev/docs/examples/account/update-email.md +++ /dev/null @@ -1,23 +0,0 @@ -import 'package:appwrite_dev/appwrite_dev.dart'; - -void main() { // Init SDK - Client client = Client(); - Account account = Account(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = account.updateEmail( - email: 'email@example.com', - password: 'password', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter-dev/docs/examples/account/update-name.md b/app/sdks/0.6.2/client-flutter-dev/docs/examples/account/update-name.md deleted file mode 100644 index e5e218a515..0000000000 --- a/app/sdks/0.6.2/client-flutter-dev/docs/examples/account/update-name.md +++ /dev/null @@ -1,22 +0,0 @@ -import 'package:appwrite_dev/appwrite_dev.dart'; - -void main() { // Init SDK - Client client = Client(); - Account account = Account(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = account.updateName( - name: '[NAME]', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter-dev/docs/examples/account/update-password.md b/app/sdks/0.6.2/client-flutter-dev/docs/examples/account/update-password.md deleted file mode 100644 index 869b4d9a30..0000000000 --- a/app/sdks/0.6.2/client-flutter-dev/docs/examples/account/update-password.md +++ /dev/null @@ -1,23 +0,0 @@ -import 'package:appwrite_dev/appwrite_dev.dart'; - -void main() { // Init SDK - Client client = Client(); - Account account = Account(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = account.updatePassword( - password: 'password', - oldPassword: 'password', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter-dev/docs/examples/account/update-prefs.md b/app/sdks/0.6.2/client-flutter-dev/docs/examples/account/update-prefs.md deleted file mode 100644 index 0d50469742..0000000000 --- a/app/sdks/0.6.2/client-flutter-dev/docs/examples/account/update-prefs.md +++ /dev/null @@ -1,22 +0,0 @@ -import 'package:appwrite_dev/appwrite_dev.dart'; - -void main() { // Init SDK - Client client = Client(); - Account account = Account(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = account.updatePrefs( - prefs: {}, - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter-dev/docs/examples/account/update-recovery.md b/app/sdks/0.6.2/client-flutter-dev/docs/examples/account/update-recovery.md deleted file mode 100644 index e028e60a7d..0000000000 --- a/app/sdks/0.6.2/client-flutter-dev/docs/examples/account/update-recovery.md +++ /dev/null @@ -1,25 +0,0 @@ -import 'package:appwrite_dev/appwrite_dev.dart'; - -void main() { // Init SDK - Client client = Client(); - Account account = Account(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = account.updateRecovery( - userId: '[USER_ID]', - secret: '[SECRET]', - password: 'password', - passwordAgain: 'password', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter-dev/docs/examples/account/update-verification.md b/app/sdks/0.6.2/client-flutter-dev/docs/examples/account/update-verification.md deleted file mode 100644 index 48d669efcc..0000000000 --- a/app/sdks/0.6.2/client-flutter-dev/docs/examples/account/update-verification.md +++ /dev/null @@ -1,23 +0,0 @@ -import 'package:appwrite_dev/appwrite_dev.dart'; - -void main() { // Init SDK - Client client = Client(); - Account account = Account(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = account.updateVerification( - userId: '[USER_ID]', - secret: '[SECRET]', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter-dev/docs/examples/avatars/get-browser.md b/app/sdks/0.6.2/client-flutter-dev/docs/examples/avatars/get-browser.md deleted file mode 100644 index dec7863b1f..0000000000 --- a/app/sdks/0.6.2/client-flutter-dev/docs/examples/avatars/get-browser.md +++ /dev/null @@ -1,17 +0,0 @@ -import 'package:appwrite_dev/appwrite_dev.dart'; - -void main() { // Init SDK - Client client = Client(); - Avatars avatars = Avatars(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - String result = avatars.getBrowser( - code: 'aa', - ); - - print(result); // Resource URL string -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter-dev/docs/examples/avatars/get-credit-card.md b/app/sdks/0.6.2/client-flutter-dev/docs/examples/avatars/get-credit-card.md deleted file mode 100644 index e2746c4999..0000000000 --- a/app/sdks/0.6.2/client-flutter-dev/docs/examples/avatars/get-credit-card.md +++ /dev/null @@ -1,17 +0,0 @@ -import 'package:appwrite_dev/appwrite_dev.dart'; - -void main() { // Init SDK - Client client = Client(); - Avatars avatars = Avatars(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - String result = avatars.getCreditCard( - code: 'amex', - ); - - print(result); // Resource URL string -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter-dev/docs/examples/avatars/get-favicon.md b/app/sdks/0.6.2/client-flutter-dev/docs/examples/avatars/get-favicon.md deleted file mode 100644 index 1c56335b9f..0000000000 --- a/app/sdks/0.6.2/client-flutter-dev/docs/examples/avatars/get-favicon.md +++ /dev/null @@ -1,17 +0,0 @@ -import 'package:appwrite_dev/appwrite_dev.dart'; - -void main() { // Init SDK - Client client = Client(); - Avatars avatars = Avatars(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - String result = avatars.getFavicon( - url: 'https://example.com', - ); - - print(result); // Resource URL string -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter-dev/docs/examples/avatars/get-flag.md b/app/sdks/0.6.2/client-flutter-dev/docs/examples/avatars/get-flag.md deleted file mode 100644 index 8a91f608ce..0000000000 --- a/app/sdks/0.6.2/client-flutter-dev/docs/examples/avatars/get-flag.md +++ /dev/null @@ -1,17 +0,0 @@ -import 'package:appwrite_dev/appwrite_dev.dart'; - -void main() { // Init SDK - Client client = Client(); - Avatars avatars = Avatars(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - String result = avatars.getFlag( - code: 'af', - ); - - print(result); // Resource URL string -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter-dev/docs/examples/avatars/get-image.md b/app/sdks/0.6.2/client-flutter-dev/docs/examples/avatars/get-image.md deleted file mode 100644 index a2cbea98e3..0000000000 --- a/app/sdks/0.6.2/client-flutter-dev/docs/examples/avatars/get-image.md +++ /dev/null @@ -1,17 +0,0 @@ -import 'package:appwrite_dev/appwrite_dev.dart'; - -void main() { // Init SDK - Client client = Client(); - Avatars avatars = Avatars(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - String result = avatars.getImage( - url: 'https://example.com', - ); - - print(result); // Resource URL string -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter-dev/docs/examples/avatars/get-q-r.md b/app/sdks/0.6.2/client-flutter-dev/docs/examples/avatars/get-q-r.md deleted file mode 100644 index 2737297082..0000000000 --- a/app/sdks/0.6.2/client-flutter-dev/docs/examples/avatars/get-q-r.md +++ /dev/null @@ -1,17 +0,0 @@ -import 'package:appwrite_dev/appwrite_dev.dart'; - -void main() { // Init SDK - Client client = Client(); - Avatars avatars = Avatars(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - String result = avatars.getQR( - text: '[TEXT]', - ); - - print(result); // Resource URL string -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter-dev/docs/examples/database/create-document.md b/app/sdks/0.6.2/client-flutter-dev/docs/examples/database/create-document.md deleted file mode 100644 index 6fc27bdfbb..0000000000 --- a/app/sdks/0.6.2/client-flutter-dev/docs/examples/database/create-document.md +++ /dev/null @@ -1,25 +0,0 @@ -import 'package:appwrite_dev/appwrite_dev.dart'; - -void main() { // Init SDK - Client client = Client(); - Database database = Database(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = database.createDocument( - collectionId: '[COLLECTION_ID]', - data: {}, - read: [], - write: [], - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter-dev/docs/examples/database/delete-document.md b/app/sdks/0.6.2/client-flutter-dev/docs/examples/database/delete-document.md deleted file mode 100644 index 74bcd69d9a..0000000000 --- a/app/sdks/0.6.2/client-flutter-dev/docs/examples/database/delete-document.md +++ /dev/null @@ -1,23 +0,0 @@ -import 'package:appwrite_dev/appwrite_dev.dart'; - -void main() { // Init SDK - Client client = Client(); - Database database = Database(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = database.deleteDocument( - collectionId: '[COLLECTION_ID]', - documentId: '[DOCUMENT_ID]', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter-dev/docs/examples/database/get-document.md b/app/sdks/0.6.2/client-flutter-dev/docs/examples/database/get-document.md deleted file mode 100644 index 639209ed3c..0000000000 --- a/app/sdks/0.6.2/client-flutter-dev/docs/examples/database/get-document.md +++ /dev/null @@ -1,23 +0,0 @@ -import 'package:appwrite_dev/appwrite_dev.dart'; - -void main() { // Init SDK - Client client = Client(); - Database database = Database(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = database.getDocument( - collectionId: '[COLLECTION_ID]', - documentId: '[DOCUMENT_ID]', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter-dev/docs/examples/database/list-documents.md b/app/sdks/0.6.2/client-flutter-dev/docs/examples/database/list-documents.md deleted file mode 100644 index 41eac5dd9a..0000000000 --- a/app/sdks/0.6.2/client-flutter-dev/docs/examples/database/list-documents.md +++ /dev/null @@ -1,22 +0,0 @@ -import 'package:appwrite_dev/appwrite_dev.dart'; - -void main() { // Init SDK - Client client = Client(); - Database database = Database(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = database.listDocuments( - collectionId: '[COLLECTION_ID]', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter-dev/docs/examples/database/update-document.md b/app/sdks/0.6.2/client-flutter-dev/docs/examples/database/update-document.md deleted file mode 100644 index 0b153b1595..0000000000 --- a/app/sdks/0.6.2/client-flutter-dev/docs/examples/database/update-document.md +++ /dev/null @@ -1,26 +0,0 @@ -import 'package:appwrite_dev/appwrite_dev.dart'; - -void main() { // Init SDK - Client client = Client(); - Database database = Database(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = database.updateDocument( - collectionId: '[COLLECTION_ID]', - documentId: '[DOCUMENT_ID]', - data: {}, - read: [], - write: [], - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter-dev/docs/examples/locale/get-continents.md b/app/sdks/0.6.2/client-flutter-dev/docs/examples/locale/get-continents.md deleted file mode 100644 index 2c6bd7389f..0000000000 --- a/app/sdks/0.6.2/client-flutter-dev/docs/examples/locale/get-continents.md +++ /dev/null @@ -1,20 +0,0 @@ -import 'package:appwrite_dev/appwrite_dev.dart'; - -void main() { // Init SDK - Client client = Client(); - Locale locale = Locale(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = locale.getContinents( ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter-dev/docs/examples/locale/get-countries-e-u.md b/app/sdks/0.6.2/client-flutter-dev/docs/examples/locale/get-countries-e-u.md deleted file mode 100644 index 443fb2d115..0000000000 --- a/app/sdks/0.6.2/client-flutter-dev/docs/examples/locale/get-countries-e-u.md +++ /dev/null @@ -1,20 +0,0 @@ -import 'package:appwrite_dev/appwrite_dev.dart'; - -void main() { // Init SDK - Client client = Client(); - Locale locale = Locale(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = locale.getCountriesEU( ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter-dev/docs/examples/locale/get-countries-phones.md b/app/sdks/0.6.2/client-flutter-dev/docs/examples/locale/get-countries-phones.md deleted file mode 100644 index e08e2bca47..0000000000 --- a/app/sdks/0.6.2/client-flutter-dev/docs/examples/locale/get-countries-phones.md +++ /dev/null @@ -1,20 +0,0 @@ -import 'package:appwrite_dev/appwrite_dev.dart'; - -void main() { // Init SDK - Client client = Client(); - Locale locale = Locale(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = locale.getCountriesPhones( ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter-dev/docs/examples/locale/get-countries.md b/app/sdks/0.6.2/client-flutter-dev/docs/examples/locale/get-countries.md deleted file mode 100644 index a64a23c666..0000000000 --- a/app/sdks/0.6.2/client-flutter-dev/docs/examples/locale/get-countries.md +++ /dev/null @@ -1,20 +0,0 @@ -import 'package:appwrite_dev/appwrite_dev.dart'; - -void main() { // Init SDK - Client client = Client(); - Locale locale = Locale(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = locale.getCountries( ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter-dev/docs/examples/locale/get-currencies.md b/app/sdks/0.6.2/client-flutter-dev/docs/examples/locale/get-currencies.md deleted file mode 100644 index e086245ffd..0000000000 --- a/app/sdks/0.6.2/client-flutter-dev/docs/examples/locale/get-currencies.md +++ /dev/null @@ -1,20 +0,0 @@ -import 'package:appwrite_dev/appwrite_dev.dart'; - -void main() { // Init SDK - Client client = Client(); - Locale locale = Locale(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = locale.getCurrencies( ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter-dev/docs/examples/locale/get.md b/app/sdks/0.6.2/client-flutter-dev/docs/examples/locale/get.md deleted file mode 100644 index 5cb8ae176e..0000000000 --- a/app/sdks/0.6.2/client-flutter-dev/docs/examples/locale/get.md +++ /dev/null @@ -1,20 +0,0 @@ -import 'package:appwrite_dev/appwrite_dev.dart'; - -void main() { // Init SDK - Client client = Client(); - Locale locale = Locale(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = locale.get( ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter-dev/docs/examples/storage/create-file.md b/app/sdks/0.6.2/client-flutter-dev/docs/examples/storage/create-file.md deleted file mode 100644 index d824bd5831..0000000000 --- a/app/sdks/0.6.2/client-flutter-dev/docs/examples/storage/create-file.md +++ /dev/null @@ -1,25 +0,0 @@ -import 'dart:io'; -import 'package:appwrite_dev/appwrite_dev.dart'; - -void main() { // Init SDK - Client client = Client(); - Storage storage = Storage(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = storage.createFile( - file: await MultipartFile.fromFile('./path-to-files/image.jpg', 'image.jpg'), - read: [], - write: [], - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter-dev/docs/examples/storage/delete-file.md b/app/sdks/0.6.2/client-flutter-dev/docs/examples/storage/delete-file.md deleted file mode 100644 index 88e7b8815c..0000000000 --- a/app/sdks/0.6.2/client-flutter-dev/docs/examples/storage/delete-file.md +++ /dev/null @@ -1,22 +0,0 @@ -import 'package:appwrite_dev/appwrite_dev.dart'; - -void main() { // Init SDK - Client client = Client(); - Storage storage = Storage(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = storage.deleteFile( - fileId: '[FILE_ID]', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter-dev/docs/examples/storage/get-file-download.md b/app/sdks/0.6.2/client-flutter-dev/docs/examples/storage/get-file-download.md deleted file mode 100644 index 483340e24a..0000000000 --- a/app/sdks/0.6.2/client-flutter-dev/docs/examples/storage/get-file-download.md +++ /dev/null @@ -1,17 +0,0 @@ -import 'package:appwrite_dev/appwrite_dev.dart'; - -void main() { // Init SDK - Client client = Client(); - Storage storage = Storage(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - String result = storage.getFileDownload( - fileId: '[FILE_ID]', - ); - - print(result); // Resource URL string -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter-dev/docs/examples/storage/get-file-preview.md b/app/sdks/0.6.2/client-flutter-dev/docs/examples/storage/get-file-preview.md deleted file mode 100644 index dd8d924fe7..0000000000 --- a/app/sdks/0.6.2/client-flutter-dev/docs/examples/storage/get-file-preview.md +++ /dev/null @@ -1,17 +0,0 @@ -import 'package:appwrite_dev/appwrite_dev.dart'; - -void main() { // Init SDK - Client client = Client(); - Storage storage = Storage(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - String result = storage.getFilePreview( - fileId: '[FILE_ID]', - ); - - print(result); // Resource URL string -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter-dev/docs/examples/storage/get-file-view.md b/app/sdks/0.6.2/client-flutter-dev/docs/examples/storage/get-file-view.md deleted file mode 100644 index 8ed6a946e0..0000000000 --- a/app/sdks/0.6.2/client-flutter-dev/docs/examples/storage/get-file-view.md +++ /dev/null @@ -1,17 +0,0 @@ -import 'package:appwrite_dev/appwrite_dev.dart'; - -void main() { // Init SDK - Client client = Client(); - Storage storage = Storage(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - String result = storage.getFileView( - fileId: '[FILE_ID]', - ); - - print(result); // Resource URL string -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter-dev/docs/examples/storage/get-file.md b/app/sdks/0.6.2/client-flutter-dev/docs/examples/storage/get-file.md deleted file mode 100644 index 4e398f88fd..0000000000 --- a/app/sdks/0.6.2/client-flutter-dev/docs/examples/storage/get-file.md +++ /dev/null @@ -1,22 +0,0 @@ -import 'package:appwrite_dev/appwrite_dev.dart'; - -void main() { // Init SDK - Client client = Client(); - Storage storage = Storage(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = storage.getFile( - fileId: '[FILE_ID]', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter-dev/docs/examples/storage/list-files.md b/app/sdks/0.6.2/client-flutter-dev/docs/examples/storage/list-files.md deleted file mode 100644 index d72ba29e03..0000000000 --- a/app/sdks/0.6.2/client-flutter-dev/docs/examples/storage/list-files.md +++ /dev/null @@ -1,21 +0,0 @@ -import 'package:appwrite_dev/appwrite_dev.dart'; - -void main() { // Init SDK - Client client = Client(); - Storage storage = Storage(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = storage.listFiles( - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter-dev/docs/examples/storage/update-file.md b/app/sdks/0.6.2/client-flutter-dev/docs/examples/storage/update-file.md deleted file mode 100644 index 95e213ddc2..0000000000 --- a/app/sdks/0.6.2/client-flutter-dev/docs/examples/storage/update-file.md +++ /dev/null @@ -1,24 +0,0 @@ -import 'package:appwrite_dev/appwrite_dev.dart'; - -void main() { // Init SDK - Client client = Client(); - Storage storage = Storage(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = storage.updateFile( - fileId: '[FILE_ID]', - read: [], - write: [], - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter-dev/docs/examples/teams/create-membership.md b/app/sdks/0.6.2/client-flutter-dev/docs/examples/teams/create-membership.md deleted file mode 100644 index 31bf7ec1af..0000000000 --- a/app/sdks/0.6.2/client-flutter-dev/docs/examples/teams/create-membership.md +++ /dev/null @@ -1,25 +0,0 @@ -import 'package:appwrite_dev/appwrite_dev.dart'; - -void main() { // Init SDK - Client client = Client(); - Teams teams = Teams(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = teams.createMembership( - teamId: '[TEAM_ID]', - email: 'email@example.com', - roles: [], - url: 'https://example.com', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter-dev/docs/examples/teams/create.md b/app/sdks/0.6.2/client-flutter-dev/docs/examples/teams/create.md deleted file mode 100644 index e50279de01..0000000000 --- a/app/sdks/0.6.2/client-flutter-dev/docs/examples/teams/create.md +++ /dev/null @@ -1,22 +0,0 @@ -import 'package:appwrite_dev/appwrite_dev.dart'; - -void main() { // Init SDK - Client client = Client(); - Teams teams = Teams(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = teams.create( - name: '[NAME]', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter-dev/docs/examples/teams/delete-membership.md b/app/sdks/0.6.2/client-flutter-dev/docs/examples/teams/delete-membership.md deleted file mode 100644 index 015507d3a2..0000000000 --- a/app/sdks/0.6.2/client-flutter-dev/docs/examples/teams/delete-membership.md +++ /dev/null @@ -1,23 +0,0 @@ -import 'package:appwrite_dev/appwrite_dev.dart'; - -void main() { // Init SDK - Client client = Client(); - Teams teams = Teams(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = teams.deleteMembership( - teamId: '[TEAM_ID]', - inviteId: '[INVITE_ID]', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter-dev/docs/examples/teams/delete.md b/app/sdks/0.6.2/client-flutter-dev/docs/examples/teams/delete.md deleted file mode 100644 index 6cc1367f9b..0000000000 --- a/app/sdks/0.6.2/client-flutter-dev/docs/examples/teams/delete.md +++ /dev/null @@ -1,22 +0,0 @@ -import 'package:appwrite_dev/appwrite_dev.dart'; - -void main() { // Init SDK - Client client = Client(); - Teams teams = Teams(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = teams.delete( - teamId: '[TEAM_ID]', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter-dev/docs/examples/teams/get-memberships.md b/app/sdks/0.6.2/client-flutter-dev/docs/examples/teams/get-memberships.md deleted file mode 100644 index d427c9ac47..0000000000 --- a/app/sdks/0.6.2/client-flutter-dev/docs/examples/teams/get-memberships.md +++ /dev/null @@ -1,22 +0,0 @@ -import 'package:appwrite_dev/appwrite_dev.dart'; - -void main() { // Init SDK - Client client = Client(); - Teams teams = Teams(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = teams.getMemberships( - teamId: '[TEAM_ID]', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter-dev/docs/examples/teams/get.md b/app/sdks/0.6.2/client-flutter-dev/docs/examples/teams/get.md deleted file mode 100644 index 1bca70a23f..0000000000 --- a/app/sdks/0.6.2/client-flutter-dev/docs/examples/teams/get.md +++ /dev/null @@ -1,22 +0,0 @@ -import 'package:appwrite_dev/appwrite_dev.dart'; - -void main() { // Init SDK - Client client = Client(); - Teams teams = Teams(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = teams.get( - teamId: '[TEAM_ID]', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter-dev/docs/examples/teams/list.md b/app/sdks/0.6.2/client-flutter-dev/docs/examples/teams/list.md deleted file mode 100644 index c56e7a5dd5..0000000000 --- a/app/sdks/0.6.2/client-flutter-dev/docs/examples/teams/list.md +++ /dev/null @@ -1,21 +0,0 @@ -import 'package:appwrite_dev/appwrite_dev.dart'; - -void main() { // Init SDK - Client client = Client(); - Teams teams = Teams(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = teams.list( - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter-dev/docs/examples/teams/update-membership-status.md b/app/sdks/0.6.2/client-flutter-dev/docs/examples/teams/update-membership-status.md deleted file mode 100644 index 6098b38ed9..0000000000 --- a/app/sdks/0.6.2/client-flutter-dev/docs/examples/teams/update-membership-status.md +++ /dev/null @@ -1,25 +0,0 @@ -import 'package:appwrite_dev/appwrite_dev.dart'; - -void main() { // Init SDK - Client client = Client(); - Teams teams = Teams(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = teams.updateMembershipStatus( - teamId: '[TEAM_ID]', - inviteId: '[INVITE_ID]', - userId: '[USER_ID]', - secret: '[SECRET]', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter-dev/docs/examples/teams/update.md b/app/sdks/0.6.2/client-flutter-dev/docs/examples/teams/update.md deleted file mode 100644 index 2494f408d9..0000000000 --- a/app/sdks/0.6.2/client-flutter-dev/docs/examples/teams/update.md +++ /dev/null @@ -1,23 +0,0 @@ -import 'package:appwrite_dev/appwrite_dev.dart'; - -void main() { // Init SDK - Client client = Client(); - Teams teams = Teams(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = teams.update( - teamId: '[TEAM_ID]', - name: '[NAME]', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter-dev/example/README.md b/app/sdks/0.6.2/client-flutter-dev/example/README.md deleted file mode 100644 index f6768a5f85..0000000000 --- a/app/sdks/0.6.2/client-flutter-dev/example/README.md +++ /dev/null @@ -1,55 +0,0 @@ -# Examples - -Init your Appwrite client: - -```dart - Client client = Client(); - - client - .setEndpoint('https://localhost/v1') // Your Appwrite Endpoint - .setProject('5e8cf4f46b5e8') // Your project ID - .setSelfSigned() // Remove in production - ; - -``` - -Create a new user and session: - -```dart -Account account = Account(client); - -Response user = await account.create(email: 'me@appwrite.io', password: 'password', name: 'My Name'); - -Response session = await account.createSession(email: 'me@appwrite.io', password: 'password'); - -``` - -Fetch user profile: - -```dart -Account account = Account(client); - -Response profile = await account.get(); -``` - -Upload File: - -```dart -Storage storage = Storage(client); - -MultipartFile file = MultipartFile.fromFile('./path-to-file/image.jpg', filename: 'image.jpg'); - -storage.createFile( - file: file, - read: ['*'], - write: [] -) -.then((response) { - print(response); // File uploaded! -}) -.catchError((error) { - print(error.response); -}); -``` - -All examples and API features are available at the [official Appwrite docs](https://appwrite.io/docs) \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter-dev/lib/appwrite.dart b/app/sdks/0.6.2/client-flutter-dev/lib/appwrite.dart deleted file mode 100644 index 95d0b72cfe..0000000000 --- a/app/sdks/0.6.2/client-flutter-dev/lib/appwrite.dart +++ /dev/null @@ -1,10 +0,0 @@ -export 'package:dio/dio.dart' show Response; - -export 'client.dart'; -export 'enums.dart'; -export 'services/account.dart'; -export 'services/avatars.dart'; -export 'services/database.dart'; -export 'services/locale.dart'; -export 'services/storage.dart'; -export 'services/teams.dart'; diff --git a/app/sdks/0.6.2/client-flutter-dev/lib/appwrite_dev.dart b/app/sdks/0.6.2/client-flutter-dev/lib/appwrite_dev.dart deleted file mode 100644 index 95d0b72cfe..0000000000 --- a/app/sdks/0.6.2/client-flutter-dev/lib/appwrite_dev.dart +++ /dev/null @@ -1,10 +0,0 @@ -export 'package:dio/dio.dart' show Response; - -export 'client.dart'; -export 'enums.dart'; -export 'services/account.dart'; -export 'services/avatars.dart'; -export 'services/database.dart'; -export 'services/locale.dart'; -export 'services/storage.dart'; -export 'services/teams.dart'; diff --git a/app/sdks/0.6.2/client-flutter-dev/lib/client.dart b/app/sdks/0.6.2/client-flutter-dev/lib/client.dart deleted file mode 100644 index a5583fcd00..0000000000 --- a/app/sdks/0.6.2/client-flutter-dev/lib/client.dart +++ /dev/null @@ -1,134 +0,0 @@ -import 'dart:io'; - -import 'package:dio/dio.dart'; -import 'package:flutter/foundation.dart'; -import 'package:dio/adapter.dart'; -import 'package:dio_cookie_manager/dio_cookie_manager.dart'; -import 'package:cookie_jar/cookie_jar.dart'; -import 'package:path_provider/path_provider.dart'; -import 'package:package_info/package_info.dart'; - -import 'enums.dart'; - -class Client { - String endPoint; - String type = 'unknown'; - Map headers; - Map config; - bool selfSigned; - bool initialized = false; - Dio http; - PersistCookieJar cookieJar; - - Client({this.endPoint = 'https://appwrite.io/v1', this.selfSigned = false, Dio http}) : this.http = http ?? Dio() { - // Platform is not supported in web so if web, set type to web automatically and skip Platform check - if(kIsWeb) { - type = 'web'; - }else{ - type = (Platform.isIOS) ? 'ios' : type; - type = (Platform.isMacOS) ? 'macos' : type; - type = (Platform.isAndroid) ? 'android' : type; - type = (Platform.isLinux) ? 'linux' : type; - type = (Platform.isWindows) ? 'windows' : type; - type = (Platform.isFuchsia) ? 'fuchsia' : type; - } - - this.headers = { - 'content-type': 'application/json', - 'x-sdk-version': 'appwrite:flutter:0.3.2', - }; - - this.config = {}; - - assert(endPoint.startsWith(RegExp("http://|https://")), "endPoint $endPoint must start with 'http'"); - } - - Future _getCookiePath() async { - final directory = await getApplicationDocumentsDirectory(); - final path = directory.path; - final Directory dir = new Directory('$path/cookies'); - await dir.create(); - return dir; - } - - /// Your project ID - Client setProject(value) { - config['project'] = value; - addHeader('X-Appwrite-Project', value); - return this; - } - - Client setLocale(value) { - config['locale'] = value; - addHeader('X-Appwrite-Locale', value); - return this; - } - - Client setSelfSigned({bool status = true}) { - selfSigned = status; - return this; - } - - Client setEndpoint(String endPoint) { - this.endPoint = endPoint; - this.http.options.baseUrl = this.endPoint; - return this; - } - - Client addHeader(String key, String value) { - headers[key] = value; - - return this; - } - - Future init() async { - if(!initialized) { - // if web skip cookie implementation and origin header as those are automatically handled by browsers - if(!kIsWeb) { - final Directory cookieDir = await _getCookiePath(); - cookieJar = new PersistCookieJar(dir:cookieDir.path); - this.http.interceptors.add(CookieManager(cookieJar)); - PackageInfo packageInfo = await PackageInfo.fromPlatform(); - addHeader('Origin', 'appwrite-' + type + '://' + packageInfo.packageName); - }else{ - // if web set httpClientAdapter as BrowserHttpClientAdapter with withCredentials true to make cookies work - this.http.options.extra['withCredentials'] = true; - } - - this.http.options.baseUrl = this.endPoint; - this.http.options.validateStatus = (status) => status < 400; - } - } - - Future call(HttpMethod method, {String path = '', Map headers = const {}, Map params = const {}}) async { - if(selfSigned) { - // Allow self signed requests - (http.httpClientAdapter as DefaultHttpClientAdapter).onHttpClientCreate = (HttpClient client) { - client.badCertificateCallback = (X509Certificate cert, String host, int port) => true; - return client; - }; - } - - await this.init(); - - // Origin is hardcoded for testing - Options options = Options( - headers: {...this.headers, ...headers}, - method: method.name(), - ); - - if(headers['content-type'] == 'multipart/form-data') { - return http.request(path, data: FormData.fromMap(params), options: options); - } - - if (method == HttpMethod.get) { - params.keys.forEach((key) {if (params[key] is int || params[key] is double) { - params[key] = params[key].toString(); - }}); - - return http.get(path, queryParameters: params, options: options); - } else { - return http.request(path, data: params, options: options); - } - } -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter-dev/lib/enums.dart b/app/sdks/0.6.2/client-flutter-dev/lib/enums.dart deleted file mode 100644 index 2757f6073e..0000000000 --- a/app/sdks/0.6.2/client-flutter-dev/lib/enums.dart +++ /dev/null @@ -1,15 +0,0 @@ -enum HttpMethod { get, post, put, delete, patch } - -extension HttpMethodString on HttpMethod { - String name() { - return this.toString().split('.').last.toUpperCase(); - } -} - -enum OrderType { asc, desc } - -extension OrderTypeString on OrderType { - String name() { - return this.toString().split('.').last.toUpperCase(); - } -} diff --git a/app/sdks/0.6.2/client-flutter-dev/lib/service.dart b/app/sdks/0.6.2/client-flutter-dev/lib/service.dart deleted file mode 100644 index 1ae319b705..0000000000 --- a/app/sdks/0.6.2/client-flutter-dev/lib/service.dart +++ /dev/null @@ -1,7 +0,0 @@ -import 'client.dart'; - -class Service { - final Client client; - - const Service(this.client); -} diff --git a/app/sdks/0.6.2/client-flutter-dev/lib/services/account.dart b/app/sdks/0.6.2/client-flutter-dev/lib/services/account.dart deleted file mode 100644 index 02fc33400e..0000000000 --- a/app/sdks/0.6.2/client-flutter-dev/lib/services/account.dart +++ /dev/null @@ -1,424 +0,0 @@ - -import 'dart:io'; - -import 'package:dio/dio.dart'; -import 'package:meta/meta.dart'; -import 'package:flutter_web_auth/flutter_web_auth.dart'; - -import "../client.dart"; -import '../enums.dart'; -import "../service.dart"; - -class Account extends Service { - Account(Client client): super(client); - - /// Get Account - /// - /// Get currently logged in user data as JSON object. - /// - Future get() { - final String path = '/account'; - - final Map params = { - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.get, path: path, params: params, headers: headers); - } - - /// Create Account - /// - /// Use this endpoint to allow a new user to register a new account in your - /// project. After the user registration completes successfully, you can use - /// the [/account/verfication](/docs/client/account#createVerification) route - /// to start verifying the user email address. To allow your new user to login - /// to his new account, you need to create a new [account - /// session](/docs/client/account#createSession). - /// - Future create({@required String email, @required String password, String name = ''}) { - final String path = '/account'; - - final Map params = { - 'email': email, - 'password': password, - 'name': name, - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.post, path: path, params: params, headers: headers); - } - - /// Delete Account - /// - /// Delete a currently logged in user account. Behind the scene, the user - /// record is not deleted but permanently blocked from any access. This is done - /// to avoid deleted accounts being overtaken by new users with the same email - /// address. Any user-related resources like documents or storage files should - /// be deleted separately. - /// - Future delete() { - final String path = '/account'; - - final Map params = { - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.delete, path: path, params: params, headers: headers); - } - - /// Update Account Email - /// - /// Update currently logged in user account email address. After changing user - /// address, user confirmation status is being reset and a new confirmation - /// mail is sent. For security measures, user password is required to complete - /// this request. - /// - Future updateEmail({@required String email, @required String password}) { - final String path = '/account/email'; - - final Map params = { - 'email': email, - 'password': password, - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.patch, path: path, params: params, headers: headers); - } - - /// Get Account 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 getLogs() { - final String path = '/account/logs'; - - final Map params = { - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.get, path: path, params: params, headers: headers); - } - - /// Update Account Name - /// - /// Update currently logged in user account name. - /// - Future updateName({@required String name}) { - final String path = '/account/name'; - - final Map params = { - 'name': name, - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.patch, path: path, params: params, headers: headers); - } - - /// Update Account Password - /// - /// Update currently logged in user password. For validation, user is required - /// to pass the password twice. - /// - Future updatePassword({@required String password, @required String oldPassword}) { - final String path = '/account/password'; - - final Map params = { - 'password': password, - 'oldPassword': oldPassword, - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.patch, path: path, params: params, headers: headers); - } - - /// Get Account Preferences - /// - /// Get currently logged in user preferences as a key-value object. - /// - Future getPrefs() { - final String path = '/account/prefs'; - - final Map params = { - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.get, path: path, params: params, headers: headers); - } - - /// Update Account Preferences - /// - /// Update currently logged in user account preferences. You can pass only the - /// specific settings you wish to update. - /// - Future updatePrefs({@required dynamic prefs}) { - final String path = '/account/prefs'; - - final Map params = { - 'prefs': prefs, - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.patch, path: path, params: params, headers: headers); - } - - /// Create Password Recovery - /// - /// Sends the user an email with a temporary secret key for password reset. - /// When the user clicks the confirmation link he is redirected back to your - /// app password reset URL with the secret key and email address values - /// attached to the URL query string. Use the query string params to submit a - /// request to the [PUT /account/recovery](/docs/client/account#updateRecovery) - /// endpoint to complete the process. - /// - Future createRecovery({@required String email, @required String url}) { - final String path = '/account/recovery'; - - final Map params = { - 'email': email, - 'url': url, - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.post, path: path, params: params, headers: headers); - } - - /// Complete Password Recovery - /// - /// Use this endpoint to complete the user account password reset. Both the - /// **userId** and **secret** arguments will be passed as query parameters to - /// the redirect URL you have provided when sending your request to the [POST - /// /account/recovery](/docs/client/account#createRecovery) endpoint. - /// - /// Please note that in order to avoid a [Redirect - /// 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}) { - final String path = '/account/recovery'; - - final Map params = { - 'userId': userId, - 'secret': secret, - 'password': password, - 'passwordAgain': passwordAgain, - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.put, path: path, params: params, headers: headers); - } - - /// Get Account Sessions - /// - /// Get currently logged in user list of active sessions across different - /// devices. - /// - Future getSessions() { - final String path = '/account/sessions'; - - final Map params = { - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.get, path: path, params: params, headers: headers); - } - - /// Create Account Session - /// - /// Allow the user to login into his account by providing a valid email and - /// password combination. This route will create a new session for the user. - /// - Future createSession({@required String email, @required String password}) { - final String path = '/account/sessions'; - - final Map params = { - 'email': email, - 'password': password, - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.post, path: path, params: params, headers: headers); - } - - /// Delete All Account Sessions - /// - /// Delete all sessions from the user account and remove any sessions cookies - /// from the end client. - /// - Future deleteSessions() { - final String path = '/account/sessions'; - - final Map params = { - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.delete, path: path, params: params, headers: headers); - } - - /// Create Account Session with OAuth2 - /// - /// Allow the user to login to his account using the OAuth2 provider of his - /// choice. Each OAuth2 provider should be enabled from the Appwrite console - /// first. Use the success and failure arguments to provide a redirect URL's - /// back to your app when login is completed. - /// - Future createOAuth2Session({@required String provider, String success = 'https://appwrite.io/auth/oauth2/success', String failure = 'https://appwrite.io/auth/oauth2/failure'}) { - final String path = '/account/sessions/oauth2/{provider}'.replaceAll(RegExp('{provider}'), provider); - - final Map params = { - 'success': success, - 'failure': failure, - 'project': client.config['project'], - }; - - - final List query = []; - - params.forEach((key, value) { - if (value is List) { - for (var item in value) { - query.add(Uri.encodeComponent(key + '[]') + '=' + Uri.encodeComponent(item)); - } - } - else { - query.add(Uri.encodeComponent(key) + '=' + Uri.encodeComponent(value)); - } - }); - - Uri endpoint = Uri.parse(client.endPoint); - Uri url = new Uri(scheme: endpoint.scheme, - host: endpoint.host, - port: endpoint.port, - path: endpoint.path + path, - query: query.join('&') - ); - - return FlutterWebAuth.authenticate( - url: url.toString(), - callbackUrlScheme: "appwrite-callback-" + client.config['project'] - ).then((value) async { - Uri url = Uri.parse(value); - Cookie cookie = new Cookie(url.queryParameters['key'], url.queryParameters['secret']); - cookie.domain = Uri.parse(client.endPoint).host; - cookie.httpOnly = true; - cookie.path = '/'; - List cookies = [cookie]; - await client.init(); - client.cookieJar.saveFromResponse(Uri.parse(client.endPoint), cookies); - }); - } - - /// Delete Account Session - /// - /// Use this endpoint to log out the currently logged in user from all his - /// account sessions across all his different devices. When using the option id - /// argument, only the session unique ID provider will be deleted. - /// - Future deleteSession({@required String sessionId}) { - final String path = '/account/sessions/{sessionId}'.replaceAll(RegExp('{sessionId}'), sessionId); - - final Map params = { - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.delete, path: path, params: params, headers: headers); - } - - /// Create Email Verification - /// - /// Use this endpoint to send a verification message to your user email address - /// to confirm they are the valid owners of that address. Both the **userId** - /// and **secret** arguments will be passed as query parameters to the URL you - /// have provider to be attached to the verification email. The provided URL - /// should redirect the user back for your app and allow you to complete the - /// verification process by verifying both the **userId** and **secret** - /// parameters. Learn more about how to [complete the verification - /// process](/docs/client/account#updateAccountVerification). - /// - /// Please note that in order to avoid a [Redirect - /// 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 createVerification({@required String url}) { - final String path = '/account/verification'; - - final Map params = { - 'url': url, - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.post, path: path, params: params, headers: headers); - } - - /// Complete Email Verification - /// - /// 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}) { - final String path = '/account/verification'; - - final Map params = { - 'userId': userId, - 'secret': secret, - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.put, path: path, params: params, headers: headers); - } -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter-dev/lib/services/avatars.dart b/app/sdks/0.6.2/client-flutter-dev/lib/services/avatars.dart deleted file mode 100644 index 828ea7dfb0..0000000000 --- a/app/sdks/0.6.2/client-flutter-dev/lib/services/avatars.dart +++ /dev/null @@ -1,198 +0,0 @@ - - -import 'package:dio/dio.dart'; -import 'package:meta/meta.dart'; - -import "../client.dart"; -import '../enums.dart'; -import "../service.dart"; - -class Avatars extends Service { - Avatars(Client client): super(client); - - /// Get Browser Icon - /// - /// You can use this endpoint to show different browser icons to your users. - /// The code argument receives the browser code as it appears in your user - /// /account/sessions endpoint. Use width, height and quality arguments to - /// change the output settings. - /// - String getBrowser({@required String code, int width = 100, int height = 100, int quality = 100}) { - final String path = '/avatars/browsers/{code}'.replaceAll(RegExp('{code}'), code); - - final Map params = { - 'width': width, - 'height': height, - 'quality': quality, - 'project': client.config['project'], - }; - - params.keys.forEach((key) {if (params[key] is int || params[key] is double) { - params[key] = params[key].toString(); - }}); - - Uri endpoint = Uri.parse(client.endPoint); - Uri location = new Uri(scheme: endpoint.scheme, - host: endpoint.host, - port: endpoint.port, - path: endpoint.path + path, - queryParameters:params, - ); - - return location.toString(); - } - - /// Get Credit Card Icon - /// - /// Need to display your users with your billing method or their payment - /// methods? The credit card endpoint will return you the icon of the credit - /// card provider you need. Use width, height and quality arguments to change - /// the output settings. - /// - String getCreditCard({@required String code, int width = 100, int height = 100, int quality = 100}) { - final String path = '/avatars/credit-cards/{code}'.replaceAll(RegExp('{code}'), code); - - final Map params = { - 'width': width, - 'height': height, - 'quality': quality, - 'project': client.config['project'], - }; - - params.keys.forEach((key) {if (params[key] is int || params[key] is double) { - params[key] = params[key].toString(); - }}); - - Uri endpoint = Uri.parse(client.endPoint); - Uri location = new Uri(scheme: endpoint.scheme, - host: endpoint.host, - port: endpoint.port, - path: endpoint.path + path, - queryParameters:params, - ); - - return location.toString(); - } - - /// Get Favicon - /// - /// Use this endpoint to fetch the favorite icon (AKA favicon) of a any remote - /// website URL. - /// - String getFavicon({@required String url}) { - final String path = '/avatars/favicon'; - - final Map params = { - 'url': url, - 'project': client.config['project'], - }; - - params.keys.forEach((key) {if (params[key] is int || params[key] is double) { - params[key] = params[key].toString(); - }}); - - Uri endpoint = Uri.parse(client.endPoint); - Uri location = new Uri(scheme: endpoint.scheme, - host: endpoint.host, - port: endpoint.port, - path: endpoint.path + path, - queryParameters:params, - ); - - return location.toString(); - } - - /// Get Country Flag - /// - /// You can use this endpoint to show different country flags icons to your - /// users. The code argument receives the 2 letter country code. Use width, - /// height and quality arguments to change the output settings. - /// - String getFlag({@required String code, int width = 100, int height = 100, int quality = 100}) { - final String path = '/avatars/flags/{code}'.replaceAll(RegExp('{code}'), code); - - final Map params = { - 'width': width, - 'height': height, - 'quality': quality, - 'project': client.config['project'], - }; - - params.keys.forEach((key) {if (params[key] is int || params[key] is double) { - params[key] = params[key].toString(); - }}); - - Uri endpoint = Uri.parse(client.endPoint); - Uri location = new Uri(scheme: endpoint.scheme, - host: endpoint.host, - port: endpoint.port, - path: endpoint.path + path, - queryParameters:params, - ); - - return location.toString(); - } - - /// Get Image from URL - /// - /// Use this endpoint to fetch a remote image URL and crop it to any image size - /// you want. This endpoint is very useful if you need to crop and display - /// remote images in your app or in case you want to make sure a 3rd party - /// image is properly served using a TLS protocol. - /// - String getImage({@required String url, int width = 400, int height = 400}) { - final String path = '/avatars/image'; - - final Map params = { - 'url': url, - 'width': width, - 'height': height, - 'project': client.config['project'], - }; - - params.keys.forEach((key) {if (params[key] is int || params[key] is double) { - params[key] = params[key].toString(); - }}); - - Uri endpoint = Uri.parse(client.endPoint); - Uri location = new Uri(scheme: endpoint.scheme, - host: endpoint.host, - port: endpoint.port, - path: endpoint.path + path, - queryParameters:params, - ); - - return location.toString(); - } - - /// 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. - /// - String getQR({@required String text, int size = 400, int margin = 1, int download = 0}) { - final String path = '/avatars/qr'; - - final Map params = { - 'text': text, - 'size': size, - 'margin': margin, - 'download': download, - 'project': client.config['project'], - }; - - params.keys.forEach((key) {if (params[key] is int || params[key] is double) { - params[key] = params[key].toString(); - }}); - - Uri endpoint = Uri.parse(client.endPoint); - Uri location = new Uri(scheme: endpoint.scheme, - host: endpoint.host, - port: endpoint.port, - path: endpoint.path + path, - queryParameters:params, - ); - - return location.toString(); - } -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter-dev/lib/services/database.dart b/app/sdks/0.6.2/client-flutter-dev/lib/services/database.dart deleted file mode 100644 index 88082feef7..0000000000 --- a/app/sdks/0.6.2/client-flutter-dev/lib/services/database.dart +++ /dev/null @@ -1,121 +0,0 @@ - - -import 'package:dio/dio.dart'; -import 'package:meta/meta.dart'; - -import "../client.dart"; -import '../enums.dart'; -import "../service.dart"; - -class Database extends Service { - Database(Client client): super(client); - - /// List Documents - /// - /// Get a list of all the user documents. You can use the query params to - /// filter your results. On admin mode, this endpoint will return a list of all - /// of the project documents. [Learn more about different API - /// modes](/docs/admin). - /// - Future listDocuments({@required String collectionId, List filters = const [], int offset = 0, int limit = 50, String orderField = '\$id', OrderType orderType = OrderType.asc, String orderCast = 'string', String search = '', int first = 0, int last = 0}) { - final String path = '/database/collections/{collectionId}/documents'.replaceAll(RegExp('{collectionId}'), collectionId); - - final Map params = { - 'filters': filters, - 'offset': offset, - 'limit': limit, - 'orderField': orderField, - 'orderType': orderType.name(), - 'orderCast': orderCast, - 'search': search, - 'first': first, - 'last': last, - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.get, path: path, params: params, headers: headers); - } - - /// Create Document - /// - /// Create a new Document. Before using this route, you should create a new - /// collection resource using either a [server - /// integration](/docs/server/database?sdk=nodejs#createCollection) API or - /// directly from your database console. - /// - Future createDocument({@required String collectionId, @required dynamic data, @required List read, @required List write, String parentDocument = '', String parentProperty = '', String parentPropertyType = 'assign'}) { - final String path = '/database/collections/{collectionId}/documents'.replaceAll(RegExp('{collectionId}'), collectionId); - - final Map params = { - 'data': data, - 'read': read, - 'write': write, - 'parentDocument': parentDocument, - 'parentProperty': parentProperty, - 'parentPropertyType': parentPropertyType, - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.post, path: path, params: params, headers: headers); - } - - /// Get Document - /// - /// Get document by its unique ID. This endpoint response returns a JSON object - /// with the document data. - /// - Future getDocument({@required String collectionId, @required String documentId}) { - final String path = '/database/collections/{collectionId}/documents/{documentId}'.replaceAll(RegExp('{collectionId}'), collectionId).replaceAll(RegExp('{documentId}'), documentId); - - final Map params = { - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.get, path: path, params: params, headers: headers); - } - - /// Update Document - Future updateDocument({@required String collectionId, @required String documentId, @required dynamic data, @required List read, @required List write}) { - final String path = '/database/collections/{collectionId}/documents/{documentId}'.replaceAll(RegExp('{collectionId}'), collectionId).replaceAll(RegExp('{documentId}'), documentId); - - final Map params = { - 'data': data, - 'read': read, - 'write': write, - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.patch, path: path, params: params, headers: headers); - } - - /// Delete Document - /// - /// Delete document by its unique ID. This endpoint deletes only the parent - /// documents, his attributes and relations to other documents. Child documents - /// **will not** be deleted. - /// - Future deleteDocument({@required String collectionId, @required String documentId}) { - final String path = '/database/collections/{collectionId}/documents/{documentId}'.replaceAll(RegExp('{collectionId}'), collectionId).replaceAll(RegExp('{documentId}'), documentId); - - final Map params = { - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.delete, path: path, params: params, headers: headers); - } -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter-dev/lib/services/locale.dart b/app/sdks/0.6.2/client-flutter-dev/lib/services/locale.dart deleted file mode 100644 index 91ea1567ef..0000000000 --- a/app/sdks/0.6.2/client-flutter-dev/lib/services/locale.dart +++ /dev/null @@ -1,125 +0,0 @@ - - -import 'package:dio/dio.dart'; -import 'package:meta/meta.dart'; - -import "../client.dart"; -import '../enums.dart'; -import "../service.dart"; - -class Locale extends Service { - Locale(Client client): super(client); - - /// Get User Locale - /// - /// Get the current user location based on IP. Returns an object with user - /// country code, country name, continent name, continent code, ip address and - /// suggested currency. You can use the locale header to get the data in a - /// supported language. - /// - /// ([IP Geolocation by DB-IP](https://db-ip.com)) - /// - Future get() { - final String path = '/locale'; - - final Map params = { - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.get, path: path, params: params, headers: headers); - } - - /// List Continents - /// - /// List of all continents. You can use the locale header to get the data in a - /// supported language. - /// - Future getContinents() { - final String path = '/locale/continents'; - - final Map params = { - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.get, path: path, params: params, headers: headers); - } - - /// List Countries - /// - /// List of all countries. You can use the locale header to get the data in a - /// supported language. - /// - Future getCountries() { - final String path = '/locale/countries'; - - final Map params = { - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.get, path: path, params: params, headers: headers); - } - - /// 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 getCountriesEU() { - final String path = '/locale/countries/eu'; - - final Map params = { - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.get, path: path, params: params, headers: headers); - } - - /// 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 getCountriesPhones() { - final String path = '/locale/countries/phones'; - - final Map params = { - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.get, path: path, params: params, headers: headers); - } - - /// List Currencies - /// - /// List of all currencies, including currency symol, 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 getCurrencies() { - final String path = '/locale/currencies'; - - final Map params = { - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.get, path: path, params: params, headers: headers); - } -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter-dev/lib/services/storage.dart b/app/sdks/0.6.2/client-flutter-dev/lib/services/storage.dart deleted file mode 100644 index 51f9345050..0000000000 --- a/app/sdks/0.6.2/client-flutter-dev/lib/services/storage.dart +++ /dev/null @@ -1,203 +0,0 @@ - - -import 'package:dio/dio.dart'; -import 'package:meta/meta.dart'; - -import "../client.dart"; -import '../enums.dart'; -import "../service.dart"; - -class Storage extends Service { - Storage(Client client): super(client); - - /// List Files - /// - /// Get a list of all the user files. You can use the query params to filter - /// your results. On admin mode, this endpoint will return a list of all of the - /// project files. [Learn more about different API modes](/docs/admin). - /// - Future listFiles({String search = '', int limit = 25, int offset = 0, OrderType orderType = OrderType.asc}) { - final String path = '/storage/files'; - - final Map params = { - 'search': search, - 'limit': limit, - 'offset': offset, - 'orderType': orderType.name(), - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.get, path: path, params: params, headers: headers); - } - - /// Create File - /// - /// Create a new file. The user who creates the file will automatically be - /// assigned to read and write access unless he has passed custom values for - /// read and write arguments. - /// - Future createFile({@required MultipartFile file, @required List read, @required List write}) { - final String path = '/storage/files'; - - final Map params = { - 'file': file, - 'read': read, - 'write': write, - }; - - final Map headers = { - 'content-type': 'multipart/form-data', - }; - - return client.call(HttpMethod.post, path: path, params: params, headers: headers); - } - - /// Get File - /// - /// Get file by its unique ID. This endpoint response returns a JSON object - /// with the file metadata. - /// - Future getFile({@required String fileId}) { - final String path = '/storage/files/{fileId}'.replaceAll(RegExp('{fileId}'), fileId); - - final Map params = { - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.get, path: path, params: params, headers: headers); - } - - /// Update File - /// - /// Update file by its unique ID. Only users with write permissions have access - /// to update this resource. - /// - Future updateFile({@required String fileId, @required List read, @required List write}) { - final String path = '/storage/files/{fileId}'.replaceAll(RegExp('{fileId}'), fileId); - - final Map params = { - 'read': read, - 'write': write, - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.put, path: path, params: params, headers: headers); - } - - /// Delete File - /// - /// Delete a file by its unique ID. Only users with write permissions have - /// access to delete this resource. - /// - Future deleteFile({@required String fileId}) { - final String path = '/storage/files/{fileId}'.replaceAll(RegExp('{fileId}'), fileId); - - final Map params = { - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.delete, path: path, params: params, headers: headers); - } - - /// Get File for Download - /// - /// Get 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. - /// - String getFileDownload({@required String fileId}) { - final String path = '/storage/files/{fileId}/download'.replaceAll(RegExp('{fileId}'), fileId); - - final Map params = { - 'project': client.config['project'], - }; - - params.keys.forEach((key) {if (params[key] is int || params[key] is double) { - params[key] = params[key].toString(); - }}); - - Uri endpoint = Uri.parse(client.endPoint); - Uri location = new Uri(scheme: endpoint.scheme, - host: endpoint.host, - port: endpoint.port, - path: endpoint.path + path, - queryParameters:params, - ); - - return location.toString(); - } - - /// Get File Preview - /// - /// Get a file preview image. Currently, this method supports preview for image - /// files (jpg, png, and gif), other supported formats, like pdf, docs, slides, - /// and spreadsheets, will return the file icon image. You can also pass query - /// string arguments for cutting and resizing your preview image. - /// - String getFilePreview({@required String fileId, int width = 0, int height = 0, int quality = 100, String background = '', String output = ''}) { - final String path = '/storage/files/{fileId}/preview'.replaceAll(RegExp('{fileId}'), fileId); - - final Map params = { - 'width': width, - 'height': height, - 'quality': quality, - 'background': background, - 'output': output, - 'project': client.config['project'], - }; - - params.keys.forEach((key) {if (params[key] is int || params[key] is double) { - params[key] = params[key].toString(); - }}); - - Uri endpoint = Uri.parse(client.endPoint); - Uri location = new Uri(scheme: endpoint.scheme, - host: endpoint.host, - port: endpoint.port, - path: endpoint.path + path, - queryParameters:params, - ); - - return location.toString(); - } - - /// Get File for View - /// - /// Get file content by its unique ID. This endpoint is similar to the download - /// method but returns with no 'Content-Disposition: attachment' header. - /// - String getFileView({@required String fileId, String as = ''}) { - final String path = '/storage/files/{fileId}/view'.replaceAll(RegExp('{fileId}'), fileId); - - final Map params = { - 'as': as, - 'project': client.config['project'], - }; - - params.keys.forEach((key) {if (params[key] is int || params[key] is double) { - params[key] = params[key].toString(); - }}); - - Uri endpoint = Uri.parse(client.endPoint); - Uri location = new Uri(scheme: endpoint.scheme, - host: endpoint.host, - port: endpoint.port, - path: endpoint.path + path, - queryParameters:params, - ); - - return location.toString(); - } -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter-dev/lib/services/teams.dart b/app/sdks/0.6.2/client-flutter-dev/lib/services/teams.dart deleted file mode 100644 index b98590b33d..0000000000 --- a/app/sdks/0.6.2/client-flutter-dev/lib/services/teams.dart +++ /dev/null @@ -1,203 +0,0 @@ - - -import 'package:dio/dio.dart'; -import 'package:meta/meta.dart'; - -import "../client.dart"; -import '../enums.dart'; -import "../service.dart"; - -class Teams extends Service { - Teams(Client client): super(client); - - /// List Teams - /// - /// Get a list of all the current user teams. You can use the query params to - /// filter your results. On admin mode, this endpoint will return a list of all - /// of the project teams. [Learn more about different API modes](/docs/admin). - /// - Future list({String search = '', int limit = 25, int offset = 0, OrderType orderType = OrderType.asc}) { - final String path = '/teams'; - - final Map params = { - 'search': search, - 'limit': limit, - 'offset': offset, - 'orderType': orderType.name(), - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.get, path: path, params: params, headers: headers); - } - - /// Create Team - /// - /// Create a new team. The user who creates the team will automatically be - /// assigned as the owner of the team. The team owner can invite new members, - /// who will be able add new owners and update or delete the team from your - /// project. - /// - Future create({@required String name, List roles = const ["owner"]}) { - final String path = '/teams'; - - final Map params = { - 'name': name, - 'roles': roles, - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.post, path: path, params: params, headers: headers); - } - - /// Get Team - /// - /// Get team by its unique ID. All team members have read access for this - /// resource. - /// - Future get({@required String teamId}) { - final String path = '/teams/{teamId}'.replaceAll(RegExp('{teamId}'), teamId); - - final Map params = { - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.get, path: path, params: params, headers: headers); - } - - /// Update Team - /// - /// Update team by its unique ID. Only team owners have write access for this - /// resource. - /// - Future update({@required String teamId, @required String name}) { - final String path = '/teams/{teamId}'.replaceAll(RegExp('{teamId}'), teamId); - - final Map params = { - 'name': name, - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.put, path: path, params: params, headers: headers); - } - - /// Delete Team - /// - /// Delete team by its unique ID. Only team owners have write access for this - /// resource. - /// - Future delete({@required String teamId}) { - final String path = '/teams/{teamId}'.replaceAll(RegExp('{teamId}'), teamId); - - final Map params = { - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.delete, path: path, params: params, headers: headers); - } - - /// Get Team Memberships - /// - /// Get team members by the team unique ID. All team members have read access - /// for this list of resources. - /// - Future getMemberships({@required String teamId}) { - final String path = '/teams/{teamId}/memberships'.replaceAll(RegExp('{teamId}'), teamId); - - final Map params = { - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.get, path: path, params: params, headers: headers); - } - - /// Create Team Membership - /// - /// Use this endpoint to invite a new member to join your team. An email with a - /// link to join the team will be sent to the new member email address if the - /// member doesn't exist in the project it will be created automatically. - /// - /// Use the 'URL' parameter to redirect the user from the invitation email back - /// to your app. When the user is redirected, use the [Update Team Membership - /// Status](/docs/client/teams#updateMembershipStatus) endpoint to allow the - /// user to accept the invitation to the team. - /// - /// Please note that in order to avoid a [Redirect - /// Attacks](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) - /// the only valid redirect URL's are the once from domains you have set when - /// added your platforms in the console interface. - /// - Future createMembership({@required String teamId, @required String email, @required List roles, @required String url, String name = ''}) { - final String path = '/teams/{teamId}/memberships'.replaceAll(RegExp('{teamId}'), teamId); - - final Map params = { - 'email': email, - 'name': name, - 'roles': roles, - 'url': url, - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.post, path: path, params: params, headers: headers); - } - - /// 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 he didn't accept it. - /// - Future deleteMembership({@required String teamId, @required String inviteId}) { - final String path = '/teams/{teamId}/memberships/{inviteId}'.replaceAll(RegExp('{teamId}'), teamId).replaceAll(RegExp('{inviteId}'), inviteId); - - final Map params = { - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.delete, path: path, params: params, headers: headers); - } - - /// Update Team Membership Status - /// - /// Use this endpoint to allow a user to accept an invitation to join a team - /// after he is being redirected back to your app from the invitation email he - /// was sent. - /// - Future updateMembershipStatus({@required String teamId, @required String inviteId, @required String userId, @required String secret}) { - final String path = '/teams/{teamId}/memberships/{inviteId}/status'.replaceAll(RegExp('{teamId}'), teamId).replaceAll(RegExp('{inviteId}'), inviteId); - - final Map params = { - 'userId': userId, - 'secret': secret, - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.patch, path: path, params: params, headers: headers); - } -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter-dev/pubspec.yaml b/app/sdks/0.6.2/client-flutter-dev/pubspec.yaml deleted file mode 100644 index 7d3646b8ee..0000000000 --- a/app/sdks/0.6.2/client-flutter-dev/pubspec.yaml +++ /dev/null @@ -1,23 +0,0 @@ -name: appwrite_dev -version: 0.3.2 -description: Appwrite is an open-source self-hosted backend server that abstract and simplify complex and repetitive development tasks behind a very simple REST API -homepage: https://appwrite.io -repository: https://github.com/appwrite/sdk-for-flutter-dev -issue_tracker: https://github.com/appwrite/sdk-generator/issues -documentation: https://appwrite.io/support -environment: - sdk: '>=2.6.0 <3.0.0' -dependencies: - meta: ^1.1.8 - path_provider: ^1.6.14 - package_info: ^0.4.3 - dio: ^3.0.10 - cookie_jar: ^1.0.1 - dio_cookie_manager: ^1.0.0 - flutter_web_auth: ^0.2.4 - flutter: - sdk: flutter - -dev_dependencies: - flutter_test: - sdk: flutter \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter/CHANGELOG.md b/app/sdks/0.6.2/client-flutter/CHANGELOG.md deleted file mode 100644 index a584ad8b9a..0000000000 --- a/app/sdks/0.6.2/client-flutter/CHANGELOG.md +++ /dev/null @@ -1,60 +0,0 @@ -## 0.3.0-dev.2 - -- Fix for an error when using a self-signed certificate for Web - -## 0.3.0-dev.1 - -- Updated package dependencies (@lohanidamodar) -- Added Flutter for Web compatibility (@lohanidamodar) - -## 0.2.3 - -- Fixed OAuth2 cookie bug, where a new session cookie couldn't overwrite an old cookie - -## 0.2.2 - -- Fixed an error that happend when the OAuth session creation request was sent before any other API call -- Fixed a bug in the Avatars service where location URL generation had syntax error - -## 0.2.1 - -- Fixed callback scheme - -## 0.2.0 - -- Updated flutter_web_auth plugin to version 0.2.4 -- Added per project unique callback for OAuth2 redirects to aviod conflicts between multiple Appwrite projects - -## 0.1.1 - -- Updated flutter_web_auth version - -## 0.1.0 - -- Added examples file -- Some minor style fixes - -## 0.0.14 - -- Using MultipartFile for file uploads - -## 0.0.13 - -- Fix for file upload method - -## 0.0.12 - -- Added file upload support for storage service - -## 0.0.11 - -- Added integration with web auth plugin to support Appwrite OAuth API - -## 0.0.9 - -- Updated deafult params - -## 0.0.8 - -- Fixed compilation error in Client class -- Shorter description for package \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter/LICENSE b/app/sdks/0.6.2/client-flutter/LICENSE deleted file mode 100644 index fc7c051a91..0000000000 --- a/app/sdks/0.6.2/client-flutter/LICENSE +++ /dev/null @@ -1,12 +0,0 @@ -Copyright (c) 2019 Appwrite (https://appwrite.io) and individual contributors. -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - - 3. Neither the name Appwrite nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter/README.md b/app/sdks/0.6.2/client-flutter/README.md deleted file mode 100644 index d272426ee3..0000000000 --- a/app/sdks/0.6.2/client-flutter/README.md +++ /dev/null @@ -1,38 +0,0 @@ -# Appwrite Flutter SDK - -[![pub package](https://img.shields.io/pub/v/appwrite.svg)](https://pub.dartlang.org/packages/appwrite) -![License](https://img.shields.io/github/license/appwrite/sdk-for-flutter.svg?v=1) -![Version](https://img.shields.io/badge/api%20version-0.6.2-blue.svg?v=1) - -**This SDK is compatible with Appwrite server version 0.6.2. For older versions, please check previous releases.** - -Appwrite is an open-source backend as a service server that abstract and simplify complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way. - Use the Flutter SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools. - For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs) - - - -![Appwrite](https://appwrite.io/images/github.png) - -## Installation - -Add this to your package's `pubspec.yaml` file: - -```yml -dependencies: - appwrite: ^0.3.0-dev.2 -``` - -You can install packages from the command line: - -```bash -pub get appwrite -``` - -## Contribution - -This library is auto-generated by Appwrite custom [SDK Generator](https://github.com/appwrite/sdk-generator). To learn more about how you can help us improve this SDK, please check the [contribution guide](https://github.com/appwrite/sdk-generator/blob/master/CONTRIBUTING.md) before sending a pull-request. - -## License - -Please see the [BSD-3-Clause license](https://raw.githubusercontent.com/appwrite/appwrite/master/LICENSE) file for more information. \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter/docs/examples/account/create-o-auth2session.md b/app/sdks/0.6.2/client-flutter/docs/examples/account/create-o-auth2session.md deleted file mode 100644 index 0e26dd27af..0000000000 --- a/app/sdks/0.6.2/client-flutter/docs/examples/account/create-o-auth2session.md +++ /dev/null @@ -1,22 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Account account = Account(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = account.createOAuth2Session( - provider: 'amazon', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter/docs/examples/account/create-recovery.md b/app/sdks/0.6.2/client-flutter/docs/examples/account/create-recovery.md deleted file mode 100644 index 50db45b15d..0000000000 --- a/app/sdks/0.6.2/client-flutter/docs/examples/account/create-recovery.md +++ /dev/null @@ -1,23 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Account account = Account(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = account.createRecovery( - email: 'email@example.com', - url: 'https://example.com', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter/docs/examples/account/create-session.md b/app/sdks/0.6.2/client-flutter/docs/examples/account/create-session.md deleted file mode 100644 index ef824b4eca..0000000000 --- a/app/sdks/0.6.2/client-flutter/docs/examples/account/create-session.md +++ /dev/null @@ -1,23 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Account account = Account(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = account.createSession( - email: 'email@example.com', - password: 'password', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter/docs/examples/account/create-verification.md b/app/sdks/0.6.2/client-flutter/docs/examples/account/create-verification.md deleted file mode 100644 index 6b9b1ace40..0000000000 --- a/app/sdks/0.6.2/client-flutter/docs/examples/account/create-verification.md +++ /dev/null @@ -1,22 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Account account = Account(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = account.createVerification( - url: 'https://example.com', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter/docs/examples/account/create.md b/app/sdks/0.6.2/client-flutter/docs/examples/account/create.md deleted file mode 100644 index 384258ae68..0000000000 --- a/app/sdks/0.6.2/client-flutter/docs/examples/account/create.md +++ /dev/null @@ -1,23 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Account account = Account(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = account.create( - email: 'email@example.com', - password: 'password', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter/docs/examples/account/delete-session.md b/app/sdks/0.6.2/client-flutter/docs/examples/account/delete-session.md deleted file mode 100644 index 80a3f505d0..0000000000 --- a/app/sdks/0.6.2/client-flutter/docs/examples/account/delete-session.md +++ /dev/null @@ -1,22 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Account account = Account(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = account.deleteSession( - sessionId: '[SESSION_ID]', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter/docs/examples/account/delete-sessions.md b/app/sdks/0.6.2/client-flutter/docs/examples/account/delete-sessions.md deleted file mode 100644 index 5e947fabc2..0000000000 --- a/app/sdks/0.6.2/client-flutter/docs/examples/account/delete-sessions.md +++ /dev/null @@ -1,20 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Account account = Account(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = account.deleteSessions( ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter/docs/examples/account/delete.md b/app/sdks/0.6.2/client-flutter/docs/examples/account/delete.md deleted file mode 100644 index 2853a1f437..0000000000 --- a/app/sdks/0.6.2/client-flutter/docs/examples/account/delete.md +++ /dev/null @@ -1,20 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Account account = Account(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = account.delete( ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter/docs/examples/account/get-logs.md b/app/sdks/0.6.2/client-flutter/docs/examples/account/get-logs.md deleted file mode 100644 index 8f52f8220b..0000000000 --- a/app/sdks/0.6.2/client-flutter/docs/examples/account/get-logs.md +++ /dev/null @@ -1,20 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Account account = Account(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = account.getLogs( ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter/docs/examples/account/get-prefs.md b/app/sdks/0.6.2/client-flutter/docs/examples/account/get-prefs.md deleted file mode 100644 index 01d57a5499..0000000000 --- a/app/sdks/0.6.2/client-flutter/docs/examples/account/get-prefs.md +++ /dev/null @@ -1,20 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Account account = Account(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = account.getPrefs( ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter/docs/examples/account/get-sessions.md b/app/sdks/0.6.2/client-flutter/docs/examples/account/get-sessions.md deleted file mode 100644 index e921bda59b..0000000000 --- a/app/sdks/0.6.2/client-flutter/docs/examples/account/get-sessions.md +++ /dev/null @@ -1,20 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Account account = Account(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = account.getSessions( ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter/docs/examples/account/get.md b/app/sdks/0.6.2/client-flutter/docs/examples/account/get.md deleted file mode 100644 index 35241b5607..0000000000 --- a/app/sdks/0.6.2/client-flutter/docs/examples/account/get.md +++ /dev/null @@ -1,20 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Account account = Account(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = account.get( ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter/docs/examples/account/update-email.md b/app/sdks/0.6.2/client-flutter/docs/examples/account/update-email.md deleted file mode 100644 index 4a1a002db4..0000000000 --- a/app/sdks/0.6.2/client-flutter/docs/examples/account/update-email.md +++ /dev/null @@ -1,23 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Account account = Account(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = account.updateEmail( - email: 'email@example.com', - password: 'password', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter/docs/examples/account/update-name.md b/app/sdks/0.6.2/client-flutter/docs/examples/account/update-name.md deleted file mode 100644 index fa432bb34a..0000000000 --- a/app/sdks/0.6.2/client-flutter/docs/examples/account/update-name.md +++ /dev/null @@ -1,22 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Account account = Account(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = account.updateName( - name: '[NAME]', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter/docs/examples/account/update-password.md b/app/sdks/0.6.2/client-flutter/docs/examples/account/update-password.md deleted file mode 100644 index 9bd8ad9b77..0000000000 --- a/app/sdks/0.6.2/client-flutter/docs/examples/account/update-password.md +++ /dev/null @@ -1,23 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Account account = Account(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = account.updatePassword( - password: 'password', - oldPassword: 'password', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter/docs/examples/account/update-prefs.md b/app/sdks/0.6.2/client-flutter/docs/examples/account/update-prefs.md deleted file mode 100644 index 443252f89a..0000000000 --- a/app/sdks/0.6.2/client-flutter/docs/examples/account/update-prefs.md +++ /dev/null @@ -1,22 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Account account = Account(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = account.updatePrefs( - prefs: {}, - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter/docs/examples/account/update-recovery.md b/app/sdks/0.6.2/client-flutter/docs/examples/account/update-recovery.md deleted file mode 100644 index 5140235d49..0000000000 --- a/app/sdks/0.6.2/client-flutter/docs/examples/account/update-recovery.md +++ /dev/null @@ -1,25 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Account account = Account(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = account.updateRecovery( - userId: '[USER_ID]', - secret: '[SECRET]', - password: 'password', - passwordAgain: 'password', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter/docs/examples/account/update-verification.md b/app/sdks/0.6.2/client-flutter/docs/examples/account/update-verification.md deleted file mode 100644 index b795cde92d..0000000000 --- a/app/sdks/0.6.2/client-flutter/docs/examples/account/update-verification.md +++ /dev/null @@ -1,23 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Account account = Account(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = account.updateVerification( - userId: '[USER_ID]', - secret: '[SECRET]', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter/docs/examples/avatars/get-browser.md b/app/sdks/0.6.2/client-flutter/docs/examples/avatars/get-browser.md deleted file mode 100644 index 464767c4c0..0000000000 --- a/app/sdks/0.6.2/client-flutter/docs/examples/avatars/get-browser.md +++ /dev/null @@ -1,17 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Avatars avatars = Avatars(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - String result = avatars.getBrowser( - code: 'aa', - ); - - print(result); // Resource URL string -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter/docs/examples/avatars/get-credit-card.md b/app/sdks/0.6.2/client-flutter/docs/examples/avatars/get-credit-card.md deleted file mode 100644 index 482c642402..0000000000 --- a/app/sdks/0.6.2/client-flutter/docs/examples/avatars/get-credit-card.md +++ /dev/null @@ -1,17 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Avatars avatars = Avatars(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - String result = avatars.getCreditCard( - code: 'amex', - ); - - print(result); // Resource URL string -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter/docs/examples/avatars/get-favicon.md b/app/sdks/0.6.2/client-flutter/docs/examples/avatars/get-favicon.md deleted file mode 100644 index 60397b0af2..0000000000 --- a/app/sdks/0.6.2/client-flutter/docs/examples/avatars/get-favicon.md +++ /dev/null @@ -1,17 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Avatars avatars = Avatars(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - String result = avatars.getFavicon( - url: 'https://example.com', - ); - - print(result); // Resource URL string -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter/docs/examples/avatars/get-flag.md b/app/sdks/0.6.2/client-flutter/docs/examples/avatars/get-flag.md deleted file mode 100644 index a9f7a711d9..0000000000 --- a/app/sdks/0.6.2/client-flutter/docs/examples/avatars/get-flag.md +++ /dev/null @@ -1,17 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Avatars avatars = Avatars(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - String result = avatars.getFlag( - code: 'af', - ); - - print(result); // Resource URL string -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter/docs/examples/avatars/get-image.md b/app/sdks/0.6.2/client-flutter/docs/examples/avatars/get-image.md deleted file mode 100644 index 7cead1cb2f..0000000000 --- a/app/sdks/0.6.2/client-flutter/docs/examples/avatars/get-image.md +++ /dev/null @@ -1,17 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Avatars avatars = Avatars(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - String result = avatars.getImage( - url: 'https://example.com', - ); - - print(result); // Resource URL string -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter/docs/examples/avatars/get-initials.md b/app/sdks/0.6.2/client-flutter/docs/examples/avatars/get-initials.md deleted file mode 100644 index b2e70788d6..0000000000 --- a/app/sdks/0.6.2/client-flutter/docs/examples/avatars/get-initials.md +++ /dev/null @@ -1,16 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Avatars avatars = Avatars(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - String result = avatars.getInitials( - ); - - print(result); // Resource URL string -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter/docs/examples/avatars/get-q-r.md b/app/sdks/0.6.2/client-flutter/docs/examples/avatars/get-q-r.md deleted file mode 100644 index a5bcfd2c05..0000000000 --- a/app/sdks/0.6.2/client-flutter/docs/examples/avatars/get-q-r.md +++ /dev/null @@ -1,17 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Avatars avatars = Avatars(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - String result = avatars.getQR( - text: '[TEXT]', - ); - - print(result); // Resource URL string -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter/docs/examples/database/create-document.md b/app/sdks/0.6.2/client-flutter/docs/examples/database/create-document.md deleted file mode 100644 index b7d540bc2d..0000000000 --- a/app/sdks/0.6.2/client-flutter/docs/examples/database/create-document.md +++ /dev/null @@ -1,25 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Database database = Database(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = database.createDocument( - collectionId: '[COLLECTION_ID]', - data: {}, - read: [], - write: [], - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter/docs/examples/database/delete-document.md b/app/sdks/0.6.2/client-flutter/docs/examples/database/delete-document.md deleted file mode 100644 index 40c1cbdfe2..0000000000 --- a/app/sdks/0.6.2/client-flutter/docs/examples/database/delete-document.md +++ /dev/null @@ -1,23 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Database database = Database(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = database.deleteDocument( - collectionId: '[COLLECTION_ID]', - documentId: '[DOCUMENT_ID]', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter/docs/examples/database/get-document.md b/app/sdks/0.6.2/client-flutter/docs/examples/database/get-document.md deleted file mode 100644 index 0c98142315..0000000000 --- a/app/sdks/0.6.2/client-flutter/docs/examples/database/get-document.md +++ /dev/null @@ -1,23 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Database database = Database(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = database.getDocument( - collectionId: '[COLLECTION_ID]', - documentId: '[DOCUMENT_ID]', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter/docs/examples/database/list-documents.md b/app/sdks/0.6.2/client-flutter/docs/examples/database/list-documents.md deleted file mode 100644 index 0685e7f1aa..0000000000 --- a/app/sdks/0.6.2/client-flutter/docs/examples/database/list-documents.md +++ /dev/null @@ -1,22 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Database database = Database(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = database.listDocuments( - collectionId: '[COLLECTION_ID]', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter/docs/examples/database/update-document.md b/app/sdks/0.6.2/client-flutter/docs/examples/database/update-document.md deleted file mode 100644 index 2f37cd767a..0000000000 --- a/app/sdks/0.6.2/client-flutter/docs/examples/database/update-document.md +++ /dev/null @@ -1,26 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Database database = Database(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = database.updateDocument( - collectionId: '[COLLECTION_ID]', - documentId: '[DOCUMENT_ID]', - data: {}, - read: [], - write: [], - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter/docs/examples/locale/get-continents.md b/app/sdks/0.6.2/client-flutter/docs/examples/locale/get-continents.md deleted file mode 100644 index 2a6a6413ba..0000000000 --- a/app/sdks/0.6.2/client-flutter/docs/examples/locale/get-continents.md +++ /dev/null @@ -1,20 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Locale locale = Locale(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = locale.getContinents( ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter/docs/examples/locale/get-countries-e-u.md b/app/sdks/0.6.2/client-flutter/docs/examples/locale/get-countries-e-u.md deleted file mode 100644 index 1934fc6709..0000000000 --- a/app/sdks/0.6.2/client-flutter/docs/examples/locale/get-countries-e-u.md +++ /dev/null @@ -1,20 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Locale locale = Locale(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = locale.getCountriesEU( ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter/docs/examples/locale/get-countries-phones.md b/app/sdks/0.6.2/client-flutter/docs/examples/locale/get-countries-phones.md deleted file mode 100644 index f6b1f58749..0000000000 --- a/app/sdks/0.6.2/client-flutter/docs/examples/locale/get-countries-phones.md +++ /dev/null @@ -1,20 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Locale locale = Locale(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = locale.getCountriesPhones( ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter/docs/examples/locale/get-countries.md b/app/sdks/0.6.2/client-flutter/docs/examples/locale/get-countries.md deleted file mode 100644 index 104584968f..0000000000 --- a/app/sdks/0.6.2/client-flutter/docs/examples/locale/get-countries.md +++ /dev/null @@ -1,20 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Locale locale = Locale(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = locale.getCountries( ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter/docs/examples/locale/get-currencies.md b/app/sdks/0.6.2/client-flutter/docs/examples/locale/get-currencies.md deleted file mode 100644 index 8dc01fc68e..0000000000 --- a/app/sdks/0.6.2/client-flutter/docs/examples/locale/get-currencies.md +++ /dev/null @@ -1,20 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Locale locale = Locale(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = locale.getCurrencies( ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter/docs/examples/locale/get-languages.md b/app/sdks/0.6.2/client-flutter/docs/examples/locale/get-languages.md deleted file mode 100644 index a4124d3cbd..0000000000 --- a/app/sdks/0.6.2/client-flutter/docs/examples/locale/get-languages.md +++ /dev/null @@ -1,20 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Locale locale = Locale(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = locale.getLanguages( ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter/docs/examples/locale/get.md b/app/sdks/0.6.2/client-flutter/docs/examples/locale/get.md deleted file mode 100644 index 189fceb7d1..0000000000 --- a/app/sdks/0.6.2/client-flutter/docs/examples/locale/get.md +++ /dev/null @@ -1,20 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Locale locale = Locale(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = locale.get( ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter/docs/examples/storage/create-file.md b/app/sdks/0.6.2/client-flutter/docs/examples/storage/create-file.md deleted file mode 100644 index 9f61be12f4..0000000000 --- a/app/sdks/0.6.2/client-flutter/docs/examples/storage/create-file.md +++ /dev/null @@ -1,25 +0,0 @@ -import 'dart:io'; -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Storage storage = Storage(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = storage.createFile( - file: await MultipartFile.fromFile('./path-to-files/image.jpg', 'image.jpg'), - read: [], - write: [], - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter/docs/examples/storage/delete-file.md b/app/sdks/0.6.2/client-flutter/docs/examples/storage/delete-file.md deleted file mode 100644 index 271ed7b2dd..0000000000 --- a/app/sdks/0.6.2/client-flutter/docs/examples/storage/delete-file.md +++ /dev/null @@ -1,22 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Storage storage = Storage(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = storage.deleteFile( - fileId: '[FILE_ID]', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter/docs/examples/storage/get-file-download.md b/app/sdks/0.6.2/client-flutter/docs/examples/storage/get-file-download.md deleted file mode 100644 index be3385a61b..0000000000 --- a/app/sdks/0.6.2/client-flutter/docs/examples/storage/get-file-download.md +++ /dev/null @@ -1,17 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Storage storage = Storage(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - String result = storage.getFileDownload( - fileId: '[FILE_ID]', - ); - - print(result); // Resource URL string -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter/docs/examples/storage/get-file-preview.md b/app/sdks/0.6.2/client-flutter/docs/examples/storage/get-file-preview.md deleted file mode 100644 index 8bd1a47457..0000000000 --- a/app/sdks/0.6.2/client-flutter/docs/examples/storage/get-file-preview.md +++ /dev/null @@ -1,17 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Storage storage = Storage(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - String result = storage.getFilePreview( - fileId: '[FILE_ID]', - ); - - print(result); // Resource URL string -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter/docs/examples/storage/get-file-view.md b/app/sdks/0.6.2/client-flutter/docs/examples/storage/get-file-view.md deleted file mode 100644 index 5803fd409f..0000000000 --- a/app/sdks/0.6.2/client-flutter/docs/examples/storage/get-file-view.md +++ /dev/null @@ -1,17 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Storage storage = Storage(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - String result = storage.getFileView( - fileId: '[FILE_ID]', - ); - - print(result); // Resource URL string -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter/docs/examples/storage/get-file.md b/app/sdks/0.6.2/client-flutter/docs/examples/storage/get-file.md deleted file mode 100644 index feca667fa9..0000000000 --- a/app/sdks/0.6.2/client-flutter/docs/examples/storage/get-file.md +++ /dev/null @@ -1,22 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Storage storage = Storage(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = storage.getFile( - fileId: '[FILE_ID]', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter/docs/examples/storage/list-files.md b/app/sdks/0.6.2/client-flutter/docs/examples/storage/list-files.md deleted file mode 100644 index 1963ec694d..0000000000 --- a/app/sdks/0.6.2/client-flutter/docs/examples/storage/list-files.md +++ /dev/null @@ -1,21 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Storage storage = Storage(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = storage.listFiles( - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter/docs/examples/storage/update-file.md b/app/sdks/0.6.2/client-flutter/docs/examples/storage/update-file.md deleted file mode 100644 index a5ecbfe987..0000000000 --- a/app/sdks/0.6.2/client-flutter/docs/examples/storage/update-file.md +++ /dev/null @@ -1,24 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Storage storage = Storage(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = storage.updateFile( - fileId: '[FILE_ID]', - read: [], - write: [], - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter/docs/examples/teams/create-membership.md b/app/sdks/0.6.2/client-flutter/docs/examples/teams/create-membership.md deleted file mode 100644 index e5e82de7b4..0000000000 --- a/app/sdks/0.6.2/client-flutter/docs/examples/teams/create-membership.md +++ /dev/null @@ -1,25 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Teams teams = Teams(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = teams.createMembership( - teamId: '[TEAM_ID]', - email: 'email@example.com', - roles: [], - url: 'https://example.com', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter/docs/examples/teams/create.md b/app/sdks/0.6.2/client-flutter/docs/examples/teams/create.md deleted file mode 100644 index d11958ae6d..0000000000 --- a/app/sdks/0.6.2/client-flutter/docs/examples/teams/create.md +++ /dev/null @@ -1,22 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Teams teams = Teams(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = teams.create( - name: '[NAME]', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter/docs/examples/teams/delete-membership.md b/app/sdks/0.6.2/client-flutter/docs/examples/teams/delete-membership.md deleted file mode 100644 index 3f57b840fe..0000000000 --- a/app/sdks/0.6.2/client-flutter/docs/examples/teams/delete-membership.md +++ /dev/null @@ -1,23 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Teams teams = Teams(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = teams.deleteMembership( - teamId: '[TEAM_ID]', - inviteId: '[INVITE_ID]', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter/docs/examples/teams/delete.md b/app/sdks/0.6.2/client-flutter/docs/examples/teams/delete.md deleted file mode 100644 index 9fb488afec..0000000000 --- a/app/sdks/0.6.2/client-flutter/docs/examples/teams/delete.md +++ /dev/null @@ -1,22 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Teams teams = Teams(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = teams.delete( - teamId: '[TEAM_ID]', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter/docs/examples/teams/get-memberships.md b/app/sdks/0.6.2/client-flutter/docs/examples/teams/get-memberships.md deleted file mode 100644 index 4edadfa2b4..0000000000 --- a/app/sdks/0.6.2/client-flutter/docs/examples/teams/get-memberships.md +++ /dev/null @@ -1,22 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Teams teams = Teams(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = teams.getMemberships( - teamId: '[TEAM_ID]', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter/docs/examples/teams/get.md b/app/sdks/0.6.2/client-flutter/docs/examples/teams/get.md deleted file mode 100644 index 083565f7a6..0000000000 --- a/app/sdks/0.6.2/client-flutter/docs/examples/teams/get.md +++ /dev/null @@ -1,22 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Teams teams = Teams(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = teams.get( - teamId: '[TEAM_ID]', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter/docs/examples/teams/list.md b/app/sdks/0.6.2/client-flutter/docs/examples/teams/list.md deleted file mode 100644 index 665020e928..0000000000 --- a/app/sdks/0.6.2/client-flutter/docs/examples/teams/list.md +++ /dev/null @@ -1,21 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Teams teams = Teams(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = teams.list( - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter/docs/examples/teams/update-membership-status.md b/app/sdks/0.6.2/client-flutter/docs/examples/teams/update-membership-status.md deleted file mode 100644 index 616f64e148..0000000000 --- a/app/sdks/0.6.2/client-flutter/docs/examples/teams/update-membership-status.md +++ /dev/null @@ -1,25 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Teams teams = Teams(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = teams.updateMembershipStatus( - teamId: '[TEAM_ID]', - inviteId: '[INVITE_ID]', - userId: '[USER_ID]', - secret: '[SECRET]', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter/docs/examples/teams/update.md b/app/sdks/0.6.2/client-flutter/docs/examples/teams/update.md deleted file mode 100644 index 915fb57d38..0000000000 --- a/app/sdks/0.6.2/client-flutter/docs/examples/teams/update.md +++ /dev/null @@ -1,23 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Teams teams = Teams(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = teams.update( - teamId: '[TEAM_ID]', - name: '[NAME]', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter/example/README.md b/app/sdks/0.6.2/client-flutter/example/README.md deleted file mode 100644 index f6768a5f85..0000000000 --- a/app/sdks/0.6.2/client-flutter/example/README.md +++ /dev/null @@ -1,55 +0,0 @@ -# Examples - -Init your Appwrite client: - -```dart - Client client = Client(); - - client - .setEndpoint('https://localhost/v1') // Your Appwrite Endpoint - .setProject('5e8cf4f46b5e8') // Your project ID - .setSelfSigned() // Remove in production - ; - -``` - -Create a new user and session: - -```dart -Account account = Account(client); - -Response user = await account.create(email: 'me@appwrite.io', password: 'password', name: 'My Name'); - -Response session = await account.createSession(email: 'me@appwrite.io', password: 'password'); - -``` - -Fetch user profile: - -```dart -Account account = Account(client); - -Response profile = await account.get(); -``` - -Upload File: - -```dart -Storage storage = Storage(client); - -MultipartFile file = MultipartFile.fromFile('./path-to-file/image.jpg', filename: 'image.jpg'); - -storage.createFile( - file: file, - read: ['*'], - write: [] -) -.then((response) { - print(response); // File uploaded! -}) -.catchError((error) { - print(error.response); -}); -``` - -All examples and API features are available at the [official Appwrite docs](https://appwrite.io/docs) \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter/lib/appwrite.dart b/app/sdks/0.6.2/client-flutter/lib/appwrite.dart deleted file mode 100644 index 95d0b72cfe..0000000000 --- a/app/sdks/0.6.2/client-flutter/lib/appwrite.dart +++ /dev/null @@ -1,10 +0,0 @@ -export 'package:dio/dio.dart' show Response; - -export 'client.dart'; -export 'enums.dart'; -export 'services/account.dart'; -export 'services/avatars.dart'; -export 'services/database.dart'; -export 'services/locale.dart'; -export 'services/storage.dart'; -export 'services/teams.dart'; diff --git a/app/sdks/0.6.2/client-flutter/lib/client.dart b/app/sdks/0.6.2/client-flutter/lib/client.dart deleted file mode 100644 index ee55d8ba18..0000000000 --- a/app/sdks/0.6.2/client-flutter/lib/client.dart +++ /dev/null @@ -1,134 +0,0 @@ -import 'dart:io'; - -import 'package:dio/dio.dart'; -import 'package:flutter/foundation.dart'; -import 'package:dio/adapter.dart'; -import 'package:dio_cookie_manager/dio_cookie_manager.dart'; -import 'package:cookie_jar/cookie_jar.dart'; -import 'package:path_provider/path_provider.dart'; -import 'package:package_info/package_info.dart'; - -import 'enums.dart'; - -class Client { - String endPoint; - String type = 'unknown'; - Map headers; - Map config; - bool selfSigned; - bool initialized = false; - Dio http; - PersistCookieJar cookieJar; - - Client({this.endPoint = 'https://appwrite.io/v1', this.selfSigned = false, Dio http}) : this.http = http ?? Dio() { - // Platform is not supported in web so if web, set type to web automatically and skip Platform check - if(kIsWeb) { - type = 'web'; - }else{ - type = (Platform.isIOS) ? 'ios' : type; - type = (Platform.isMacOS) ? 'macos' : type; - type = (Platform.isAndroid) ? 'android' : type; - type = (Platform.isLinux) ? 'linux' : type; - type = (Platform.isWindows) ? 'windows' : type; - type = (Platform.isFuchsia) ? 'fuchsia' : type; - } - - this.headers = { - 'content-type': 'application/json', - 'x-sdk-version': 'appwrite:flutter:0.3.0-dev.2', - }; - - this.config = {}; - - assert(endPoint.startsWith(RegExp("http://|https://")), "endPoint $endPoint must start with 'http'"); - } - - Future _getCookiePath() async { - final directory = await getApplicationDocumentsDirectory(); - final path = directory.path; - final Directory dir = new Directory('$path/cookies'); - await dir.create(); - return dir; - } - - /// Your project ID - Client setProject(value) { - config['project'] = value; - addHeader('X-Appwrite-Project', value); - return this; - } - - Client setLocale(value) { - config['locale'] = value; - addHeader('X-Appwrite-Locale', value); - return this; - } - - Client setSelfSigned({bool status = true}) { - selfSigned = status; - return this; - } - - Client setEndpoint(String endPoint) { - this.endPoint = endPoint; - this.http.options.baseUrl = this.endPoint; - return this; - } - - Client addHeader(String key, String value) { - headers[key] = value; - - return this; - } - - Future init() async { - if(!initialized) { - // if web skip cookie implementation and origin header as those are automatically handled by browsers - if(!kIsWeb) { - final Directory cookieDir = await _getCookiePath(); - cookieJar = new PersistCookieJar(dir:cookieDir.path); - this.http.interceptors.add(CookieManager(cookieJar)); - PackageInfo packageInfo = await PackageInfo.fromPlatform(); - addHeader('Origin', 'appwrite-' + type + '://' + packageInfo.packageName); - }else{ - // if web set httpClientAdapter as BrowserHttpClientAdapter with withCredentials true to make cookies work - this.http.options.extra['withCredentials'] = true; - } - - this.http.options.baseUrl = this.endPoint; - this.http.options.validateStatus = (status) => status < 400; - } - } - - Future call(HttpMethod method, {String path = '', Map headers = const {}, Map params = const {}}) async { - if(selfSigned && !kIsWeb) { - // Allow self signed requests - (http.httpClientAdapter as DefaultHttpClientAdapter).onHttpClientCreate = (HttpClient client) { - client.badCertificateCallback = (X509Certificate cert, String host, int port) => true; - return client; - }; - } - - await this.init(); - - // Origin is hardcoded for testing - Options options = Options( - headers: {...this.headers, ...headers}, - method: method.name(), - ); - - if(headers['content-type'] == 'multipart/form-data') { - return http.request(path, data: FormData.fromMap(params), options: options); - } - - if (method == HttpMethod.get) { - params.keys.forEach((key) {if (params[key] is int || params[key] is double) { - params[key] = params[key].toString(); - }}); - - return http.get(path, queryParameters: params, options: options); - } else { - return http.request(path, data: params, options: options); - } - } -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter/lib/enums.dart b/app/sdks/0.6.2/client-flutter/lib/enums.dart deleted file mode 100644 index 2757f6073e..0000000000 --- a/app/sdks/0.6.2/client-flutter/lib/enums.dart +++ /dev/null @@ -1,15 +0,0 @@ -enum HttpMethod { get, post, put, delete, patch } - -extension HttpMethodString on HttpMethod { - String name() { - return this.toString().split('.').last.toUpperCase(); - } -} - -enum OrderType { asc, desc } - -extension OrderTypeString on OrderType { - String name() { - return this.toString().split('.').last.toUpperCase(); - } -} diff --git a/app/sdks/0.6.2/client-flutter/lib/service.dart b/app/sdks/0.6.2/client-flutter/lib/service.dart deleted file mode 100644 index 1ae319b705..0000000000 --- a/app/sdks/0.6.2/client-flutter/lib/service.dart +++ /dev/null @@ -1,7 +0,0 @@ -import 'client.dart'; - -class Service { - final Client client; - - const Service(this.client); -} diff --git a/app/sdks/0.6.2/client-flutter/lib/services/account.dart b/app/sdks/0.6.2/client-flutter/lib/services/account.dart deleted file mode 100644 index 890303a9d6..0000000000 --- a/app/sdks/0.6.2/client-flutter/lib/services/account.dart +++ /dev/null @@ -1,435 +0,0 @@ - -import 'dart:io'; -import 'package:universal_html/html.dart' as html; - -import 'package:dio/dio.dart'; -import 'package:meta/meta.dart'; -import 'package:flutter/foundation.dart'; -import 'package:flutter_web_auth/flutter_web_auth.dart'; - -import "../client.dart"; -import '../enums.dart'; -import "../service.dart"; - -class Account extends Service { - Account(Client client): super(client); - - /// Get Account - /// - /// Get currently logged in user data as JSON object. - /// - Future get() { - final String path = '/account'; - - final Map params = { - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.get, path: path, params: params, headers: headers); - } - - /// Create Account - /// - /// Use this endpoint to allow a new user to register a new account in your - /// project. After the user registration completes successfully, you can use - /// the [/account/verfication](/docs/client/account#createVerification) route - /// to start verifying the user email address. To allow your new user to login - /// to his new account, you need to create a new [account - /// session](/docs/client/account#createSession). - /// - Future create({@required String email, @required String password, String name = ''}) { - final String path = '/account'; - - final Map params = { - 'email': email, - 'password': password, - 'name': name, - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.post, path: path, params: params, headers: headers); - } - - /// Delete Account - /// - /// Delete a currently logged in user account. Behind the scene, the user - /// record is not deleted but permanently blocked from any access. This is done - /// to avoid deleted accounts being overtaken by new users with the same email - /// address. Any user-related resources like documents or storage files should - /// be deleted separately. - /// - Future delete() { - final String path = '/account'; - - final Map params = { - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.delete, path: path, params: params, headers: headers); - } - - /// Update Account Email - /// - /// Update currently logged in user account email address. After changing user - /// address, user confirmation status is being reset and a new confirmation - /// mail is sent. For security measures, user password is required to complete - /// this request. - /// - Future updateEmail({@required String email, @required String password}) { - final String path = '/account/email'; - - final Map params = { - 'email': email, - 'password': password, - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.patch, path: path, params: params, headers: headers); - } - - /// Get Account 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 getLogs() { - final String path = '/account/logs'; - - final Map params = { - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.get, path: path, params: params, headers: headers); - } - - /// Update Account Name - /// - /// Update currently logged in user account name. - /// - Future updateName({@required String name}) { - final String path = '/account/name'; - - final Map params = { - 'name': name, - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.patch, path: path, params: params, headers: headers); - } - - /// Update Account Password - /// - /// Update currently logged in user password. For validation, user is required - /// to pass the password twice. - /// - Future updatePassword({@required String password, @required String oldPassword}) { - final String path = '/account/password'; - - final Map params = { - 'password': password, - 'oldPassword': oldPassword, - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.patch, path: path, params: params, headers: headers); - } - - /// Get Account Preferences - /// - /// Get currently logged in user preferences as a key-value object. - /// - Future getPrefs() { - final String path = '/account/prefs'; - - final Map params = { - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.get, path: path, params: params, headers: headers); - } - - /// Update Account Preferences - /// - /// Update currently logged in user account preferences. You can pass only the - /// specific settings you wish to update. - /// - Future updatePrefs({@required dynamic prefs}) { - final String path = '/account/prefs'; - - final Map params = { - 'prefs': prefs, - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.patch, path: path, params: params, headers: headers); - } - - /// Create Password Recovery - /// - /// Sends the user an email with a temporary secret key for password reset. - /// When the user clicks the confirmation link he is redirected back to your - /// app password reset URL with the secret key and email address values - /// attached to the URL query string. Use the query string params to submit a - /// request to the [PUT /account/recovery](/docs/client/account#updateRecovery) - /// endpoint to complete the process. - /// - Future createRecovery({@required String email, @required String url}) { - final String path = '/account/recovery'; - - final Map params = { - 'email': email, - 'url': url, - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.post, path: path, params: params, headers: headers); - } - - /// Complete Password Recovery - /// - /// Use this endpoint to complete the user account password reset. Both the - /// **userId** and **secret** arguments will be passed as query parameters to - /// the redirect URL you have provided when sending your request to the [POST - /// /account/recovery](/docs/client/account#createRecovery) endpoint. - /// - /// Please note that in order to avoid a [Redirect - /// 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}) { - final String path = '/account/recovery'; - - final Map params = { - 'userId': userId, - 'secret': secret, - 'password': password, - 'passwordAgain': passwordAgain, - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.put, path: path, params: params, headers: headers); - } - - /// Get Account Sessions - /// - /// Get currently logged in user list of active sessions across different - /// devices. - /// - Future getSessions() { - final String path = '/account/sessions'; - - final Map params = { - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.get, path: path, params: params, headers: headers); - } - - /// Create Account Session - /// - /// Allow the user to login into his account by providing a valid email and - /// password combination. This route will create a new session for the user. - /// - Future createSession({@required String email, @required String password}) { - final String path = '/account/sessions'; - - final Map params = { - 'email': email, - 'password': password, - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.post, path: path, params: params, headers: headers); - } - - /// Delete All Account Sessions - /// - /// Delete all sessions from the user account and remove any sessions cookies - /// from the end client. - /// - Future deleteSessions() { - final String path = '/account/sessions'; - - final Map params = { - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.delete, path: path, params: params, headers: headers); - } - - /// Create Account Session with OAuth2 - /// - /// Allow the user to login to his account using the OAuth2 provider of his - /// choice. Each OAuth2 provider should be enabled from the Appwrite console - /// first. Use the success and failure arguments to provide a redirect URL's - /// back to your app when login is completed. - /// - Future createOAuth2Session({@required String provider, String success = 'https://appwrite.io/auth/oauth2/success', String failure = 'https://appwrite.io/auth/oauth2/failure', List scopes = const []}) { - final String path = '/account/sessions/oauth2/{provider}'.replaceAll(RegExp('{provider}'), provider); - - final Map params = { - 'success': success, - 'failure': failure, - 'scopes': scopes, - 'project': client.config['project'], - }; - - - final List query = []; - - params.forEach((key, value) { - if (value is List) { - for (var item in value) { - query.add(Uri.encodeComponent(key + '[]') + '=' + Uri.encodeComponent(item)); - } - } - else { - query.add(Uri.encodeComponent(key) + '=' + Uri.encodeComponent(value)); - } - }); - - Uri endpoint = Uri.parse(client.endPoint); - Uri url = new Uri(scheme: endpoint.scheme, - host: endpoint.host, - port: endpoint.port, - path: endpoint.path + path, - query: query.join('&') - ); - - if(kIsWeb) { - html.window.location.href = url.toString(); - return null; - }else{ - - return FlutterWebAuth.authenticate( - url: url.toString(), - callbackUrlScheme: "appwrite-callback-" + client.config['project'] - ).then((value) async { - Uri url = Uri.parse(value); - Cookie cookie = new Cookie(url.queryParameters['key'], url.queryParameters['secret']); - cookie.domain = Uri.parse(client.endPoint).host; - cookie.httpOnly = true; - cookie.path = '/'; - List cookies = [cookie]; - await client.init(); - client.cookieJar.saveFromResponse(Uri.parse(client.endPoint), cookies); - }); - } - - } - - /// Delete Account Session - /// - /// Use this endpoint to log out the currently logged in user from all his - /// account sessions across all his different devices. When using the option id - /// argument, only the session unique ID provider will be deleted. - /// - Future deleteSession({@required String sessionId}) { - final String path = '/account/sessions/{sessionId}'.replaceAll(RegExp('{sessionId}'), sessionId); - - final Map params = { - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.delete, path: path, params: params, headers: headers); - } - - /// Create Email Verification - /// - /// Use this endpoint to send a verification message to your user email address - /// to confirm they are the valid owners of that address. Both the **userId** - /// and **secret** arguments will be passed as query parameters to the URL you - /// have provided to be attached to the verification email. The provided URL - /// should redirect the user back to your app and allow you to complete the - /// verification process by verifying both the **userId** and **secret** - /// parameters. Learn more about how to [complete the verification - /// process](/docs/client/account#updateAccountVerification). - /// - /// Please note that in order to avoid a [Redirect - /// 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 createVerification({@required String url}) { - final String path = '/account/verification'; - - final Map params = { - 'url': url, - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.post, path: path, params: params, headers: headers); - } - - /// Complete Email Verification - /// - /// 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}) { - final String path = '/account/verification'; - - final Map params = { - 'userId': userId, - 'secret': secret, - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.put, path: path, params: params, headers: headers); - } -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter/lib/services/avatars.dart b/app/sdks/0.6.2/client-flutter/lib/services/avatars.dart deleted file mode 100644 index b7fa6393ef..0000000000 --- a/app/sdks/0.6.2/client-flutter/lib/services/avatars.dart +++ /dev/null @@ -1,238 +0,0 @@ - - -import 'package:dio/dio.dart'; -import 'package:meta/meta.dart'; - -import "../client.dart"; -import '../enums.dart'; -import "../service.dart"; - -class Avatars extends Service { - Avatars(Client client): super(client); - - /// Get Browser Icon - /// - /// You can use this endpoint to show different browser icons to your users. - /// The code argument receives the browser code as it appears in your user - /// /account/sessions endpoint. Use width, height and quality arguments to - /// change the output settings. - /// - String getBrowser({@required String code, int width = 100, int height = 100, int quality = 100}) { - final String path = '/avatars/browsers/{code}'.replaceAll(RegExp('{code}'), code); - - final Map params = { - 'width': width, - 'height': height, - 'quality': quality, - 'project': client.config['project'], - }; - - params.keys.forEach((key) {if (params[key] is int || params[key] is double) { - params[key] = params[key].toString(); - }}); - - Uri endpoint = Uri.parse(client.endPoint); - Uri location = new Uri(scheme: endpoint.scheme, - host: endpoint.host, - port: endpoint.port, - path: endpoint.path + path, - queryParameters:params, - ); - - return location.toString(); - } - - /// Get Credit Card Icon - /// - /// Need to display your users with your billing method or their payment - /// methods? The credit card endpoint will return you the icon of the credit - /// card provider you need. Use width, height and quality arguments to change - /// the output settings. - /// - String getCreditCard({@required String code, int width = 100, int height = 100, int quality = 100}) { - final String path = '/avatars/credit-cards/{code}'.replaceAll(RegExp('{code}'), code); - - final Map params = { - 'width': width, - 'height': height, - 'quality': quality, - 'project': client.config['project'], - }; - - params.keys.forEach((key) {if (params[key] is int || params[key] is double) { - params[key] = params[key].toString(); - }}); - - Uri endpoint = Uri.parse(client.endPoint); - Uri location = new Uri(scheme: endpoint.scheme, - host: endpoint.host, - port: endpoint.port, - path: endpoint.path + path, - queryParameters:params, - ); - - return location.toString(); - } - - /// Get Favicon - /// - /// Use this endpoint to fetch the favorite icon (AKA favicon) of a any remote - /// website URL. - /// - String getFavicon({@required String url}) { - final String path = '/avatars/favicon'; - - final Map params = { - 'url': url, - 'project': client.config['project'], - }; - - params.keys.forEach((key) {if (params[key] is int || params[key] is double) { - params[key] = params[key].toString(); - }}); - - Uri endpoint = Uri.parse(client.endPoint); - Uri location = new Uri(scheme: endpoint.scheme, - host: endpoint.host, - port: endpoint.port, - path: endpoint.path + path, - queryParameters:params, - ); - - return location.toString(); - } - - /// Get Country Flag - /// - /// You can use this endpoint to show different country flags icons to your - /// users. The code argument receives the 2 letter country code. Use width, - /// height and quality arguments to change the output settings. - /// - String getFlag({@required String code, int width = 100, int height = 100, int quality = 100}) { - final String path = '/avatars/flags/{code}'.replaceAll(RegExp('{code}'), code); - - final Map params = { - 'width': width, - 'height': height, - 'quality': quality, - 'project': client.config['project'], - }; - - params.keys.forEach((key) {if (params[key] is int || params[key] is double) { - params[key] = params[key].toString(); - }}); - - Uri endpoint = Uri.parse(client.endPoint); - Uri location = new Uri(scheme: endpoint.scheme, - host: endpoint.host, - port: endpoint.port, - path: endpoint.path + path, - queryParameters:params, - ); - - return location.toString(); - } - - /// Get Image from URL - /// - /// Use this endpoint to fetch a remote image URL and crop it to any image size - /// you want. This endpoint is very useful if you need to crop and display - /// remote images in your app or in case you want to make sure a 3rd party - /// image is properly served using a TLS protocol. - /// - String getImage({@required String url, int width = 400, int height = 400}) { - final String path = '/avatars/image'; - - final Map params = { - 'url': url, - 'width': width, - 'height': height, - 'project': client.config['project'], - }; - - params.keys.forEach((key) {if (params[key] is int || params[key] is double) { - params[key] = params[key].toString(); - }}); - - Uri endpoint = Uri.parse(client.endPoint); - Uri location = new Uri(scheme: endpoint.scheme, - host: endpoint.host, - port: endpoint.port, - path: endpoint.path + path, - queryParameters:params, - ); - - return location.toString(); - } - - /// Get User Initials - /// - /// Use this endpoint to show your user initials avatar icon on your website or - /// app. By default, this route will try to print your logged-in user name or - /// email initials. You can also overwrite the user name if you pass the 'name' - /// parameter. If no name is given and no user is logged, an empty avatar will - /// be returned. - /// - /// You can use the color and background params to change the avatar colors. By - /// default, a random theme will be selected. The random theme will persist for - /// the user's initials when reloading the same theme will always return for - /// the same initials. - /// - String getInitials({String name = '', int width = 500, int height = 500, String color = '', String background = ''}) { - final String path = '/avatars/initials'; - - final Map params = { - 'name': name, - 'width': width, - 'height': height, - 'color': color, - 'background': background, - 'project': client.config['project'], - }; - - params.keys.forEach((key) {if (params[key] is int || params[key] is double) { - params[key] = params[key].toString(); - }}); - - Uri endpoint = Uri.parse(client.endPoint); - Uri location = new Uri(scheme: endpoint.scheme, - host: endpoint.host, - port: endpoint.port, - path: endpoint.path + path, - queryParameters:params, - ); - - return location.toString(); - } - - /// 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. - /// - String getQR({@required String text, int size = 400, int margin = 1, bool download = false}) { - final String path = '/avatars/qr'; - - final Map params = { - 'text': text, - 'size': size, - 'margin': margin, - 'download': download, - 'project': client.config['project'], - }; - - params.keys.forEach((key) {if (params[key] is int || params[key] is double) { - params[key] = params[key].toString(); - }}); - - Uri endpoint = Uri.parse(client.endPoint); - Uri location = new Uri(scheme: endpoint.scheme, - host: endpoint.host, - port: endpoint.port, - path: endpoint.path + path, - queryParameters:params, - ); - - return location.toString(); - } -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter/lib/services/database.dart b/app/sdks/0.6.2/client-flutter/lib/services/database.dart deleted file mode 100644 index 0fec1fb4d6..0000000000 --- a/app/sdks/0.6.2/client-flutter/lib/services/database.dart +++ /dev/null @@ -1,119 +0,0 @@ - - -import 'package:dio/dio.dart'; -import 'package:meta/meta.dart'; - -import "../client.dart"; -import '../enums.dart'; -import "../service.dart"; - -class Database extends Service { - Database(Client client): super(client); - - /// List Documents - /// - /// Get a list of all the user documents. You can use the query params to - /// filter your results. On admin mode, this endpoint will return a list of all - /// of the project documents. [Learn more about different API - /// modes](/docs/admin). - /// - Future listDocuments({@required String collectionId, List filters = const [], int offset = 0, int limit = 50, String orderField = '\$id', OrderType orderType = OrderType.asc, String orderCast = 'string', String search = ''}) { - final String path = '/database/collections/{collectionId}/documents'.replaceAll(RegExp('{collectionId}'), collectionId); - - final Map params = { - 'filters': filters, - 'offset': offset, - 'limit': limit, - 'orderField': orderField, - 'orderType': orderType.name(), - 'orderCast': orderCast, - 'search': search, - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.get, path: path, params: params, headers: headers); - } - - /// Create Document - /// - /// Create a new Document. Before using this route, you should create a new - /// collection resource using either a [server - /// integration](/docs/server/database?sdk=nodejs#createCollection) API or - /// directly from your database console. - /// - Future createDocument({@required String collectionId, @required dynamic data, @required List read, @required List write, String parentDocument = '', String parentProperty = '', String parentPropertyType = 'assign'}) { - final String path = '/database/collections/{collectionId}/documents'.replaceAll(RegExp('{collectionId}'), collectionId); - - final Map params = { - 'data': data, - 'read': read, - 'write': write, - 'parentDocument': parentDocument, - 'parentProperty': parentProperty, - 'parentPropertyType': parentPropertyType, - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.post, path: path, params: params, headers: headers); - } - - /// Get Document - /// - /// Get document by its unique ID. This endpoint response returns a JSON object - /// with the document data. - /// - Future getDocument({@required String collectionId, @required String documentId}) { - final String path = '/database/collections/{collectionId}/documents/{documentId}'.replaceAll(RegExp('{collectionId}'), collectionId).replaceAll(RegExp('{documentId}'), documentId); - - final Map params = { - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.get, path: path, params: params, headers: headers); - } - - /// Update Document - Future updateDocument({@required String collectionId, @required String documentId, @required dynamic data, @required List read, @required List write}) { - final String path = '/database/collections/{collectionId}/documents/{documentId}'.replaceAll(RegExp('{collectionId}'), collectionId).replaceAll(RegExp('{documentId}'), documentId); - - final Map params = { - 'data': data, - 'read': read, - 'write': write, - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.patch, path: path, params: params, headers: headers); - } - - /// Delete Document - /// - /// Delete document by its unique ID. This endpoint deletes only the parent - /// documents, his attributes and relations to other documents. Child documents - /// **will not** be deleted. - /// - Future deleteDocument({@required String collectionId, @required String documentId}) { - final String path = '/database/collections/{collectionId}/documents/{documentId}'.replaceAll(RegExp('{collectionId}'), collectionId).replaceAll(RegExp('{documentId}'), documentId); - - final Map params = { - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.delete, path: path, params: params, headers: headers); - } -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter/lib/services/locale.dart b/app/sdks/0.6.2/client-flutter/lib/services/locale.dart deleted file mode 100644 index 095af4792c..0000000000 --- a/app/sdks/0.6.2/client-flutter/lib/services/locale.dart +++ /dev/null @@ -1,143 +0,0 @@ - - -import 'package:dio/dio.dart'; -import 'package:meta/meta.dart'; - -import "../client.dart"; -import '../enums.dart'; -import "../service.dart"; - -class Locale extends Service { - Locale(Client client): super(client); - - /// Get User Locale - /// - /// Get the current user location based on IP. Returns an object with user - /// country code, country name, continent name, continent code, ip address and - /// suggested currency. You can use the locale header to get the data in a - /// supported language. - /// - /// ([IP Geolocation by DB-IP](https://db-ip.com)) - /// - Future get() { - final String path = '/locale'; - - final Map params = { - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.get, path: path, params: params, headers: headers); - } - - /// List Continents - /// - /// List of all continents. You can use the locale header to get the data in a - /// supported language. - /// - Future getContinents() { - final String path = '/locale/continents'; - - final Map params = { - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.get, path: path, params: params, headers: headers); - } - - /// List Countries - /// - /// List of all countries. You can use the locale header to get the data in a - /// supported language. - /// - Future getCountries() { - final String path = '/locale/countries'; - - final Map params = { - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.get, path: path, params: params, headers: headers); - } - - /// 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 getCountriesEU() { - final String path = '/locale/countries/eu'; - - final Map params = { - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.get, path: path, params: params, headers: headers); - } - - /// 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 getCountriesPhones() { - final String path = '/locale/countries/phones'; - - final Map params = { - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.get, path: path, params: params, headers: headers); - } - - /// 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 getCurrencies() { - final String path = '/locale/currencies'; - - final Map params = { - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.get, path: path, params: params, headers: headers); - } - - /// 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 getLanguages() { - final String path = '/locale/languages'; - - final Map params = { - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.get, path: path, params: params, headers: headers); - } -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter/lib/services/storage.dart b/app/sdks/0.6.2/client-flutter/lib/services/storage.dart deleted file mode 100644 index 51f9345050..0000000000 --- a/app/sdks/0.6.2/client-flutter/lib/services/storage.dart +++ /dev/null @@ -1,203 +0,0 @@ - - -import 'package:dio/dio.dart'; -import 'package:meta/meta.dart'; - -import "../client.dart"; -import '../enums.dart'; -import "../service.dart"; - -class Storage extends Service { - Storage(Client client): super(client); - - /// List Files - /// - /// Get a list of all the user files. You can use the query params to filter - /// your results. On admin mode, this endpoint will return a list of all of the - /// project files. [Learn more about different API modes](/docs/admin). - /// - Future listFiles({String search = '', int limit = 25, int offset = 0, OrderType orderType = OrderType.asc}) { - final String path = '/storage/files'; - - final Map params = { - 'search': search, - 'limit': limit, - 'offset': offset, - 'orderType': orderType.name(), - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.get, path: path, params: params, headers: headers); - } - - /// Create File - /// - /// Create a new file. The user who creates the file will automatically be - /// assigned to read and write access unless he has passed custom values for - /// read and write arguments. - /// - Future createFile({@required MultipartFile file, @required List read, @required List write}) { - final String path = '/storage/files'; - - final Map params = { - 'file': file, - 'read': read, - 'write': write, - }; - - final Map headers = { - 'content-type': 'multipart/form-data', - }; - - return client.call(HttpMethod.post, path: path, params: params, headers: headers); - } - - /// Get File - /// - /// Get file by its unique ID. This endpoint response returns a JSON object - /// with the file metadata. - /// - Future getFile({@required String fileId}) { - final String path = '/storage/files/{fileId}'.replaceAll(RegExp('{fileId}'), fileId); - - final Map params = { - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.get, path: path, params: params, headers: headers); - } - - /// Update File - /// - /// Update file by its unique ID. Only users with write permissions have access - /// to update this resource. - /// - Future updateFile({@required String fileId, @required List read, @required List write}) { - final String path = '/storage/files/{fileId}'.replaceAll(RegExp('{fileId}'), fileId); - - final Map params = { - 'read': read, - 'write': write, - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.put, path: path, params: params, headers: headers); - } - - /// Delete File - /// - /// Delete a file by its unique ID. Only users with write permissions have - /// access to delete this resource. - /// - Future deleteFile({@required String fileId}) { - final String path = '/storage/files/{fileId}'.replaceAll(RegExp('{fileId}'), fileId); - - final Map params = { - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.delete, path: path, params: params, headers: headers); - } - - /// Get File for Download - /// - /// Get 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. - /// - String getFileDownload({@required String fileId}) { - final String path = '/storage/files/{fileId}/download'.replaceAll(RegExp('{fileId}'), fileId); - - final Map params = { - 'project': client.config['project'], - }; - - params.keys.forEach((key) {if (params[key] is int || params[key] is double) { - params[key] = params[key].toString(); - }}); - - Uri endpoint = Uri.parse(client.endPoint); - Uri location = new Uri(scheme: endpoint.scheme, - host: endpoint.host, - port: endpoint.port, - path: endpoint.path + path, - queryParameters:params, - ); - - return location.toString(); - } - - /// Get File Preview - /// - /// Get a file preview image. Currently, this method supports preview for image - /// files (jpg, png, and gif), other supported formats, like pdf, docs, slides, - /// and spreadsheets, will return the file icon image. You can also pass query - /// string arguments for cutting and resizing your preview image. - /// - String getFilePreview({@required String fileId, int width = 0, int height = 0, int quality = 100, String background = '', String output = ''}) { - final String path = '/storage/files/{fileId}/preview'.replaceAll(RegExp('{fileId}'), fileId); - - final Map params = { - 'width': width, - 'height': height, - 'quality': quality, - 'background': background, - 'output': output, - 'project': client.config['project'], - }; - - params.keys.forEach((key) {if (params[key] is int || params[key] is double) { - params[key] = params[key].toString(); - }}); - - Uri endpoint = Uri.parse(client.endPoint); - Uri location = new Uri(scheme: endpoint.scheme, - host: endpoint.host, - port: endpoint.port, - path: endpoint.path + path, - queryParameters:params, - ); - - return location.toString(); - } - - /// Get File for View - /// - /// Get file content by its unique ID. This endpoint is similar to the download - /// method but returns with no 'Content-Disposition: attachment' header. - /// - String getFileView({@required String fileId, String as = ''}) { - final String path = '/storage/files/{fileId}/view'.replaceAll(RegExp('{fileId}'), fileId); - - final Map params = { - 'as': as, - 'project': client.config['project'], - }; - - params.keys.forEach((key) {if (params[key] is int || params[key] is double) { - params[key] = params[key].toString(); - }}); - - Uri endpoint = Uri.parse(client.endPoint); - Uri location = new Uri(scheme: endpoint.scheme, - host: endpoint.host, - port: endpoint.port, - path: endpoint.path + path, - queryParameters:params, - ); - - return location.toString(); - } -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter/lib/services/teams.dart b/app/sdks/0.6.2/client-flutter/lib/services/teams.dart deleted file mode 100644 index b9205da455..0000000000 --- a/app/sdks/0.6.2/client-flutter/lib/services/teams.dart +++ /dev/null @@ -1,207 +0,0 @@ - - -import 'package:dio/dio.dart'; -import 'package:meta/meta.dart'; - -import "../client.dart"; -import '../enums.dart'; -import "../service.dart"; - -class Teams extends Service { - Teams(Client client): super(client); - - /// List Teams - /// - /// Get a list of all the current user teams. You can use the query params to - /// filter your results. On admin mode, this endpoint will return a list of all - /// of the project teams. [Learn more about different API modes](/docs/admin). - /// - Future list({String search = '', int limit = 25, int offset = 0, OrderType orderType = OrderType.asc}) { - final String path = '/teams'; - - final Map params = { - 'search': search, - 'limit': limit, - 'offset': offset, - 'orderType': orderType.name(), - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.get, path: path, params: params, headers: headers); - } - - /// Create Team - /// - /// Create a new team. The user who creates the team will automatically be - /// assigned as the owner of the team. The team owner can invite new members, - /// who will be able add new owners and update or delete the team from your - /// project. - /// - Future create({@required String name, List roles = const ["owner"]}) { - final String path = '/teams'; - - final Map params = { - 'name': name, - 'roles': roles, - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.post, path: path, params: params, headers: headers); - } - - /// Get Team - /// - /// Get team by its unique ID. All team members have read access for this - /// resource. - /// - Future get({@required String teamId}) { - final String path = '/teams/{teamId}'.replaceAll(RegExp('{teamId}'), teamId); - - final Map params = { - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.get, path: path, params: params, headers: headers); - } - - /// Update Team - /// - /// Update team by its unique ID. Only team owners have write access for this - /// resource. - /// - Future update({@required String teamId, @required String name}) { - final String path = '/teams/{teamId}'.replaceAll(RegExp('{teamId}'), teamId); - - final Map params = { - 'name': name, - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.put, path: path, params: params, headers: headers); - } - - /// Delete Team - /// - /// Delete team by its unique ID. Only team owners have write access for this - /// resource. - /// - Future delete({@required String teamId}) { - final String path = '/teams/{teamId}'.replaceAll(RegExp('{teamId}'), teamId); - - final Map params = { - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.delete, path: path, params: params, headers: headers); - } - - /// Get Team Memberships - /// - /// Get team members by the team unique ID. All team members have read access - /// for this list of resources. - /// - Future getMemberships({@required String teamId, String search = '', int limit = 25, int offset = 0, OrderType orderType = OrderType.asc}) { - final String path = '/teams/{teamId}/memberships'.replaceAll(RegExp('{teamId}'), teamId); - - final Map params = { - 'search': search, - 'limit': limit, - 'offset': offset, - 'orderType': orderType.name(), - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.get, path: path, params: params, headers: headers); - } - - /// Create Team Membership - /// - /// Use this endpoint to invite a new member to join your team. An email with a - /// link to join the team will be sent to the new member email address if the - /// member doesn't exist in the project it will be created automatically. - /// - /// Use the 'URL' parameter to redirect the user from the invitation email back - /// to your app. When the user is redirected, use the [Update Team Membership - /// Status](/docs/client/teams#updateMembershipStatus) endpoint to allow the - /// user to accept the invitation to the team. - /// - /// Please note that in order to avoid a [Redirect - /// Attacks](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) - /// the only valid redirect URL's are the once from domains you have set when - /// added your platforms in the console interface. - /// - Future createMembership({@required String teamId, @required String email, @required List roles, @required String url, String name = ''}) { - final String path = '/teams/{teamId}/memberships'.replaceAll(RegExp('{teamId}'), teamId); - - final Map params = { - 'email': email, - 'name': name, - 'roles': roles, - 'url': url, - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.post, path: path, params: params, headers: headers); - } - - /// 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 he didn't accept it. - /// - Future deleteMembership({@required String teamId, @required String inviteId}) { - final String path = '/teams/{teamId}/memberships/{inviteId}'.replaceAll(RegExp('{teamId}'), teamId).replaceAll(RegExp('{inviteId}'), inviteId); - - final Map params = { - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.delete, path: path, params: params, headers: headers); - } - - /// Update Team Membership Status - /// - /// Use this endpoint to allow a user to accept an invitation to join a team - /// after he is being redirected back to your app from the invitation email he - /// was sent. - /// - Future updateMembershipStatus({@required String teamId, @required String inviteId, @required String userId, @required String secret}) { - final String path = '/teams/{teamId}/memberships/{inviteId}/status'.replaceAll(RegExp('{teamId}'), teamId).replaceAll(RegExp('{inviteId}'), inviteId); - - final Map params = { - 'userId': userId, - 'secret': secret, - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.patch, path: path, params: params, headers: headers); - } -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-flutter/pubspec.yaml b/app/sdks/0.6.2/client-flutter/pubspec.yaml deleted file mode 100644 index cabc271c5e..0000000000 --- a/app/sdks/0.6.2/client-flutter/pubspec.yaml +++ /dev/null @@ -1,24 +0,0 @@ -name: appwrite -version: 0.3.0-dev.2 -description: Appwrite is an open-source self-hosted backend server that abstract and simplify complex and repetitive development tasks behind a very simple REST API -homepage: https://appwrite.io -repository: https://github.com/appwrite/sdk-for-flutter -issue_tracker: https://github.com/appwrite/sdk-generator/issues -documentation: https://appwrite.io/support -environment: - sdk: '>=2.6.0 <3.0.0' -dependencies: - meta: ^1.1.8 - path_provider: ^1.6.14 - package_info: ^0.4.3 - dio: ^3.0.10 - cookie_jar: ^1.0.1 - dio_cookie_manager: ^1.0.0 - flutter_web_auth: ^0.2.4 - universal_html: ^1.2.3 - flutter: - sdk: flutter - -dev_dependencies: - flutter_test: - sdk: flutter \ No newline at end of file diff --git a/app/sdks/0.6.2/client-swift/CHANGELOG.md b/app/sdks/0.6.2/client-swift/CHANGELOG.md deleted file mode 100644 index fa4d35e687..0000000000 --- a/app/sdks/0.6.2/client-swift/CHANGELOG.md +++ /dev/null @@ -1 +0,0 @@ -# Change Log \ No newline at end of file diff --git a/app/sdks/0.6.2/client-swift/LICENSE b/app/sdks/0.6.2/client-swift/LICENSE deleted file mode 100644 index fc7c051a91..0000000000 --- a/app/sdks/0.6.2/client-swift/LICENSE +++ /dev/null @@ -1,12 +0,0 @@ -Copyright (c) 2019 Appwrite (https://appwrite.io) and individual contributors. -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - - 3. Neither the name Appwrite nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/app/sdks/0.6.2/client-swift/Package.swift b/app/sdks/0.6.2/client-swift/Package.swift deleted file mode 100644 index 5bea7f1c50..0000000000 --- a/app/sdks/0.6.2/client-swift/Package.swift +++ /dev/null @@ -1,35 +0,0 @@ -// swift-tools-version:5.1 -// The swift-tools-version declares the minimum version of Swift required to build this package. -// -// Created by Armino -// GitHub: https://github.com/armino-dev/sdk-generator -// - -import PackageDescription - -let package = Package( - name: "Appwrite", - products: [ - // Products define the executables and libraries produced by a package, - // and make them visible to other packages. - .library( - name: "Appwrite", - targets: ["Appwrite"]), - ], - dependencies: [ - // Dependencies declare other packages that this package depends on. - // .package(url: /* package url */, from: "1.0.0"), - ], - targets: [ - // Targets are the basic building blocks of a package. - // A target can define a module or a test suite. - // Targets can depend on other targets in this package, - // and on products in packages which this package depends on. - .target( - name: "Appwrite", - dependencies: []), - .testTarget( - name: "AppwriteTests", - dependencies: [Appwrite]), - ] -) diff --git a/app/sdks/0.6.2/client-swift/README.md b/app/sdks/0.6.2/client-swift/README.md deleted file mode 100644 index d46757f068..0000000000 --- a/app/sdks/0.6.2/client-swift/README.md +++ /dev/null @@ -1,24 +0,0 @@ -# Appwrite Swift SDK - -![License](https://img.shields.io/github/license/appwrite/sdk-for-swift.svg?v=1) -![Version](https://img.shields.io/badge/api%20version-0.7.0-blue.svg?v=1) - -Appwrite is an open-source backend as a service server that abstract and simplify complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way. - Use the Swift SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools. - For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs) - - - -![Appwrite](https://appwrite.io/images/github.png) - -## Installation - -``` - git clone appwrite/sdk-for-swift - cd sdk-for-swift - swift run -``` - -## License - -Please see the [BSD-3-Clause license](https://raw.githubusercontent.com/appwrite/appwrite/master/LICENSE) file for more information. diff --git a/app/sdks/0.6.2/client-swift/Sources/Appwrite/Client.swift b/app/sdks/0.6.2/client-swift/Sources/Appwrite/Client.swift deleted file mode 100644 index 8748fbc0f9..0000000000 --- a/app/sdks/0.6.2/client-swift/Sources/Appwrite/Client.swift +++ /dev/null @@ -1,231 +0,0 @@ -// -// Client.swift -// -// Created by Armino -// GitHub: https://github.com/armino-dev/sdk-generator -// - -import Foundation - -open class Client { - - // MARK: Properties - - open var selfSigned = false - - open var endpoint = "https://appwrite.io/v1" - - open var headers: [String: String] = [ - "content-type": "", - "x-sdk-version": "appwrite:swift:" - ] - - - // MARK: Methods - - // default constructor - public init() { - - } - - /// - /// Set Project - /// - /// Your project ID - /// - /// @param String value - /// - /// @return Client - /// - open func setProject(value: String) -> Client { - - self.addHeader(key: "X-Appwrite-Project", value: value) - return self - } - - /// - /// Set Locale - /// - /// @param String value - /// - /// @return Client - /// - open func setLocale(value: String) -> Client { - - self.addHeader(key: "X-Appwrite-Locale", value: value) - return self - } - - - /// - /// @param Bool status - /// @return Client - /// - open func setSelfSigned(status: Bool = true) -> Client { - - self.selfSigned = status - return self - } - - /// - /// @param String endpoint - /// @return Client - /// - open func setEndpoint(endpoint: String) -> Client { - - self.endpoint = endpoint - return self - } - - /// - /// @param String key - /// @param String value - /// - open func addHeader(key: String, value: String) -> Client { - - self.headers[key.lowercased()] = value.lowercased() - - return self - } - - /// - open func httpBuildQuery(params: [String: Any], prefix: String = "") -> String { - var output: String = "" - for (key, value) in params { - let finalKey: String = prefix.isEmpty ? key : (prefix + "[" + key + "]") - if (value is AnyCollection) { - output += self.httpBuildQuery(params: value as! [String : Any], prefix: finalKey) - } else { - output += "\(value)" - } - output += "&" - } - return output - } - - /// - /// Make an API call - /// - /// @param String method - /// @param String path - /// @param Array params - /// @param Array headers - /// @return Array|String - /// @throws Exception - /// - func call(method:String, path:String = "", headers:[String: String] = [:], params:[String: Any] = [:]) -> Any { - - self.headers.merge(headers){(_, new) in new} - let targetURL:URL = URL(string: self.endpoint + path + (( method == HTTPMethod.get.rawValue && !params.isEmpty ) ? "?" + httpBuildQuery(params: params) : ""))! - - var query: String = "" - - var responseStatus: Int = HTTPStatus.unknown.rawValue - var responseType: String = "" - var responseBody: Any = "" - - switch (self.headers["content-type"]) { - case "application/json": - do { - let json = try JSONSerialization.data(withJSONObject:params, options: []) - query = String( data: json, encoding: String.Encoding.utf8)! - } catch { - print("Failed to parse json: \(error.localizedDescription)") - } - break - default: - query = self.httpBuildQuery(params: params) - break - } - - var request = URLRequest(url: targetURL) - let session = URLSession.shared - - for (key, value) in self.headers { - request.setValue(value, forHTTPHeaderField: key) - } - - request.httpMethod = method - if (method.uppercased() == "POST") { - request.httpBody = query.data(using: .utf8) - } - - let semaphore = DispatchSemaphore(value: 0) - - session.dataTask(with: request) { data, response, error in - if (error != nil) { - print(error!) - return - } - do { - let httpResponse = response as! HTTPURLResponse - responseStatus = httpResponse.statusCode - - if (responseStatus == HTTPStatus.internalServerError.rawValue) { - print(responseStatus) - return - } - - responseType = httpResponse.mimeType ?? "" - - if (responseType == "application/json") { - let json = try JSONSerialization.jsonObject(with: data!, options: []) - responseBody = json - } else { - responseBody = String(data: data!, encoding: String.Encoding.utf8)! - } - } catch { - print(error) - } - - semaphore.signal() - }.resume() - - _ = semaphore.wait(wallTimeout: .distantFuture) - - return responseBody - } - -} - -extension Client { - - public enum HTTPStatus: Int { - case unknown = -1 - - case ok = 200 - case created = 201 - case accepted = 202 - - case movedPermanently = 301 - case found = 302 - - case badRequest = 400 - case notAuthorized = 401 - case paymentRequired = 402 - case forbidden = 403 - case notFound = 404 - case methodNotAllowed = 405 - case notAcceptable = 406 - - case internalServerError = 500 - case notImplemented = 501 - } - - public enum HTTPMethod: String { - case get - - case post - case put - case patch - - case delete - - case head - case options - case connect - case trace - } - - -} diff --git a/app/sdks/0.6.2/client-swift/Sources/Appwrite/Service.swift b/app/sdks/0.6.2/client-swift/Sources/Appwrite/Service.swift deleted file mode 100644 index b11a067a5d..0000000000 --- a/app/sdks/0.6.2/client-swift/Sources/Appwrite/Service.swift +++ /dev/null @@ -1,16 +0,0 @@ -// -// Service.swift -// -// Created by Armino -// GitHub: https://github.com/armino-dev/sdk-generator -// - -open class Service { - - open var client: Client; - - public init(client: Client) - { - self.client = client - } -} diff --git a/app/sdks/0.6.2/client-swift/Sources/Appwrite/Services/Account.swift b/app/sdks/0.6.2/client-swift/Sources/Appwrite/Services/Account.swift deleted file mode 100644 index 0ffb74df52..0000000000 --- a/app/sdks/0.6.2/client-swift/Sources/Appwrite/Services/Account.swift +++ /dev/null @@ -1,491 +0,0 @@ - - -class Account: Service -{ - /** - * Get Account - * - * Get currently logged in user data as JSON object. - * - * @throws Exception - * @return array - */ - - func get() -> Array { - let path: String = "/account" - - - let params: [String: Any] = [:] - - - return [self.client.call(method: Client.HTTPMethod.get.rawValue, path: path, headers: [ - "content-type": "application/json", - ], params: params)]; - } - - /** - * Create Account - * - * Use this endpoint to allow a new user to register a new account in your - * project. After the user registration completes successfully, you can use - * the [/account/verfication](/docs/client/account#createVerification) route - * to start verifying the user email address. To allow your new user to login - * to his new account, you need to create a new [account - * session](/docs/client/account#createSession). - * - * @param String _email - * @param String _password - * @param String _name - * @throws Exception - * @return array - */ - - func create(_email: String, _password: String, _name: String = "") -> Array { - let path: String = "/account" - - - var params: [String: Any] = [:] - - params["email"] = _email - params["password"] = _password - params["name"] = _name - - return [self.client.call(method: Client.HTTPMethod.post.rawValue, path: path, headers: [ - "content-type": "application/json", - ], params: params)]; - } - - /** - * Delete Account - * - * Delete a currently logged in user account. Behind the scene, the user - * record is not deleted but permanently blocked from any access. This is done - * to avoid deleted accounts being overtaken by new users with the same email - * address. Any user-related resources like documents or storage files should - * be deleted separately. - * - * @throws Exception - * @return array - */ - - func delete() -> Array { - let path: String = "/account" - - - let params: [String: Any] = [:] - - - return [self.client.call(method: Client.HTTPMethod.delete.rawValue, path: path, headers: [ - "content-type": "application/json", - ], params: params)]; - } - - /** - * Update Account Email - * - * Update currently logged in user account email address. After changing user - * address, user confirmation status is being reset and a new confirmation - * mail is sent. For security measures, user password is required to complete - * this request. - * - * @param String _email - * @param String _password - * @throws Exception - * @return array - */ - - func updateEmail(_email: String, _password: String) -> Array { - let path: String = "/account/email" - - - var params: [String: Any] = [:] - - params["email"] = _email - params["password"] = _password - - return [self.client.call(method: Client.HTTPMethod.patch.rawValue, path: path, headers: [ - "content-type": "application/json", - ], params: params)]; - } - - /** - * Get Account 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. - * - * @throws Exception - * @return array - */ - - func getLogs() -> Array { - let path: String = "/account/logs" - - - let params: [String: Any] = [:] - - - return [self.client.call(method: Client.HTTPMethod.get.rawValue, path: path, headers: [ - "content-type": "application/json", - ], params: params)]; - } - - /** - * Update Account Name - * - * Update currently logged in user account name. - * - * @param String _name - * @throws Exception - * @return array - */ - - func updateName(_name: String) -> Array { - let path: String = "/account/name" - - - var params: [String: Any] = [:] - - params["name"] = _name - - return [self.client.call(method: Client.HTTPMethod.patch.rawValue, path: path, headers: [ - "content-type": "application/json", - ], params: params)]; - } - - /** - * Update Account Password - * - * Update currently logged in user password. For validation, user is required - * to pass the password twice. - * - * @param String _password - * @param String _oldPassword - * @throws Exception - * @return array - */ - - func updatePassword(_password: String, _oldPassword: String) -> Array { - let path: String = "/account/password" - - - var params: [String: Any] = [:] - - params["password"] = _password - params["oldPassword"] = _oldPassword - - return [self.client.call(method: Client.HTTPMethod.patch.rawValue, path: path, headers: [ - "content-type": "application/json", - ], params: params)]; - } - - /** - * Get Account Preferences - * - * Get currently logged in user preferences as a key-value object. - * - * @throws Exception - * @return array - */ - - func getPrefs() -> Array { - let path: String = "/account/prefs" - - - let params: [String: Any] = [:] - - - return [self.client.call(method: Client.HTTPMethod.get.rawValue, path: path, headers: [ - "content-type": "application/json", - ], params: params)]; - } - - /** - * Update Account Preferences - * - * Update currently logged in user account preferences. You can pass only the - * specific settings you wish to update. - * - * @param object _prefs - * @throws Exception - * @return array - */ - - func updatePrefs(_prefs: object) -> Array { - let path: String = "/account/prefs" - - - var params: [String: Any] = [:] - - params["prefs"] = _prefs - - return [self.client.call(method: Client.HTTPMethod.patch.rawValue, path: path, headers: [ - "content-type": "application/json", - ], params: params)]; - } - - /** - * Create Password Recovery - * - * Sends the user an email with a temporary secret key for password reset. - * When the user clicks the confirmation link he is redirected back to your - * app password reset URL with the secret key and email address values - * attached to the URL query string. Use the query string params to submit a - * request to the [PUT /account/recovery](/docs/client/account#updateRecovery) - * endpoint to complete the process. - * - * @param String _email - * @param String _url - * @throws Exception - * @return array - */ - - func createRecovery(_email: String, _url: String) -> Array { - let path: String = "/account/recovery" - - - var params: [String: Any] = [:] - - params["email"] = _email - params["url"] = _url - - return [self.client.call(method: Client.HTTPMethod.post.rawValue, path: path, headers: [ - "content-type": "application/json", - ], params: params)]; - } - - /** - * Complete Password Recovery - * - * Use this endpoint to complete the user account password reset. Both the - * **userId** and **secret** arguments will be passed as query parameters to - * the redirect URL you have provided when sending your request to the [POST - * /account/recovery](/docs/client/account#createRecovery) endpoint. - * - * Please note that in order to avoid a [Redirect - * 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. - * - * @param String _userId - * @param String _secret - * @param String _password - * @param String _passwordAgain - * @throws Exception - * @return array - */ - - func updateRecovery(_userId: String, _secret: String, _password: String, _passwordAgain: String) -> Array { - let path: String = "/account/recovery" - - - var params: [String: Any] = [:] - - params["userId"] = _userId - params["secret"] = _secret - params["password"] = _password - params["passwordAgain"] = _passwordAgain - - return [self.client.call(method: Client.HTTPMethod.put.rawValue, path: path, headers: [ - "content-type": "application/json", - ], params: params)]; - } - - /** - * Get Account Sessions - * - * Get currently logged in user list of active sessions across different - * devices. - * - * @throws Exception - * @return array - */ - - func getSessions() -> Array { - let path: String = "/account/sessions" - - - let params: [String: Any] = [:] - - - return [self.client.call(method: Client.HTTPMethod.get.rawValue, path: path, headers: [ - "content-type": "application/json", - ], params: params)]; - } - - /** - * Create Account Session - * - * Allow the user to login into his account by providing a valid email and - * password combination. This route will create a new session for the user. - * - * @param String _email - * @param String _password - * @throws Exception - * @return array - */ - - func createSession(_email: String, _password: String) -> Array { - let path: String = "/account/sessions" - - - var params: [String: Any] = [:] - - params["email"] = _email - params["password"] = _password - - return [self.client.call(method: Client.HTTPMethod.post.rawValue, path: path, headers: [ - "content-type": "application/json", - ], params: params)]; - } - - /** - * Delete All Account Sessions - * - * Delete all sessions from the user account and remove any sessions cookies - * from the end client. - * - * @throws Exception - * @return array - */ - - func deleteSessions() -> Array { - let path: String = "/account/sessions" - - - let params: [String: Any] = [:] - - - return [self.client.call(method: Client.HTTPMethod.delete.rawValue, path: path, headers: [ - "content-type": "application/json", - ], params: params)]; - } - - /** - * Create Account Session with OAuth2 - * - * Allow the user to login to his account using the OAuth2 provider of his - * choice. Each OAuth2 provider should be enabled from the Appwrite console - * first. Use the success and failure arguments to provide a redirect URL's - * back to your app when login is completed. - * - * @param String _provider - * @param String _success - * @param String _failure - * @param Array _scopes - * @throws Exception - * @return array - */ - - func createOAuth2Session(_provider: String, _success: String = "https://appwrite.io/auth/oauth2/success", _failure: String = "https://appwrite.io/auth/oauth2/failure", _scopes: Array = []) -> Array { - var path: String = "/account/sessions/oauth2/{provider}" - - path = path.replacingOccurrences( - of: "{provider}", - with: _provider - ) - - var params: [String: Any] = [:] - - params["success"] = _success - params["failure"] = _failure - params["scopes"] = _scopes - - return [self.client.call(method: Client.HTTPMethod.get.rawValue, path: path, headers: [ - "content-type": "application/json", - ], params: params)]; - } - - /** - * Delete Account Session - * - * Use this endpoint to log out the currently logged in user from all his - * account sessions across all his different devices. When using the option id - * argument, only the session unique ID provider will be deleted. - * - * @param String _sessionId - * @throws Exception - * @return array - */ - - func deleteSession(_sessionId: String) -> Array { - var path: String = "/account/sessions/{sessionId}" - - path = path.replacingOccurrences( - of: "{sessionId}", - with: _sessionId - ) - - let params: [String: Any] = [:] - - - return [self.client.call(method: Client.HTTPMethod.delete.rawValue, path: path, headers: [ - "content-type": "application/json", - ], params: params)]; - } - - /** - * Create Email Verification - * - * Use this endpoint to send a verification message to your user email address - * to confirm they are the valid owners of that address. Both the **userId** - * and **secret** arguments will be passed as query parameters to the URL you - * have provided to be attached to the verification email. The provided URL - * should redirect the user back to your app and allow you to complete the - * verification process by verifying both the **userId** and **secret** - * parameters. Learn more about how to [complete the verification - * process](/docs/client/account#updateAccountVerification). - * - * Please note that in order to avoid a [Redirect - * 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. - * - * - * @param String _url - * @throws Exception - * @return array - */ - - func createVerification(_url: String) -> Array { - let path: String = "/account/verification" - - - var params: [String: Any] = [:] - - params["url"] = _url - - return [self.client.call(method: Client.HTTPMethod.post.rawValue, path: path, headers: [ - "content-type": "application/json", - ], params: params)]; - } - - /** - * Complete Email Verification - * - * 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. - * - * @param String _userId - * @param String _secret - * @throws Exception - * @return array - */ - - func updateVerification(_userId: String, _secret: String) -> Array { - let path: String = "/account/verification" - - - var params: [String: Any] = [:] - - params["userId"] = _userId - params["secret"] = _secret - - return [self.client.call(method: Client.HTTPMethod.put.rawValue, path: path, headers: [ - "content-type": "application/json", - ], params: params)]; - } - -} diff --git a/app/sdks/0.6.2/client-swift/Sources/Appwrite/Services/Avatars.swift b/app/sdks/0.6.2/client-swift/Sources/Appwrite/Services/Avatars.swift deleted file mode 100644 index 867841bafd..0000000000 --- a/app/sdks/0.6.2/client-swift/Sources/Appwrite/Services/Avatars.swift +++ /dev/null @@ -1,233 +0,0 @@ - - -class Avatars: Service -{ - /** - * Get Browser Icon - * - * You can use this endpoint to show different browser icons to your users. - * The code argument receives the browser code as it appears in your user - * /account/sessions endpoint. Use width, height and quality arguments to - * change the output settings. - * - * @param String _code - * @param Int _width - * @param Int _height - * @param Int _quality - * @throws Exception - * @return array - */ - - func getBrowser(_code: String, _width: Int = 100, _height: Int = 100, _quality: Int = 100) -> Array { - var path: String = "/avatars/browsers/{code}" - - path = path.replacingOccurrences( - of: "{code}", - with: _code - ) - - var params: [String: Any] = [:] - - params["width"] = _width - params["height"] = _height - params["quality"] = _quality - - return [self.client.call(method: Client.HTTPMethod.get.rawValue, path: path, headers: [ - "content-type": "application/json", - ], params: params)]; - } - - /** - * Get Credit Card Icon - * - * Need to display your users with your billing method or their payment - * methods? The credit card endpoint will return you the icon of the credit - * card provider you need. Use width, height and quality arguments to change - * the output settings. - * - * @param String _code - * @param Int _width - * @param Int _height - * @param Int _quality - * @throws Exception - * @return array - */ - - func getCreditCard(_code: String, _width: Int = 100, _height: Int = 100, _quality: Int = 100) -> Array { - var path: String = "/avatars/credit-cards/{code}" - - path = path.replacingOccurrences( - of: "{code}", - with: _code - ) - - var params: [String: Any] = [:] - - params["width"] = _width - params["height"] = _height - params["quality"] = _quality - - return [self.client.call(method: Client.HTTPMethod.get.rawValue, path: path, headers: [ - "content-type": "application/json", - ], params: params)]; - } - - /** - * Get Favicon - * - * Use this endpoint to fetch the favorite icon (AKA favicon) of a any remote - * website URL. - * - * @param String _url - * @throws Exception - * @return array - */ - - func getFavicon(_url: String) -> Array { - let path: String = "/avatars/favicon" - - - var params: [String: Any] = [:] - - params["url"] = _url - - return [self.client.call(method: Client.HTTPMethod.get.rawValue, path: path, headers: [ - "content-type": "application/json", - ], params: params)]; - } - - /** - * Get Country Flag - * - * You can use this endpoint to show different country flags icons to your - * users. The code argument receives the 2 letter country code. Use width, - * height and quality arguments to change the output settings. - * - * @param String _code - * @param Int _width - * @param Int _height - * @param Int _quality - * @throws Exception - * @return array - */ - - func getFlag(_code: String, _width: Int = 100, _height: Int = 100, _quality: Int = 100) -> Array { - var path: String = "/avatars/flags/{code}" - - path = path.replacingOccurrences( - of: "{code}", - with: _code - ) - - var params: [String: Any] = [:] - - params["width"] = _width - params["height"] = _height - params["quality"] = _quality - - return [self.client.call(method: Client.HTTPMethod.get.rawValue, path: path, headers: [ - "content-type": "application/json", - ], params: params)]; - } - - /** - * Get Image from URL - * - * Use this endpoint to fetch a remote image URL and crop it to any image size - * you want. This endpoint is very useful if you need to crop and display - * remote images in your app or in case you want to make sure a 3rd party - * image is properly served using a TLS protocol. - * - * @param String _url - * @param Int _width - * @param Int _height - * @throws Exception - * @return array - */ - - func getImage(_url: String, _width: Int = 400, _height: Int = 400) -> Array { - let path: String = "/avatars/image" - - - var params: [String: Any] = [:] - - params["url"] = _url - params["width"] = _width - params["height"] = _height - - return [self.client.call(method: Client.HTTPMethod.get.rawValue, path: path, headers: [ - "content-type": "application/json", - ], params: params)]; - } - - /** - * Get User Initials - * - * Use this endpoint to show your user initials avatar icon on your website or - * app. By default, this route will try to print your logged-in user name or - * email initials. You can also overwrite the user name if you pass the 'name' - * parameter. If no name is given and no user is logged, an empty avatar will - * be returned. - * - * You can use the color and background params to change the avatar colors. By - * default, a random theme will be selected. The random theme will persist for - * the user's initials when reloading the same theme will always return for - * the same initials. - * - * @param String _name - * @param Int _width - * @param Int _height - * @param String _color - * @param String _background - * @throws Exception - * @return array - */ - - func getInitials(_name: String = "", _width: Int = 500, _height: Int = 500, _color: String = "", _background: String = "") -> Array { - let path: String = "/avatars/initials" - - - var params: [String: Any] = [:] - - params["name"] = _name - params["width"] = _width - params["height"] = _height - params["color"] = _color - params["background"] = _background - - return [self.client.call(method: Client.HTTPMethod.get.rawValue, path: path, headers: [ - "content-type": "application/json", - ], params: params)]; - } - - /** - * 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. - * - * @param String _text - * @param Int _size - * @param Int _margin - * @param Bool _download - * @throws Exception - * @return array - */ - - func getQR(_text: String, _size: Int = 400, _margin: Int = 1, _download: Bool = false) -> Array { - let path: String = "/avatars/qr" - - - var params: [String: Any] = [:] - - params["text"] = _text - params["size"] = _size - params["margin"] = _margin - params["download"] = _download - - return [self.client.call(method: Client.HTTPMethod.get.rawValue, path: path, headers: [ - "content-type": "application/json", - ], params: params)]; - } - -} diff --git a/app/sdks/0.6.2/client-swift/Sources/Appwrite/Services/Database.swift b/app/sdks/0.6.2/client-swift/Sources/Appwrite/Services/Database.swift deleted file mode 100644 index 8436985582..0000000000 --- a/app/sdks/0.6.2/client-swift/Sources/Appwrite/Services/Database.swift +++ /dev/null @@ -1,183 +0,0 @@ - - -class Database: Service -{ - /** - * List Documents - * - * Get a list of all the user documents. You can use the query params to - * filter your results. On admin mode, this endpoint will return a list of all - * of the project documents. [Learn more about different API - * modes](/docs/admin). - * - * @param String _collectionId - * @param Array _filters - * @param Int _limit - * @param Int _offset - * @param String _orderField - * @param String _orderType - * @param String _orderCast - * @param String _search - * @throws Exception - * @return array - */ - - func listDocuments(_collectionId: String, _filters: Array = [], _limit: Int = 25, _offset: Int = 0, _orderField: String = "$id", _orderType: String = "ASC", _orderCast: String = "string", _search: String = "") -> Array { - var path: String = "/database/collections/{collectionId}/documents" - - path = path.replacingOccurrences( - of: "{collectionId}", - with: _collectionId - ) - - var params: [String: Any] = [:] - - params["filters"] = _filters - params["limit"] = _limit - params["offset"] = _offset - params["orderField"] = _orderField - params["orderType"] = _orderType - params["orderCast"] = _orderCast - params["search"] = _search - - return [self.client.call(method: Client.HTTPMethod.get.rawValue, path: path, headers: [ - "content-type": "application/json", - ], params: params)]; - } - - /** - * Create Document - * - * Create a new Document. Before using this route, you should create a new - * collection resource using either a [server - * integration](/docs/server/database?sdk=nodejs#createCollection) API or - * directly from your database console. - * - * @param String _collectionId - * @param object _data - * @param Array _read - * @param Array _write - * @throws Exception - * @return array - */ - - func createDocument(_collectionId: String, _data: object, _read: Array, _write: Array) -> Array { - var path: String = "/database/collections/{collectionId}/documents" - - path = path.replacingOccurrences( - of: "{collectionId}", - with: _collectionId - ) - - var params: [String: Any] = [:] - - params["data"] = _data - params["read"] = _read - params["write"] = _write - - return [self.client.call(method: Client.HTTPMethod.post.rawValue, path: path, headers: [ - "content-type": "application/json", - ], params: params)]; - } - - /** - * Get Document - * - * Get document by its unique ID. This endpoint response returns a JSON object - * with the document data. - * - * @param String _collectionId - * @param String _documentId - * @throws Exception - * @return array - */ - - func getDocument(_collectionId: String, _documentId: String) -> Array { - var path: String = "/database/collections/{collectionId}/documents/{documentId}" - - path = path.replacingOccurrences( - of: "{collectionId}", - with: _collectionId - ) - path = path.replacingOccurrences( - of: "{documentId}", - with: _documentId - ) - - let params: [String: Any] = [:] - - - return [self.client.call(method: Client.HTTPMethod.get.rawValue, path: path, headers: [ - "content-type": "application/json", - ], params: params)]; - } - - /** - * Update Document - * - * @param String _collectionId - * @param String _documentId - * @param object _data - * @param Array _read - * @param Array _write - * @throws Exception - * @return array - */ - - func updateDocument(_collectionId: String, _documentId: String, _data: object, _read: Array, _write: Array) -> Array { - var path: String = "/database/collections/{collectionId}/documents/{documentId}" - - path = path.replacingOccurrences( - of: "{collectionId}", - with: _collectionId - ) - path = path.replacingOccurrences( - of: "{documentId}", - with: _documentId - ) - - var params: [String: Any] = [:] - - params["data"] = _data - params["read"] = _read - params["write"] = _write - - return [self.client.call(method: Client.HTTPMethod.patch.rawValue, path: path, headers: [ - "content-type": "application/json", - ], params: params)]; - } - - /** - * Delete Document - * - * Delete document by its unique ID. This endpoint deletes only the parent - * documents, his attributes and relations to other documents. Child documents - * **will not** be deleted. - * - * @param String _collectionId - * @param String _documentId - * @throws Exception - * @return array - */ - - func deleteDocument(_collectionId: String, _documentId: String) -> Array { - var path: String = "/database/collections/{collectionId}/documents/{documentId}" - - path = path.replacingOccurrences( - of: "{collectionId}", - with: _collectionId - ) - path = path.replacingOccurrences( - of: "{documentId}", - with: _documentId - ) - - let params: [String: Any] = [:] - - - return [self.client.call(method: Client.HTTPMethod.delete.rawValue, path: path, headers: [ - "content-type": "application/json", - ], params: params)]; - } - -} diff --git a/app/sdks/0.6.2/client-swift/Sources/Appwrite/Services/Locale.swift b/app/sdks/0.6.2/client-swift/Sources/Appwrite/Services/Locale.swift deleted file mode 100644 index ef21554cbc..0000000000 --- a/app/sdks/0.6.2/client-swift/Sources/Appwrite/Services/Locale.swift +++ /dev/null @@ -1,164 +0,0 @@ - - -class Locale: Service -{ - /** - * Get User Locale - * - * Get the current user location based on IP. Returns an object with user - * country code, country name, continent name, continent code, ip address and - * suggested currency. You can use the locale header to get the data in a - * supported language. - * - * ([IP Geolocation by DB-IP](https://db-ip.com)) - * - * @throws Exception - * @return array - */ - - func get() -> Array { - let path: String = "/locale" - - - let params: [String: Any] = [:] - - - return [self.client.call(method: Client.HTTPMethod.get.rawValue, path: path, headers: [ - "content-type": "application/json", - ], params: params)]; - } - - /** - * List Continents - * - * List of all continents. You can use the locale header to get the data in a - * supported language. - * - * @throws Exception - * @return array - */ - - func getContinents() -> Array { - let path: String = "/locale/continents" - - - let params: [String: Any] = [:] - - - return [self.client.call(method: Client.HTTPMethod.get.rawValue, path: path, headers: [ - "content-type": "application/json", - ], params: params)]; - } - - /** - * List Countries - * - * List of all countries. You can use the locale header to get the data in a - * supported language. - * - * @throws Exception - * @return array - */ - - func getCountries() -> Array { - let path: String = "/locale/countries" - - - let params: [String: Any] = [:] - - - return [self.client.call(method: Client.HTTPMethod.get.rawValue, path: path, headers: [ - "content-type": "application/json", - ], params: params)]; - } - - /** - * 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. - * - * @throws Exception - * @return array - */ - - func getCountriesEU() -> Array { - let path: String = "/locale/countries/eu" - - - let params: [String: Any] = [:] - - - return [self.client.call(method: Client.HTTPMethod.get.rawValue, path: path, headers: [ - "content-type": "application/json", - ], params: params)]; - } - - /** - * List Countries Phone Codes - * - * List of all countries phone codes. You can use the locale header to get the - * data in a supported language. - * - * @throws Exception - * @return array - */ - - func getCountriesPhones() -> Array { - let path: String = "/locale/countries/phones" - - - let params: [String: Any] = [:] - - - return [self.client.call(method: Client.HTTPMethod.get.rawValue, path: path, headers: [ - "content-type": "application/json", - ], params: params)]; - } - - /** - * 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. - * - * @throws Exception - * @return array - */ - - func getCurrencies() -> Array { - let path: String = "/locale/currencies" - - - let params: [String: Any] = [:] - - - return [self.client.call(method: Client.HTTPMethod.get.rawValue, path: path, headers: [ - "content-type": "application/json", - ], params: params)]; - } - - /** - * List Languages - * - * List of all languages classified by ISO 639-1 including 2-letter code, name - * in English, and name in the respective language. - * - * @throws Exception - * @return array - */ - - func getLanguages() -> Array { - let path: String = "/locale/languages" - - - let params: [String: Any] = [:] - - - return [self.client.call(method: Client.HTTPMethod.get.rawValue, path: path, headers: [ - "content-type": "application/json", - ], params: params)]; - } - -} diff --git a/app/sdks/0.6.2/client-swift/Sources/Appwrite/Services/Storage.swift b/app/sdks/0.6.2/client-swift/Sources/Appwrite/Services/Storage.swift deleted file mode 100644 index b6e98145f7..0000000000 --- a/app/sdks/0.6.2/client-swift/Sources/Appwrite/Services/Storage.swift +++ /dev/null @@ -1,246 +0,0 @@ - - -class Storage: Service -{ - /** - * List Files - * - * Get a list of all the user files. You can use the query params to filter - * your results. On admin mode, this endpoint will return a list of all of the - * project files. [Learn more about different API modes](/docs/admin). - * - * @param String _search - * @param Int _limit - * @param Int _offset - * @param String _orderType - * @throws Exception - * @return array - */ - - func listFiles(_search: String = "", _limit: Int = 25, _offset: Int = 0, _orderType: String = "ASC") -> Array { - let path: String = "/storage/files" - - - var params: [String: Any] = [:] - - params["search"] = _search - params["limit"] = _limit - params["offset"] = _offset - params["orderType"] = _orderType - - return [self.client.call(method: Client.HTTPMethod.get.rawValue, path: path, headers: [ - "content-type": "application/json", - ], params: params)]; - } - - /** - * Create File - * - * Create a new file. The user who creates the file will automatically be - * assigned to read and write access unless he has passed custom values for - * read and write arguments. - * - * @param Array _file - * @param Array _read - * @param Array _write - * @throws Exception - * @return array - */ - - func createFile(_file: Array, _read: Array, _write: Array) -> Array { - let path: String = "/storage/files" - - - var params: [String: Any] = [:] - - params["file"] = _file - params["read"] = _read - params["write"] = _write - - return [self.client.call(method: Client.HTTPMethod.post.rawValue, path: path, headers: [ - "content-type": "multipart/form-data", - ], params: params)]; - } - - /** - * Get File - * - * Get file by its unique ID. This endpoint response returns a JSON object - * with the file metadata. - * - * @param String _fileId - * @throws Exception - * @return array - */ - - func getFile(_fileId: String) -> Array { - var path: String = "/storage/files/{fileId}" - - path = path.replacingOccurrences( - of: "{fileId}", - with: _fileId - ) - - let params: [String: Any] = [:] - - - return [self.client.call(method: Client.HTTPMethod.get.rawValue, path: path, headers: [ - "content-type": "application/json", - ], params: params)]; - } - - /** - * Update File - * - * Update file by its unique ID. Only users with write permissions have access - * to update this resource. - * - * @param String _fileId - * @param Array _read - * @param Array _write - * @throws Exception - * @return array - */ - - func updateFile(_fileId: String, _read: Array, _write: Array) -> Array { - var path: String = "/storage/files/{fileId}" - - path = path.replacingOccurrences( - of: "{fileId}", - with: _fileId - ) - - var params: [String: Any] = [:] - - params["read"] = _read - params["write"] = _write - - return [self.client.call(method: Client.HTTPMethod.put.rawValue, path: path, headers: [ - "content-type": "application/json", - ], params: params)]; - } - - /** - * Delete File - * - * Delete a file by its unique ID. Only users with write permissions have - * access to delete this resource. - * - * @param String _fileId - * @throws Exception - * @return array - */ - - func deleteFile(_fileId: String) -> Array { - var path: String = "/storage/files/{fileId}" - - path = path.replacingOccurrences( - of: "{fileId}", - with: _fileId - ) - - let params: [String: Any] = [:] - - - return [self.client.call(method: Client.HTTPMethod.delete.rawValue, path: path, headers: [ - "content-type": "application/json", - ], params: params)]; - } - - /** - * Get File for Download - * - * Get 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. - * - * @param String _fileId - * @throws Exception - * @return array - */ - - func getFileDownload(_fileId: String) -> Array { - var path: String = "/storage/files/{fileId}/download" - - path = path.replacingOccurrences( - of: "{fileId}", - with: _fileId - ) - - let params: [String: Any] = [:] - - - return [self.client.call(method: Client.HTTPMethod.get.rawValue, path: path, headers: [ - "content-type": "application/json", - ], params: params)]; - } - - /** - * Get File Preview - * - * Get a file preview image. Currently, this method supports preview for image - * files (jpg, png, and gif), other supported formats, like pdf, docs, slides, - * and spreadsheets, will return the file icon image. You can also pass query - * string arguments for cutting and resizing your preview image. - * - * @param String _fileId - * @param Int _width - * @param Int _height - * @param Int _quality - * @param String _background - * @param String _output - * @throws Exception - * @return array - */ - - func getFilePreview(_fileId: String, _width: Int = 0, _height: Int = 0, _quality: Int = 100, _background: String = "", _output: String = "") -> Array { - var path: String = "/storage/files/{fileId}/preview" - - path = path.replacingOccurrences( - of: "{fileId}", - with: _fileId - ) - - var params: [String: Any] = [:] - - params["width"] = _width - params["height"] = _height - params["quality"] = _quality - params["background"] = _background - params["output"] = _output - - return [self.client.call(method: Client.HTTPMethod.get.rawValue, path: path, headers: [ - "content-type": "application/json", - ], params: params)]; - } - - /** - * Get File for View - * - * Get file content by its unique ID. This endpoint is similar to the download - * method but returns with no 'Content-Disposition: attachment' header. - * - * @param String _fileId - * @param String _as - * @throws Exception - * @return array - */ - - func getFileView(_fileId: String, _as: String = "") -> Array { - var path: String = "/storage/files/{fileId}/view" - - path = path.replacingOccurrences( - of: "{fileId}", - with: _fileId - ) - - var params: [String: Any] = [:] - - params["as"] = _as - - return [self.client.call(method: Client.HTTPMethod.get.rawValue, path: path, headers: [ - "content-type": "application/json", - ], params: params)]; - } - -} diff --git a/app/sdks/0.6.2/client-swift/Sources/Appwrite/Services/Teams.swift b/app/sdks/0.6.2/client-swift/Sources/Appwrite/Services/Teams.swift deleted file mode 100644 index 50bee60273..0000000000 --- a/app/sdks/0.6.2/client-swift/Sources/Appwrite/Services/Teams.swift +++ /dev/null @@ -1,298 +0,0 @@ - - -class Teams: Service -{ - /** - * List Teams - * - * Get a list of all the current user teams. You can use the query params to - * filter your results. On admin mode, this endpoint will return a list of all - * of the project teams. [Learn more about different API modes](/docs/admin). - * - * @param String _search - * @param Int _limit - * @param Int _offset - * @param String _orderType - * @throws Exception - * @return array - */ - - func list(_search: String = "", _limit: Int = 25, _offset: Int = 0, _orderType: String = "ASC") -> Array { - let path: String = "/teams" - - - var params: [String: Any] = [:] - - params["search"] = _search - params["limit"] = _limit - params["offset"] = _offset - params["orderType"] = _orderType - - return [self.client.call(method: Client.HTTPMethod.get.rawValue, path: path, headers: [ - "content-type": "application/json", - ], params: params)]; - } - - /** - * Create Team - * - * Create a new team. The user who creates the team will automatically be - * assigned as the owner of the team. The team owner can invite new members, - * who will be able add new owners and update or delete the team from your - * project. - * - * @param String _name - * @param Array _roles - * @throws Exception - * @return array - */ - - func create(_name: String, _roles: Array = ["owner"]) -> Array { - let path: String = "/teams" - - - var params: [String: Any] = [:] - - params["name"] = _name - params["roles"] = _roles - - return [self.client.call(method: Client.HTTPMethod.post.rawValue, path: path, headers: [ - "content-type": "application/json", - ], params: params)]; - } - - /** - * Get Team - * - * Get team by its unique ID. All team members have read access for this - * resource. - * - * @param String _teamId - * @throws Exception - * @return array - */ - - func get(_teamId: String) -> Array { - var path: String = "/teams/{teamId}" - - path = path.replacingOccurrences( - of: "{teamId}", - with: _teamId - ) - - let params: [String: Any] = [:] - - - return [self.client.call(method: Client.HTTPMethod.get.rawValue, path: path, headers: [ - "content-type": "application/json", - ], params: params)]; - } - - /** - * Update Team - * - * Update team by its unique ID. Only team owners have write access for this - * resource. - * - * @param String _teamId - * @param String _name - * @throws Exception - * @return array - */ - - func update(_teamId: String, _name: String) -> Array { - var path: String = "/teams/{teamId}" - - path = path.replacingOccurrences( - of: "{teamId}", - with: _teamId - ) - - var params: [String: Any] = [:] - - params["name"] = _name - - return [self.client.call(method: Client.HTTPMethod.put.rawValue, path: path, headers: [ - "content-type": "application/json", - ], params: params)]; - } - - /** - * Delete Team - * - * Delete team by its unique ID. Only team owners have write access for this - * resource. - * - * @param String _teamId - * @throws Exception - * @return array - */ - - func delete(_teamId: String) -> Array { - var path: String = "/teams/{teamId}" - - path = path.replacingOccurrences( - of: "{teamId}", - with: _teamId - ) - - let params: [String: Any] = [:] - - - return [self.client.call(method: Client.HTTPMethod.delete.rawValue, path: path, headers: [ - "content-type": "application/json", - ], params: params)]; - } - - /** - * Get Team Memberships - * - * Get team members by the team unique ID. All team members have read access - * for this list of resources. - * - * @param String _teamId - * @param String _search - * @param Int _limit - * @param Int _offset - * @param String _orderType - * @throws Exception - * @return array - */ - - func getMemberships(_teamId: String, _search: String = "", _limit: Int = 25, _offset: Int = 0, _orderType: String = "ASC") -> Array { - var path: String = "/teams/{teamId}/memberships" - - path = path.replacingOccurrences( - of: "{teamId}", - with: _teamId - ) - - var params: [String: Any] = [:] - - params["search"] = _search - params["limit"] = _limit - params["offset"] = _offset - params["orderType"] = _orderType - - return [self.client.call(method: Client.HTTPMethod.get.rawValue, path: path, headers: [ - "content-type": "application/json", - ], params: params)]; - } - - /** - * Create Team Membership - * - * Use this endpoint to invite a new member to join your team. An email with a - * link to join the team will be sent to the new member email address if the - * member doesn't exist in the project it will be created automatically. - * - * Use the 'URL' parameter to redirect the user from the invitation email back - * to your app. When the user is redirected, use the [Update Team Membership - * Status](/docs/client/teams#updateMembershipStatus) endpoint to allow the - * user to accept the invitation to the team. - * - * Please note that in order to avoid a [Redirect - * Attacks](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) - * the only valid redirect URL's are the once from domains you have set when - * added your platforms in the console interface. - * - * @param String _teamId - * @param String _email - * @param Array _roles - * @param String _url - * @param String _name - * @throws Exception - * @return array - */ - - func createMembership(_teamId: String, _email: String, _roles: Array, _url: String, _name: String = "") -> Array { - var path: String = "/teams/{teamId}/memberships" - - path = path.replacingOccurrences( - of: "{teamId}", - with: _teamId - ) - - var params: [String: Any] = [:] - - params["email"] = _email - params["name"] = _name - params["roles"] = _roles - params["url"] = _url - - return [self.client.call(method: Client.HTTPMethod.post.rawValue, path: path, headers: [ - "content-type": "application/json", - ], params: params)]; - } - - /** - * 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 he didn't accept it. - * - * @param String _teamId - * @param String _inviteId - * @throws Exception - * @return array - */ - - func deleteMembership(_teamId: String, _inviteId: String) -> Array { - var path: String = "/teams/{teamId}/memberships/{inviteId}" - - path = path.replacingOccurrences( - of: "{teamId}", - with: _teamId - ) - path = path.replacingOccurrences( - of: "{inviteId}", - with: _inviteId - ) - - let params: [String: Any] = [:] - - - return [self.client.call(method: Client.HTTPMethod.delete.rawValue, path: path, headers: [ - "content-type": "application/json", - ], params: params)]; - } - - /** - * Update Team Membership Status - * - * Use this endpoint to allow a user to accept an invitation to join a team - * after he is being redirected back to your app from the invitation email he - * was sent. - * - * @param String _teamId - * @param String _inviteId - * @param String _userId - * @param String _secret - * @throws Exception - * @return array - */ - - func updateMembershipStatus(_teamId: String, _inviteId: String, _userId: String, _secret: String) -> Array { - var path: String = "/teams/{teamId}/memberships/{inviteId}/status" - - path = path.replacingOccurrences( - of: "{teamId}", - with: _teamId - ) - path = path.replacingOccurrences( - of: "{inviteId}", - with: _inviteId - ) - - var params: [String: Any] = [:] - - params["userId"] = _userId - params["secret"] = _secret - - return [self.client.call(method: Client.HTTPMethod.patch.rawValue, path: path, headers: [ - "content-type": "application/json", - ], params: params)]; - } - -} diff --git a/app/sdks/0.6.2/client-swift/docs/account.md b/app/sdks/0.6.2/client-swift/docs/account.md deleted file mode 100644 index 48bc91d213..0000000000 --- a/app/sdks/0.6.2/client-swift/docs/account.md +++ /dev/null @@ -1,240 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - -# Account Service - -## Get Account - -```http request -GET https://appwrite.io/v1/account -``` - -** Get currently logged in user data as JSON object. ** - -## Create Account - -```http request -POST https://appwrite.io/v1/account -``` - -** Use this endpoint to allow a new user to register a new account in your project. After the user registration completes successfully, you can use the [/account/verfication](/docs/client/account#createVerification) route to start verifying the user email address. To allow your new user to login to his new account, you need to create a new [account session](/docs/client/account#createSession). ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| email | string | User email. | | -| password | string | User password. Must be between 6 to 32 chars. | | -| name | string | User name. | | - -## Delete Account - -```http request -DELETE https://appwrite.io/v1/account -``` - -** Delete a currently logged in user account. Behind the scene, the user record is not deleted but permanently blocked from any access. This is done to avoid deleted accounts being overtaken by new users with the same email address. Any user-related resources like documents or storage files should be deleted separately. ** - -## Update Account Email - -```http request -PATCH https://appwrite.io/v1/account/email -``` - -** Update currently logged in user account email address. After changing user address, user confirmation status is being reset and a new confirmation mail is sent. For security measures, user password is required to complete this request. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| email | string | User email. | | -| password | string | User password. Must be between 6 to 32 chars. | | - -## Get Account Logs - -```http request -GET https://appwrite.io/v1/account/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. ** - -## Update Account Name - -```http request -PATCH https://appwrite.io/v1/account/name -``` - -** Update currently logged in user account name. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| name | string | User name. | | - -## Update Account Password - -```http request -PATCH https://appwrite.io/v1/account/password -``` - -** Update currently logged in user password. For validation, user is required to pass the password twice. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| password | string | New user password. Must be between 6 to 32 chars. | | -| oldPassword | string | Old user password. Must be between 6 to 32 chars. | | - -## Get Account Preferences - -```http request -GET https://appwrite.io/v1/account/prefs -``` - -** Get currently logged in user preferences as a key-value object. ** - -## Update Account Preferences - -```http request -PATCH https://appwrite.io/v1/account/prefs -``` - -** Update currently logged in user account preferences. You can pass only the specific settings you wish to update. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| prefs | object | Prefs key-value JSON object. | | - -## Create Password Recovery - -```http request -POST https://appwrite.io/v1/account/recovery -``` - -** Sends the user an email with a temporary secret key for password reset. When the user clicks the confirmation link he is redirected back to your app password reset URL with the secret key and email address values attached to the URL query string. Use the query string params to submit a request to the [PUT /account/recovery](/docs/client/account#updateRecovery) endpoint to complete the process. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| email | string | User email. | | -| url | string | URL to redirect the user back to your app from the recovery email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API. | | - -## Complete Password Recovery - -```http request -PUT https://appwrite.io/v1/account/recovery -``` - -** Use this endpoint to complete the user account password reset. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST /account/recovery](/docs/client/account#createRecovery) endpoint. - -Please note that in order to avoid a [Redirect 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. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| userId | string | User account UID address. | | -| secret | string | Valid reset token. | | -| password | string | New password. Must be between 6 to 32 chars. | | -| passwordAgain | string | New password again. Must be between 6 to 32 chars. | | - -## Get Account Sessions - -```http request -GET https://appwrite.io/v1/account/sessions -``` - -** Get currently logged in user list of active sessions across different devices. ** - -## Create Account Session - -```http request -POST https://appwrite.io/v1/account/sessions -``` - -** Allow the user to login into his account by providing a valid email and password combination. This route will create a new session for the user. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| email | string | User email. | | -| password | string | User password. Must be between 6 to 32 chars. | | - -## Delete All Account Sessions - -```http request -DELETE https://appwrite.io/v1/account/sessions -``` - -** Delete all sessions from the user account and remove any sessions cookies from the end client. ** - -## Create Account Session with OAuth2 - -```http request -GET https://appwrite.io/v1/account/sessions/oauth2/{provider} -``` - -** Allow the user to login to his account using the OAuth2 provider of his choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| provider | string | **Required** OAuth2 Provider. Currently, supported providers are: amazon, apple, bitbucket, bitly, box, discord, dropbox, facebook, github, gitlab, google, linkedin, microsoft, paypal, paypalSandbox, salesforce, slack, spotify, twitch, vk, yahoo, yandex. | | -| success | string | URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API. | https://appwrite.io/auth/oauth2/success | -| failure | string | URL to redirect back to your app after a failed login attempt. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API. | https://appwrite.io/auth/oauth2/failure | -| scopes | array | A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. | [] | - -## Delete Account Session - -```http request -DELETE https://appwrite.io/v1/account/sessions/{sessionId} -``` - -** Use this endpoint to log out the currently logged in user from all his account sessions across all his different devices. When using the option id argument, only the session unique ID provider will be deleted. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| sessionId | string | **Required** Session unique ID. Use the string 'current' to delete the current device session. | | - -## Create Email Verification - -```http request -POST https://appwrite.io/v1/account/verification -``` - -** Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](/docs/client/account#updateAccountVerification). - -Please note that in order to avoid a [Redirect 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. - ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| url | string | URL to redirect the user back to your app from the verification email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API. | | - -## Complete Email Verification - -```http request -PUT https://appwrite.io/v1/account/verification -``` - -** 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. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| userId | string | User unique ID. | | -| secret | string | Valid verification token. | | - diff --git a/app/sdks/0.6.2/client-swift/docs/avatars.md b/app/sdks/0.6.2/client-swift/docs/avatars.md deleted file mode 100644 index 1e17a8e14a..0000000000 --- a/app/sdks/0.6.2/client-swift/docs/avatars.md +++ /dev/null @@ -1,124 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - -# Avatars Service - -## Get Browser Icon - -```http request -GET https://appwrite.io/v1/avatars/browsers/{code} -``` - -** You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user /account/sessions endpoint. Use width, height and quality arguments to change the output settings. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| code | string | **Required** Browser Code. | | -| width | integer | Image width. Pass an integer between 0 to 2000. Defaults to 100. | 100 | -| height | integer | Image height. Pass an integer between 0 to 2000. Defaults to 100. | 100 | -| quality | integer | Image quality. Pass an integer between 0 to 100. Defaults to 100. | 100 | - -## Get Credit Card Icon - -```http request -GET https://appwrite.io/v1/avatars/credit-cards/{code} -``` - -** Need to display your users with your billing method or their payment methods? The credit card endpoint will return you the icon of the credit card provider you need. Use width, height and quality arguments to change the output settings. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| code | string | **Required** Credit Card Code. Possible values: amex, argencard, cabal, censosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa. | | -| width | integer | Image width. Pass an integer between 0 to 2000. Defaults to 100. | 100 | -| height | integer | Image height. Pass an integer between 0 to 2000. Defaults to 100. | 100 | -| quality | integer | Image quality. Pass an integer between 0 to 100. Defaults to 100. | 100 | - -## Get Favicon - -```http request -GET https://appwrite.io/v1/avatars/favicon -``` - -** Use this endpoint to fetch the favorite icon (AKA favicon) of a any remote website URL. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| url | string | **Required** Website URL which you want to fetch the favicon from. | | - -## Get Country Flag - -```http request -GET https://appwrite.io/v1/avatars/flags/{code} -``` - -** You can use this endpoint to show different country flags icons to your users. The code argument receives the 2 letter country code. Use width, height and quality arguments to change the output settings. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| code | string | **Required** Country Code. ISO Alpha-2 country code format. | | -| width | integer | Image width. Pass an integer between 0 to 2000. Defaults to 100. | 100 | -| height | integer | Image height. Pass an integer between 0 to 2000. Defaults to 100. | 100 | -| quality | integer | Image quality. Pass an integer between 0 to 100. Defaults to 100. | 100 | - -## Get Image from URL - -```http request -GET https://appwrite.io/v1/avatars/image -``` - -** Use this endpoint to fetch a remote image URL and crop it to any image size you want. This endpoint is very useful if you need to crop and display remote images in your app or in case you want to make sure a 3rd party image is properly served using a TLS protocol. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| url | string | **Required** Image URL which you want to crop. | | -| width | integer | Resize preview image width, Pass an integer between 0 to 2000. | 400 | -| height | integer | Resize preview image height, Pass an integer between 0 to 2000. | 400 | - -## Get User Initials - -```http request -GET https://appwrite.io/v1/avatars/initials -``` - -** Use this endpoint to show your user initials avatar icon on your website or app. By default, this route will try to print your logged-in user name or email initials. You can also overwrite the user name if you pass the 'name' parameter. If no name is given and no user is logged, an empty avatar will be returned. - -You can use the color and background params to change the avatar colors. By default, a random theme will be selected. The random theme will persist for the user's initials when reloading the same theme will always return for the same initials. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| name | string | Full Name. When empty, current user name or email will be used. | | -| width | integer | Image width. Pass an integer between 0 to 2000. Defaults to 100. | 500 | -| height | integer | Image height. Pass an integer between 0 to 2000. Defaults to 100. | 500 | -| color | string | Changes text color. By default a random color will be picked and stay will persistent to the given name. | | -| background | string | Changes background color. By default a random color will be picked and stay will persistent to the given name. | | - -## Get QR Code - -```http request -GET https://appwrite.io/v1/avatars/qr -``` - -** 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. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| text | string | **Required** Plain text to be converted to QR code image. | | -| size | integer | QR code size. Pass an integer between 0 to 1000. Defaults to 400. | 400 | -| margin | integer | Margin from edge. Pass an integer between 0 to 10. Defaults to 1. | 1 | -| download | boolean | Return resulting image with 'Content-Disposition: attachment ' headers for the browser to start downloading it. Pass 0 for no header, or 1 for otherwise. Default value is set to 0. | | - diff --git a/app/sdks/0.6.2/client-swift/docs/database.md b/app/sdks/0.6.2/client-swift/docs/database.md deleted file mode 100644 index d734cb3c1c..0000000000 --- a/app/sdks/0.6.2/client-swift/docs/database.md +++ /dev/null @@ -1,90 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - -# Database Service - -## List Documents - -```http request -GET https://appwrite.io/v1/database/collections/{collectionId}/documents -``` - -** Get a list of all the user documents. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project documents. [Learn more about different API modes](/docs/admin). ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| collectionId | string | **Required** Collection unique ID. You can create a new collection with validation rules using the Database service [server integration](/docs/server/database#createCollection). | | -| filters | array | Array of filter strings. Each filter is constructed from a key name, comparison operator (=, !=, >, <, <=, >=) and a value. You can also use a dot (.) separator in attribute names to filter by child document attributes. Examples: 'name=John Doe' or 'category.$id>=5bed2d152c362'. | [] | -| limit | integer | Maximum number of documents to return in response. Use this value to manage pagination. | 25 | -| offset | integer | Offset value. Use this value to manage pagination. | 0 | -| orderField | string | Document field that results will be sorted by. | $id | -| orderType | string | Order direction. Possible values are DESC for descending order, or ASC for ascending order. | ASC | -| orderCast | string | Order field type casting. Possible values are int, string, date, time or datetime. The database will attempt to cast the order field to the value you pass here. The default value is a string. | string | -| search | string | Search query. Enter any free text search. The database will try to find a match against all document attributes and children. | | - -## Create Document - -```http request -POST https://appwrite.io/v1/database/collections/{collectionId}/documents -``` - -** Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](/docs/server/database?sdk=nodejs#createCollection) API or directly from your database console. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| collectionId | string | **Required** Collection unique ID. You can create a new collection with validation rules using the Database service [server integration](/docs/server/database#createCollection). | | -| data | object | Document data as JSON object. | | -| read | array | An array of strings with read permissions. By default no user is granted with any read permissions. [learn more about permissions](/docs/permissions) and get a full list of available permissions. | | -| write | array | An array of strings with write permissions. By default no user is granted with any write permissions. [learn more about permissions](/docs/permissions) and get a full list of available permissions. | | - -## Get Document - -```http request -GET https://appwrite.io/v1/database/collections/{collectionId}/documents/{documentId} -``` - -** Get document by its unique ID. This endpoint response returns a JSON object with the document data. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| collectionId | string | **Required** Collection unique ID. You can create a new collection with validation rules using the Database service [server integration](/docs/server/database#createCollection). | | -| documentId | string | **Required** Document unique ID. | | - -## Update Document - -```http request -PATCH https://appwrite.io/v1/database/collections/{collectionId}/documents/{documentId} -``` - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| collectionId | string | **Required** Collection unique ID. You can create a new collection with validation rules using the Database service [server integration](/docs/server/database#createCollection). | | -| documentId | string | **Required** Document unique ID. | | -| data | object | Document data as JSON object. | | -| read | array | An array of strings with read permissions. By default no user is granted with any read permissions. [learn more about permissions](/docs/permissions) and get a full list of available permissions. | | -| write | array | An array of strings with write permissions. By default no user is granted with any write permissions. [learn more about permissions](/docs/permissions) and get a full list of available permissions. | | - -## Delete Document - -```http request -DELETE https://appwrite.io/v1/database/collections/{collectionId}/documents/{documentId} -``` - -** Delete document by its unique ID. This endpoint deletes only the parent documents, his attributes and relations to other documents. Child documents **will not** be deleted. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| collectionId | string | **Required** Collection unique ID. You can create a new collection with validation rules using the Database service [server integration](/docs/server/database#createCollection). | | -| documentId | string | **Required** Document unique ID. | | - diff --git a/app/sdks/0.6.2/client-swift/docs/examples/account/create-o-auth2session.md b/app/sdks/0.6.2/client-swift/docs/examples/account/create-o-auth2session.md deleted file mode 100644 index 0b67257890..0000000000 --- a/app/sdks/0.6.2/client-swift/docs/examples/account/create-o-auth2session.md +++ /dev/null @@ -1,14 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - - -var client: Client = Client() - -client - .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject(value: "5df5acd0d48c2") // Your project ID - -var account: Account = Account(client: client); - -var result = account.createOAuth2Session(_provider: "amazon"); diff --git a/app/sdks/0.6.2/client-swift/docs/examples/account/create-recovery.md b/app/sdks/0.6.2/client-swift/docs/examples/account/create-recovery.md deleted file mode 100644 index 04fdcae541..0000000000 --- a/app/sdks/0.6.2/client-swift/docs/examples/account/create-recovery.md +++ /dev/null @@ -1,14 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - - -var client: Client = Client() - -client - .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject(value: "5df5acd0d48c2") // Your project ID - -var account: Account = Account(client: client); - -var result = account.createRecovery(_email: "email@example.com", _url: "https://example.com"); diff --git a/app/sdks/0.6.2/client-swift/docs/examples/account/create-session.md b/app/sdks/0.6.2/client-swift/docs/examples/account/create-session.md deleted file mode 100644 index 477b20199c..0000000000 --- a/app/sdks/0.6.2/client-swift/docs/examples/account/create-session.md +++ /dev/null @@ -1,14 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - - -var client: Client = Client() - -client - .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject(value: "5df5acd0d48c2") // Your project ID - -var account: Account = Account(client: client); - -var result = account.createSession(_email: "email@example.com", _password: "password"); diff --git a/app/sdks/0.6.2/client-swift/docs/examples/account/create-verification.md b/app/sdks/0.6.2/client-swift/docs/examples/account/create-verification.md deleted file mode 100644 index b0f8d6444e..0000000000 --- a/app/sdks/0.6.2/client-swift/docs/examples/account/create-verification.md +++ /dev/null @@ -1,14 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - - -var client: Client = Client() - -client - .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject(value: "5df5acd0d48c2") // Your project ID - -var account: Account = Account(client: client); - -var result = account.createVerification(_url: "https://example.com"); diff --git a/app/sdks/0.6.2/client-swift/docs/examples/account/create.md b/app/sdks/0.6.2/client-swift/docs/examples/account/create.md deleted file mode 100644 index 176b192c5e..0000000000 --- a/app/sdks/0.6.2/client-swift/docs/examples/account/create.md +++ /dev/null @@ -1,14 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - - -var client: Client = Client() - -client - .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject(value: "5df5acd0d48c2") // Your project ID - -var account: Account = Account(client: client); - -var result = account.create(_email: "email@example.com", _password: "password"); diff --git a/app/sdks/0.6.2/client-swift/docs/examples/account/delete-session.md b/app/sdks/0.6.2/client-swift/docs/examples/account/delete-session.md deleted file mode 100644 index 6f2373dc79..0000000000 --- a/app/sdks/0.6.2/client-swift/docs/examples/account/delete-session.md +++ /dev/null @@ -1,14 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - - -var client: Client = Client() - -client - .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject(value: "5df5acd0d48c2") // Your project ID - -var account: Account = Account(client: client); - -var result = account.deleteSession(_sessionId: "[SESSION_ID]"); diff --git a/app/sdks/0.6.2/client-swift/docs/examples/account/delete-sessions.md b/app/sdks/0.6.2/client-swift/docs/examples/account/delete-sessions.md deleted file mode 100644 index 6df71814c6..0000000000 --- a/app/sdks/0.6.2/client-swift/docs/examples/account/delete-sessions.md +++ /dev/null @@ -1,14 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - - -var client: Client = Client() - -client - .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject(value: "5df5acd0d48c2") // Your project ID - -var account: Account = Account(client: client); - -var result = account.deleteSessions(); diff --git a/app/sdks/0.6.2/client-swift/docs/examples/account/delete.md b/app/sdks/0.6.2/client-swift/docs/examples/account/delete.md deleted file mode 100644 index f4123b0197..0000000000 --- a/app/sdks/0.6.2/client-swift/docs/examples/account/delete.md +++ /dev/null @@ -1,14 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - - -var client: Client = Client() - -client - .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject(value: "5df5acd0d48c2") // Your project ID - -var account: Account = Account(client: client); - -var result = account.delete(); diff --git a/app/sdks/0.6.2/client-swift/docs/examples/account/get-logs.md b/app/sdks/0.6.2/client-swift/docs/examples/account/get-logs.md deleted file mode 100644 index 8d3d965723..0000000000 --- a/app/sdks/0.6.2/client-swift/docs/examples/account/get-logs.md +++ /dev/null @@ -1,14 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - - -var client: Client = Client() - -client - .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject(value: "5df5acd0d48c2") // Your project ID - -var account: Account = Account(client: client); - -var result = account.getLogs(); diff --git a/app/sdks/0.6.2/client-swift/docs/examples/account/get-prefs.md b/app/sdks/0.6.2/client-swift/docs/examples/account/get-prefs.md deleted file mode 100644 index e9746ab34b..0000000000 --- a/app/sdks/0.6.2/client-swift/docs/examples/account/get-prefs.md +++ /dev/null @@ -1,14 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - - -var client: Client = Client() - -client - .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject(value: "5df5acd0d48c2") // Your project ID - -var account: Account = Account(client: client); - -var result = account.getPrefs(); diff --git a/app/sdks/0.6.2/client-swift/docs/examples/account/get-sessions.md b/app/sdks/0.6.2/client-swift/docs/examples/account/get-sessions.md deleted file mode 100644 index 988e91c8e5..0000000000 --- a/app/sdks/0.6.2/client-swift/docs/examples/account/get-sessions.md +++ /dev/null @@ -1,14 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - - -var client: Client = Client() - -client - .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject(value: "5df5acd0d48c2") // Your project ID - -var account: Account = Account(client: client); - -var result = account.getSessions(); diff --git a/app/sdks/0.6.2/client-swift/docs/examples/account/get.md b/app/sdks/0.6.2/client-swift/docs/examples/account/get.md deleted file mode 100644 index b84096bdb8..0000000000 --- a/app/sdks/0.6.2/client-swift/docs/examples/account/get.md +++ /dev/null @@ -1,14 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - - -var client: Client = Client() - -client - .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject(value: "5df5acd0d48c2") // Your project ID - -var account: Account = Account(client: client); - -var result = account.get(); diff --git a/app/sdks/0.6.2/client-swift/docs/examples/account/update-email.md b/app/sdks/0.6.2/client-swift/docs/examples/account/update-email.md deleted file mode 100644 index cec700b330..0000000000 --- a/app/sdks/0.6.2/client-swift/docs/examples/account/update-email.md +++ /dev/null @@ -1,14 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - - -var client: Client = Client() - -client - .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject(value: "5df5acd0d48c2") // Your project ID - -var account: Account = Account(client: client); - -var result = account.updateEmail(_email: "email@example.com", _password: "password"); diff --git a/app/sdks/0.6.2/client-swift/docs/examples/account/update-name.md b/app/sdks/0.6.2/client-swift/docs/examples/account/update-name.md deleted file mode 100644 index dbc6f7d2b8..0000000000 --- a/app/sdks/0.6.2/client-swift/docs/examples/account/update-name.md +++ /dev/null @@ -1,14 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - - -var client: Client = Client() - -client - .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject(value: "5df5acd0d48c2") // Your project ID - -var account: Account = Account(client: client); - -var result = account.updateName(_name: "[NAME]"); diff --git a/app/sdks/0.6.2/client-swift/docs/examples/account/update-password.md b/app/sdks/0.6.2/client-swift/docs/examples/account/update-password.md deleted file mode 100644 index 1346102a32..0000000000 --- a/app/sdks/0.6.2/client-swift/docs/examples/account/update-password.md +++ /dev/null @@ -1,14 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - - -var client: Client = Client() - -client - .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject(value: "5df5acd0d48c2") // Your project ID - -var account: Account = Account(client: client); - -var result = account.updatePassword(_password: "password", _oldPassword: "password"); diff --git a/app/sdks/0.6.2/client-swift/docs/examples/account/update-prefs.md b/app/sdks/0.6.2/client-swift/docs/examples/account/update-prefs.md deleted file mode 100644 index fea1a8d6ff..0000000000 --- a/app/sdks/0.6.2/client-swift/docs/examples/account/update-prefs.md +++ /dev/null @@ -1,14 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - - -var client: Client = Client() - -client - .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject(value: "5df5acd0d48c2") // Your project ID - -var account: Account = Account(client: client); - -var result = account.updatePrefs(_prefs: ); diff --git a/app/sdks/0.6.2/client-swift/docs/examples/account/update-recovery.md b/app/sdks/0.6.2/client-swift/docs/examples/account/update-recovery.md deleted file mode 100644 index 6009d62e2c..0000000000 --- a/app/sdks/0.6.2/client-swift/docs/examples/account/update-recovery.md +++ /dev/null @@ -1,14 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - - -var client: Client = Client() - -client - .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject(value: "5df5acd0d48c2") // Your project ID - -var account: Account = Account(client: client); - -var result = account.updateRecovery(_userId: "[USER_ID]", _secret: "[SECRET]", _password: "password", _passwordAgain: "password"); diff --git a/app/sdks/0.6.2/client-swift/docs/examples/account/update-verification.md b/app/sdks/0.6.2/client-swift/docs/examples/account/update-verification.md deleted file mode 100644 index 376a87a9c3..0000000000 --- a/app/sdks/0.6.2/client-swift/docs/examples/account/update-verification.md +++ /dev/null @@ -1,14 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - - -var client: Client = Client() - -client - .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject(value: "5df5acd0d48c2") // Your project ID - -var account: Account = Account(client: client); - -var result = account.updateVerification(_userId: "[USER_ID]", _secret: "[SECRET]"); diff --git a/app/sdks/0.6.2/client-swift/docs/examples/avatars/get-browser.md b/app/sdks/0.6.2/client-swift/docs/examples/avatars/get-browser.md deleted file mode 100644 index 874ef96d31..0000000000 --- a/app/sdks/0.6.2/client-swift/docs/examples/avatars/get-browser.md +++ /dev/null @@ -1,14 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - - -var client: Client = Client() - -client - .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject(value: "5df5acd0d48c2") // Your project ID - -var avatars: Avatars = Avatars(client: client); - -var result = avatars.getBrowser(_code: "aa"); diff --git a/app/sdks/0.6.2/client-swift/docs/examples/avatars/get-credit-card.md b/app/sdks/0.6.2/client-swift/docs/examples/avatars/get-credit-card.md deleted file mode 100644 index 797431f3dc..0000000000 --- a/app/sdks/0.6.2/client-swift/docs/examples/avatars/get-credit-card.md +++ /dev/null @@ -1,14 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - - -var client: Client = Client() - -client - .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject(value: "5df5acd0d48c2") // Your project ID - -var avatars: Avatars = Avatars(client: client); - -var result = avatars.getCreditCard(_code: "amex"); diff --git a/app/sdks/0.6.2/client-swift/docs/examples/avatars/get-favicon.md b/app/sdks/0.6.2/client-swift/docs/examples/avatars/get-favicon.md deleted file mode 100644 index 5623468481..0000000000 --- a/app/sdks/0.6.2/client-swift/docs/examples/avatars/get-favicon.md +++ /dev/null @@ -1,14 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - - -var client: Client = Client() - -client - .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject(value: "5df5acd0d48c2") // Your project ID - -var avatars: Avatars = Avatars(client: client); - -var result = avatars.getFavicon(_url: "https://example.com"); diff --git a/app/sdks/0.6.2/client-swift/docs/examples/avatars/get-flag.md b/app/sdks/0.6.2/client-swift/docs/examples/avatars/get-flag.md deleted file mode 100644 index fba93ae4d4..0000000000 --- a/app/sdks/0.6.2/client-swift/docs/examples/avatars/get-flag.md +++ /dev/null @@ -1,14 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - - -var client: Client = Client() - -client - .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject(value: "5df5acd0d48c2") // Your project ID - -var avatars: Avatars = Avatars(client: client); - -var result = avatars.getFlag(_code: "af"); diff --git a/app/sdks/0.6.2/client-swift/docs/examples/avatars/get-image.md b/app/sdks/0.6.2/client-swift/docs/examples/avatars/get-image.md deleted file mode 100644 index 4ebe561b3b..0000000000 --- a/app/sdks/0.6.2/client-swift/docs/examples/avatars/get-image.md +++ /dev/null @@ -1,14 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - - -var client: Client = Client() - -client - .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject(value: "5df5acd0d48c2") // Your project ID - -var avatars: Avatars = Avatars(client: client); - -var result = avatars.getImage(_url: "https://example.com"); diff --git a/app/sdks/0.6.2/client-swift/docs/examples/avatars/get-initials.md b/app/sdks/0.6.2/client-swift/docs/examples/avatars/get-initials.md deleted file mode 100644 index d317cfc5a8..0000000000 --- a/app/sdks/0.6.2/client-swift/docs/examples/avatars/get-initials.md +++ /dev/null @@ -1,14 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - - -var client: Client = Client() - -client - .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject(value: "5df5acd0d48c2") // Your project ID - -var avatars: Avatars = Avatars(client: client); - -var result = avatars.getInitials(); diff --git a/app/sdks/0.6.2/client-swift/docs/examples/avatars/get-q-r.md b/app/sdks/0.6.2/client-swift/docs/examples/avatars/get-q-r.md deleted file mode 100644 index 737acfc258..0000000000 --- a/app/sdks/0.6.2/client-swift/docs/examples/avatars/get-q-r.md +++ /dev/null @@ -1,14 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - - -var client: Client = Client() - -client - .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject(value: "5df5acd0d48c2") // Your project ID - -var avatars: Avatars = Avatars(client: client); - -var result = avatars.getQR(_text: "[TEXT]"); diff --git a/app/sdks/0.6.2/client-swift/docs/examples/database/create-document.md b/app/sdks/0.6.2/client-swift/docs/examples/database/create-document.md deleted file mode 100644 index ebd59adc47..0000000000 --- a/app/sdks/0.6.2/client-swift/docs/examples/database/create-document.md +++ /dev/null @@ -1,14 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - - -var client: Client = Client() - -client - .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject(value: "5df5acd0d48c2") // Your project ID - -var database: Database = Database(client: client); - -var result = database.createDocument(_collectionId: "[COLLECTION_ID]", _data: , _read: [], _write: []); diff --git a/app/sdks/0.6.2/client-swift/docs/examples/database/delete-document.md b/app/sdks/0.6.2/client-swift/docs/examples/database/delete-document.md deleted file mode 100644 index faec2ceee9..0000000000 --- a/app/sdks/0.6.2/client-swift/docs/examples/database/delete-document.md +++ /dev/null @@ -1,14 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - - -var client: Client = Client() - -client - .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject(value: "5df5acd0d48c2") // Your project ID - -var database: Database = Database(client: client); - -var result = database.deleteDocument(_collectionId: "[COLLECTION_ID]", _documentId: "[DOCUMENT_ID]"); diff --git a/app/sdks/0.6.2/client-swift/docs/examples/database/get-document.md b/app/sdks/0.6.2/client-swift/docs/examples/database/get-document.md deleted file mode 100644 index 0f3a05bfa5..0000000000 --- a/app/sdks/0.6.2/client-swift/docs/examples/database/get-document.md +++ /dev/null @@ -1,14 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - - -var client: Client = Client() - -client - .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject(value: "5df5acd0d48c2") // Your project ID - -var database: Database = Database(client: client); - -var result = database.getDocument(_collectionId: "[COLLECTION_ID]", _documentId: "[DOCUMENT_ID]"); diff --git a/app/sdks/0.6.2/client-swift/docs/examples/database/list-documents.md b/app/sdks/0.6.2/client-swift/docs/examples/database/list-documents.md deleted file mode 100644 index 2c9f4a2efa..0000000000 --- a/app/sdks/0.6.2/client-swift/docs/examples/database/list-documents.md +++ /dev/null @@ -1,14 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - - -var client: Client = Client() - -client - .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject(value: "5df5acd0d48c2") // Your project ID - -var database: Database = Database(client: client); - -var result = database.listDocuments(_collectionId: "[COLLECTION_ID]"); diff --git a/app/sdks/0.6.2/client-swift/docs/examples/database/update-document.md b/app/sdks/0.6.2/client-swift/docs/examples/database/update-document.md deleted file mode 100644 index bddaf61111..0000000000 --- a/app/sdks/0.6.2/client-swift/docs/examples/database/update-document.md +++ /dev/null @@ -1,14 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - - -var client: Client = Client() - -client - .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject(value: "5df5acd0d48c2") // Your project ID - -var database: Database = Database(client: client); - -var result = database.updateDocument(_collectionId: "[COLLECTION_ID]", _documentId: "[DOCUMENT_ID]", _data: , _read: [], _write: []); diff --git a/app/sdks/0.6.2/client-swift/docs/examples/locale/get-continents.md b/app/sdks/0.6.2/client-swift/docs/examples/locale/get-continents.md deleted file mode 100644 index 3f57d5eb0d..0000000000 --- a/app/sdks/0.6.2/client-swift/docs/examples/locale/get-continents.md +++ /dev/null @@ -1,14 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - - -var client: Client = Client() - -client - .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject(value: "5df5acd0d48c2") // Your project ID - -var locale: Locale = Locale(client: client); - -var result = locale.getContinents(); diff --git a/app/sdks/0.6.2/client-swift/docs/examples/locale/get-countries-e-u.md b/app/sdks/0.6.2/client-swift/docs/examples/locale/get-countries-e-u.md deleted file mode 100644 index 9f2a26213c..0000000000 --- a/app/sdks/0.6.2/client-swift/docs/examples/locale/get-countries-e-u.md +++ /dev/null @@ -1,14 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - - -var client: Client = Client() - -client - .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject(value: "5df5acd0d48c2") // Your project ID - -var locale: Locale = Locale(client: client); - -var result = locale.getCountriesEU(); diff --git a/app/sdks/0.6.2/client-swift/docs/examples/locale/get-countries-phones.md b/app/sdks/0.6.2/client-swift/docs/examples/locale/get-countries-phones.md deleted file mode 100644 index 2cc9c4a9a0..0000000000 --- a/app/sdks/0.6.2/client-swift/docs/examples/locale/get-countries-phones.md +++ /dev/null @@ -1,14 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - - -var client: Client = Client() - -client - .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject(value: "5df5acd0d48c2") // Your project ID - -var locale: Locale = Locale(client: client); - -var result = locale.getCountriesPhones(); diff --git a/app/sdks/0.6.2/client-swift/docs/examples/locale/get-countries.md b/app/sdks/0.6.2/client-swift/docs/examples/locale/get-countries.md deleted file mode 100644 index df52194af1..0000000000 --- a/app/sdks/0.6.2/client-swift/docs/examples/locale/get-countries.md +++ /dev/null @@ -1,14 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - - -var client: Client = Client() - -client - .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject(value: "5df5acd0d48c2") // Your project ID - -var locale: Locale = Locale(client: client); - -var result = locale.getCountries(); diff --git a/app/sdks/0.6.2/client-swift/docs/examples/locale/get-currencies.md b/app/sdks/0.6.2/client-swift/docs/examples/locale/get-currencies.md deleted file mode 100644 index cf5f403eba..0000000000 --- a/app/sdks/0.6.2/client-swift/docs/examples/locale/get-currencies.md +++ /dev/null @@ -1,14 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - - -var client: Client = Client() - -client - .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject(value: "5df5acd0d48c2") // Your project ID - -var locale: Locale = Locale(client: client); - -var result = locale.getCurrencies(); diff --git a/app/sdks/0.6.2/client-swift/docs/examples/locale/get-languages.md b/app/sdks/0.6.2/client-swift/docs/examples/locale/get-languages.md deleted file mode 100644 index e8296dd7ca..0000000000 --- a/app/sdks/0.6.2/client-swift/docs/examples/locale/get-languages.md +++ /dev/null @@ -1,14 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - - -var client: Client = Client() - -client - .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject(value: "5df5acd0d48c2") // Your project ID - -var locale: Locale = Locale(client: client); - -var result = locale.getLanguages(); diff --git a/app/sdks/0.6.2/client-swift/docs/examples/locale/get.md b/app/sdks/0.6.2/client-swift/docs/examples/locale/get.md deleted file mode 100644 index 5685e89440..0000000000 --- a/app/sdks/0.6.2/client-swift/docs/examples/locale/get.md +++ /dev/null @@ -1,14 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - - -var client: Client = Client() - -client - .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject(value: "5df5acd0d48c2") // Your project ID - -var locale: Locale = Locale(client: client); - -var result = locale.get(); diff --git a/app/sdks/0.6.2/client-swift/docs/examples/storage/create-file.md b/app/sdks/0.6.2/client-swift/docs/examples/storage/create-file.md deleted file mode 100644 index b4e15a4ec1..0000000000 --- a/app/sdks/0.6.2/client-swift/docs/examples/storage/create-file.md +++ /dev/null @@ -1,14 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - - -var client: Client = Client() - -client - .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject(value: "5df5acd0d48c2") // Your project ID - -var storage: Storage = Storage(client: client); - -var result = storage.createFile(_file: nil, _read: [], _write: []); diff --git a/app/sdks/0.6.2/client-swift/docs/examples/storage/delete-file.md b/app/sdks/0.6.2/client-swift/docs/examples/storage/delete-file.md deleted file mode 100644 index 83152d9194..0000000000 --- a/app/sdks/0.6.2/client-swift/docs/examples/storage/delete-file.md +++ /dev/null @@ -1,14 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - - -var client: Client = Client() - -client - .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject(value: "5df5acd0d48c2") // Your project ID - -var storage: Storage = Storage(client: client); - -var result = storage.deleteFile(_fileId: "[FILE_ID]"); diff --git a/app/sdks/0.6.2/client-swift/docs/examples/storage/get-file-download.md b/app/sdks/0.6.2/client-swift/docs/examples/storage/get-file-download.md deleted file mode 100644 index 023f1a2243..0000000000 --- a/app/sdks/0.6.2/client-swift/docs/examples/storage/get-file-download.md +++ /dev/null @@ -1,14 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - - -var client: Client = Client() - -client - .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject(value: "5df5acd0d48c2") // Your project ID - -var storage: Storage = Storage(client: client); - -var result = storage.getFileDownload(_fileId: "[FILE_ID]"); diff --git a/app/sdks/0.6.2/client-swift/docs/examples/storage/get-file-preview.md b/app/sdks/0.6.2/client-swift/docs/examples/storage/get-file-preview.md deleted file mode 100644 index faaacd8e8c..0000000000 --- a/app/sdks/0.6.2/client-swift/docs/examples/storage/get-file-preview.md +++ /dev/null @@ -1,14 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - - -var client: Client = Client() - -client - .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject(value: "5df5acd0d48c2") // Your project ID - -var storage: Storage = Storage(client: client); - -var result = storage.getFilePreview(_fileId: "[FILE_ID]"); diff --git a/app/sdks/0.6.2/client-swift/docs/examples/storage/get-file-view.md b/app/sdks/0.6.2/client-swift/docs/examples/storage/get-file-view.md deleted file mode 100644 index d480377b06..0000000000 --- a/app/sdks/0.6.2/client-swift/docs/examples/storage/get-file-view.md +++ /dev/null @@ -1,14 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - - -var client: Client = Client() - -client - .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject(value: "5df5acd0d48c2") // Your project ID - -var storage: Storage = Storage(client: client); - -var result = storage.getFileView(_fileId: "[FILE_ID]"); diff --git a/app/sdks/0.6.2/client-swift/docs/examples/storage/get-file.md b/app/sdks/0.6.2/client-swift/docs/examples/storage/get-file.md deleted file mode 100644 index 15bf5f7241..0000000000 --- a/app/sdks/0.6.2/client-swift/docs/examples/storage/get-file.md +++ /dev/null @@ -1,14 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - - -var client: Client = Client() - -client - .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject(value: "5df5acd0d48c2") // Your project ID - -var storage: Storage = Storage(client: client); - -var result = storage.getFile(_fileId: "[FILE_ID]"); diff --git a/app/sdks/0.6.2/client-swift/docs/examples/storage/list-files.md b/app/sdks/0.6.2/client-swift/docs/examples/storage/list-files.md deleted file mode 100644 index bfce4293e5..0000000000 --- a/app/sdks/0.6.2/client-swift/docs/examples/storage/list-files.md +++ /dev/null @@ -1,14 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - - -var client: Client = Client() - -client - .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject(value: "5df5acd0d48c2") // Your project ID - -var storage: Storage = Storage(client: client); - -var result = storage.listFiles(); diff --git a/app/sdks/0.6.2/client-swift/docs/examples/storage/update-file.md b/app/sdks/0.6.2/client-swift/docs/examples/storage/update-file.md deleted file mode 100644 index 6a14e47773..0000000000 --- a/app/sdks/0.6.2/client-swift/docs/examples/storage/update-file.md +++ /dev/null @@ -1,14 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - - -var client: Client = Client() - -client - .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject(value: "5df5acd0d48c2") // Your project ID - -var storage: Storage = Storage(client: client); - -var result = storage.updateFile(_fileId: "[FILE_ID]", _read: [], _write: []); diff --git a/app/sdks/0.6.2/client-swift/docs/examples/teams/create-membership.md b/app/sdks/0.6.2/client-swift/docs/examples/teams/create-membership.md deleted file mode 100644 index 4af13ae6ee..0000000000 --- a/app/sdks/0.6.2/client-swift/docs/examples/teams/create-membership.md +++ /dev/null @@ -1,14 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - - -var client: Client = Client() - -client - .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject(value: "5df5acd0d48c2") // Your project ID - -var teams: Teams = Teams(client: client); - -var result = teams.createMembership(_teamId: "[TEAM_ID]", _email: "email@example.com", _roles: [], _url: "https://example.com"); diff --git a/app/sdks/0.6.2/client-swift/docs/examples/teams/create.md b/app/sdks/0.6.2/client-swift/docs/examples/teams/create.md deleted file mode 100644 index a5cf829019..0000000000 --- a/app/sdks/0.6.2/client-swift/docs/examples/teams/create.md +++ /dev/null @@ -1,14 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - - -var client: Client = Client() - -client - .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject(value: "5df5acd0d48c2") // Your project ID - -var teams: Teams = Teams(client: client); - -var result = teams.create(_name: "[NAME]"); diff --git a/app/sdks/0.6.2/client-swift/docs/examples/teams/delete-membership.md b/app/sdks/0.6.2/client-swift/docs/examples/teams/delete-membership.md deleted file mode 100644 index 19bf8b2f7d..0000000000 --- a/app/sdks/0.6.2/client-swift/docs/examples/teams/delete-membership.md +++ /dev/null @@ -1,14 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - - -var client: Client = Client() - -client - .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject(value: "5df5acd0d48c2") // Your project ID - -var teams: Teams = Teams(client: client); - -var result = teams.deleteMembership(_teamId: "[TEAM_ID]", _inviteId: "[INVITE_ID]"); diff --git a/app/sdks/0.6.2/client-swift/docs/examples/teams/delete.md b/app/sdks/0.6.2/client-swift/docs/examples/teams/delete.md deleted file mode 100644 index 50cc25892b..0000000000 --- a/app/sdks/0.6.2/client-swift/docs/examples/teams/delete.md +++ /dev/null @@ -1,14 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - - -var client: Client = Client() - -client - .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject(value: "5df5acd0d48c2") // Your project ID - -var teams: Teams = Teams(client: client); - -var result = teams.delete(_teamId: "[TEAM_ID]"); diff --git a/app/sdks/0.6.2/client-swift/docs/examples/teams/get-memberships.md b/app/sdks/0.6.2/client-swift/docs/examples/teams/get-memberships.md deleted file mode 100644 index 089ea8f717..0000000000 --- a/app/sdks/0.6.2/client-swift/docs/examples/teams/get-memberships.md +++ /dev/null @@ -1,14 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - - -var client: Client = Client() - -client - .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject(value: "5df5acd0d48c2") // Your project ID - -var teams: Teams = Teams(client: client); - -var result = teams.getMemberships(_teamId: "[TEAM_ID]"); diff --git a/app/sdks/0.6.2/client-swift/docs/examples/teams/get.md b/app/sdks/0.6.2/client-swift/docs/examples/teams/get.md deleted file mode 100644 index 25bf212a45..0000000000 --- a/app/sdks/0.6.2/client-swift/docs/examples/teams/get.md +++ /dev/null @@ -1,14 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - - -var client: Client = Client() - -client - .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject(value: "5df5acd0d48c2") // Your project ID - -var teams: Teams = Teams(client: client); - -var result = teams.get(_teamId: "[TEAM_ID]"); diff --git a/app/sdks/0.6.2/client-swift/docs/examples/teams/list.md b/app/sdks/0.6.2/client-swift/docs/examples/teams/list.md deleted file mode 100644 index 8333d1fe43..0000000000 --- a/app/sdks/0.6.2/client-swift/docs/examples/teams/list.md +++ /dev/null @@ -1,14 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - - -var client: Client = Client() - -client - .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject(value: "5df5acd0d48c2") // Your project ID - -var teams: Teams = Teams(client: client); - -var result = teams.list(); diff --git a/app/sdks/0.6.2/client-swift/docs/examples/teams/update-membership-status.md b/app/sdks/0.6.2/client-swift/docs/examples/teams/update-membership-status.md deleted file mode 100644 index ae72e4c799..0000000000 --- a/app/sdks/0.6.2/client-swift/docs/examples/teams/update-membership-status.md +++ /dev/null @@ -1,14 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - - -var client: Client = Client() - -client - .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject(value: "5df5acd0d48c2") // Your project ID - -var teams: Teams = Teams(client: client); - -var result = teams.updateMembershipStatus(_teamId: "[TEAM_ID]", _inviteId: "[INVITE_ID]", _userId: "[USER_ID]", _secret: "[SECRET]"); diff --git a/app/sdks/0.6.2/client-swift/docs/examples/teams/update.md b/app/sdks/0.6.2/client-swift/docs/examples/teams/update.md deleted file mode 100644 index fafd98b881..0000000000 --- a/app/sdks/0.6.2/client-swift/docs/examples/teams/update.md +++ /dev/null @@ -1,14 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - - -var client: Client = Client() - -client - .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject(value: "5df5acd0d48c2") // Your project ID - -var teams: Teams = Teams(client: client); - -var result = teams.update(_teamId: "[TEAM_ID]", _name: "[NAME]"); diff --git a/app/sdks/0.6.2/client-swift/docs/locale.md b/app/sdks/0.6.2/client-swift/docs/locale.md deleted file mode 100644 index efe5a690e2..0000000000 --- a/app/sdks/0.6.2/client-swift/docs/locale.md +++ /dev/null @@ -1,64 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - -# Locale Service - -## Get User Locale - -```http request -GET https://appwrite.io/v1/locale -``` - -** Get the current user location based on IP. Returns an object with user country code, country name, continent name, continent code, ip address and suggested currency. You can use the locale header to get the data in a supported language. - -([IP Geolocation by DB-IP](https://db-ip.com)) ** - -## List Continents - -```http request -GET https://appwrite.io/v1/locale/continents -``` - -** List of all continents. You can use the locale header to get the data in a supported language. ** - -## List Countries - -```http request -GET https://appwrite.io/v1/locale/countries -``` - -** List of all countries. You can use the locale header to get the data in a supported language. ** - -## List EU Countries - -```http request -GET https://appwrite.io/v1/locale/countries/eu -``` - -** 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. ** - -## List Countries Phone Codes - -```http request -GET https://appwrite.io/v1/locale/countries/phones -``` - -** List of all countries phone codes. You can use the locale header to get the data in a supported language. ** - -## List Currencies - -```http request -GET https://appwrite.io/v1/locale/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. ** - -## List Languages - -```http request -GET https://appwrite.io/v1/locale/languages -``` - -** List of all languages classified by ISO 639-1 including 2-letter code, name in English, and name in the respective language. ** - diff --git a/app/sdks/0.6.2/client-swift/docs/storage.md b/app/sdks/0.6.2/client-swift/docs/storage.md deleted file mode 100644 index f902ebd2e9..0000000000 --- a/app/sdks/0.6.2/client-swift/docs/storage.md +++ /dev/null @@ -1,131 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - -# Storage Service - -## List Files - -```http request -GET https://appwrite.io/v1/storage/files -``` - -** Get a list of all the user files. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project files. [Learn more about different API modes](/docs/admin). ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| search | string | Search term to filter your list results. | | -| limit | integer | Results limit value. By default will return maximum 25 results. Maximum of 100 results allowed per request. | 25 | -| offset | integer | Results offset. The default value is 0. Use this param to manage pagination. | 0 | -| orderType | string | Order result by ASC or DESC order. | ASC | - -## Create File - -```http request -POST https://appwrite.io/v1/storage/files -``` - -** Create a new file. The user who creates the file will automatically be assigned to read and write access unless he has passed custom values for read and write arguments. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| file | file | Binary file. | | -| read | array | An array of strings with read permissions. By default no user is granted with any read permissions. [learn more about permissions](/docs/permissions) and get a full list of available permissions. | | -| write | array | An array of strings with write permissions. By default no user is granted with any write permissions. [learn more about permissions](/docs/permissions) and get a full list of available permissions. | | - -## Get File - -```http request -GET https://appwrite.io/v1/storage/files/{fileId} -``` - -** Get file by its unique ID. This endpoint response returns a JSON object with the file metadata. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| fileId | string | **Required** File unique ID. | | - -## Update File - -```http request -PUT https://appwrite.io/v1/storage/files/{fileId} -``` - -** Update file by its unique ID. Only users with write permissions have access to update this resource. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| fileId | string | **Required** File unique ID. | | -| read | array | An array of strings with read permissions. By default no user is granted with any read permissions. [learn more about permissions](/docs/permissions) and get a full list of available permissions. | | -| write | array | An array of strings with write permissions. By default no user is granted with any write permissions. [learn more about permissions](/docs/permissions) and get a full list of available permissions. | | - -## Delete File - -```http request -DELETE https://appwrite.io/v1/storage/files/{fileId} -``` - -** Delete a file by its unique ID. Only users with write permissions have access to delete this resource. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| fileId | string | **Required** File unique ID. | | - -## Get File for Download - -```http request -GET https://appwrite.io/v1/storage/files/{fileId}/download -``` - -** Get 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. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| fileId | string | **Required** File unique ID. | | - -## Get File Preview - -```http request -GET https://appwrite.io/v1/storage/files/{fileId}/preview -``` - -** Get a file preview image. Currently, this method supports preview for image files (jpg, png, and gif), other supported formats, like pdf, docs, slides, and spreadsheets, will return the file icon image. You can also pass query string arguments for cutting and resizing your preview image. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| fileId | string | **Required** File unique ID | | -| width | integer | Resize preview image width, Pass an integer between 0 to 4000. | 0 | -| height | integer | Resize preview image height, Pass an integer between 0 to 4000. | 0 | -| quality | integer | Preview image quality. Pass an integer between 0 to 100. Defaults to 100. | 100 | -| background | string | Preview image background color. Only works with transparent images (png). Use a valid HEX color, no # is needed for prefix. | | -| output | string | Output format type (jpeg, jpg, png, gif and webp). | | - -## Get File for View - -```http request -GET https://appwrite.io/v1/storage/files/{fileId}/view -``` - -** Get file content by its unique ID. This endpoint is similar to the download method but returns with no 'Content-Disposition: attachment' header. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| fileId | string | **Required** File unique ID. | | -| as | string | Choose a file format to convert your file to. Currently you can only convert word and pdf files to pdf or txt. This option is currently experimental only, use at your own risk. | | - diff --git a/app/sdks/0.6.2/client-swift/docs/teams.md b/app/sdks/0.6.2/client-swift/docs/teams.md deleted file mode 100644 index 7f8b4238a7..0000000000 --- a/app/sdks/0.6.2/client-swift/docs/teams.md +++ /dev/null @@ -1,153 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - -# Teams Service - -## List Teams - -```http request -GET https://appwrite.io/v1/teams -``` - -** Get a list of all the current user teams. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project teams. [Learn more about different API modes](/docs/admin). ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| search | string | Search term to filter your list results. | | -| limit | integer | Results limit value. By default will return maximum 25 results. Maximum of 100 results allowed per request. | 25 | -| offset | integer | Results offset. The default value is 0. Use this param to manage pagination. | 0 | -| orderType | string | Order result by ASC or DESC order. | ASC | - -## Create Team - -```http request -POST https://appwrite.io/v1/teams -``` - -** Create a new team. The user who creates the team will automatically be assigned as the owner of the team. The team owner can invite new members, who will be able add new owners and update or delete the team from your project. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| name | string | Team name. | | -| roles | array | Array of strings. Use this param to set the roles in the team for the user who created it. The default role is **owner**. A role can be any string. Learn more about [roles and permissions](/docs/permissions). | ["owner"] | - -## Get Team - -```http request -GET https://appwrite.io/v1/teams/{teamId} -``` - -** Get team by its unique ID. All team members have read access for this resource. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| teamId | string | **Required** Team unique ID. | | - -## Update Team - -```http request -PUT https://appwrite.io/v1/teams/{teamId} -``` - -** Update team by its unique ID. Only team owners have write access for this resource. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| teamId | string | **Required** Team unique ID. | | -| name | string | Team name. | | - -## Delete Team - -```http request -DELETE https://appwrite.io/v1/teams/{teamId} -``` - -** Delete team by its unique ID. Only team owners have write access for this resource. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| teamId | string | **Required** Team unique ID. | | - -## Get Team Memberships - -```http request -GET https://appwrite.io/v1/teams/{teamId}/memberships -``` - -** Get team members by the team unique ID. All team members have read access for this list of resources. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| teamId | string | **Required** Team unique ID. | | -| search | string | Search term to filter your list results. | | -| limit | integer | Results limit value. By default will return maximum 25 results. Maximum of 100 results allowed per request. | 25 | -| offset | integer | Results offset. The default value is 0. Use this param to manage pagination. | 0 | -| orderType | string | Order result by ASC or DESC order. | ASC | - -## Create Team Membership - -```http request -POST https://appwrite.io/v1/teams/{teamId}/memberships -``` - -** Use this endpoint to invite a new member to join your team. An email with a link to join the team will be sent to the new member email address if the member doesn't exist in the project it will be created automatically. - -Use the 'URL' parameter to redirect the user from the invitation email back to your app. When the user is redirected, use the [Update Team Membership Status](/docs/client/teams#updateMembershipStatus) endpoint to allow the user to accept the invitation to the team. - -Please note that in order to avoid a [Redirect Attacks](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URL's are the once from domains you have set when added your platforms in the console interface. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| teamId | string | **Required** Team unique ID. | | -| email | string | New team member email. | | -| name | string | New team member name. | | -| roles | array | Array of strings. Use this param to set the user roles in the team. A role can be any string. Learn more about [roles and permissions](/docs/permissions). | | -| url | string | URL to redirect the user back to your app from the invitation email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API. | | - -## Delete Team Membership - -```http request -DELETE https://appwrite.io/v1/teams/{teamId}/memberships/{inviteId} -``` - -** 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 he didn't accept it. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| teamId | string | **Required** Team unique ID. | | -| inviteId | string | **Required** Invite unique ID. | | - -## Update Team Membership Status - -```http request -PATCH https://appwrite.io/v1/teams/{teamId}/memberships/{inviteId}/status -``` - -** Use this endpoint to allow a user to accept an invitation to join a team after he is being redirected back to your app from the invitation email he was sent. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| teamId | string | **Required** Team unique ID. | | -| inviteId | string | **Required** Invite unique ID. | | -| userId | string | User unique ID. | | -| secret | string | Secret key. | | - diff --git a/app/sdks/0.6.2/client-web/CHANGELOG.md b/app/sdks/0.6.2/client-web/CHANGELOG.md deleted file mode 100644 index fa4d35e687..0000000000 --- a/app/sdks/0.6.2/client-web/CHANGELOG.md +++ /dev/null @@ -1 +0,0 @@ -# Change Log \ No newline at end of file diff --git a/app/sdks/0.6.2/client-web/LICENSE b/app/sdks/0.6.2/client-web/LICENSE deleted file mode 100644 index fc7c051a91..0000000000 --- a/app/sdks/0.6.2/client-web/LICENSE +++ /dev/null @@ -1,12 +0,0 @@ -Copyright (c) 2019 Appwrite (https://appwrite.io) and individual contributors. -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - - 3. Neither the name Appwrite nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/app/sdks/0.6.2/client-web/README.md b/app/sdks/0.6.2/client-web/README.md deleted file mode 100644 index 41e939b017..0000000000 --- a/app/sdks/0.6.2/client-web/README.md +++ /dev/null @@ -1,44 +0,0 @@ -# Appwrite Web SDK - -![License](https://img.shields.io/github/license/appwrite/sdk-for-js.svg?v=1) -![Version](https://img.shields.io/badge/api%20version-0.7.0-blue.svg?v=1) - -Appwrite is an open-source backend as a service server that abstract and simplify complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way. - Use the Web SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools. - For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs) - -![Appwrite](https://appwrite.io/images/github.png) - -## Installation - -### NPM - -To install via [NPM](https://www.npmjs.com/): - -```bash -npm install appwrite --save -``` - -If you're using a bundler (like [Browserify](http://browserify.org/) or [webpack](https://webpack.js.org/)), you can import the Appwrite module when you need it: - -```js -import * as Appwrite from "appwrite"; -``` - -### CDN - -To install with a CDN (content delivery network) add the following scripts to the bottom of your tag, but before you use any Appwrite services: - -```html - -``` - - - -## Contribution - -This library is auto-generated by Appwrite custom [SDK Generator](https://github.com/appwrite/sdk-generator). To learn more about how you can help us improve this SDK, please check the [contribution guide](https://github.com/appwrite/sdk-generator/blob/master/CONTRIBUTING.md) before sending a pull-request. - -## License - -Please see the [BSD-3-Clause license](https://raw.githubusercontent.com/appwrite/appwrite/master/LICENSE) file for more information. \ No newline at end of file diff --git a/app/sdks/0.6.2/client-web/docs/examples/account/create-o-auth2session.md b/app/sdks/0.6.2/client-web/docs/examples/account/create-o-auth2session.md deleted file mode 100644 index 25b02e632e..0000000000 --- a/app/sdks/0.6.2/client-web/docs/examples/account/create-o-auth2session.md +++ /dev/null @@ -1,10 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -// Go to OAuth provider login page -sdk.account.createOAuth2Session('amazon'); - diff --git a/app/sdks/0.6.2/client-web/docs/examples/account/create-recovery.md b/app/sdks/0.6.2/client-web/docs/examples/account/create-recovery.md deleted file mode 100644 index 72130f4de4..0000000000 --- a/app/sdks/0.6.2/client-web/docs/examples/account/create-recovery.md +++ /dev/null @@ -1,14 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.account.createRecovery('email@example.com', 'https://example.com'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/client-web/docs/examples/account/create-session.md b/app/sdks/0.6.2/client-web/docs/examples/account/create-session.md deleted file mode 100644 index 4a7682c13d..0000000000 --- a/app/sdks/0.6.2/client-web/docs/examples/account/create-session.md +++ /dev/null @@ -1,14 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.account.createSession('email@example.com', 'password'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/client-web/docs/examples/account/create-verification.md b/app/sdks/0.6.2/client-web/docs/examples/account/create-verification.md deleted file mode 100644 index 7903384a9f..0000000000 --- a/app/sdks/0.6.2/client-web/docs/examples/account/create-verification.md +++ /dev/null @@ -1,14 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.account.createVerification('https://example.com'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/client-web/docs/examples/account/create.md b/app/sdks/0.6.2/client-web/docs/examples/account/create.md deleted file mode 100644 index c9ce798b6a..0000000000 --- a/app/sdks/0.6.2/client-web/docs/examples/account/create.md +++ /dev/null @@ -1,14 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.account.create('email@example.com', 'password'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/client-web/docs/examples/account/delete-session.md b/app/sdks/0.6.2/client-web/docs/examples/account/delete-session.md deleted file mode 100644 index 581e5d132d..0000000000 --- a/app/sdks/0.6.2/client-web/docs/examples/account/delete-session.md +++ /dev/null @@ -1,14 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.account.deleteSession('[SESSION_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/client-web/docs/examples/account/delete-sessions.md b/app/sdks/0.6.2/client-web/docs/examples/account/delete-sessions.md deleted file mode 100644 index d037673eb3..0000000000 --- a/app/sdks/0.6.2/client-web/docs/examples/account/delete-sessions.md +++ /dev/null @@ -1,14 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.account.deleteSessions(); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/client-web/docs/examples/account/delete.md b/app/sdks/0.6.2/client-web/docs/examples/account/delete.md deleted file mode 100644 index d952d77d7a..0000000000 --- a/app/sdks/0.6.2/client-web/docs/examples/account/delete.md +++ /dev/null @@ -1,14 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.account.delete(); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/client-web/docs/examples/account/get-logs.md b/app/sdks/0.6.2/client-web/docs/examples/account/get-logs.md deleted file mode 100644 index c53e0446e9..0000000000 --- a/app/sdks/0.6.2/client-web/docs/examples/account/get-logs.md +++ /dev/null @@ -1,14 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.account.getLogs(); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/client-web/docs/examples/account/get-prefs.md b/app/sdks/0.6.2/client-web/docs/examples/account/get-prefs.md deleted file mode 100644 index 75835e37fb..0000000000 --- a/app/sdks/0.6.2/client-web/docs/examples/account/get-prefs.md +++ /dev/null @@ -1,14 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.account.getPrefs(); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/client-web/docs/examples/account/get-sessions.md b/app/sdks/0.6.2/client-web/docs/examples/account/get-sessions.md deleted file mode 100644 index b4434de336..0000000000 --- a/app/sdks/0.6.2/client-web/docs/examples/account/get-sessions.md +++ /dev/null @@ -1,14 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.account.getSessions(); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/client-web/docs/examples/account/get.md b/app/sdks/0.6.2/client-web/docs/examples/account/get.md deleted file mode 100644 index f0184a8513..0000000000 --- a/app/sdks/0.6.2/client-web/docs/examples/account/get.md +++ /dev/null @@ -1,14 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.account.get(); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/client-web/docs/examples/account/update-email.md b/app/sdks/0.6.2/client-web/docs/examples/account/update-email.md deleted file mode 100644 index f48fed78bc..0000000000 --- a/app/sdks/0.6.2/client-web/docs/examples/account/update-email.md +++ /dev/null @@ -1,14 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.account.updateEmail('email@example.com', 'password'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/client-web/docs/examples/account/update-name.md b/app/sdks/0.6.2/client-web/docs/examples/account/update-name.md deleted file mode 100644 index e03e72c4b2..0000000000 --- a/app/sdks/0.6.2/client-web/docs/examples/account/update-name.md +++ /dev/null @@ -1,14 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.account.updateName('[NAME]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/client-web/docs/examples/account/update-password.md b/app/sdks/0.6.2/client-web/docs/examples/account/update-password.md deleted file mode 100644 index 22539f3f64..0000000000 --- a/app/sdks/0.6.2/client-web/docs/examples/account/update-password.md +++ /dev/null @@ -1,14 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.account.updatePassword('password', 'password'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/client-web/docs/examples/account/update-prefs.md b/app/sdks/0.6.2/client-web/docs/examples/account/update-prefs.md deleted file mode 100644 index b2d4ff175e..0000000000 --- a/app/sdks/0.6.2/client-web/docs/examples/account/update-prefs.md +++ /dev/null @@ -1,14 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.account.updatePrefs({}); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/client-web/docs/examples/account/update-recovery.md b/app/sdks/0.6.2/client-web/docs/examples/account/update-recovery.md deleted file mode 100644 index 33cf1b63c9..0000000000 --- a/app/sdks/0.6.2/client-web/docs/examples/account/update-recovery.md +++ /dev/null @@ -1,14 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.account.updateRecovery('[USER_ID]', '[SECRET]', 'password', 'password'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/client-web/docs/examples/account/update-verification.md b/app/sdks/0.6.2/client-web/docs/examples/account/update-verification.md deleted file mode 100644 index a80e125e30..0000000000 --- a/app/sdks/0.6.2/client-web/docs/examples/account/update-verification.md +++ /dev/null @@ -1,14 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.account.updateVerification('[USER_ID]', '[SECRET]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/client-web/docs/examples/avatars/get-browser.md b/app/sdks/0.6.2/client-web/docs/examples/avatars/get-browser.md deleted file mode 100644 index 0855209f58..0000000000 --- a/app/sdks/0.6.2/client-web/docs/examples/avatars/get-browser.md +++ /dev/null @@ -1,10 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let result = sdk.avatars.getBrowser('aa'); - -console.log(result); // Resource URL \ No newline at end of file diff --git a/app/sdks/0.6.2/client-web/docs/examples/avatars/get-credit-card.md b/app/sdks/0.6.2/client-web/docs/examples/avatars/get-credit-card.md deleted file mode 100644 index 1aa595bd65..0000000000 --- a/app/sdks/0.6.2/client-web/docs/examples/avatars/get-credit-card.md +++ /dev/null @@ -1,10 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let result = sdk.avatars.getCreditCard('amex'); - -console.log(result); // Resource URL \ No newline at end of file diff --git a/app/sdks/0.6.2/client-web/docs/examples/avatars/get-favicon.md b/app/sdks/0.6.2/client-web/docs/examples/avatars/get-favicon.md deleted file mode 100644 index a945e50bb2..0000000000 --- a/app/sdks/0.6.2/client-web/docs/examples/avatars/get-favicon.md +++ /dev/null @@ -1,10 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let result = sdk.avatars.getFavicon('https://example.com'); - -console.log(result); // Resource URL \ No newline at end of file diff --git a/app/sdks/0.6.2/client-web/docs/examples/avatars/get-flag.md b/app/sdks/0.6.2/client-web/docs/examples/avatars/get-flag.md deleted file mode 100644 index 222b388afc..0000000000 --- a/app/sdks/0.6.2/client-web/docs/examples/avatars/get-flag.md +++ /dev/null @@ -1,10 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let result = sdk.avatars.getFlag('af'); - -console.log(result); // Resource URL \ No newline at end of file diff --git a/app/sdks/0.6.2/client-web/docs/examples/avatars/get-image.md b/app/sdks/0.6.2/client-web/docs/examples/avatars/get-image.md deleted file mode 100644 index 3f15981c71..0000000000 --- a/app/sdks/0.6.2/client-web/docs/examples/avatars/get-image.md +++ /dev/null @@ -1,10 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let result = sdk.avatars.getImage('https://example.com'); - -console.log(result); // Resource URL \ No newline at end of file diff --git a/app/sdks/0.6.2/client-web/docs/examples/avatars/get-initials.md b/app/sdks/0.6.2/client-web/docs/examples/avatars/get-initials.md deleted file mode 100644 index ef04988e2d..0000000000 --- a/app/sdks/0.6.2/client-web/docs/examples/avatars/get-initials.md +++ /dev/null @@ -1,10 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let result = sdk.avatars.getInitials(); - -console.log(result); // Resource URL \ No newline at end of file diff --git a/app/sdks/0.6.2/client-web/docs/examples/avatars/get-q-r.md b/app/sdks/0.6.2/client-web/docs/examples/avatars/get-q-r.md deleted file mode 100644 index 9d9ee3fea2..0000000000 --- a/app/sdks/0.6.2/client-web/docs/examples/avatars/get-q-r.md +++ /dev/null @@ -1,10 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let result = sdk.avatars.getQR('[TEXT]'); - -console.log(result); // Resource URL \ No newline at end of file diff --git a/app/sdks/0.6.2/client-web/docs/examples/database/create-document.md b/app/sdks/0.6.2/client-web/docs/examples/database/create-document.md deleted file mode 100644 index e04f73f73e..0000000000 --- a/app/sdks/0.6.2/client-web/docs/examples/database/create-document.md +++ /dev/null @@ -1,14 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.database.createDocument('[COLLECTION_ID]', {}, [], []); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/client-web/docs/examples/database/delete-document.md b/app/sdks/0.6.2/client-web/docs/examples/database/delete-document.md deleted file mode 100644 index 79799b6907..0000000000 --- a/app/sdks/0.6.2/client-web/docs/examples/database/delete-document.md +++ /dev/null @@ -1,14 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.database.deleteDocument('[COLLECTION_ID]', '[DOCUMENT_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/client-web/docs/examples/database/get-document.md b/app/sdks/0.6.2/client-web/docs/examples/database/get-document.md deleted file mode 100644 index b9605dccc6..0000000000 --- a/app/sdks/0.6.2/client-web/docs/examples/database/get-document.md +++ /dev/null @@ -1,14 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.database.getDocument('[COLLECTION_ID]', '[DOCUMENT_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/client-web/docs/examples/database/list-documents.md b/app/sdks/0.6.2/client-web/docs/examples/database/list-documents.md deleted file mode 100644 index 14f8a423a1..0000000000 --- a/app/sdks/0.6.2/client-web/docs/examples/database/list-documents.md +++ /dev/null @@ -1,14 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.database.listDocuments('[COLLECTION_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/client-web/docs/examples/database/update-document.md b/app/sdks/0.6.2/client-web/docs/examples/database/update-document.md deleted file mode 100644 index 9104b77a71..0000000000 --- a/app/sdks/0.6.2/client-web/docs/examples/database/update-document.md +++ /dev/null @@ -1,14 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.database.updateDocument('[COLLECTION_ID]', '[DOCUMENT_ID]', {}, [], []); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/client-web/docs/examples/locale/get-continents.md b/app/sdks/0.6.2/client-web/docs/examples/locale/get-continents.md deleted file mode 100644 index 1dfdf8013b..0000000000 --- a/app/sdks/0.6.2/client-web/docs/examples/locale/get-continents.md +++ /dev/null @@ -1,14 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.locale.getContinents(); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/client-web/docs/examples/locale/get-countries-e-u.md b/app/sdks/0.6.2/client-web/docs/examples/locale/get-countries-e-u.md deleted file mode 100644 index 6b3f210a1e..0000000000 --- a/app/sdks/0.6.2/client-web/docs/examples/locale/get-countries-e-u.md +++ /dev/null @@ -1,14 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.locale.getCountriesEU(); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/client-web/docs/examples/locale/get-countries-phones.md b/app/sdks/0.6.2/client-web/docs/examples/locale/get-countries-phones.md deleted file mode 100644 index f35e2152e4..0000000000 --- a/app/sdks/0.6.2/client-web/docs/examples/locale/get-countries-phones.md +++ /dev/null @@ -1,14 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.locale.getCountriesPhones(); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/client-web/docs/examples/locale/get-countries.md b/app/sdks/0.6.2/client-web/docs/examples/locale/get-countries.md deleted file mode 100644 index 53b96375a1..0000000000 --- a/app/sdks/0.6.2/client-web/docs/examples/locale/get-countries.md +++ /dev/null @@ -1,14 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.locale.getCountries(); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/client-web/docs/examples/locale/get-currencies.md b/app/sdks/0.6.2/client-web/docs/examples/locale/get-currencies.md deleted file mode 100644 index 57db66401f..0000000000 --- a/app/sdks/0.6.2/client-web/docs/examples/locale/get-currencies.md +++ /dev/null @@ -1,14 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.locale.getCurrencies(); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/client-web/docs/examples/locale/get-languages.md b/app/sdks/0.6.2/client-web/docs/examples/locale/get-languages.md deleted file mode 100644 index 04e3063ee7..0000000000 --- a/app/sdks/0.6.2/client-web/docs/examples/locale/get-languages.md +++ /dev/null @@ -1,14 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.locale.getLanguages(); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/client-web/docs/examples/locale/get.md b/app/sdks/0.6.2/client-web/docs/examples/locale/get.md deleted file mode 100644 index 469a046dbc..0000000000 --- a/app/sdks/0.6.2/client-web/docs/examples/locale/get.md +++ /dev/null @@ -1,14 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.locale.get(); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/client-web/docs/examples/storage/create-file.md b/app/sdks/0.6.2/client-web/docs/examples/storage/create-file.md deleted file mode 100644 index b23c47027a..0000000000 --- a/app/sdks/0.6.2/client-web/docs/examples/storage/create-file.md +++ /dev/null @@ -1,14 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.storage.createFile(document.getElementById('uploader').files[0], [], []); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/client-web/docs/examples/storage/delete-file.md b/app/sdks/0.6.2/client-web/docs/examples/storage/delete-file.md deleted file mode 100644 index c38ab4ba9c..0000000000 --- a/app/sdks/0.6.2/client-web/docs/examples/storage/delete-file.md +++ /dev/null @@ -1,14 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.storage.deleteFile('[FILE_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/client-web/docs/examples/storage/get-file-download.md b/app/sdks/0.6.2/client-web/docs/examples/storage/get-file-download.md deleted file mode 100644 index 1323b8b8df..0000000000 --- a/app/sdks/0.6.2/client-web/docs/examples/storage/get-file-download.md +++ /dev/null @@ -1,10 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let result = sdk.storage.getFileDownload('[FILE_ID]'); - -console.log(result); // Resource URL \ No newline at end of file diff --git a/app/sdks/0.6.2/client-web/docs/examples/storage/get-file-preview.md b/app/sdks/0.6.2/client-web/docs/examples/storage/get-file-preview.md deleted file mode 100644 index 5ede9fdb93..0000000000 --- a/app/sdks/0.6.2/client-web/docs/examples/storage/get-file-preview.md +++ /dev/null @@ -1,10 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let result = sdk.storage.getFilePreview('[FILE_ID]'); - -console.log(result); // Resource URL \ No newline at end of file diff --git a/app/sdks/0.6.2/client-web/docs/examples/storage/get-file-view.md b/app/sdks/0.6.2/client-web/docs/examples/storage/get-file-view.md deleted file mode 100644 index 53877ae352..0000000000 --- a/app/sdks/0.6.2/client-web/docs/examples/storage/get-file-view.md +++ /dev/null @@ -1,10 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let result = sdk.storage.getFileView('[FILE_ID]'); - -console.log(result); // Resource URL \ No newline at end of file diff --git a/app/sdks/0.6.2/client-web/docs/examples/storage/get-file.md b/app/sdks/0.6.2/client-web/docs/examples/storage/get-file.md deleted file mode 100644 index a1f94c08a6..0000000000 --- a/app/sdks/0.6.2/client-web/docs/examples/storage/get-file.md +++ /dev/null @@ -1,14 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.storage.getFile('[FILE_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/client-web/docs/examples/storage/list-files.md b/app/sdks/0.6.2/client-web/docs/examples/storage/list-files.md deleted file mode 100644 index c489a0b46d..0000000000 --- a/app/sdks/0.6.2/client-web/docs/examples/storage/list-files.md +++ /dev/null @@ -1,14 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.storage.listFiles(); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/client-web/docs/examples/storage/update-file.md b/app/sdks/0.6.2/client-web/docs/examples/storage/update-file.md deleted file mode 100644 index 2a2f579b3b..0000000000 --- a/app/sdks/0.6.2/client-web/docs/examples/storage/update-file.md +++ /dev/null @@ -1,14 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.storage.updateFile('[FILE_ID]', [], []); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/client-web/docs/examples/teams/create-membership.md b/app/sdks/0.6.2/client-web/docs/examples/teams/create-membership.md deleted file mode 100644 index 78b2d7fa77..0000000000 --- a/app/sdks/0.6.2/client-web/docs/examples/teams/create-membership.md +++ /dev/null @@ -1,14 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.teams.createMembership('[TEAM_ID]', 'email@example.com', [], 'https://example.com'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/client-web/docs/examples/teams/create.md b/app/sdks/0.6.2/client-web/docs/examples/teams/create.md deleted file mode 100644 index 43205ba888..0000000000 --- a/app/sdks/0.6.2/client-web/docs/examples/teams/create.md +++ /dev/null @@ -1,14 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.teams.create('[NAME]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/client-web/docs/examples/teams/delete-membership.md b/app/sdks/0.6.2/client-web/docs/examples/teams/delete-membership.md deleted file mode 100644 index 1b85ef08da..0000000000 --- a/app/sdks/0.6.2/client-web/docs/examples/teams/delete-membership.md +++ /dev/null @@ -1,14 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.teams.deleteMembership('[TEAM_ID]', '[INVITE_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/client-web/docs/examples/teams/delete.md b/app/sdks/0.6.2/client-web/docs/examples/teams/delete.md deleted file mode 100644 index 4665ad5773..0000000000 --- a/app/sdks/0.6.2/client-web/docs/examples/teams/delete.md +++ /dev/null @@ -1,14 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.teams.delete('[TEAM_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/client-web/docs/examples/teams/get-memberships.md b/app/sdks/0.6.2/client-web/docs/examples/teams/get-memberships.md deleted file mode 100644 index 6235ce33f4..0000000000 --- a/app/sdks/0.6.2/client-web/docs/examples/teams/get-memberships.md +++ /dev/null @@ -1,14 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.teams.getMemberships('[TEAM_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/client-web/docs/examples/teams/get.md b/app/sdks/0.6.2/client-web/docs/examples/teams/get.md deleted file mode 100644 index f4b0f040b1..0000000000 --- a/app/sdks/0.6.2/client-web/docs/examples/teams/get.md +++ /dev/null @@ -1,14 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.teams.get('[TEAM_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/client-web/docs/examples/teams/list.md b/app/sdks/0.6.2/client-web/docs/examples/teams/list.md deleted file mode 100644 index c4229e2400..0000000000 --- a/app/sdks/0.6.2/client-web/docs/examples/teams/list.md +++ /dev/null @@ -1,14 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.teams.list(); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/client-web/docs/examples/teams/update-membership-status.md b/app/sdks/0.6.2/client-web/docs/examples/teams/update-membership-status.md deleted file mode 100644 index e8b3de0a0b..0000000000 --- a/app/sdks/0.6.2/client-web/docs/examples/teams/update-membership-status.md +++ /dev/null @@ -1,14 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.teams.updateMembershipStatus('[TEAM_ID]', '[INVITE_ID]', '[USER_ID]', '[SECRET]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/client-web/docs/examples/teams/update.md b/app/sdks/0.6.2/client-web/docs/examples/teams/update.md deleted file mode 100644 index bbab80937d..0000000000 --- a/app/sdks/0.6.2/client-web/docs/examples/teams/update.md +++ /dev/null @@ -1,14 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.teams.update('[TEAM_ID]', '[NAME]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/client-web/package.json b/app/sdks/0.6.2/client-web/package.json deleted file mode 100644 index 26dd06fb94..0000000000 --- a/app/sdks/0.6.2/client-web/package.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "appwrite", - "homepage": "https://appwrite.io/support", - "description": "Appwrite is an open-source self-hosted backend server that abstract and simplify complex and repetitive development tasks behind a very simple REST API", - "version": "1.1.0", - "license": "BSD-3-Clause", - "main": "src/sdk.js", - "types": "types/index.d.ts", - "repository": { - "type": "git", - "url": "https://github.com/appwrite/sdk-for-js" - }, - "devDependencies": { - "typescript": "^3.6.4" - }, - "dependencies": {} -} \ No newline at end of file diff --git a/app/sdks/0.6.2/client-web/src/sdk.js b/app/sdks/0.6.2/client-web/src/sdk.js deleted file mode 100644 index 90c9b8021b..0000000000 --- a/app/sdks/0.6.2/client-web/src/sdk.js +++ /dev/null @@ -1,2386 +0,0 @@ -(function (window) { - - 'use strict'; - - window.Appwrite = function () { - - let config = { - endpoint: 'https://appwrite.io/v1', - project: '', - locale: '', - }; - - /** - * @param {string} endpoint - * @returns {this} - */ - let setEndpoint = function(endpoint) { - config.endpoint = endpoint; - - return this; - }; - - /** - * Set Project - * - * Your project ID - * - * @param value string - * - * @return this - */ - let setProject = function (value) - { - http.addGlobalHeader('X-Appwrite-Project', value); - - config.project = value; - - return this; - }; - - /** - * Set Locale - * - * @param value string - * - * @return this - */ - let setLocale = function (value) - { - http.addGlobalHeader('X-Appwrite-Locale', value); - - config.locale = value; - - return this; - }; - - let http = function(document) { - let globalParams = [], - globalHeaders = []; - - let addParam = function (url, param, value) { - let a = document.createElement('a'), regex = /(?:\?|&|&)+([^=]+)(?:=([^&]*))*/g; - let match, str = []; - a.href = url; - param = encodeURIComponent(param); - - while (match = regex.exec(a.search)) if (param !== match[1]) str.push(match[1] + (match[2] ? "=" + match[2] : "")); - - str.push(param + (value ? "=" + encodeURIComponent(value) : "")); - - a.search = str.join("&"); - - return a.href; - }; - - /** - * @param {Object} params - * @returns {string} - */ - let buildQuery = function(params) { - let str = []; - - for (let p in params) { - if(Array.isArray(params[p])) { - for (let index = 0; index < params[p].length; index++) { - let param = params[p][index]; - str.push(encodeURIComponent(p + '[]') + "=" + encodeURIComponent(param)); - } - } - else { - str.push(encodeURIComponent(p) + "=" + encodeURIComponent(params[p])); - } - } - - return str.join("&"); - }; - - let addGlobalHeader = function(key, value) { - globalHeaders[key] = {key: key.toLowerCase(), value: value.toLowerCase()}; - }; - - let addGlobalParam = function(key, value) { - globalParams.push({key: key, value: value}); - }; - - addGlobalHeader('x-sdk-version', 'appwrite:javascript:1.1.0'); - addGlobalHeader('content-type', ''); - - /** - * @param {string} method - * @param {string} path string - * @param {Object} headers - * @param {Object} params - * @param {function} progress - * @returns {Promise} - */ - let call = function (method, path, headers = {}, params = {}, progress = null) { - let i; - - path = config.endpoint + path; - - if (-1 === ['GET', 'POST', 'PUT', 'DELETE', 'TRACE', 'HEAD', 'OPTIONS', 'CONNECT', 'PATCH'].indexOf(method)) { - throw new Error('var method must contain a valid HTTP method name'); - } - - if (typeof path !== 'string') { - throw new Error('var path must be of type string'); - } - - if (typeof headers !== 'object') { - throw new Error('var headers must be of type object'); - } - - for (i = 0; i < globalParams.length; i++) { // Add global params to URL - path = addParam(path, globalParams[i].key, globalParams[i].value); - } - - if(window.localStorage && window.localStorage.getItem('cookieFallback')) { - headers['X-Fallback-Cookies'] = window.localStorage.getItem('cookieFallback'); - } - - for (let key in globalHeaders) { // Add Global Headers - if (globalHeaders.hasOwnProperty(key)) { - if (!headers[globalHeaders[key].key]) { - headers[globalHeaders[key].key] = globalHeaders[key].value; - } - } - } - - if(method === 'GET') { - for (let param in params) { - if (param.hasOwnProperty(key)) { - path = addParam(path, key + (Array.isArray(param) ? '[]' : ''), params[key]); - } - } - } - - switch (headers['content-type']) { // Parse request by content type - case 'application/json': - params = JSON.stringify(params); - break; - - case 'multipart/form-data': - let formData = new FormData(); - - Object.keys(params).forEach(function(key) { - let param = params[key]; - formData.append(key + (Array.isArray(param) ? '[]' : ''), param); - }); - - params = formData; - break; - } - - return new Promise(function (resolve, reject) { - - let request = new XMLHttpRequest(), key; - - request.withCredentials = true; - request.open(method, path, true); - - for (key in headers) { // Set Headers - if (headers.hasOwnProperty(key)) { - if (key === 'content-type' && headers[key] === 'multipart/form-data') { // Skip to avoid missing boundary - continue; - } - - request.setRequestHeader(key, headers[key]); - } - } - - request.onload = function () { - let data = request.response; - let contentType = this.getResponseHeader('content-type') || ''; - contentType = contentType.substring(0, contentType.indexOf(';')); - - switch (contentType) { - case 'application/json': - data = JSON.parse(data); - break; - } - - let cookieFallback = this.getResponseHeader('X-Fallback-Cookies') || ''; - - if(window.localStorage && cookieFallback) { - window.console.warn('Appwrite is using localStorage for session management. Increase your security by adding a custom domain as your API endpoint.'); - window.localStorage.setItem('cookieFallback', cookieFallback); - } - - if (4 === request.readyState && 399 >= request.status) { - resolve(data); - } else { - reject(data); - } - }; - - if (progress) { - request.addEventListener('progress', progress); - request.upload.addEventListener('progress', progress, false); - } - - // Handle network errors - request.onerror = function () { - reject(new Error("Network Error")); - }; - - request.send(params); - }) - }; - - return { - 'get': function(path, headers = {}, params = {}) { - return call('GET', path + ((Object.keys(params).length > 0) ? '?' + buildQuery(params) : ''), headers, {}); - }, - 'post': function(path, headers = {}, params = {}, progress = null) { - return call('POST', path, headers, params, progress); - }, - 'put': function(path, headers = {}, params = {}, progress = null) { - return call('PUT', path, headers, params, progress); - }, - 'patch': function(path, headers = {}, params = {}, progress = null) { - return call('PATCH', path, headers, params, progress); - }, - 'delete': function(path, headers = {}, params = {}, progress = null) { - return call('DELETE', path, headers, params, progress); - }, - 'addGlobalParam': addGlobalParam, - 'addGlobalHeader': addGlobalHeader - } - }(window.document); - - let account = { - - /** - * Get Account - * - * Get currently logged in user data as JSON object. - * - * @throws {Error} - * @return {Promise} - */ - get: function() { - let path = '/account'; - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Create Account - * - * Use this endpoint to allow a new user to register a new account in your - * project. After the user registration completes successfully, you can use - * the [/account/verfication](/docs/client/account#createVerification) route - * to start verifying the user email address. To allow your new user to login - * to his new account, you need to create a new [account - * session](/docs/client/account#createSession). - * - * @param {string} email - * @param {string} password - * @param {string} name - * @throws {Error} - * @return {Promise} - */ - create: function(email, password, name = '') { - if(email === undefined) { - throw new Error('Missing required parameter: "email"'); - } - - if(password === undefined) { - throw new Error('Missing required parameter: "password"'); - } - - let path = '/account'; - - let payload = {}; - - if(email) { - payload['email'] = email; - } - - if(password) { - payload['password'] = password; - } - - if(name) { - payload['name'] = name; - } - - return http - .post(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Delete Account - * - * Delete a currently logged in user account. Behind the scene, the user - * record is not deleted but permanently blocked from any access. This is done - * to avoid deleted accounts being overtaken by new users with the same email - * address. Any user-related resources like documents or storage files should - * be deleted separately. - * - * @throws {Error} - * @return {Promise} - */ - delete: function() { - let path = '/account'; - - let payload = {}; - - return http - .delete(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Update Account Email - * - * Update currently logged in user account email address. After changing user - * address, user confirmation status is being reset and a new confirmation - * mail is sent. For security measures, user password is required to complete - * this request. - * - * @param {string} email - * @param {string} password - * @throws {Error} - * @return {Promise} - */ - updateEmail: function(email, password) { - if(email === undefined) { - throw new Error('Missing required parameter: "email"'); - } - - if(password === undefined) { - throw new Error('Missing required parameter: "password"'); - } - - let path = '/account/email'; - - let payload = {}; - - if(email) { - payload['email'] = email; - } - - if(password) { - payload['password'] = password; - } - - return http - .patch(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Get Account 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. - * - * @throws {Error} - * @return {Promise} - */ - getLogs: function() { - let path = '/account/logs'; - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Update Account Name - * - * Update currently logged in user account name. - * - * @param {string} name - * @throws {Error} - * @return {Promise} - */ - updateName: function(name) { - if(name === undefined) { - throw new Error('Missing required parameter: "name"'); - } - - let path = '/account/name'; - - let payload = {}; - - if(name) { - payload['name'] = name; - } - - return http - .patch(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Update Account Password - * - * Update currently logged in user password. For validation, user is required - * to pass the password twice. - * - * @param {string} password - * @param {string} oldPassword - * @throws {Error} - * @return {Promise} - */ - updatePassword: function(password, oldPassword) { - if(password === undefined) { - throw new Error('Missing required parameter: "password"'); - } - - if(oldPassword === undefined) { - throw new Error('Missing required parameter: "oldPassword"'); - } - - let path = '/account/password'; - - let payload = {}; - - if(password) { - payload['password'] = password; - } - - if(oldPassword) { - payload['oldPassword'] = oldPassword; - } - - return http - .patch(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Get Account Preferences - * - * Get currently logged in user preferences as a key-value object. - * - * @throws {Error} - * @return {Promise} - */ - getPrefs: function() { - let path = '/account/prefs'; - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Update Account Preferences - * - * Update currently logged in user account preferences. You can pass only the - * specific settings you wish to update. - * - * @param {object} prefs - * @throws {Error} - * @return {Promise} - */ - updatePrefs: function(prefs) { - if(prefs === undefined) { - throw new Error('Missing required parameter: "prefs"'); - } - - let path = '/account/prefs'; - - let payload = {}; - - if(prefs) { - payload['prefs'] = prefs; - } - - return http - .patch(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Create Password Recovery - * - * Sends the user an email with a temporary secret key for password reset. - * When the user clicks the confirmation link he is redirected back to your - * app password reset URL with the secret key and email address values - * attached to the URL query string. Use the query string params to submit a - * request to the [PUT /account/recovery](/docs/client/account#updateRecovery) - * endpoint to complete the process. - * - * @param {string} email - * @param {string} url - * @throws {Error} - * @return {Promise} - */ - createRecovery: function(email, url) { - if(email === undefined) { - throw new Error('Missing required parameter: "email"'); - } - - if(url === undefined) { - throw new Error('Missing required parameter: "url"'); - } - - let path = '/account/recovery'; - - let payload = {}; - - if(email) { - payload['email'] = email; - } - - if(url) { - payload['url'] = url; - } - - return http - .post(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Complete Password Recovery - * - * Use this endpoint to complete the user account password reset. Both the - * **userId** and **secret** arguments will be passed as query parameters to - * the redirect URL you have provided when sending your request to the [POST - * /account/recovery](/docs/client/account#createRecovery) endpoint. - * - * Please note that in order to avoid a [Redirect - * 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. - * - * @param {string} userId - * @param {string} secret - * @param {string} password - * @param {string} passwordAgain - * @throws {Error} - * @return {Promise} - */ - updateRecovery: function(userId, secret, password, passwordAgain) { - if(userId === undefined) { - throw new Error('Missing required parameter: "userId"'); - } - - if(secret === undefined) { - throw new Error('Missing required parameter: "secret"'); - } - - if(password === undefined) { - throw new Error('Missing required parameter: "password"'); - } - - if(passwordAgain === undefined) { - throw new Error('Missing required parameter: "passwordAgain"'); - } - - let path = '/account/recovery'; - - let payload = {}; - - if(userId) { - payload['userId'] = userId; - } - - if(secret) { - payload['secret'] = secret; - } - - if(password) { - payload['password'] = password; - } - - if(passwordAgain) { - payload['passwordAgain'] = passwordAgain; - } - - return http - .put(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Get Account Sessions - * - * Get currently logged in user list of active sessions across different - * devices. - * - * @throws {Error} - * @return {Promise} - */ - getSessions: function() { - let path = '/account/sessions'; - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Create Account Session - * - * Allow the user to login into his account by providing a valid email and - * password combination. This route will create a new session for the user. - * - * @param {string} email - * @param {string} password - * @throws {Error} - * @return {Promise} - */ - createSession: function(email, password) { - if(email === undefined) { - throw new Error('Missing required parameter: "email"'); - } - - if(password === undefined) { - throw new Error('Missing required parameter: "password"'); - } - - let path = '/account/sessions'; - - let payload = {}; - - if(email) { - payload['email'] = email; - } - - if(password) { - payload['password'] = password; - } - - return http - .post(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Delete All Account Sessions - * - * Delete all sessions from the user account and remove any sessions cookies - * from the end client. - * - * @throws {Error} - * @return {Promise} - */ - deleteSessions: function() { - let path = '/account/sessions'; - - let payload = {}; - - return http - .delete(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Create Account Session with OAuth2 - * - * Allow the user to login to his account using the OAuth2 provider of his - * choice. Each OAuth2 provider should be enabled from the Appwrite console - * first. Use the success and failure arguments to provide a redirect URL's - * back to your app when login is completed. - * - * @param {string} provider - * @param {string} success - * @param {string} failure - * @param {string[]} scopes - * @throws {Error} - * @return {Promise} - */ - createOAuth2Session: function(provider, success = 'https://appwrite.io/auth/oauth2/success', failure = 'https://appwrite.io/auth/oauth2/failure', scopes = []) { - if(provider === undefined) { - throw new Error('Missing required parameter: "provider"'); - } - - let path = '/account/sessions/oauth2/{provider}'.replace(new RegExp('{provider}', 'g'), provider); - - let payload = {}; - - if(success) { - payload['success'] = success; - } - - if(failure) { - payload['failure'] = failure; - } - - if(scopes) { - payload['scopes'] = scopes; - } - - payload['project'] = config.project; - - - let query = []; - - for (let p in payload) { - if(Array.isArray(payload[p])) { - for (let index = 0; index < payload[p].length; index++) { - let param = payload[p][index]; - query.push(encodeURIComponent(p + '[]') + "=" + encodeURIComponent(param)); - } - } - else { - query.push(encodeURIComponent(p) + "=" + encodeURIComponent(payload[p])); - } - } - - query = query.join("&"); - - window.location = config.endpoint + path + ((query) ? '?' + query : ''); - }, - - /** - * Delete Account Session - * - * Use this endpoint to log out the currently logged in user from all his - * account sessions across all his different devices. When using the option id - * argument, only the session unique ID provider will be deleted. - * - * @param {string} sessionId - * @throws {Error} - * @return {Promise} - */ - deleteSession: function(sessionId) { - if(sessionId === undefined) { - throw new Error('Missing required parameter: "sessionId"'); - } - - let path = '/account/sessions/{sessionId}'.replace(new RegExp('{sessionId}', 'g'), sessionId); - - let payload = {}; - - return http - .delete(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Create Email Verification - * - * Use this endpoint to send a verification message to your user email address - * to confirm they are the valid owners of that address. Both the **userId** - * and **secret** arguments will be passed as query parameters to the URL you - * have provided to be attached to the verification email. The provided URL - * should redirect the user back to your app and allow you to complete the - * verification process by verifying both the **userId** and **secret** - * parameters. Learn more about how to [complete the verification - * process](/docs/client/account#updateAccountVerification). - * - * Please note that in order to avoid a [Redirect - * 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. - * - * - * @param {string} url - * @throws {Error} - * @return {Promise} - */ - createVerification: function(url) { - if(url === undefined) { - throw new Error('Missing required parameter: "url"'); - } - - let path = '/account/verification'; - - let payload = {}; - - if(url) { - payload['url'] = url; - } - - return http - .post(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Complete Email Verification - * - * 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. - * - * @param {string} userId - * @param {string} secret - * @throws {Error} - * @return {Promise} - */ - updateVerification: function(userId, secret) { - if(userId === undefined) { - throw new Error('Missing required parameter: "userId"'); - } - - if(secret === undefined) { - throw new Error('Missing required parameter: "secret"'); - } - - let path = '/account/verification'; - - let payload = {}; - - if(userId) { - payload['userId'] = userId; - } - - if(secret) { - payload['secret'] = secret; - } - - return http - .put(path, { - 'content-type': 'application/json', - }, payload); - } - }; - - let avatars = { - - /** - * Get Browser Icon - * - * You can use this endpoint to show different browser icons to your users. - * The code argument receives the browser code as it appears in your user - * /account/sessions endpoint. Use width, height and quality arguments to - * change the output settings. - * - * @param {string} code - * @param {number} width - * @param {number} height - * @param {number} quality - * @throws {Error} - * @return {string} - */ - getBrowser: function(code, width = 100, height = 100, quality = 100) { - if(code === undefined) { - throw new Error('Missing required parameter: "code"'); - } - - let path = '/avatars/browsers/{code}'.replace(new RegExp('{code}', 'g'), code); - - let payload = {}; - - if(width) { - payload['width'] = width; - } - - if(height) { - payload['height'] = height; - } - - if(quality) { - payload['quality'] = quality; - } - - payload['project'] = config.project; - - - let query = []; - - for (let p in payload) { - if(Array.isArray(payload[p])) { - for (let index = 0; index < payload[p].length; index++) { - let param = payload[p][index]; - query.push(encodeURIComponent(p + '[]') + "=" + encodeURIComponent(param)); - } - } - else { - query.push(encodeURIComponent(p) + "=" + encodeURIComponent(payload[p])); - } - } - - query = query.join("&"); - - return config.endpoint + path + ((query) ? '?' + query : ''); - }, - - /** - * Get Credit Card Icon - * - * Need to display your users with your billing method or their payment - * methods? The credit card endpoint will return you the icon of the credit - * card provider you need. Use width, height and quality arguments to change - * the output settings. - * - * @param {string} code - * @param {number} width - * @param {number} height - * @param {number} quality - * @throws {Error} - * @return {string} - */ - getCreditCard: function(code, width = 100, height = 100, quality = 100) { - if(code === undefined) { - throw new Error('Missing required parameter: "code"'); - } - - let path = '/avatars/credit-cards/{code}'.replace(new RegExp('{code}', 'g'), code); - - let payload = {}; - - if(width) { - payload['width'] = width; - } - - if(height) { - payload['height'] = height; - } - - if(quality) { - payload['quality'] = quality; - } - - payload['project'] = config.project; - - - let query = []; - - for (let p in payload) { - if(Array.isArray(payload[p])) { - for (let index = 0; index < payload[p].length; index++) { - let param = payload[p][index]; - query.push(encodeURIComponent(p + '[]') + "=" + encodeURIComponent(param)); - } - } - else { - query.push(encodeURIComponent(p) + "=" + encodeURIComponent(payload[p])); - } - } - - query = query.join("&"); - - return config.endpoint + path + ((query) ? '?' + query : ''); - }, - - /** - * Get Favicon - * - * Use this endpoint to fetch the favorite icon (AKA favicon) of a any remote - * website URL. - * - * @param {string} url - * @throws {Error} - * @return {string} - */ - getFavicon: function(url) { - if(url === undefined) { - throw new Error('Missing required parameter: "url"'); - } - - let path = '/avatars/favicon'; - - let payload = {}; - - if(url) { - payload['url'] = url; - } - - payload['project'] = config.project; - - - let query = []; - - for (let p in payload) { - if(Array.isArray(payload[p])) { - for (let index = 0; index < payload[p].length; index++) { - let param = payload[p][index]; - query.push(encodeURIComponent(p + '[]') + "=" + encodeURIComponent(param)); - } - } - else { - query.push(encodeURIComponent(p) + "=" + encodeURIComponent(payload[p])); - } - } - - query = query.join("&"); - - return config.endpoint + path + ((query) ? '?' + query : ''); - }, - - /** - * Get Country Flag - * - * You can use this endpoint to show different country flags icons to your - * users. The code argument receives the 2 letter country code. Use width, - * height and quality arguments to change the output settings. - * - * @param {string} code - * @param {number} width - * @param {number} height - * @param {number} quality - * @throws {Error} - * @return {string} - */ - getFlag: function(code, width = 100, height = 100, quality = 100) { - if(code === undefined) { - throw new Error('Missing required parameter: "code"'); - } - - let path = '/avatars/flags/{code}'.replace(new RegExp('{code}', 'g'), code); - - let payload = {}; - - if(width) { - payload['width'] = width; - } - - if(height) { - payload['height'] = height; - } - - if(quality) { - payload['quality'] = quality; - } - - payload['project'] = config.project; - - - let query = []; - - for (let p in payload) { - if(Array.isArray(payload[p])) { - for (let index = 0; index < payload[p].length; index++) { - let param = payload[p][index]; - query.push(encodeURIComponent(p + '[]') + "=" + encodeURIComponent(param)); - } - } - else { - query.push(encodeURIComponent(p) + "=" + encodeURIComponent(payload[p])); - } - } - - query = query.join("&"); - - return config.endpoint + path + ((query) ? '?' + query : ''); - }, - - /** - * Get Image from URL - * - * Use this endpoint to fetch a remote image URL and crop it to any image size - * you want. This endpoint is very useful if you need to crop and display - * remote images in your app or in case you want to make sure a 3rd party - * image is properly served using a TLS protocol. - * - * @param {string} url - * @param {number} width - * @param {number} height - * @throws {Error} - * @return {string} - */ - getImage: function(url, width = 400, height = 400) { - if(url === undefined) { - throw new Error('Missing required parameter: "url"'); - } - - let path = '/avatars/image'; - - let payload = {}; - - if(url) { - payload['url'] = url; - } - - if(width) { - payload['width'] = width; - } - - if(height) { - payload['height'] = height; - } - - payload['project'] = config.project; - - - let query = []; - - for (let p in payload) { - if(Array.isArray(payload[p])) { - for (let index = 0; index < payload[p].length; index++) { - let param = payload[p][index]; - query.push(encodeURIComponent(p + '[]') + "=" + encodeURIComponent(param)); - } - } - else { - query.push(encodeURIComponent(p) + "=" + encodeURIComponent(payload[p])); - } - } - - query = query.join("&"); - - return config.endpoint + path + ((query) ? '?' + query : ''); - }, - - /** - * Get User Initials - * - * Use this endpoint to show your user initials avatar icon on your website or - * app. By default, this route will try to print your logged-in user name or - * email initials. You can also overwrite the user name if you pass the 'name' - * parameter. If no name is given and no user is logged, an empty avatar will - * be returned. - * - * You can use the color and background params to change the avatar colors. By - * default, a random theme will be selected. The random theme will persist for - * the user's initials when reloading the same theme will always return for - * the same initials. - * - * @param {string} name - * @param {number} width - * @param {number} height - * @param {string} color - * @param {string} background - * @throws {Error} - * @return {string} - */ - getInitials: function(name = '', width = 500, height = 500, color = '', background = '') { - let path = '/avatars/initials'; - - let payload = {}; - - if(name) { - payload['name'] = name; - } - - if(width) { - payload['width'] = width; - } - - if(height) { - payload['height'] = height; - } - - if(color) { - payload['color'] = color; - } - - if(background) { - payload['background'] = background; - } - - payload['project'] = config.project; - - - let query = []; - - for (let p in payload) { - if(Array.isArray(payload[p])) { - for (let index = 0; index < payload[p].length; index++) { - let param = payload[p][index]; - query.push(encodeURIComponent(p + '[]') + "=" + encodeURIComponent(param)); - } - } - else { - query.push(encodeURIComponent(p) + "=" + encodeURIComponent(payload[p])); - } - } - - query = query.join("&"); - - return config.endpoint + path + ((query) ? '?' + query : ''); - }, - - /** - * 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. - * - * @param {string} text - * @param {number} size - * @param {number} margin - * @param {boolean} download - * @throws {Error} - * @return {string} - */ - getQR: function(text, size = 400, margin = 1, download = false) { - if(text === undefined) { - throw new Error('Missing required parameter: "text"'); - } - - let path = '/avatars/qr'; - - let payload = {}; - - if(text) { - payload['text'] = text; - } - - if(size) { - payload['size'] = size; - } - - if(margin) { - payload['margin'] = margin; - } - - if(download) { - payload['download'] = download; - } - - payload['project'] = config.project; - - - let query = []; - - for (let p in payload) { - if(Array.isArray(payload[p])) { - for (let index = 0; index < payload[p].length; index++) { - let param = payload[p][index]; - query.push(encodeURIComponent(p + '[]') + "=" + encodeURIComponent(param)); - } - } - else { - query.push(encodeURIComponent(p) + "=" + encodeURIComponent(payload[p])); - } - } - - query = query.join("&"); - - return config.endpoint + path + ((query) ? '?' + query : ''); - } - }; - - let database = { - - /** - * List Documents - * - * Get a list of all the user documents. You can use the query params to - * filter your results. On admin mode, this endpoint will return a list of all - * of the project documents. [Learn more about different API - * modes](/docs/admin). - * - * @param {string} collectionId - * @param {string[]} filters - * @param {number} limit - * @param {number} offset - * @param {string} orderField - * @param {string} orderType - * @param {string} orderCast - * @param {string} search - * @throws {Error} - * @return {Promise} - */ - listDocuments: function(collectionId, filters = [], limit = 25, offset = 0, orderField = '$id', orderType = 'ASC', orderCast = 'string', search = '') { - if(collectionId === undefined) { - throw new Error('Missing required parameter: "collectionId"'); - } - - let path = '/database/collections/{collectionId}/documents'.replace(new RegExp('{collectionId}', 'g'), collectionId); - - let payload = {}; - - if(filters) { - payload['filters'] = filters; - } - - if(limit) { - payload['limit'] = limit; - } - - if(offset) { - payload['offset'] = offset; - } - - if(orderField) { - payload['orderField'] = orderField; - } - - if(orderType) { - payload['orderType'] = orderType; - } - - if(orderCast) { - payload['orderCast'] = orderCast; - } - - if(search) { - payload['search'] = search; - } - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Create Document - * - * Create a new Document. Before using this route, you should create a new - * collection resource using either a [server - * integration](/docs/server/database?sdk=nodejs#createCollection) API or - * directly from your database console. - * - * @param {string} collectionId - * @param {object} data - * @param {string[]} read - * @param {string[]} write - * @param {string} parentDocument - * @param {string} parentProperty - * @param {string} parentPropertyType - * @throws {Error} - * @return {Promise} - */ - createDocument: function(collectionId, data, read, write, parentDocument = '', parentProperty = '', parentPropertyType = 'assign') { - if(collectionId === undefined) { - throw new Error('Missing required parameter: "collectionId"'); - } - - if(data === undefined) { - throw new Error('Missing required parameter: "data"'); - } - - if(read === undefined) { - throw new Error('Missing required parameter: "read"'); - } - - if(write === undefined) { - throw new Error('Missing required parameter: "write"'); - } - - let path = '/database/collections/{collectionId}/documents'.replace(new RegExp('{collectionId}', 'g'), collectionId); - - let payload = {}; - - if(data) { - payload['data'] = data; - } - - if(read) { - payload['read'] = read; - } - - if(write) { - payload['write'] = write; - } - - if(parentDocument) { - payload['parentDocument'] = parentDocument; - } - - if(parentProperty) { - payload['parentProperty'] = parentProperty; - } - - if(parentPropertyType) { - payload['parentPropertyType'] = parentPropertyType; - } - - return http - .post(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Get Document - * - * Get document by its unique ID. This endpoint response returns a JSON object - * with the document data. - * - * @param {string} collectionId - * @param {string} documentId - * @throws {Error} - * @return {Promise} - */ - getDocument: function(collectionId, documentId) { - if(collectionId === undefined) { - throw new Error('Missing required parameter: "collectionId"'); - } - - if(documentId === undefined) { - throw new Error('Missing required parameter: "documentId"'); - } - - let path = '/database/collections/{collectionId}/documents/{documentId}'.replace(new RegExp('{collectionId}', 'g'), collectionId).replace(new RegExp('{documentId}', 'g'), documentId); - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Update Document - * - * - * @param {string} collectionId - * @param {string} documentId - * @param {object} data - * @param {string[]} read - * @param {string[]} write - * @throws {Error} - * @return {Promise} - */ - updateDocument: function(collectionId, documentId, data, read, write) { - if(collectionId === undefined) { - throw new Error('Missing required parameter: "collectionId"'); - } - - if(documentId === undefined) { - throw new Error('Missing required parameter: "documentId"'); - } - - if(data === undefined) { - throw new Error('Missing required parameter: "data"'); - } - - if(read === undefined) { - throw new Error('Missing required parameter: "read"'); - } - - if(write === undefined) { - throw new Error('Missing required parameter: "write"'); - } - - let path = '/database/collections/{collectionId}/documents/{documentId}'.replace(new RegExp('{collectionId}', 'g'), collectionId).replace(new RegExp('{documentId}', 'g'), documentId); - - let payload = {}; - - if(data) { - payload['data'] = data; - } - - if(read) { - payload['read'] = read; - } - - if(write) { - payload['write'] = write; - } - - return http - .patch(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Delete Document - * - * Delete document by its unique ID. This endpoint deletes only the parent - * documents, his attributes and relations to other documents. Child documents - * **will not** be deleted. - * - * @param {string} collectionId - * @param {string} documentId - * @throws {Error} - * @return {Promise} - */ - deleteDocument: function(collectionId, documentId) { - if(collectionId === undefined) { - throw new Error('Missing required parameter: "collectionId"'); - } - - if(documentId === undefined) { - throw new Error('Missing required parameter: "documentId"'); - } - - let path = '/database/collections/{collectionId}/documents/{documentId}'.replace(new RegExp('{collectionId}', 'g'), collectionId).replace(new RegExp('{documentId}', 'g'), documentId); - - let payload = {}; - - return http - .delete(path, { - 'content-type': 'application/json', - }, payload); - } - }; - - let locale = { - - /** - * Get User Locale - * - * Get the current user location based on IP. Returns an object with user - * country code, country name, continent name, continent code, ip address and - * suggested currency. You can use the locale header to get the data in a - * supported language. - * - * ([IP Geolocation by DB-IP](https://db-ip.com)) - * - * @throws {Error} - * @return {Promise} - */ - get: function() { - let path = '/locale'; - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * List Continents - * - * List of all continents. You can use the locale header to get the data in a - * supported language. - * - * @throws {Error} - * @return {Promise} - */ - getContinents: function() { - let path = '/locale/continents'; - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * List Countries - * - * List of all countries. You can use the locale header to get the data in a - * supported language. - * - * @throws {Error} - * @return {Promise} - */ - getCountries: function() { - let path = '/locale/countries'; - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * 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. - * - * @throws {Error} - * @return {Promise} - */ - getCountriesEU: function() { - let path = '/locale/countries/eu'; - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * List Countries Phone Codes - * - * List of all countries phone codes. You can use the locale header to get the - * data in a supported language. - * - * @throws {Error} - * @return {Promise} - */ - getCountriesPhones: function() { - let path = '/locale/countries/phones'; - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * 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. - * - * @throws {Error} - * @return {Promise} - */ - getCurrencies: function() { - let path = '/locale/currencies'; - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * List Languages - * - * List of all languages classified by ISO 639-1 including 2-letter code, name - * in English, and name in the respective language. - * - * @throws {Error} - * @return {Promise} - */ - getLanguages: function() { - let path = '/locale/languages'; - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - } - }; - - let storage = { - - /** - * List Files - * - * Get a list of all the user files. You can use the query params to filter - * your results. On admin mode, this endpoint will return a list of all of the - * project files. [Learn more about different API modes](/docs/admin). - * - * @param {string} search - * @param {number} limit - * @param {number} offset - * @param {string} orderType - * @throws {Error} - * @return {Promise} - */ - listFiles: function(search = '', limit = 25, offset = 0, orderType = 'ASC') { - let path = '/storage/files'; - - let payload = {}; - - if(search) { - payload['search'] = search; - } - - if(limit) { - payload['limit'] = limit; - } - - if(offset) { - payload['offset'] = offset; - } - - if(orderType) { - payload['orderType'] = orderType; - } - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Create File - * - * Create a new file. The user who creates the file will automatically be - * assigned to read and write access unless he has passed custom values for - * read and write arguments. - * - * @param {File} file - * @param {string[]} read - * @param {string[]} write - * @throws {Error} - * @return {Promise} - */ - createFile: function(file, read, write) { - if(file === undefined) { - throw new Error('Missing required parameter: "file"'); - } - - if(read === undefined) { - throw new Error('Missing required parameter: "read"'); - } - - if(write === undefined) { - throw new Error('Missing required parameter: "write"'); - } - - let path = '/storage/files'; - - let payload = {}; - - if(file) { - payload['file'] = file; - } - - if(read) { - payload['read'] = read; - } - - if(write) { - payload['write'] = write; - } - - return http - .post(path, { - 'content-type': 'multipart/form-data', - }, payload); - }, - - /** - * Get File - * - * Get file by its unique ID. This endpoint response returns a JSON object - * with the file metadata. - * - * @param {string} fileId - * @throws {Error} - * @return {Promise} - */ - getFile: function(fileId) { - if(fileId === undefined) { - throw new Error('Missing required parameter: "fileId"'); - } - - let path = '/storage/files/{fileId}'.replace(new RegExp('{fileId}', 'g'), fileId); - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Update File - * - * Update file by its unique ID. Only users with write permissions have access - * to update this resource. - * - * @param {string} fileId - * @param {string[]} read - * @param {string[]} write - * @throws {Error} - * @return {Promise} - */ - updateFile: function(fileId, read, write) { - if(fileId === undefined) { - throw new Error('Missing required parameter: "fileId"'); - } - - if(read === undefined) { - throw new Error('Missing required parameter: "read"'); - } - - if(write === undefined) { - throw new Error('Missing required parameter: "write"'); - } - - let path = '/storage/files/{fileId}'.replace(new RegExp('{fileId}', 'g'), fileId); - - let payload = {}; - - if(read) { - payload['read'] = read; - } - - if(write) { - payload['write'] = write; - } - - return http - .put(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Delete File - * - * Delete a file by its unique ID. Only users with write permissions have - * access to delete this resource. - * - * @param {string} fileId - * @throws {Error} - * @return {Promise} - */ - deleteFile: function(fileId) { - if(fileId === undefined) { - throw new Error('Missing required parameter: "fileId"'); - } - - let path = '/storage/files/{fileId}'.replace(new RegExp('{fileId}', 'g'), fileId); - - let payload = {}; - - return http - .delete(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Get File for Download - * - * Get 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. - * - * @param {string} fileId - * @throws {Error} - * @return {string} - */ - getFileDownload: function(fileId) { - if(fileId === undefined) { - throw new Error('Missing required parameter: "fileId"'); - } - - let path = '/storage/files/{fileId}/download'.replace(new RegExp('{fileId}', 'g'), fileId); - - let payload = {}; - - payload['project'] = config.project; - - - let query = []; - - for (let p in payload) { - if(Array.isArray(payload[p])) { - for (let index = 0; index < payload[p].length; index++) { - let param = payload[p][index]; - query.push(encodeURIComponent(p + '[]') + "=" + encodeURIComponent(param)); - } - } - else { - query.push(encodeURIComponent(p) + "=" + encodeURIComponent(payload[p])); - } - } - - query = query.join("&"); - - return config.endpoint + path + ((query) ? '?' + query : ''); - }, - - /** - * Get File Preview - * - * Get a file preview image. Currently, this method supports preview for image - * files (jpg, png, and gif), other supported formats, like pdf, docs, slides, - * and spreadsheets, will return the file icon image. You can also pass query - * string arguments for cutting and resizing your preview image. - * - * @param {string} fileId - * @param {number} width - * @param {number} height - * @param {number} quality - * @param {string} background - * @param {string} output - * @throws {Error} - * @return {string} - */ - getFilePreview: function(fileId, width = 0, height = 0, quality = 100, background = '', output = '') { - if(fileId === undefined) { - throw new Error('Missing required parameter: "fileId"'); - } - - let path = '/storage/files/{fileId}/preview'.replace(new RegExp('{fileId}', 'g'), fileId); - - let payload = {}; - - if(width) { - payload['width'] = width; - } - - if(height) { - payload['height'] = height; - } - - if(quality) { - payload['quality'] = quality; - } - - if(background) { - payload['background'] = background; - } - - if(output) { - payload['output'] = output; - } - - payload['project'] = config.project; - - - let query = []; - - for (let p in payload) { - if(Array.isArray(payload[p])) { - for (let index = 0; index < payload[p].length; index++) { - let param = payload[p][index]; - query.push(encodeURIComponent(p + '[]') + "=" + encodeURIComponent(param)); - } - } - else { - query.push(encodeURIComponent(p) + "=" + encodeURIComponent(payload[p])); - } - } - - query = query.join("&"); - - return config.endpoint + path + ((query) ? '?' + query : ''); - }, - - /** - * Get File for View - * - * Get file content by its unique ID. This endpoint is similar to the download - * method but returns with no 'Content-Disposition: attachment' header. - * - * @param {string} fileId - * @param {string} as - * @throws {Error} - * @return {string} - */ - getFileView: function(fileId, as = '') { - if(fileId === undefined) { - throw new Error('Missing required parameter: "fileId"'); - } - - let path = '/storage/files/{fileId}/view'.replace(new RegExp('{fileId}', 'g'), fileId); - - let payload = {}; - - if(as) { - payload['as'] = as; - } - - payload['project'] = config.project; - - - let query = []; - - for (let p in payload) { - if(Array.isArray(payload[p])) { - for (let index = 0; index < payload[p].length; index++) { - let param = payload[p][index]; - query.push(encodeURIComponent(p + '[]') + "=" + encodeURIComponent(param)); - } - } - else { - query.push(encodeURIComponent(p) + "=" + encodeURIComponent(payload[p])); - } - } - - query = query.join("&"); - - return config.endpoint + path + ((query) ? '?' + query : ''); - } - }; - - let teams = { - - /** - * List Teams - * - * Get a list of all the current user teams. You can use the query params to - * filter your results. On admin mode, this endpoint will return a list of all - * of the project teams. [Learn more about different API modes](/docs/admin). - * - * @param {string} search - * @param {number} limit - * @param {number} offset - * @param {string} orderType - * @throws {Error} - * @return {Promise} - */ - list: function(search = '', limit = 25, offset = 0, orderType = 'ASC') { - let path = '/teams'; - - let payload = {}; - - if(search) { - payload['search'] = search; - } - - if(limit) { - payload['limit'] = limit; - } - - if(offset) { - payload['offset'] = offset; - } - - if(orderType) { - payload['orderType'] = orderType; - } - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Create Team - * - * Create a new team. The user who creates the team will automatically be - * assigned as the owner of the team. The team owner can invite new members, - * who will be able add new owners and update or delete the team from your - * project. - * - * @param {string} name - * @param {string[]} roles - * @throws {Error} - * @return {Promise} - */ - create: function(name, roles = ["owner"]) { - if(name === undefined) { - throw new Error('Missing required parameter: "name"'); - } - - let path = '/teams'; - - let payload = {}; - - if(name) { - payload['name'] = name; - } - - if(roles) { - payload['roles'] = roles; - } - - return http - .post(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Get Team - * - * Get team by its unique ID. All team members have read access for this - * resource. - * - * @param {string} teamId - * @throws {Error} - * @return {Promise} - */ - get: function(teamId) { - if(teamId === undefined) { - throw new Error('Missing required parameter: "teamId"'); - } - - let path = '/teams/{teamId}'.replace(new RegExp('{teamId}', 'g'), teamId); - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Update Team - * - * Update team by its unique ID. Only team owners have write access for this - * resource. - * - * @param {string} teamId - * @param {string} name - * @throws {Error} - * @return {Promise} - */ - update: function(teamId, name) { - if(teamId === undefined) { - throw new Error('Missing required parameter: "teamId"'); - } - - if(name === undefined) { - throw new Error('Missing required parameter: "name"'); - } - - let path = '/teams/{teamId}'.replace(new RegExp('{teamId}', 'g'), teamId); - - let payload = {}; - - if(name) { - payload['name'] = name; - } - - return http - .put(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Delete Team - * - * Delete team by its unique ID. Only team owners have write access for this - * resource. - * - * @param {string} teamId - * @throws {Error} - * @return {Promise} - */ - delete: function(teamId) { - if(teamId === undefined) { - throw new Error('Missing required parameter: "teamId"'); - } - - let path = '/teams/{teamId}'.replace(new RegExp('{teamId}', 'g'), teamId); - - let payload = {}; - - return http - .delete(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Get Team Memberships - * - * Get team members by the team unique ID. All team members have read access - * for this list of resources. - * - * @param {string} teamId - * @param {string} search - * @param {number} limit - * @param {number} offset - * @param {string} orderType - * @throws {Error} - * @return {Promise} - */ - getMemberships: function(teamId, search = '', limit = 25, offset = 0, orderType = 'ASC') { - if(teamId === undefined) { - throw new Error('Missing required parameter: "teamId"'); - } - - let path = '/teams/{teamId}/memberships'.replace(new RegExp('{teamId}', 'g'), teamId); - - let payload = {}; - - if(search) { - payload['search'] = search; - } - - if(limit) { - payload['limit'] = limit; - } - - if(offset) { - payload['offset'] = offset; - } - - if(orderType) { - payload['orderType'] = orderType; - } - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Create Team Membership - * - * Use this endpoint to invite a new member to join your team. An email with a - * link to join the team will be sent to the new member email address if the - * member doesn't exist in the project it will be created automatically. - * - * Use the 'URL' parameter to redirect the user from the invitation email back - * to your app. When the user is redirected, use the [Update Team Membership - * Status](/docs/client/teams#updateMembershipStatus) endpoint to allow the - * user to accept the invitation to the team. - * - * Please note that in order to avoid a [Redirect - * Attacks](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) - * the only valid redirect URL's are the once from domains you have set when - * added your platforms in the console interface. - * - * @param {string} teamId - * @param {string} email - * @param {string[]} roles - * @param {string} url - * @param {string} name - * @throws {Error} - * @return {Promise} - */ - createMembership: function(teamId, email, roles, url, name = '') { - if(teamId === undefined) { - throw new Error('Missing required parameter: "teamId"'); - } - - if(email === undefined) { - throw new Error('Missing required parameter: "email"'); - } - - if(roles === undefined) { - throw new Error('Missing required parameter: "roles"'); - } - - if(url === undefined) { - throw new Error('Missing required parameter: "url"'); - } - - let path = '/teams/{teamId}/memberships'.replace(new RegExp('{teamId}', 'g'), teamId); - - let payload = {}; - - if(email) { - payload['email'] = email; - } - - if(name) { - payload['name'] = name; - } - - if(roles) { - payload['roles'] = roles; - } - - if(url) { - payload['url'] = url; - } - - return http - .post(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * 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 he didn't accept it. - * - * @param {string} teamId - * @param {string} inviteId - * @throws {Error} - * @return {Promise} - */ - deleteMembership: function(teamId, inviteId) { - if(teamId === undefined) { - throw new Error('Missing required parameter: "teamId"'); - } - - if(inviteId === undefined) { - throw new Error('Missing required parameter: "inviteId"'); - } - - let path = '/teams/{teamId}/memberships/{inviteId}'.replace(new RegExp('{teamId}', 'g'), teamId).replace(new RegExp('{inviteId}', 'g'), inviteId); - - let payload = {}; - - return http - .delete(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Update Team Membership Status - * - * Use this endpoint to allow a user to accept an invitation to join a team - * after he is being redirected back to your app from the invitation email he - * was sent. - * - * @param {string} teamId - * @param {string} inviteId - * @param {string} userId - * @param {string} secret - * @throws {Error} - * @return {Promise} - */ - updateMembershipStatus: function(teamId, inviteId, userId, secret) { - if(teamId === undefined) { - throw new Error('Missing required parameter: "teamId"'); - } - - if(inviteId === undefined) { - throw new Error('Missing required parameter: "inviteId"'); - } - - if(userId === undefined) { - throw new Error('Missing required parameter: "userId"'); - } - - if(secret === undefined) { - throw new Error('Missing required parameter: "secret"'); - } - - let path = '/teams/{teamId}/memberships/{inviteId}/status'.replace(new RegExp('{teamId}', 'g'), teamId).replace(new RegExp('{inviteId}', 'g'), inviteId); - - let payload = {}; - - if(userId) { - payload['userId'] = userId; - } - - if(secret) { - payload['secret'] = secret; - } - - return http - .patch(path, { - 'content-type': 'application/json', - }, payload); - } - }; - - return { - setEndpoint: setEndpoint, - setProject: setProject, - setLocale: setLocale, - account: account, - avatars: avatars, - database: database, - locale: locale, - storage: storage, - teams: teams - }; - }; - - if(typeof module !== "undefined") { - module.exports = window.Appwrite; - } - -})((typeof window !== "undefined") ? window : {}); \ No newline at end of file diff --git a/app/sdks/0.6.2/client-web/src/sdk.min.js b/app/sdks/0.6.2/client-web/src/sdk.min.js deleted file mode 100644 index 2bc06cc935..0000000000 --- a/app/sdks/0.6.2/client-web/src/sdk.min.js +++ /dev/null @@ -1,187 +0,0 @@ -(function(window){'use strict';window.Appwrite=function(){let config={endpoint:'https://appwrite.io/v1',project:'',locale:'',};let setEndpoint=function(endpoint){config.endpoint=endpoint;return this};let setProject=function(value){http.addGlobalHeader('X-Appwrite-Project',value);config.project=value;return this};let setLocale=function(value){http.addGlobalHeader('X-Appwrite-Locale',value);config.locale=value;return this};let http=function(document){let globalParams=[],globalHeaders=[];let addParam=function(url,param,value){let a=document.createElement('a'),regex=/(?:\?|&|&)+([^=]+)(?:=([^&]*))*/g;let match,str=[];a.href=url;param=encodeURIComponent(param);while(match=regex.exec(a.search))if(param!==match[1])str.push(match[1]+(match[2]?"="+match[2]:""));str.push(param+(value?"="+encodeURIComponent(value):""));a.search=str.join("&");return a.href};let buildQuery=function(params){let str=[];for(let p in params){if(Array.isArray(params[p])){for(let index=0;index=request.status){resolve(data)}else{reject(data)}};if(progress){request.addEventListener('progress',progress);request.upload.addEventListener('progress',progress,!1)} -request.onerror=function(){reject(new Error("Network Error"))};request.send(params)})};return{'get':function(path,headers={},params={}){return call('GET',path+((Object.keys(params).length>0)?'?'+buildQuery(params):''),headers,{})},'post':function(path,headers={},params={},progress=null){return call('POST',path,headers,params,progress)},'put':function(path,headers={},params={},progress=null){return call('PUT',path,headers,params,progress)},'patch':function(path,headers={},params={},progress=null){return call('PATCH',path,headers,params,progress)},'delete':function(path,headers={},params={},progress=null){return call('DELETE',path,headers,params,progress)},'addGlobalParam':addGlobalParam,'addGlobalHeader':addGlobalHeader}}(window.document);let account={get:function(){let path='/account';let payload={};return http.get(path,{'content-type':'application/json',},payload)},create:function(email,password,name=''){if(email===undefined){throw new Error('Missing required parameter: "email"')} -if(password===undefined){throw new Error('Missing required parameter: "password"')} -let path='/account';let payload={};if(email){payload.email=email} -if(password){payload.password=password} -if(name){payload.name=name} -return http.post(path,{'content-type':'application/json',},payload)},delete:function(){let path='/account';let payload={};return http.delete(path,{'content-type':'application/json',},payload)},updateEmail:function(email,password){if(email===undefined){throw new Error('Missing required parameter: "email"')} -if(password===undefined){throw new Error('Missing required parameter: "password"')} -let path='/account/email';let payload={};if(email){payload.email=email} -if(password){payload.password=password} -return http.patch(path,{'content-type':'application/json',},payload)},getLogs:function(){let path='/account/logs';let payload={};return http.get(path,{'content-type':'application/json',},payload)},updateName:function(name){if(name===undefined){throw new Error('Missing required parameter: "name"')} -let path='/account/name';let payload={};if(name){payload.name=name} -return http.patch(path,{'content-type':'application/json',},payload)},updatePassword:function(password,oldPassword){if(password===undefined){throw new Error('Missing required parameter: "password"')} -if(oldPassword===undefined){throw new Error('Missing required parameter: "oldPassword"')} -let path='/account/password';let payload={};if(password){payload.password=password} -if(oldPassword){payload.oldPassword=oldPassword} -return http.patch(path,{'content-type':'application/json',},payload)},getPrefs:function(){let path='/account/prefs';let payload={};return http.get(path,{'content-type':'application/json',},payload)},updatePrefs:function(prefs){if(prefs===undefined){throw new Error('Missing required parameter: "prefs"')} -let path='/account/prefs';let payload={};if(prefs){payload.prefs=prefs} -return http.patch(path,{'content-type':'application/json',},payload)},createRecovery:function(email,url){if(email===undefined){throw new Error('Missing required parameter: "email"')} -if(url===undefined){throw new Error('Missing required parameter: "url"')} -let path='/account/recovery';let payload={};if(email){payload.email=email} -if(url){payload.url=url} -return http.post(path,{'content-type':'application/json',},payload)},updateRecovery:function(userId,secret,password,passwordAgain){if(userId===undefined){throw new Error('Missing required parameter: "userId"')} -if(secret===undefined){throw new Error('Missing required parameter: "secret"')} -if(password===undefined){throw new Error('Missing required parameter: "password"')} -if(passwordAgain===undefined){throw new Error('Missing required parameter: "passwordAgain"')} -let path='/account/recovery';let payload={};if(userId){payload.userId=userId} -if(secret){payload.secret=secret} -if(password){payload.password=password} -if(passwordAgain){payload.passwordAgain=passwordAgain} -return http.put(path,{'content-type':'application/json',},payload)},getSessions:function(){let path='/account/sessions';let payload={};return http.get(path,{'content-type':'application/json',},payload)},createSession:function(email,password){if(email===undefined){throw new Error('Missing required parameter: "email"')} -if(password===undefined){throw new Error('Missing required parameter: "password"')} -let path='/account/sessions';let payload={};if(email){payload.email=email} -if(password){payload.password=password} -return http.post(path,{'content-type':'application/json',},payload)},deleteSessions:function(){let path='/account/sessions';let payload={};return http.delete(path,{'content-type':'application/json',},payload)},createOAuth2Session:function(provider,success='https://appwrite.io/auth/oauth2/success',failure='https://appwrite.io/auth/oauth2/failure',scopes=[]){if(provider===undefined){throw new Error('Missing required parameter: "provider"')} -let path='/account/sessions/oauth2/{provider}'.replace(new RegExp('{provider}','g'),provider);let payload={};if(success){payload.success=success} -if(failure){payload.failure=failure} -if(scopes){payload.scopes=scopes} -payload.project=config.project;let query=[];for(let p in payload){if(Array.isArray(payload[p])){for(let index=0;index; - - /** - * Create Account - * - * Use this endpoint to allow a new user to register a new account in your - * project. After the user registration completes successfully, you can use - * the [/account/verfication](/docs/client/account#createVerification) route - * to start verifying the user email address. To allow your new user to login - * to his new account, you need to create a new [account - * session](/docs/client/account#createSession). - * - * @param {string} email - * @param {string} password - * @param {string} name - * @throws {Error} - * @return {Promise} - */ - create(email: string, password: string, name: string): Promise; - - /** - * Delete Account - * - * Delete a currently logged in user account. Behind the scene, the user - * record is not deleted but permanently blocked from any access. This is done - * to avoid deleted accounts being overtaken by new users with the same email - * address. Any user-related resources like documents or storage files should - * be deleted separately. - * - * @throws {Error} - * @return {Promise} - */ - delete(): Promise; - - /** - * Update Account Email - * - * Update currently logged in user account email address. After changing user - * address, user confirmation status is being reset and a new confirmation - * mail is sent. For security measures, user password is required to complete - * this request. - * - * @param {string} email - * @param {string} password - * @throws {Error} - * @return {Promise} - */ - updateEmail(email: string, password: string): Promise; - - /** - * Get Account 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. - * - * @throws {Error} - * @return {Promise} - */ - getLogs(): Promise; - - /** - * Update Account Name - * - * Update currently logged in user account name. - * - * @param {string} name - * @throws {Error} - * @return {Promise} - */ - updateName(name: string): Promise; - - /** - * Update Account Password - * - * Update currently logged in user password. For validation, user is required - * to pass the password twice. - * - * @param {string} password - * @param {string} oldPassword - * @throws {Error} - * @return {Promise} - */ - updatePassword(password: string, oldPassword: string): Promise; - - /** - * Get Account Preferences - * - * Get currently logged in user preferences as a key-value object. - * - * @throws {Error} - * @return {Promise} - */ - getPrefs(): Promise; - - /** - * Update Account Preferences - * - * Update currently logged in user account preferences. You can pass only the - * specific settings you wish to update. - * - * @param {object} prefs - * @throws {Error} - * @return {Promise} - */ - updatePrefs(prefs: object): Promise; - - /** - * Create Password Recovery - * - * Sends the user an email with a temporary secret key for password reset. - * When the user clicks the confirmation link he is redirected back to your - * app password reset URL with the secret key and email address values - * attached to the URL query string. Use the query string params to submit a - * request to the [PUT /account/recovery](/docs/client/account#updateRecovery) - * endpoint to complete the process. - * - * @param {string} email - * @param {string} url - * @throws {Error} - * @return {Promise} - */ - createRecovery(email: string, url: string): Promise; - - /** - * Complete Password Recovery - * - * Use this endpoint to complete the user account password reset. Both the - * **userId** and **secret** arguments will be passed as query parameters to - * the redirect URL you have provided when sending your request to the [POST - * /account/recovery](/docs/client/account#createRecovery) endpoint. - * - * Please note that in order to avoid a [Redirect - * 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. - * - * @param {string} userId - * @param {string} secret - * @param {string} password - * @param {string} passwordAgain - * @throws {Error} - * @return {Promise} - */ - updateRecovery(userId: string, secret: string, password: string, passwordAgain: string): Promise; - - /** - * Get Account Sessions - * - * Get currently logged in user list of active sessions across different - * devices. - * - * @throws {Error} - * @return {Promise} - */ - getSessions(): Promise; - - /** - * Create Account Session - * - * Allow the user to login into his account by providing a valid email and - * password combination. This route will create a new session for the user. - * - * @param {string} email - * @param {string} password - * @throws {Error} - * @return {Promise} - */ - createSession(email: string, password: string): Promise; - - /** - * Delete All Account Sessions - * - * Delete all sessions from the user account and remove any sessions cookies - * from the end client. - * - * @throws {Error} - * @return {Promise} - */ - deleteSessions(): Promise; - - /** - * Create Account Session with OAuth2 - * - * Allow the user to login to his account using the OAuth2 provider of his - * choice. Each OAuth2 provider should be enabled from the Appwrite console - * first. Use the success and failure arguments to provide a redirect URL's - * back to your app when login is completed. - * - * @param {string} provider - * @param {string} success - * @param {string} failure - * @param {string[]} scopes - * @throws {Error} - * @return {Promise} - */ - createOAuth2Session(provider: string, success: string, failure: string, scopes: string[]): Promise; - - /** - * Delete Account Session - * - * Use this endpoint to log out the currently logged in user from all his - * account sessions across all his different devices. When using the option id - * argument, only the session unique ID provider will be deleted. - * - * @param {string} sessionId - * @throws {Error} - * @return {Promise} - */ - deleteSession(sessionId: string): Promise; - - /** - * Create Email Verification - * - * Use this endpoint to send a verification message to your user email address - * to confirm they are the valid owners of that address. Both the **userId** - * and **secret** arguments will be passed as query parameters to the URL you - * have provided to be attached to the verification email. The provided URL - * should redirect the user back to your app and allow you to complete the - * verification process by verifying both the **userId** and **secret** - * parameters. Learn more about how to [complete the verification - * process](/docs/client/account#updateAccountVerification). - * - * Please note that in order to avoid a [Redirect - * 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. - * - * - * @param {string} url - * @throws {Error} - * @return {Promise} - */ - createVerification(url: string): Promise; - - /** - * Complete Email Verification - * - * 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. - * - * @param {string} userId - * @param {string} secret - * @throws {Error} - * @return {Promise} - */ - updateVerification(userId: string, secret: string): Promise; - - } - - export interface Avatars { - - /** - * Get Browser Icon - * - * You can use this endpoint to show different browser icons to your users. - * The code argument receives the browser code as it appears in your user - * /account/sessions endpoint. Use width, height and quality arguments to - * change the output settings. - * - * @param {string} code - * @param {number} width - * @param {number} height - * @param {number} quality - * @throws {Error} - * @return {string} - */ - getBrowser(code: string, width: number, height: number, quality: number): string; - - /** - * Get Credit Card Icon - * - * Need to display your users with your billing method or their payment - * methods? The credit card endpoint will return you the icon of the credit - * card provider you need. Use width, height and quality arguments to change - * the output settings. - * - * @param {string} code - * @param {number} width - * @param {number} height - * @param {number} quality - * @throws {Error} - * @return {string} - */ - getCreditCard(code: string, width: number, height: number, quality: number): string; - - /** - * Get Favicon - * - * Use this endpoint to fetch the favorite icon (AKA favicon) of a any remote - * website URL. - * - * @param {string} url - * @throws {Error} - * @return {string} - */ - getFavicon(url: string): string; - - /** - * Get Country Flag - * - * You can use this endpoint to show different country flags icons to your - * users. The code argument receives the 2 letter country code. Use width, - * height and quality arguments to change the output settings. - * - * @param {string} code - * @param {number} width - * @param {number} height - * @param {number} quality - * @throws {Error} - * @return {string} - */ - getFlag(code: string, width: number, height: number, quality: number): string; - - /** - * Get Image from URL - * - * Use this endpoint to fetch a remote image URL and crop it to any image size - * you want. This endpoint is very useful if you need to crop and display - * remote images in your app or in case you want to make sure a 3rd party - * image is properly served using a TLS protocol. - * - * @param {string} url - * @param {number} width - * @param {number} height - * @throws {Error} - * @return {string} - */ - getImage(url: string, width: number, height: number): string; - - /** - * Get User Initials - * - * Use this endpoint to show your user initials avatar icon on your website or - * app. By default, this route will try to print your logged-in user name or - * email initials. You can also overwrite the user name if you pass the 'name' - * parameter. If no name is given and no user is logged, an empty avatar will - * be returned. - * - * You can use the color and background params to change the avatar colors. By - * default, a random theme will be selected. The random theme will persist for - * the user's initials when reloading the same theme will always return for - * the same initials. - * - * @param {string} name - * @param {number} width - * @param {number} height - * @param {string} color - * @param {string} background - * @throws {Error} - * @return {string} - */ - getInitials(name: string, width: number, height: number, color: string, background: string): string; - - /** - * 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. - * - * @param {string} text - * @param {number} size - * @param {number} margin - * @param {boolean} download - * @throws {Error} - * @return {string} - */ - getQR(text: string, size: number, margin: number, download: boolean): string; - - } - - export interface Database { - - /** - * List Documents - * - * Get a list of all the user documents. You can use the query params to - * filter your results. On admin mode, this endpoint will return a list of all - * of the project documents. [Learn more about different API - * modes](/docs/admin). - * - * @param {string} collectionId - * @param {string[]} filters - * @param {number} limit - * @param {number} offset - * @param {string} orderField - * @param {string} orderType - * @param {string} orderCast - * @param {string} search - * @throws {Error} - * @return {Promise} - */ - listDocuments(collectionId: string, filters: string[], limit: number, offset: number, orderField: string, orderType: string, orderCast: string, search: string): Promise; - - /** - * Create Document - * - * Create a new Document. Before using this route, you should create a new - * collection resource using either a [server - * integration](/docs/server/database?sdk=nodejs#createCollection) API or - * directly from your database console. - * - * @param {string} collectionId - * @param {object} data - * @param {string[]} read - * @param {string[]} write - * @param {string} parentDocument - * @param {string} parentProperty - * @param {string} parentPropertyType - * @throws {Error} - * @return {Promise} - */ - createDocument(collectionId: string, data: object, read: string[], write: string[], parentDocument: string, parentProperty: string, parentPropertyType: string): Promise; - - /** - * Get Document - * - * Get document by its unique ID. This endpoint response returns a JSON object - * with the document data. - * - * @param {string} collectionId - * @param {string} documentId - * @throws {Error} - * @return {Promise} - */ - getDocument(collectionId: string, documentId: string): Promise; - - /** - * Update Document - * - * - * @param {string} collectionId - * @param {string} documentId - * @param {object} data - * @param {string[]} read - * @param {string[]} write - * @throws {Error} - * @return {Promise} - */ - updateDocument(collectionId: string, documentId: string, data: object, read: string[], write: string[]): Promise; - - /** - * Delete Document - * - * Delete document by its unique ID. This endpoint deletes only the parent - * documents, his attributes and relations to other documents. Child documents - * **will not** be deleted. - * - * @param {string} collectionId - * @param {string} documentId - * @throws {Error} - * @return {Promise} - */ - deleteDocument(collectionId: string, documentId: string): Promise; - - } - - export interface Locale { - - /** - * Get User Locale - * - * Get the current user location based on IP. Returns an object with user - * country code, country name, continent name, continent code, ip address and - * suggested currency. You can use the locale header to get the data in a - * supported language. - * - * ([IP Geolocation by DB-IP](https://db-ip.com)) - * - * @throws {Error} - * @return {Promise} - */ - get(): Promise; - - /** - * List Continents - * - * List of all continents. You can use the locale header to get the data in a - * supported language. - * - * @throws {Error} - * @return {Promise} - */ - getContinents(): Promise; - - /** - * List Countries - * - * List of all countries. You can use the locale header to get the data in a - * supported language. - * - * @throws {Error} - * @return {Promise} - */ - getCountries(): Promise; - - /** - * 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. - * - * @throws {Error} - * @return {Promise} - */ - getCountriesEU(): Promise; - - /** - * List Countries Phone Codes - * - * List of all countries phone codes. You can use the locale header to get the - * data in a supported language. - * - * @throws {Error} - * @return {Promise} - */ - getCountriesPhones(): Promise; - - /** - * 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. - * - * @throws {Error} - * @return {Promise} - */ - getCurrencies(): Promise; - - /** - * List Languages - * - * List of all languages classified by ISO 639-1 including 2-letter code, name - * in English, and name in the respective language. - * - * @throws {Error} - * @return {Promise} - */ - getLanguages(): Promise; - - } - - export interface Storage { - - /** - * List Files - * - * Get a list of all the user files. You can use the query params to filter - * your results. On admin mode, this endpoint will return a list of all of the - * project files. [Learn more about different API modes](/docs/admin). - * - * @param {string} search - * @param {number} limit - * @param {number} offset - * @param {string} orderType - * @throws {Error} - * @return {Promise} - */ - listFiles(search: string, limit: number, offset: number, orderType: string): Promise; - - /** - * Create File - * - * Create a new file. The user who creates the file will automatically be - * assigned to read and write access unless he has passed custom values for - * read and write arguments. - * - * @param {File} file - * @param {string[]} read - * @param {string[]} write - * @throws {Error} - * @return {Promise} - */ - createFile(file: File, read: string[], write: string[]): Promise; - - /** - * Get File - * - * Get file by its unique ID. This endpoint response returns a JSON object - * with the file metadata. - * - * @param {string} fileId - * @throws {Error} - * @return {Promise} - */ - getFile(fileId: string): Promise; - - /** - * Update File - * - * Update file by its unique ID. Only users with write permissions have access - * to update this resource. - * - * @param {string} fileId - * @param {string[]} read - * @param {string[]} write - * @throws {Error} - * @return {Promise} - */ - updateFile(fileId: string, read: string[], write: string[]): Promise; - - /** - * Delete File - * - * Delete a file by its unique ID. Only users with write permissions have - * access to delete this resource. - * - * @param {string} fileId - * @throws {Error} - * @return {Promise} - */ - deleteFile(fileId: string): Promise; - - /** - * Get File for Download - * - * Get 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. - * - * @param {string} fileId - * @throws {Error} - * @return {string} - */ - getFileDownload(fileId: string): string; - - /** - * Get File Preview - * - * Get a file preview image. Currently, this method supports preview for image - * files (jpg, png, and gif), other supported formats, like pdf, docs, slides, - * and spreadsheets, will return the file icon image. You can also pass query - * string arguments for cutting and resizing your preview image. - * - * @param {string} fileId - * @param {number} width - * @param {number} height - * @param {number} quality - * @param {string} background - * @param {string} output - * @throws {Error} - * @return {string} - */ - getFilePreview(fileId: string, width: number, height: number, quality: number, background: string, output: string): string; - - /** - * Get File for View - * - * Get file content by its unique ID. This endpoint is similar to the download - * method but returns with no 'Content-Disposition: attachment' header. - * - * @param {string} fileId - * @param {string} as - * @throws {Error} - * @return {string} - */ - getFileView(fileId: string, as: string): string; - - } - - export interface Teams { - - /** - * List Teams - * - * Get a list of all the current user teams. You can use the query params to - * filter your results. On admin mode, this endpoint will return a list of all - * of the project teams. [Learn more about different API modes](/docs/admin). - * - * @param {string} search - * @param {number} limit - * @param {number} offset - * @param {string} orderType - * @throws {Error} - * @return {Promise} - */ - list(search: string, limit: number, offset: number, orderType: string): Promise; - - /** - * Create Team - * - * Create a new team. The user who creates the team will automatically be - * assigned as the owner of the team. The team owner can invite new members, - * who will be able add new owners and update or delete the team from your - * project. - * - * @param {string} name - * @param {string[]} roles - * @throws {Error} - * @return {Promise} - */ - create(name: string, roles: string[]): Promise; - - /** - * Get Team - * - * Get team by its unique ID. All team members have read access for this - * resource. - * - * @param {string} teamId - * @throws {Error} - * @return {Promise} - */ - get(teamId: string): Promise; - - /** - * Update Team - * - * Update team by its unique ID. Only team owners have write access for this - * resource. - * - * @param {string} teamId - * @param {string} name - * @throws {Error} - * @return {Promise} - */ - update(teamId: string, name: string): Promise; - - /** - * Delete Team - * - * Delete team by its unique ID. Only team owners have write access for this - * resource. - * - * @param {string} teamId - * @throws {Error} - * @return {Promise} - */ - delete(teamId: string): Promise; - - /** - * Get Team Memberships - * - * Get team members by the team unique ID. All team members have read access - * for this list of resources. - * - * @param {string} teamId - * @param {string} search - * @param {number} limit - * @param {number} offset - * @param {string} orderType - * @throws {Error} - * @return {Promise} - */ - getMemberships(teamId: string, search: string, limit: number, offset: number, orderType: string): Promise; - - /** - * Create Team Membership - * - * Use this endpoint to invite a new member to join your team. An email with a - * link to join the team will be sent to the new member email address if the - * member doesn't exist in the project it will be created automatically. - * - * Use the 'URL' parameter to redirect the user from the invitation email back - * to your app. When the user is redirected, use the [Update Team Membership - * Status](/docs/client/teams#updateMembershipStatus) endpoint to allow the - * user to accept the invitation to the team. - * - * Please note that in order to avoid a [Redirect - * Attacks](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) - * the only valid redirect URL's are the once from domains you have set when - * added your platforms in the console interface. - * - * @param {string} teamId - * @param {string} email - * @param {string[]} roles - * @param {string} url - * @param {string} name - * @throws {Error} - * @return {Promise} - */ - createMembership(teamId: string, email: string, roles: string[], url: string, name: string): Promise; - - /** - * 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 he didn't accept it. - * - * @param {string} teamId - * @param {string} inviteId - * @throws {Error} - * @return {Promise} - */ - deleteMembership(teamId: string, inviteId: string): Promise; - - /** - * Update Team Membership Status - * - * Use this endpoint to allow a user to accept an invitation to join a team - * after he is being redirected back to your app from the invitation email he - * was sent. - * - * @param {string} teamId - * @param {string} inviteId - * @param {string} userId - * @param {string} secret - * @throws {Error} - * @return {Promise} - */ - updateMembershipStatus(teamId: string, inviteId: string, userId: string, secret: string): Promise; - - } - - -} \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/CHANGELOG.md b/app/sdks/0.6.2/console-web/CHANGELOG.md deleted file mode 100644 index fa4d35e687..0000000000 --- a/app/sdks/0.6.2/console-web/CHANGELOG.md +++ /dev/null @@ -1 +0,0 @@ -# Change Log \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/LICENSE b/app/sdks/0.6.2/console-web/LICENSE deleted file mode 100644 index fc7c051a91..0000000000 --- a/app/sdks/0.6.2/console-web/LICENSE +++ /dev/null @@ -1,12 +0,0 @@ -Copyright (c) 2019 Appwrite (https://appwrite.io) and individual contributors. -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - - 3. Neither the name Appwrite nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/README.md b/app/sdks/0.6.2/console-web/README.md deleted file mode 100644 index 000e4988f1..0000000000 --- a/app/sdks/0.6.2/console-web/README.md +++ /dev/null @@ -1,44 +0,0 @@ -# Appwrite Console SDK - -![License](https://img.shields.io/github/license/appwrite/sdk-for-console.svg?v=1) -![Version](https://img.shields.io/badge/api%20version-0.7.0-blue.svg?v=1) - -Appwrite is an open-source backend as a service server that abstract and simplify complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way. - Use the Console SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools. - For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs) - -![Appwrite](https://appwrite.io/images/github.png) - -## Installation - -### NPM - -To install via [NPM](https://www.npmjs.com/): - -```bash -npm install appwrite --save -``` - -If you're using a bundler (like [Browserify](http://browserify.org/) or [webpack](https://webpack.js.org/)), you can import the Appwrite module when you need it: - -```js -import * as Appwrite from "appwrite"; -``` - -### CDN - -To install with a CDN (content delivery network) add the following scripts to the bottom of your tag, but before you use any Appwrite services: - -```html - -``` - - - -## Contribution - -This library is auto-generated by Appwrite custom [SDK Generator](https://github.com/appwrite/sdk-generator). To learn more about how you can help us improve this SDK, please check the [contribution guide](https://github.com/appwrite/sdk-generator/blob/master/CONTRIBUTING.md) before sending a pull-request. - -## License - -Please see the [BSD-3-Clause license](https://raw.githubusercontent.com/appwrite/appwrite/master/LICENSE) file for more information. \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/account/create-o-auth2session.md b/app/sdks/0.6.2/console-web/docs/examples/account/create-o-auth2session.md deleted file mode 100644 index 3a2dcba651..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/account/create-o-auth2session.md +++ /dev/null @@ -1,11 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -// Go to OAuth provider login page -sdk.account.createOAuth2Session('amazon'); - diff --git a/app/sdks/0.6.2/console-web/docs/examples/account/create-recovery.md b/app/sdks/0.6.2/console-web/docs/examples/account/create-recovery.md deleted file mode 100644 index d69269b351..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/account/create-recovery.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.account.createRecovery('email@example.com', 'https://example.com'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/account/create-session.md b/app/sdks/0.6.2/console-web/docs/examples/account/create-session.md deleted file mode 100644 index 0734a84aaa..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/account/create-session.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.account.createSession('email@example.com', 'password'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/account/create-verification.md b/app/sdks/0.6.2/console-web/docs/examples/account/create-verification.md deleted file mode 100644 index 1211b5c642..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/account/create-verification.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.account.createVerification('https://example.com'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/account/create.md b/app/sdks/0.6.2/console-web/docs/examples/account/create.md deleted file mode 100644 index e61b1fbac4..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/account/create.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.account.create('email@example.com', 'password'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/account/delete-session.md b/app/sdks/0.6.2/console-web/docs/examples/account/delete-session.md deleted file mode 100644 index 84505281f0..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/account/delete-session.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.account.deleteSession('[SESSION_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/account/delete-sessions.md b/app/sdks/0.6.2/console-web/docs/examples/account/delete-sessions.md deleted file mode 100644 index 61bec86399..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/account/delete-sessions.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.account.deleteSessions(); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/account/delete.md b/app/sdks/0.6.2/console-web/docs/examples/account/delete.md deleted file mode 100644 index dbb8dbf250..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/account/delete.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.account.delete(); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/account/get-logs.md b/app/sdks/0.6.2/console-web/docs/examples/account/get-logs.md deleted file mode 100644 index 12e6656c96..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/account/get-logs.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.account.getLogs(); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/account/get-prefs.md b/app/sdks/0.6.2/console-web/docs/examples/account/get-prefs.md deleted file mode 100644 index e328baba32..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/account/get-prefs.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.account.getPrefs(); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/account/get-sessions.md b/app/sdks/0.6.2/console-web/docs/examples/account/get-sessions.md deleted file mode 100644 index cb281dd4db..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/account/get-sessions.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.account.getSessions(); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/account/get.md b/app/sdks/0.6.2/console-web/docs/examples/account/get.md deleted file mode 100644 index 82c96fb9db..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/account/get.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.account.get(); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/account/update-email.md b/app/sdks/0.6.2/console-web/docs/examples/account/update-email.md deleted file mode 100644 index c2caaf060e..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/account/update-email.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.account.updateEmail('email@example.com', 'password'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/account/update-name.md b/app/sdks/0.6.2/console-web/docs/examples/account/update-name.md deleted file mode 100644 index 047eba688b..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/account/update-name.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.account.updateName('[NAME]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/account/update-password.md b/app/sdks/0.6.2/console-web/docs/examples/account/update-password.md deleted file mode 100644 index d305031fa0..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/account/update-password.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.account.updatePassword('password', 'password'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/account/update-prefs.md b/app/sdks/0.6.2/console-web/docs/examples/account/update-prefs.md deleted file mode 100644 index 8c4e402ae1..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/account/update-prefs.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.account.updatePrefs({}); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/account/update-recovery.md b/app/sdks/0.6.2/console-web/docs/examples/account/update-recovery.md deleted file mode 100644 index 235a4db481..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/account/update-recovery.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.account.updateRecovery('[USER_ID]', '[SECRET]', 'password', 'password'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/account/update-verification.md b/app/sdks/0.6.2/console-web/docs/examples/account/update-verification.md deleted file mode 100644 index ef2c384853..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/account/update-verification.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.account.updateVerification('[USER_ID]', '[SECRET]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/avatars/get-browser.md b/app/sdks/0.6.2/console-web/docs/examples/avatars/get-browser.md deleted file mode 100644 index bbbdb9738f..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/avatars/get-browser.md +++ /dev/null @@ -1,11 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let result = sdk.avatars.getBrowser('aa'); - -console.log(result); // Resource URL \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/avatars/get-credit-card.md b/app/sdks/0.6.2/console-web/docs/examples/avatars/get-credit-card.md deleted file mode 100644 index e1fab01cf2..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/avatars/get-credit-card.md +++ /dev/null @@ -1,11 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let result = sdk.avatars.getCreditCard('amex'); - -console.log(result); // Resource URL \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/avatars/get-favicon.md b/app/sdks/0.6.2/console-web/docs/examples/avatars/get-favicon.md deleted file mode 100644 index 397986b11a..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/avatars/get-favicon.md +++ /dev/null @@ -1,11 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let result = sdk.avatars.getFavicon('https://example.com'); - -console.log(result); // Resource URL \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/avatars/get-flag.md b/app/sdks/0.6.2/console-web/docs/examples/avatars/get-flag.md deleted file mode 100644 index 6e90b72feb..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/avatars/get-flag.md +++ /dev/null @@ -1,11 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let result = sdk.avatars.getFlag('af'); - -console.log(result); // Resource URL \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/avatars/get-image.md b/app/sdks/0.6.2/console-web/docs/examples/avatars/get-image.md deleted file mode 100644 index afd1a17cb5..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/avatars/get-image.md +++ /dev/null @@ -1,11 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let result = sdk.avatars.getImage('https://example.com'); - -console.log(result); // Resource URL \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/avatars/get-initials.md b/app/sdks/0.6.2/console-web/docs/examples/avatars/get-initials.md deleted file mode 100644 index dab6417ca5..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/avatars/get-initials.md +++ /dev/null @@ -1,11 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let result = sdk.avatars.getInitials(); - -console.log(result); // Resource URL \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/avatars/get-q-r.md b/app/sdks/0.6.2/console-web/docs/examples/avatars/get-q-r.md deleted file mode 100644 index 31f490cedd..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/avatars/get-q-r.md +++ /dev/null @@ -1,11 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let result = sdk.avatars.getQR('[TEXT]'); - -console.log(result); // Resource URL \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/bar/delete.md b/app/sdks/0.6.2/console-web/docs/examples/bar/delete.md deleted file mode 100644 index c60d7a75f0..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/bar/delete.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.bar.delete('[]', null, []); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/bar/get.md b/app/sdks/0.6.2/console-web/docs/examples/bar/get.md deleted file mode 100644 index a690ffc039..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/bar/get.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.bar.get('[]', null, []); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/bar/patch.md b/app/sdks/0.6.2/console-web/docs/examples/bar/patch.md deleted file mode 100644 index 46ac2d7438..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/bar/patch.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.bar.patch('[]', null, []); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/bar/post.md b/app/sdks/0.6.2/console-web/docs/examples/bar/post.md deleted file mode 100644 index 4b21090c3f..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/bar/post.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.bar.post('[]', null, []); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/bar/put.md b/app/sdks/0.6.2/console-web/docs/examples/bar/put.md deleted file mode 100644 index 8eac3ebad8..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/bar/put.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.bar.put('[]', null, []); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/database/create-collection.md b/app/sdks/0.6.2/console-web/docs/examples/database/create-collection.md deleted file mode 100644 index a7a4b90197..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/database/create-collection.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.database.createCollection('[NAME]', [], [], []); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/database/create-document.md b/app/sdks/0.6.2/console-web/docs/examples/database/create-document.md deleted file mode 100644 index 64809c6156..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/database/create-document.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.database.createDocument('[COLLECTION_ID]', {}, [], []); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/database/delete-collection.md b/app/sdks/0.6.2/console-web/docs/examples/database/delete-collection.md deleted file mode 100644 index bfb0706bf5..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/database/delete-collection.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.database.deleteCollection('[COLLECTION_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/database/delete-document.md b/app/sdks/0.6.2/console-web/docs/examples/database/delete-document.md deleted file mode 100644 index 356a71a437..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/database/delete-document.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.database.deleteDocument('[COLLECTION_ID]', '[DOCUMENT_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/database/get-collection-logs.md b/app/sdks/0.6.2/console-web/docs/examples/database/get-collection-logs.md deleted file mode 100644 index 8934910901..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/database/get-collection-logs.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.database.getCollectionLogs('[COLLECTION_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/database/get-collection.md b/app/sdks/0.6.2/console-web/docs/examples/database/get-collection.md deleted file mode 100644 index d74d4b3225..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/database/get-collection.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.database.getCollection('[COLLECTION_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/database/get-document.md b/app/sdks/0.6.2/console-web/docs/examples/database/get-document.md deleted file mode 100644 index 51638880c5..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/database/get-document.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.database.getDocument('[COLLECTION_ID]', '[DOCUMENT_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/database/list-collections.md b/app/sdks/0.6.2/console-web/docs/examples/database/list-collections.md deleted file mode 100644 index 8a18249748..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/database/list-collections.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.database.listCollections(); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/database/list-documents.md b/app/sdks/0.6.2/console-web/docs/examples/database/list-documents.md deleted file mode 100644 index 1d895a566a..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/database/list-documents.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.database.listDocuments('[COLLECTION_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/database/update-collection.md b/app/sdks/0.6.2/console-web/docs/examples/database/update-collection.md deleted file mode 100644 index f00a6c6f8c..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/database/update-collection.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.database.updateCollection('[COLLECTION_ID]', '[NAME]', [], []); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/database/update-document.md b/app/sdks/0.6.2/console-web/docs/examples/database/update-document.md deleted file mode 100644 index 52c172ab6a..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/database/update-document.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.database.updateDocument('[COLLECTION_ID]', '[DOCUMENT_ID]', {}, [], []); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/foo/delete.md b/app/sdks/0.6.2/console-web/docs/examples/foo/delete.md deleted file mode 100644 index 715289a5b8..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/foo/delete.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.foo.delete('[]', null, []); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/foo/get.md b/app/sdks/0.6.2/console-web/docs/examples/foo/get.md deleted file mode 100644 index cb3ee31c9d..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/foo/get.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.foo.get('[]', null, []); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/foo/patch.md b/app/sdks/0.6.2/console-web/docs/examples/foo/patch.md deleted file mode 100644 index e39222e71d..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/foo/patch.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.foo.patch('[]', null, []); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/foo/post.md b/app/sdks/0.6.2/console-web/docs/examples/foo/post.md deleted file mode 100644 index 4c236776f6..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/foo/post.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.foo.post('[]', null, []); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/foo/put.md b/app/sdks/0.6.2/console-web/docs/examples/foo/put.md deleted file mode 100644 index d13c4c44ff..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/foo/put.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.foo.put('[]', null, []); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/functions/create-execution.md b/app/sdks/0.6.2/console-web/docs/examples/functions/create-execution.md deleted file mode 100644 index e70d7f931a..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/functions/create-execution.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.functions.createExecution('[FUNCTION_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/functions/create-tag.md b/app/sdks/0.6.2/console-web/docs/examples/functions/create-tag.md deleted file mode 100644 index 743517ff1a..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/functions/create-tag.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.functions.createTag('[FUNCTION_ID]', '[COMMAND]', document.getElementById('uploader').files[0]); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/functions/create.md b/app/sdks/0.6.2/console-web/docs/examples/functions/create.md deleted file mode 100644 index 6fb506816f..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/functions/create.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.functions.create('[NAME]', 'node-14'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/functions/delete-tag.md b/app/sdks/0.6.2/console-web/docs/examples/functions/delete-tag.md deleted file mode 100644 index 9c1b5cdda3..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/functions/delete-tag.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.functions.deleteTag('[FUNCTION_ID]', '[TAG_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/functions/delete.md b/app/sdks/0.6.2/console-web/docs/examples/functions/delete.md deleted file mode 100644 index f76f809c2b..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/functions/delete.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.functions.delete('[FUNCTION_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/functions/get-execution.md b/app/sdks/0.6.2/console-web/docs/examples/functions/get-execution.md deleted file mode 100644 index 8287c4709e..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/functions/get-execution.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.functions.getExecution('[FUNCTION_ID]', '[EXECUTION_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/functions/get-tag.md b/app/sdks/0.6.2/console-web/docs/examples/functions/get-tag.md deleted file mode 100644 index c6021ccdac..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/functions/get-tag.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.functions.getTag('[FUNCTION_ID]', '[TAG_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/functions/get.md b/app/sdks/0.6.2/console-web/docs/examples/functions/get.md deleted file mode 100644 index dc068ffa09..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/functions/get.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.functions.get('[FUNCTION_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/functions/list-executions.md b/app/sdks/0.6.2/console-web/docs/examples/functions/list-executions.md deleted file mode 100644 index 9367a9eb52..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/functions/list-executions.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.functions.listExecutions('[FUNCTION_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/functions/list-tags.md b/app/sdks/0.6.2/console-web/docs/examples/functions/list-tags.md deleted file mode 100644 index 4542bae44b..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/functions/list-tags.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.functions.listTags('[FUNCTION_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/functions/list.md b/app/sdks/0.6.2/console-web/docs/examples/functions/list.md deleted file mode 100644 index e2ce2511e0..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/functions/list.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.functions.list(); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/functions/update-active.md b/app/sdks/0.6.2/console-web/docs/examples/functions/update-active.md deleted file mode 100644 index eed2be885c..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/functions/update-active.md +++ /dev/null @@ -1,14 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.functions.updateActive('[FUNCTION_ID]', '[ACTIVE]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/functions/update-tag.md b/app/sdks/0.6.2/console-web/docs/examples/functions/update-tag.md deleted file mode 100644 index 7ea2ba1808..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/functions/update-tag.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.functions.updateTag('[FUNCTION_ID]', '[TAG]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/functions/update.md b/app/sdks/0.6.2/console-web/docs/examples/functions/update.md deleted file mode 100644 index c6a34cff5c..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/functions/update.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.functions.update('[FUNCTION_ID]', '[NAME]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/general/empty.md b/app/sdks/0.6.2/console-web/docs/examples/general/empty.md deleted file mode 100644 index 50fd0e8a5c..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/general/empty.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.general.empty(); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/general/get-cookie.md b/app/sdks/0.6.2/console-web/docs/examples/general/get-cookie.md deleted file mode 100644 index 5785a0323f..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/general/get-cookie.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.general.getCookie(); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/general/redirect.md b/app/sdks/0.6.2/console-web/docs/examples/general/redirect.md deleted file mode 100644 index 769533f6f6..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/general/redirect.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.general.redirect(); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/general/redirected.md b/app/sdks/0.6.2/console-web/docs/examples/general/redirected.md deleted file mode 100644 index 712e614ac9..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/general/redirected.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.general.redirected(); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/general/set-cookie.md b/app/sdks/0.6.2/console-web/docs/examples/general/set-cookie.md deleted file mode 100644 index ee0f85cc1f..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/general/set-cookie.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.general.setCookie(); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/general/upload.md b/app/sdks/0.6.2/console-web/docs/examples/general/upload.md deleted file mode 100644 index bbc2bee92a..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/general/upload.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.general.upload('[]', null, [], document.getElementById('uploader').files[0]); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/health/get-anti-virus.md b/app/sdks/0.6.2/console-web/docs/examples/health/get-anti-virus.md deleted file mode 100644 index 95b671992b..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/health/get-anti-virus.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.health.getAntiVirus(); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/health/get-cache.md b/app/sdks/0.6.2/console-web/docs/examples/health/get-cache.md deleted file mode 100644 index 5c41d81868..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/health/get-cache.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.health.getCache(); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/health/get-d-b.md b/app/sdks/0.6.2/console-web/docs/examples/health/get-d-b.md deleted file mode 100644 index 407f87e2a1..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/health/get-d-b.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.health.getDB(); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/health/get-queue-certificates.md b/app/sdks/0.6.2/console-web/docs/examples/health/get-queue-certificates.md deleted file mode 100644 index a115c869ba..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/health/get-queue-certificates.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.health.getQueueCertificates(); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/health/get-queue-functions.md b/app/sdks/0.6.2/console-web/docs/examples/health/get-queue-functions.md deleted file mode 100644 index 3c0dc33acf..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/health/get-queue-functions.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.health.getQueueFunctions(); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/health/get-queue-logs.md b/app/sdks/0.6.2/console-web/docs/examples/health/get-queue-logs.md deleted file mode 100644 index b3d41b49c6..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/health/get-queue-logs.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.health.getQueueLogs(); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/health/get-queue-tasks.md b/app/sdks/0.6.2/console-web/docs/examples/health/get-queue-tasks.md deleted file mode 100644 index 4f34f670a6..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/health/get-queue-tasks.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.health.getQueueTasks(); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/health/get-queue-usage.md b/app/sdks/0.6.2/console-web/docs/examples/health/get-queue-usage.md deleted file mode 100644 index 3d234be2de..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/health/get-queue-usage.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.health.getQueueUsage(); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/health/get-queue-webhooks.md b/app/sdks/0.6.2/console-web/docs/examples/health/get-queue-webhooks.md deleted file mode 100644 index c5825dcf6c..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/health/get-queue-webhooks.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.health.getQueueWebhooks(); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/health/get-storage-local.md b/app/sdks/0.6.2/console-web/docs/examples/health/get-storage-local.md deleted file mode 100644 index 7287745704..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/health/get-storage-local.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.health.getStorageLocal(); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/health/get-time.md b/app/sdks/0.6.2/console-web/docs/examples/health/get-time.md deleted file mode 100644 index b6087b73d5..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/health/get-time.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.health.getTime(); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/health/get.md b/app/sdks/0.6.2/console-web/docs/examples/health/get.md deleted file mode 100644 index 1e7d6fe4e8..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/health/get.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.health.get(); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/locale/get-continents.md b/app/sdks/0.6.2/console-web/docs/examples/locale/get-continents.md deleted file mode 100644 index 93144335ea..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/locale/get-continents.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.locale.getContinents(); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/locale/get-countries-e-u.md b/app/sdks/0.6.2/console-web/docs/examples/locale/get-countries-e-u.md deleted file mode 100644 index fffc8696e8..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/locale/get-countries-e-u.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.locale.getCountriesEU(); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/locale/get-countries-phones.md b/app/sdks/0.6.2/console-web/docs/examples/locale/get-countries-phones.md deleted file mode 100644 index 751f4f6cc4..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/locale/get-countries-phones.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.locale.getCountriesPhones(); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/locale/get-countries.md b/app/sdks/0.6.2/console-web/docs/examples/locale/get-countries.md deleted file mode 100644 index 30b1dd95c7..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/locale/get-countries.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.locale.getCountries(); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/locale/get-currencies.md b/app/sdks/0.6.2/console-web/docs/examples/locale/get-currencies.md deleted file mode 100644 index 4c92714062..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/locale/get-currencies.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.locale.getCurrencies(); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/locale/get-languages.md b/app/sdks/0.6.2/console-web/docs/examples/locale/get-languages.md deleted file mode 100644 index 2d1f713eeb..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/locale/get-languages.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.locale.getLanguages(); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/locale/get.md b/app/sdks/0.6.2/console-web/docs/examples/locale/get.md deleted file mode 100644 index 1fba9877b5..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/locale/get.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.locale.get(); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/projects/create-domain.md b/app/sdks/0.6.2/console-web/docs/examples/projects/create-domain.md deleted file mode 100644 index 756b869a85..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/projects/create-domain.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.projects.createDomain('[PROJECT_ID]', ''); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/projects/create-key.md b/app/sdks/0.6.2/console-web/docs/examples/projects/create-key.md deleted file mode 100644 index 9556f5b7f7..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/projects/create-key.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.projects.createKey('[PROJECT_ID]', '[NAME]', []); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/projects/create-platform.md b/app/sdks/0.6.2/console-web/docs/examples/projects/create-platform.md deleted file mode 100644 index f4476fe599..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/projects/create-platform.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.projects.createPlatform('[PROJECT_ID]', 'web', '[NAME]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/projects/create-task.md b/app/sdks/0.6.2/console-web/docs/examples/projects/create-task.md deleted file mode 100644 index 9b0f3c1e03..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/projects/create-task.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.projects.createTask('[PROJECT_ID]', '[NAME]', 'play', '', false, 'GET', 'https://example.com'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/projects/create-webhook.md b/app/sdks/0.6.2/console-web/docs/examples/projects/create-webhook.md deleted file mode 100644 index be722f3dbe..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/projects/create-webhook.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.projects.createWebhook('[PROJECT_ID]', '[NAME]', [], 'https://example.com', false); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/projects/create.md b/app/sdks/0.6.2/console-web/docs/examples/projects/create.md deleted file mode 100644 index 8041ed154e..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/projects/create.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.projects.create('[NAME]', '[TEAM_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/projects/delete-domain.md b/app/sdks/0.6.2/console-web/docs/examples/projects/delete-domain.md deleted file mode 100644 index 1b3df9363b..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/projects/delete-domain.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.projects.deleteDomain('[PROJECT_ID]', '[DOMAIN_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/projects/delete-key.md b/app/sdks/0.6.2/console-web/docs/examples/projects/delete-key.md deleted file mode 100644 index dc855bcc30..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/projects/delete-key.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.projects.deleteKey('[PROJECT_ID]', '[KEY_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/projects/delete-platform.md b/app/sdks/0.6.2/console-web/docs/examples/projects/delete-platform.md deleted file mode 100644 index 2a180c47e4..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/projects/delete-platform.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.projects.deletePlatform('[PROJECT_ID]', '[PLATFORM_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/projects/delete-task.md b/app/sdks/0.6.2/console-web/docs/examples/projects/delete-task.md deleted file mode 100644 index b7f9ad3e47..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/projects/delete-task.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.projects.deleteTask('[PROJECT_ID]', '[TASK_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/projects/delete-webhook.md b/app/sdks/0.6.2/console-web/docs/examples/projects/delete-webhook.md deleted file mode 100644 index c5e0588ad1..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/projects/delete-webhook.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.projects.deleteWebhook('[PROJECT_ID]', '[WEBHOOK_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/projects/delete.md b/app/sdks/0.6.2/console-web/docs/examples/projects/delete.md deleted file mode 100644 index 20b67370f0..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/projects/delete.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.projects.delete('[PROJECT_ID]', '[PASSWORD]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/projects/get-domain.md b/app/sdks/0.6.2/console-web/docs/examples/projects/get-domain.md deleted file mode 100644 index 1622546719..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/projects/get-domain.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.projects.getDomain('[PROJECT_ID]', '[DOMAIN_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/projects/get-key.md b/app/sdks/0.6.2/console-web/docs/examples/projects/get-key.md deleted file mode 100644 index 8bb458c335..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/projects/get-key.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.projects.getKey('[PROJECT_ID]', '[KEY_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/projects/get-platform.md b/app/sdks/0.6.2/console-web/docs/examples/projects/get-platform.md deleted file mode 100644 index bfeb49393b..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/projects/get-platform.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.projects.getPlatform('[PROJECT_ID]', '[PLATFORM_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/projects/get-task.md b/app/sdks/0.6.2/console-web/docs/examples/projects/get-task.md deleted file mode 100644 index c405299d74..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/projects/get-task.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.projects.getTask('[PROJECT_ID]', '[TASK_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/projects/get-usage.md b/app/sdks/0.6.2/console-web/docs/examples/projects/get-usage.md deleted file mode 100644 index e024a2966c..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/projects/get-usage.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.projects.getUsage('[PROJECT_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/projects/get-webhook.md b/app/sdks/0.6.2/console-web/docs/examples/projects/get-webhook.md deleted file mode 100644 index 2629d4424d..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/projects/get-webhook.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.projects.getWebhook('[PROJECT_ID]', '[WEBHOOK_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/projects/get.md b/app/sdks/0.6.2/console-web/docs/examples/projects/get.md deleted file mode 100644 index bcfb35186b..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/projects/get.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.projects.get('[PROJECT_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/projects/list-domains.md b/app/sdks/0.6.2/console-web/docs/examples/projects/list-domains.md deleted file mode 100644 index 5ddfec49b5..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/projects/list-domains.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.projects.listDomains('[PROJECT_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/projects/list-keys.md b/app/sdks/0.6.2/console-web/docs/examples/projects/list-keys.md deleted file mode 100644 index 497ddf9bac..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/projects/list-keys.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.projects.listKeys('[PROJECT_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/projects/list-platforms.md b/app/sdks/0.6.2/console-web/docs/examples/projects/list-platforms.md deleted file mode 100644 index 4fd2d311f3..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/projects/list-platforms.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.projects.listPlatforms('[PROJECT_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/projects/list-tasks.md b/app/sdks/0.6.2/console-web/docs/examples/projects/list-tasks.md deleted file mode 100644 index d42efc2b80..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/projects/list-tasks.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.projects.listTasks('[PROJECT_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/projects/list-webhooks.md b/app/sdks/0.6.2/console-web/docs/examples/projects/list-webhooks.md deleted file mode 100644 index 6c45849399..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/projects/list-webhooks.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.projects.listWebhooks('[PROJECT_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/projects/list.md b/app/sdks/0.6.2/console-web/docs/examples/projects/list.md deleted file mode 100644 index 428fc4545f..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/projects/list.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.projects.list(); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/projects/update-domain-verification.md b/app/sdks/0.6.2/console-web/docs/examples/projects/update-domain-verification.md deleted file mode 100644 index ea53295bcf..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/projects/update-domain-verification.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.projects.updateDomainVerification('[PROJECT_ID]', '[DOMAIN_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/projects/update-key.md b/app/sdks/0.6.2/console-web/docs/examples/projects/update-key.md deleted file mode 100644 index f19b593c9f..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/projects/update-key.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.projects.updateKey('[PROJECT_ID]', '[KEY_ID]', '[NAME]', []); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/projects/update-o-auth2.md b/app/sdks/0.6.2/console-web/docs/examples/projects/update-o-auth2.md deleted file mode 100644 index 479c5e9d30..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/projects/update-o-auth2.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.projects.updateOAuth2('[PROJECT_ID]', 'amazon'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/projects/update-platform.md b/app/sdks/0.6.2/console-web/docs/examples/projects/update-platform.md deleted file mode 100644 index 0e22080ed0..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/projects/update-platform.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.projects.updatePlatform('[PROJECT_ID]', '[PLATFORM_ID]', '[NAME]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/projects/update-task.md b/app/sdks/0.6.2/console-web/docs/examples/projects/update-task.md deleted file mode 100644 index 38744a36bd..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/projects/update-task.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.projects.updateTask('[PROJECT_ID]', '[TASK_ID]', '[NAME]', 'play', '', false, 'GET', 'https://example.com'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/projects/update-webhook.md b/app/sdks/0.6.2/console-web/docs/examples/projects/update-webhook.md deleted file mode 100644 index cdef2ec479..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/projects/update-webhook.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.projects.updateWebhook('[PROJECT_ID]', '[WEBHOOK_ID]', '[NAME]', [], 'https://example.com', false); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/projects/update.md b/app/sdks/0.6.2/console-web/docs/examples/projects/update.md deleted file mode 100644 index 9d06850534..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/projects/update.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.projects.update('[PROJECT_ID]', '[NAME]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/storage/create-file.md b/app/sdks/0.6.2/console-web/docs/examples/storage/create-file.md deleted file mode 100644 index 673777e380..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/storage/create-file.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.storage.createFile(document.getElementById('uploader').files[0], [], []); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/storage/delete-file.md b/app/sdks/0.6.2/console-web/docs/examples/storage/delete-file.md deleted file mode 100644 index 7278b682ae..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/storage/delete-file.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.storage.deleteFile('[FILE_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/storage/get-file-download.md b/app/sdks/0.6.2/console-web/docs/examples/storage/get-file-download.md deleted file mode 100644 index 0a4677fe80..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/storage/get-file-download.md +++ /dev/null @@ -1,11 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let result = sdk.storage.getFileDownload('[FILE_ID]'); - -console.log(result); // Resource URL \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/storage/get-file-preview.md b/app/sdks/0.6.2/console-web/docs/examples/storage/get-file-preview.md deleted file mode 100644 index a44cb6479c..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/storage/get-file-preview.md +++ /dev/null @@ -1,11 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let result = sdk.storage.getFilePreview('[FILE_ID]'); - -console.log(result); // Resource URL \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/storage/get-file-view.md b/app/sdks/0.6.2/console-web/docs/examples/storage/get-file-view.md deleted file mode 100644 index adfb6320c3..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/storage/get-file-view.md +++ /dev/null @@ -1,11 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let result = sdk.storage.getFileView('[FILE_ID]'); - -console.log(result); // Resource URL \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/storage/get-file.md b/app/sdks/0.6.2/console-web/docs/examples/storage/get-file.md deleted file mode 100644 index 9691be3056..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/storage/get-file.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.storage.getFile('[FILE_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/storage/list-files.md b/app/sdks/0.6.2/console-web/docs/examples/storage/list-files.md deleted file mode 100644 index 5c2560d06d..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/storage/list-files.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.storage.listFiles(); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/storage/update-file.md b/app/sdks/0.6.2/console-web/docs/examples/storage/update-file.md deleted file mode 100644 index c053d60470..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/storage/update-file.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.storage.updateFile('[FILE_ID]', [], []); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/teams/create-membership.md b/app/sdks/0.6.2/console-web/docs/examples/teams/create-membership.md deleted file mode 100644 index 534577ead3..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/teams/create-membership.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.teams.createMembership('[TEAM_ID]', 'email@example.com', [], 'https://example.com'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/teams/create.md b/app/sdks/0.6.2/console-web/docs/examples/teams/create.md deleted file mode 100644 index 6f7232b9c5..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/teams/create.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.teams.create('[NAME]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/teams/delete-membership.md b/app/sdks/0.6.2/console-web/docs/examples/teams/delete-membership.md deleted file mode 100644 index fa1efe401b..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/teams/delete-membership.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.teams.deleteMembership('[TEAM_ID]', '[INVITE_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/teams/delete.md b/app/sdks/0.6.2/console-web/docs/examples/teams/delete.md deleted file mode 100644 index cacad26c02..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/teams/delete.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.teams.delete('[TEAM_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/teams/get-memberships.md b/app/sdks/0.6.2/console-web/docs/examples/teams/get-memberships.md deleted file mode 100644 index e1b959d1eb..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/teams/get-memberships.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.teams.getMemberships('[TEAM_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/teams/get.md b/app/sdks/0.6.2/console-web/docs/examples/teams/get.md deleted file mode 100644 index a8496ad76d..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/teams/get.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.teams.get('[TEAM_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/teams/list.md b/app/sdks/0.6.2/console-web/docs/examples/teams/list.md deleted file mode 100644 index b94d6c32ff..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/teams/list.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.teams.list(); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/teams/update-membership-status.md b/app/sdks/0.6.2/console-web/docs/examples/teams/update-membership-status.md deleted file mode 100644 index 4931f02689..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/teams/update-membership-status.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.teams.updateMembershipStatus('[TEAM_ID]', '[INVITE_ID]', '[USER_ID]', '[SECRET]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/teams/update.md b/app/sdks/0.6.2/console-web/docs/examples/teams/update.md deleted file mode 100644 index 5b73121518..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/teams/update.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.teams.update('[TEAM_ID]', '[NAME]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/users/create.md b/app/sdks/0.6.2/console-web/docs/examples/users/create.md deleted file mode 100644 index 9adc060ff5..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/users/create.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.users.create('email@example.com', 'password'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/users/delete-session.md b/app/sdks/0.6.2/console-web/docs/examples/users/delete-session.md deleted file mode 100644 index 96a9b5c94f..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/users/delete-session.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.users.deleteSession('[USER_ID]', '[SESSION_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/users/delete-sessions.md b/app/sdks/0.6.2/console-web/docs/examples/users/delete-sessions.md deleted file mode 100644 index 56092ab5fc..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/users/delete-sessions.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.users.deleteSessions('[USER_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/users/delete-user.md b/app/sdks/0.6.2/console-web/docs/examples/users/delete-user.md deleted file mode 100644 index 40f33e34c2..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/users/delete-user.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.users.deleteUser('[USER_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/users/get-logs.md b/app/sdks/0.6.2/console-web/docs/examples/users/get-logs.md deleted file mode 100644 index c349383ec1..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/users/get-logs.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.users.getLogs('[USER_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/users/get-prefs.md b/app/sdks/0.6.2/console-web/docs/examples/users/get-prefs.md deleted file mode 100644 index 7d8a3cd33f..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/users/get-prefs.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.users.getPrefs('[USER_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/users/get-sessions.md b/app/sdks/0.6.2/console-web/docs/examples/users/get-sessions.md deleted file mode 100644 index 1b7535855e..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/users/get-sessions.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.users.getSessions('[USER_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/users/get.md b/app/sdks/0.6.2/console-web/docs/examples/users/get.md deleted file mode 100644 index 751798de39..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/users/get.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.users.get('[USER_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/users/list.md b/app/sdks/0.6.2/console-web/docs/examples/users/list.md deleted file mode 100644 index bbc4895412..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/users/list.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.users.list(); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/users/update-prefs.md b/app/sdks/0.6.2/console-web/docs/examples/users/update-prefs.md deleted file mode 100644 index 877aa309a1..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/users/update-prefs.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.users.updatePrefs('[USER_ID]', {}); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/docs/examples/users/update-status.md b/app/sdks/0.6.2/console-web/docs/examples/users/update-status.md deleted file mode 100644 index 6c432ff4c6..0000000000 --- a/app/sdks/0.6.2/console-web/docs/examples/users/update-status.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.users.updateStatus('[USER_ID]', '1'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/package.json b/app/sdks/0.6.2/console-web/package.json deleted file mode 100644 index 6c53a70307..0000000000 --- a/app/sdks/0.6.2/console-web/package.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "appwrite", - "homepage": "https://appwrite.io/support", - "description": "Appwrite is an open-source self-hosted backend server that abstract and simplify complex and repetitive development tasks behind a very simple REST API", - "version": "1.0.0", - "license": "BSD-3-Clause", - "main": "src/sdk.js", - "types": "types/index.d.ts", - "repository": { - "type": "git", - "url": "https://github.com/appwrite/sdk-for-console" - }, - "devDependencies": { - "typescript": "^3.6.4" - }, - "dependencies": {} -} \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/src/sdk.js b/app/sdks/0.6.2/console-web/src/sdk.js deleted file mode 100644 index fc8da5a1c2..0000000000 --- a/app/sdks/0.6.2/console-web/src/sdk.js +++ /dev/null @@ -1,4993 +0,0 @@ -(function (window) { - - 'use strict'; - - window.Appwrite = function () { - - let config = { - endpoint: 'https://appwrite.io/v1', - project: '', - key: '', - locale: '', - mode: '', - }; - - /** - * @param {string} endpoint - * @returns {this} - */ - let setEndpoint = function(endpoint) { - config.endpoint = endpoint; - - return this; - }; - - /** - * Set Project - * - * Your project ID - * - * @param value string - * - * @return this - */ - let setProject = function (value) - { - http.addGlobalHeader('X-Appwrite-Project', value); - - config.project = value; - - return this; - }; - - /** - * Set Key - * - * Your secret API key - * - * @param value string - * - * @return this - */ - let setKey = function (value) - { - http.addGlobalHeader('X-Appwrite-Key', value); - - config.key = value; - - return this; - }; - - /** - * Set Locale - * - * @param value string - * - * @return this - */ - let setLocale = function (value) - { - http.addGlobalHeader('X-Appwrite-Locale', value); - - config.locale = value; - - return this; - }; - - /** - * Set Mode - * - * @param value string - * - * @return this - */ - let setMode = function (value) - { - http.addGlobalHeader('X-Appwrite-Mode', value); - - config.mode = value; - - return this; - }; - - let http = function(document) { - let globalParams = [], - globalHeaders = []; - - let addParam = function (url, param, value) { - let a = document.createElement('a'), regex = /(?:\?|&|&)+([^=]+)(?:=([^&]*))*/g; - let match, str = []; - a.href = url; - param = encodeURIComponent(param); - - while (match = regex.exec(a.search)) if (param !== match[1]) str.push(match[1] + (match[2] ? "=" + match[2] : "")); - - str.push(param + (value ? "=" + encodeURIComponent(value) : "")); - - a.search = str.join("&"); - - return a.href; - }; - - /** - * @param {Object} params - * @returns {string} - */ - let buildQuery = function(params) { - let str = []; - - for (let p in params) { - if(Array.isArray(params[p])) { - for (let index = 0; index < params[p].length; index++) { - let param = params[p][index]; - str.push(encodeURIComponent(p + '[]') + "=" + encodeURIComponent(param)); - } - } - else { - str.push(encodeURIComponent(p) + "=" + encodeURIComponent(params[p])); - } - } - - return str.join("&"); - }; - - let addGlobalHeader = function(key, value) { - globalHeaders[key] = {key: key.toLowerCase(), value: value.toLowerCase()}; - }; - - let addGlobalParam = function(key, value) { - globalParams.push({key: key, value: value}); - }; - - addGlobalHeader('x-sdk-version', 'appwrite:javascript:1.0.0'); - addGlobalHeader('content-type', ''); - - /** - * @param {string} method - * @param {string} path string - * @param {Object} headers - * @param {Object} params - * @param {function} progress - * @returns {Promise} - */ - let call = function (method, path, headers = {}, params = {}, progress = null) { - let i; - - path = config.endpoint + path; - - if (-1 === ['GET', 'POST', 'PUT', 'DELETE', 'TRACE', 'HEAD', 'OPTIONS', 'CONNECT', 'PATCH'].indexOf(method)) { - throw new Error('var method must contain a valid HTTP method name'); - } - - if (typeof path !== 'string') { - throw new Error('var path must be of type string'); - } - - if (typeof headers !== 'object') { - throw new Error('var headers must be of type object'); - } - - for (i = 0; i < globalParams.length; i++) { // Add global params to URL - path = addParam(path, globalParams[i].key, globalParams[i].value); - } - - if(window.localStorage && window.localStorage.getItem('cookieFallback')) { - headers['X-Fallback-Cookies'] = window.localStorage.getItem('cookieFallback'); - } - - for (let key in globalHeaders) { // Add Global Headers - if (globalHeaders.hasOwnProperty(key)) { - if (!headers[globalHeaders[key].key]) { - headers[globalHeaders[key].key] = globalHeaders[key].value; - } - } - } - - if(method === 'GET') { - for (let param in params) { - if (param.hasOwnProperty(key)) { - path = addParam(path, key + (Array.isArray(param) ? '[]' : ''), params[key]); - } - } - } - - switch (headers['content-type']) { // Parse request by content type - case 'application/json': - params = JSON.stringify(params); - break; - - case 'multipart/form-data': - let formData = new FormData(); - - Object.keys(params).forEach(function(key) { - let param = params[key]; - formData.append(key + (Array.isArray(param) ? '[]' : ''), param); - }); - - params = formData; - break; - } - - return new Promise(function (resolve, reject) { - - let request = new XMLHttpRequest(), key; - - request.withCredentials = true; - request.open(method, path, true); - - for (key in headers) { // Set Headers - if (headers.hasOwnProperty(key)) { - if (key === 'content-type' && headers[key] === 'multipart/form-data') { // Skip to avoid missing boundary - continue; - } - - request.setRequestHeader(key, headers[key]); - } - } - - request.onload = function () { - let data = request.response; - let contentType = this.getResponseHeader('content-type') || ''; - contentType = contentType.substring(0, contentType.indexOf(';')); - - switch (contentType) { - case 'application/json': - data = JSON.parse(data); - break; - } - - let cookieFallback = this.getResponseHeader('X-Fallback-Cookies') || ''; - - if(window.localStorage && cookieFallback) { - window.console.warn('Appwrite is using localStorage for session management. Increase your security by adding a custom domain as your API endpoint.'); - window.localStorage.setItem('cookieFallback', cookieFallback); - } - - if (4 === request.readyState && 399 >= request.status) { - resolve(data); - } else { - reject(data); - } - }; - - if (progress) { - request.addEventListener('progress', progress); - request.upload.addEventListener('progress', progress, false); - } - - // Handle network errors - request.onerror = function () { - reject(new Error("Network Error")); - }; - - request.send(params); - }) - }; - - return { - 'get': function(path, headers = {}, params = {}) { - return call('GET', path + ((Object.keys(params).length > 0) ? '?' + buildQuery(params) : ''), headers, {}); - }, - 'post': function(path, headers = {}, params = {}, progress = null) { - return call('POST', path, headers, params, progress); - }, - 'put': function(path, headers = {}, params = {}, progress = null) { - return call('PUT', path, headers, params, progress); - }, - 'patch': function(path, headers = {}, params = {}, progress = null) { - return call('PATCH', path, headers, params, progress); - }, - 'delete': function(path, headers = {}, params = {}, progress = null) { - return call('DELETE', path, headers, params, progress); - }, - 'addGlobalParam': addGlobalParam, - 'addGlobalHeader': addGlobalHeader - } - }(window.document); - - let account = { - - /** - * Get Account - * - * Get currently logged in user data as JSON object. - * - * @throws {Error} - * @return {Promise} - */ - get: function() { - let path = '/account'; - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Create Account - * - * Use this endpoint to allow a new user to register a new account in your - * project. After the user registration completes successfully, you can use - * the [/account/verfication](/docs/client/account#createVerification) route - * to start verifying the user email address. To allow your new user to login - * to his new account, you need to create a new [account - * session](/docs/client/account#createSession). - * - * @param {string} email - * @param {string} password - * @param {string} name - * @throws {Error} - * @return {Promise} - */ - create: function(email, password, name = '') { - if(email === undefined) { - throw new Error('Missing required parameter: "email"'); - } - - if(password === undefined) { - throw new Error('Missing required parameter: "password"'); - } - - let path = '/account'; - - let payload = {}; - - if(email) { - payload['email'] = email; - } - - if(password) { - payload['password'] = password; - } - - if(name) { - payload['name'] = name; - } - - return http - .post(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Delete Account - * - * Delete a currently logged in user account. Behind the scene, the user - * record is not deleted but permanently blocked from any access. This is done - * to avoid deleted accounts being overtaken by new users with the same email - * address. Any user-related resources like documents or storage files should - * be deleted separately. - * - * @throws {Error} - * @return {Promise} - */ - delete: function() { - let path = '/account'; - - let payload = {}; - - return http - .delete(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Update Account Email - * - * Update currently logged in user account email address. After changing user - * address, user confirmation status is being reset and a new confirmation - * mail is sent. For security measures, user password is required to complete - * this request. - * - * @param {string} email - * @param {string} password - * @throws {Error} - * @return {Promise} - */ - updateEmail: function(email, password) { - if(email === undefined) { - throw new Error('Missing required parameter: "email"'); - } - - if(password === undefined) { - throw new Error('Missing required parameter: "password"'); - } - - let path = '/account/email'; - - let payload = {}; - - if(email) { - payload['email'] = email; - } - - if(password) { - payload['password'] = password; - } - - return http - .patch(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Get Account 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. - * - * @throws {Error} - * @return {Promise} - */ - getLogs: function() { - let path = '/account/logs'; - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Update Account Name - * - * Update currently logged in user account name. - * - * @param {string} name - * @throws {Error} - * @return {Promise} - */ - updateName: function(name) { - if(name === undefined) { - throw new Error('Missing required parameter: "name"'); - } - - let path = '/account/name'; - - let payload = {}; - - if(name) { - payload['name'] = name; - } - - return http - .patch(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Update Account Password - * - * Update currently logged in user password. For validation, user is required - * to pass the password twice. - * - * @param {string} password - * @param {string} oldPassword - * @throws {Error} - * @return {Promise} - */ - updatePassword: function(password, oldPassword) { - if(password === undefined) { - throw new Error('Missing required parameter: "password"'); - } - - if(oldPassword === undefined) { - throw new Error('Missing required parameter: "oldPassword"'); - } - - let path = '/account/password'; - - let payload = {}; - - if(password) { - payload['password'] = password; - } - - if(oldPassword) { - payload['oldPassword'] = oldPassword; - } - - return http - .patch(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Get Account Preferences - * - * Get currently logged in user preferences as a key-value object. - * - * @throws {Error} - * @return {Promise} - */ - getPrefs: function() { - let path = '/account/prefs'; - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Update Account Preferences - * - * Update currently logged in user account preferences. You can pass only the - * specific settings you wish to update. - * - * @param {object} prefs - * @throws {Error} - * @return {Promise} - */ - updatePrefs: function(prefs) { - if(prefs === undefined) { - throw new Error('Missing required parameter: "prefs"'); - } - - let path = '/account/prefs'; - - let payload = {}; - - if(prefs) { - payload['prefs'] = prefs; - } - - return http - .patch(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Create Password Recovery - * - * Sends the user an email with a temporary secret key for password reset. - * When the user clicks the confirmation link he is redirected back to your - * app password reset URL with the secret key and email address values - * attached to the URL query string. Use the query string params to submit a - * request to the [PUT /account/recovery](/docs/client/account#updateRecovery) - * endpoint to complete the process. - * - * @param {string} email - * @param {string} url - * @throws {Error} - * @return {Promise} - */ - createRecovery: function(email, url) { - if(email === undefined) { - throw new Error('Missing required parameter: "email"'); - } - - if(url === undefined) { - throw new Error('Missing required parameter: "url"'); - } - - let path = '/account/recovery'; - - let payload = {}; - - if(email) { - payload['email'] = email; - } - - if(url) { - payload['url'] = url; - } - - return http - .post(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Complete Password Recovery - * - * Use this endpoint to complete the user account password reset. Both the - * **userId** and **secret** arguments will be passed as query parameters to - * the redirect URL you have provided when sending your request to the [POST - * /account/recovery](/docs/client/account#createRecovery) endpoint. - * - * Please note that in order to avoid a [Redirect - * 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. - * - * @param {string} userId - * @param {string} secret - * @param {string} password - * @param {string} passwordAgain - * @throws {Error} - * @return {Promise} - */ - updateRecovery: function(userId, secret, password, passwordAgain) { - if(userId === undefined) { - throw new Error('Missing required parameter: "userId"'); - } - - if(secret === undefined) { - throw new Error('Missing required parameter: "secret"'); - } - - if(password === undefined) { - throw new Error('Missing required parameter: "password"'); - } - - if(passwordAgain === undefined) { - throw new Error('Missing required parameter: "passwordAgain"'); - } - - let path = '/account/recovery'; - - let payload = {}; - - if(userId) { - payload['userId'] = userId; - } - - if(secret) { - payload['secret'] = secret; - } - - if(password) { - payload['password'] = password; - } - - if(passwordAgain) { - payload['passwordAgain'] = passwordAgain; - } - - return http - .put(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Get Account Sessions - * - * Get currently logged in user list of active sessions across different - * devices. - * - * @throws {Error} - * @return {Promise} - */ - getSessions: function() { - let path = '/account/sessions'; - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Create Account Session - * - * Allow the user to login into his account by providing a valid email and - * password combination. This route will create a new session for the user. - * - * @param {string} email - * @param {string} password - * @throws {Error} - * @return {Promise} - */ - createSession: function(email, password) { - if(email === undefined) { - throw new Error('Missing required parameter: "email"'); - } - - if(password === undefined) { - throw new Error('Missing required parameter: "password"'); - } - - let path = '/account/sessions'; - - let payload = {}; - - if(email) { - payload['email'] = email; - } - - if(password) { - payload['password'] = password; - } - - return http - .post(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Delete All Account Sessions - * - * Delete all sessions from the user account and remove any sessions cookies - * from the end client. - * - * @throws {Error} - * @return {Promise} - */ - deleteSessions: function() { - let path = '/account/sessions'; - - let payload = {}; - - return http - .delete(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Create Account Session with OAuth2 - * - * Allow the user to login to his account using the OAuth2 provider of his - * choice. Each OAuth2 provider should be enabled from the Appwrite console - * first. Use the success and failure arguments to provide a redirect URL's - * back to your app when login is completed. - * - * @param {string} provider - * @param {string} success - * @param {string} failure - * @param {string[]} scopes - * @throws {Error} - * @return {Promise} - */ - createOAuth2Session: function(provider, success = 'https://appwrite.io/auth/oauth2/success', failure = 'https://appwrite.io/auth/oauth2/failure', scopes = []) { - if(provider === undefined) { - throw new Error('Missing required parameter: "provider"'); - } - - let path = '/account/sessions/oauth2/{provider}'.replace(new RegExp('{provider}', 'g'), provider); - - let payload = {}; - - if(success) { - payload['success'] = success; - } - - if(failure) { - payload['failure'] = failure; - } - - if(scopes) { - payload['scopes'] = scopes; - } - - payload['project'] = config.project; - - payload['key'] = config.key; - - - let query = []; - - for (let p in payload) { - if(Array.isArray(payload[p])) { - for (let index = 0; index < payload[p].length; index++) { - let param = payload[p][index]; - query.push(encodeURIComponent(p + '[]') + "=" + encodeURIComponent(param)); - } - } - else { - query.push(encodeURIComponent(p) + "=" + encodeURIComponent(payload[p])); - } - } - - query = query.join("&"); - - window.location = config.endpoint + path + ((query) ? '?' + query : ''); - }, - - /** - * Delete Account Session - * - * Use this endpoint to log out the currently logged in user from all his - * account sessions across all his different devices. When using the option id - * argument, only the session unique ID provider will be deleted. - * - * @param {string} sessionId - * @throws {Error} - * @return {Promise} - */ - deleteSession: function(sessionId) { - if(sessionId === undefined) { - throw new Error('Missing required parameter: "sessionId"'); - } - - let path = '/account/sessions/{sessionId}'.replace(new RegExp('{sessionId}', 'g'), sessionId); - - let payload = {}; - - return http - .delete(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Create Email Verification - * - * Use this endpoint to send a verification message to your user email address - * to confirm they are the valid owners of that address. Both the **userId** - * and **secret** arguments will be passed as query parameters to the URL you - * have provided to be attached to the verification email. The provided URL - * should redirect the user back to your app and allow you to complete the - * verification process by verifying both the **userId** and **secret** - * parameters. Learn more about how to [complete the verification - * process](/docs/client/account#updateAccountVerification). - * - * Please note that in order to avoid a [Redirect - * 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. - * - * - * @param {string} url - * @throws {Error} - * @return {Promise} - */ - createVerification: function(url) { - if(url === undefined) { - throw new Error('Missing required parameter: "url"'); - } - - let path = '/account/verification'; - - let payload = {}; - - if(url) { - payload['url'] = url; - } - - return http - .post(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Complete Email Verification - * - * 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. - * - * @param {string} userId - * @param {string} secret - * @throws {Error} - * @return {Promise} - */ - updateVerification: function(userId, secret) { - if(userId === undefined) { - throw new Error('Missing required parameter: "userId"'); - } - - if(secret === undefined) { - throw new Error('Missing required parameter: "secret"'); - } - - let path = '/account/verification'; - - let payload = {}; - - if(userId) { - payload['userId'] = userId; - } - - if(secret) { - payload['secret'] = secret; - } - - return http - .put(path, { - 'content-type': 'application/json', - }, payload); - } - }; - - let avatars = { - - /** - * Get Browser Icon - * - * You can use this endpoint to show different browser icons to your users. - * The code argument receives the browser code as it appears in your user - * /account/sessions endpoint. Use width, height and quality arguments to - * change the output settings. - * - * @param {string} code - * @param {number} width - * @param {number} height - * @param {number} quality - * @throws {Error} - * @return {string} - */ - getBrowser: function(code, width = 100, height = 100, quality = 100) { - if(code === undefined) { - throw new Error('Missing required parameter: "code"'); - } - - let path = '/avatars/browsers/{code}'.replace(new RegExp('{code}', 'g'), code); - - let payload = {}; - - if(width) { - payload['width'] = width; - } - - if(height) { - payload['height'] = height; - } - - if(quality) { - payload['quality'] = quality; - } - - payload['project'] = config.project; - - payload['key'] = config.key; - - - let query = []; - - for (let p in payload) { - if(Array.isArray(payload[p])) { - for (let index = 0; index < payload[p].length; index++) { - let param = payload[p][index]; - query.push(encodeURIComponent(p + '[]') + "=" + encodeURIComponent(param)); - } - } - else { - query.push(encodeURIComponent(p) + "=" + encodeURIComponent(payload[p])); - } - } - - query = query.join("&"); - - return config.endpoint + path + ((query) ? '?' + query : ''); - }, - - /** - * Get Credit Card Icon - * - * Need to display your users with your billing method or their payment - * methods? The credit card endpoint will return you the icon of the credit - * card provider you need. Use width, height and quality arguments to change - * the output settings. - * - * @param {string} code - * @param {number} width - * @param {number} height - * @param {number} quality - * @throws {Error} - * @return {string} - */ - getCreditCard: function(code, width = 100, height = 100, quality = 100) { - if(code === undefined) { - throw new Error('Missing required parameter: "code"'); - } - - let path = '/avatars/credit-cards/{code}'.replace(new RegExp('{code}', 'g'), code); - - let payload = {}; - - if(width) { - payload['width'] = width; - } - - if(height) { - payload['height'] = height; - } - - if(quality) { - payload['quality'] = quality; - } - - payload['project'] = config.project; - - payload['key'] = config.key; - - - let query = []; - - for (let p in payload) { - if(Array.isArray(payload[p])) { - for (let index = 0; index < payload[p].length; index++) { - let param = payload[p][index]; - query.push(encodeURIComponent(p + '[]') + "=" + encodeURIComponent(param)); - } - } - else { - query.push(encodeURIComponent(p) + "=" + encodeURIComponent(payload[p])); - } - } - - query = query.join("&"); - - return config.endpoint + path + ((query) ? '?' + query : ''); - }, - - /** - * Get Favicon - * - * Use this endpoint to fetch the favorite icon (AKA favicon) of a any remote - * website URL. - * - * @param {string} url - * @throws {Error} - * @return {string} - */ - getFavicon: function(url) { - if(url === undefined) { - throw new Error('Missing required parameter: "url"'); - } - - let path = '/avatars/favicon'; - - let payload = {}; - - if(url) { - payload['url'] = url; - } - - payload['project'] = config.project; - - payload['key'] = config.key; - - - let query = []; - - for (let p in payload) { - if(Array.isArray(payload[p])) { - for (let index = 0; index < payload[p].length; index++) { - let param = payload[p][index]; - query.push(encodeURIComponent(p + '[]') + "=" + encodeURIComponent(param)); - } - } - else { - query.push(encodeURIComponent(p) + "=" + encodeURIComponent(payload[p])); - } - } - - query = query.join("&"); - - return config.endpoint + path + ((query) ? '?' + query : ''); - }, - - /** - * Get Country Flag - * - * You can use this endpoint to show different country flags icons to your - * users. The code argument receives the 2 letter country code. Use width, - * height and quality arguments to change the output settings. - * - * @param {string} code - * @param {number} width - * @param {number} height - * @param {number} quality - * @throws {Error} - * @return {string} - */ - getFlag: function(code, width = 100, height = 100, quality = 100) { - if(code === undefined) { - throw new Error('Missing required parameter: "code"'); - } - - let path = '/avatars/flags/{code}'.replace(new RegExp('{code}', 'g'), code); - - let payload = {}; - - if(width) { - payload['width'] = width; - } - - if(height) { - payload['height'] = height; - } - - if(quality) { - payload['quality'] = quality; - } - - payload['project'] = config.project; - - payload['key'] = config.key; - - - let query = []; - - for (let p in payload) { - if(Array.isArray(payload[p])) { - for (let index = 0; index < payload[p].length; index++) { - let param = payload[p][index]; - query.push(encodeURIComponent(p + '[]') + "=" + encodeURIComponent(param)); - } - } - else { - query.push(encodeURIComponent(p) + "=" + encodeURIComponent(payload[p])); - } - } - - query = query.join("&"); - - return config.endpoint + path + ((query) ? '?' + query : ''); - }, - - /** - * Get Image from URL - * - * Use this endpoint to fetch a remote image URL and crop it to any image size - * you want. This endpoint is very useful if you need to crop and display - * remote images in your app or in case you want to make sure a 3rd party - * image is properly served using a TLS protocol. - * - * @param {string} url - * @param {number} width - * @param {number} height - * @throws {Error} - * @return {string} - */ - getImage: function(url, width = 400, height = 400) { - if(url === undefined) { - throw new Error('Missing required parameter: "url"'); - } - - let path = '/avatars/image'; - - let payload = {}; - - if(url) { - payload['url'] = url; - } - - if(width) { - payload['width'] = width; - } - - if(height) { - payload['height'] = height; - } - - payload['project'] = config.project; - - payload['key'] = config.key; - - - let query = []; - - for (let p in payload) { - if(Array.isArray(payload[p])) { - for (let index = 0; index < payload[p].length; index++) { - let param = payload[p][index]; - query.push(encodeURIComponent(p + '[]') + "=" + encodeURIComponent(param)); - } - } - else { - query.push(encodeURIComponent(p) + "=" + encodeURIComponent(payload[p])); - } - } - - query = query.join("&"); - - return config.endpoint + path + ((query) ? '?' + query : ''); - }, - - /** - * Get User Initials - * - * Use this endpoint to show your user initials avatar icon on your website or - * app. By default, this route will try to print your logged-in user name or - * email initials. You can also overwrite the user name if you pass the 'name' - * parameter. If no name is given and no user is logged, an empty avatar will - * be returned. - * - * You can use the color and background params to change the avatar colors. By - * default, a random theme will be selected. The random theme will persist for - * the user's initials when reloading the same theme will always return for - * the same initials. - * - * @param {string} name - * @param {number} width - * @param {number} height - * @param {string} color - * @param {string} background - * @throws {Error} - * @return {string} - */ - getInitials: function(name = '', width = 500, height = 500, color = '', background = '') { - let path = '/avatars/initials'; - - let payload = {}; - - if(name) { - payload['name'] = name; - } - - if(width) { - payload['width'] = width; - } - - if(height) { - payload['height'] = height; - } - - if(color) { - payload['color'] = color; - } - - if(background) { - payload['background'] = background; - } - - payload['project'] = config.project; - - payload['key'] = config.key; - - - let query = []; - - for (let p in payload) { - if(Array.isArray(payload[p])) { - for (let index = 0; index < payload[p].length; index++) { - let param = payload[p][index]; - query.push(encodeURIComponent(p + '[]') + "=" + encodeURIComponent(param)); - } - } - else { - query.push(encodeURIComponent(p) + "=" + encodeURIComponent(payload[p])); - } - } - - query = query.join("&"); - - return config.endpoint + path + ((query) ? '?' + query : ''); - }, - - /** - * 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. - * - * @param {string} text - * @param {number} size - * @param {number} margin - * @param {boolean} download - * @throws {Error} - * @return {string} - */ - getQR: function(text, size = 400, margin = 1, download = false) { - if(text === undefined) { - throw new Error('Missing required parameter: "text"'); - } - - let path = '/avatars/qr'; - - let payload = {}; - - if(text) { - payload['text'] = text; - } - - if(size) { - payload['size'] = size; - } - - if(margin) { - payload['margin'] = margin; - } - - if(download) { - payload['download'] = download; - } - - payload['project'] = config.project; - - payload['key'] = config.key; - - - let query = []; - - for (let p in payload) { - if(Array.isArray(payload[p])) { - for (let index = 0; index < payload[p].length; index++) { - let param = payload[p][index]; - query.push(encodeURIComponent(p + '[]') + "=" + encodeURIComponent(param)); - } - } - else { - query.push(encodeURIComponent(p) + "=" + encodeURIComponent(payload[p])); - } - } - - query = query.join("&"); - - return config.endpoint + path + ((query) ? '?' + query : ''); - } - }; - - let database = { - - /** - * List Collections - * - * Get a list of all the user collections. You can use the query params to - * filter your results. On admin mode, this endpoint will return a list of all - * of the project collections. [Learn more about different API - * modes](/docs/admin). - * - * @param {string} search - * @param {number} limit - * @param {number} offset - * @param {string} orderType - * @throws {Error} - * @return {Promise} - */ - listCollections: function(search = '', limit = 25, offset = 0, orderType = 'ASC') { - let path = '/database/collections'; - - let payload = {}; - - if(search) { - payload['search'] = search; - } - - if(limit) { - payload['limit'] = limit; - } - - if(offset) { - payload['offset'] = offset; - } - - if(orderType) { - payload['orderType'] = orderType; - } - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Create Collection - * - * Create a new Collection. - * - * @param {string} name - * @param {string[]} read - * @param {string[]} write - * @param {string[]} rules - * @throws {Error} - * @return {Promise} - */ - createCollection: function(name, read, write, rules) { - if(name === undefined) { - throw new Error('Missing required parameter: "name"'); - } - - if(read === undefined) { - throw new Error('Missing required parameter: "read"'); - } - - if(write === undefined) { - throw new Error('Missing required parameter: "write"'); - } - - if(rules === undefined) { - throw new Error('Missing required parameter: "rules"'); - } - - let path = '/database/collections'; - - let payload = {}; - - if(name) { - payload['name'] = name; - } - - if(read) { - payload['read'] = read; - } - - if(write) { - payload['write'] = write; - } - - if(rules) { - payload['rules'] = rules; - } - - return http - .post(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Get Collection - * - * Get collection by its unique ID. This endpoint response returns a JSON - * object with the collection metadata. - * - * @param {string} collectionId - * @throws {Error} - * @return {Promise} - */ - getCollection: function(collectionId) { - if(collectionId === undefined) { - throw new Error('Missing required parameter: "collectionId"'); - } - - let path = '/database/collections/{collectionId}'.replace(new RegExp('{collectionId}', 'g'), collectionId); - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Update Collection - * - * Update collection by its unique ID. - * - * @param {string} collectionId - * @param {string} name - * @param {string[]} read - * @param {string[]} write - * @param {string[]} rules - * @throws {Error} - * @return {Promise} - */ - updateCollection: function(collectionId, name, read, write, rules = []) { - if(collectionId === undefined) { - throw new Error('Missing required parameter: "collectionId"'); - } - - if(name === undefined) { - throw new Error('Missing required parameter: "name"'); - } - - if(read === undefined) { - throw new Error('Missing required parameter: "read"'); - } - - if(write === undefined) { - throw new Error('Missing required parameter: "write"'); - } - - let path = '/database/collections/{collectionId}'.replace(new RegExp('{collectionId}', 'g'), collectionId); - - let payload = {}; - - if(name) { - payload['name'] = name; - } - - if(read) { - payload['read'] = read; - } - - if(write) { - payload['write'] = write; - } - - if(rules) { - payload['rules'] = rules; - } - - return http - .put(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Delete Collection - * - * Delete a collection by its unique ID. Only users with write permissions - * have access to delete this resource. - * - * @param {string} collectionId - * @throws {Error} - * @return {Promise} - */ - deleteCollection: function(collectionId) { - if(collectionId === undefined) { - throw new Error('Missing required parameter: "collectionId"'); - } - - let path = '/database/collections/{collectionId}'.replace(new RegExp('{collectionId}', 'g'), collectionId); - - let payload = {}; - - return http - .delete(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * List Documents - * - * Get a list of all the user documents. You can use the query params to - * filter your results. On admin mode, this endpoint will return a list of all - * of the project documents. [Learn more about different API - * modes](/docs/admin). - * - * @param {string} collectionId - * @param {string[]} filters - * @param {number} limit - * @param {number} offset - * @param {string} orderField - * @param {string} orderType - * @param {string} orderCast - * @param {string} search - * @throws {Error} - * @return {Promise} - */ - listDocuments: function(collectionId, filters = [], limit = 25, offset = 0, orderField = '$id', orderType = 'ASC', orderCast = 'string', search = '') { - if(collectionId === undefined) { - throw new Error('Missing required parameter: "collectionId"'); - } - - let path = '/database/collections/{collectionId}/documents'.replace(new RegExp('{collectionId}', 'g'), collectionId); - - let payload = {}; - - if(filters) { - payload['filters'] = filters; - } - - if(limit) { - payload['limit'] = limit; - } - - if(offset) { - payload['offset'] = offset; - } - - if(orderField) { - payload['orderField'] = orderField; - } - - if(orderType) { - payload['orderType'] = orderType; - } - - if(orderCast) { - payload['orderCast'] = orderCast; - } - - if(search) { - payload['search'] = search; - } - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Create Document - * - * Create a new Document. Before using this route, you should create a new - * collection resource using either a [server - * integration](/docs/server/database?sdk=nodejs#createCollection) API or - * directly from your database console. - * - * @param {string} collectionId - * @param {object} data - * @param {string[]} read - * @param {string[]} write - * @param {string} parentDocument - * @param {string} parentProperty - * @param {string} parentPropertyType - * @throws {Error} - * @return {Promise} - */ - createDocument: function(collectionId, data, read, write, parentDocument = '', parentProperty = '', parentPropertyType = 'assign') { - if(collectionId === undefined) { - throw new Error('Missing required parameter: "collectionId"'); - } - - if(data === undefined) { - throw new Error('Missing required parameter: "data"'); - } - - if(read === undefined) { - throw new Error('Missing required parameter: "read"'); - } - - if(write === undefined) { - throw new Error('Missing required parameter: "write"'); - } - - let path = '/database/collections/{collectionId}/documents'.replace(new RegExp('{collectionId}', 'g'), collectionId); - - let payload = {}; - - if(data) { - payload['data'] = data; - } - - if(read) { - payload['read'] = read; - } - - if(write) { - payload['write'] = write; - } - - if(parentDocument) { - payload['parentDocument'] = parentDocument; - } - - if(parentProperty) { - payload['parentProperty'] = parentProperty; - } - - if(parentPropertyType) { - payload['parentPropertyType'] = parentPropertyType; - } - - return http - .post(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Get Document - * - * Get document by its unique ID. This endpoint response returns a JSON object - * with the document data. - * - * @param {string} collectionId - * @param {string} documentId - * @throws {Error} - * @return {Promise} - */ - getDocument: function(collectionId, documentId) { - if(collectionId === undefined) { - throw new Error('Missing required parameter: "collectionId"'); - } - - if(documentId === undefined) { - throw new Error('Missing required parameter: "documentId"'); - } - - let path = '/database/collections/{collectionId}/documents/{documentId}'.replace(new RegExp('{collectionId}', 'g'), collectionId).replace(new RegExp('{documentId}', 'g'), documentId); - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Update Document - * - * - * @param {string} collectionId - * @param {string} documentId - * @param {object} data - * @param {string[]} read - * @param {string[]} write - * @throws {Error} - * @return {Promise} - */ - updateDocument: function(collectionId, documentId, data, read, write) { - if(collectionId === undefined) { - throw new Error('Missing required parameter: "collectionId"'); - } - - if(documentId === undefined) { - throw new Error('Missing required parameter: "documentId"'); - } - - if(data === undefined) { - throw new Error('Missing required parameter: "data"'); - } - - if(read === undefined) { - throw new Error('Missing required parameter: "read"'); - } - - if(write === undefined) { - throw new Error('Missing required parameter: "write"'); - } - - let path = '/database/collections/{collectionId}/documents/{documentId}'.replace(new RegExp('{collectionId}', 'g'), collectionId).replace(new RegExp('{documentId}', 'g'), documentId); - - let payload = {}; - - if(data) { - payload['data'] = data; - } - - if(read) { - payload['read'] = read; - } - - if(write) { - payload['write'] = write; - } - - return http - .patch(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Delete Document - * - * Delete document by its unique ID. This endpoint deletes only the parent - * documents, his attributes and relations to other documents. Child documents - * **will not** be deleted. - * - * @param {string} collectionId - * @param {string} documentId - * @throws {Error} - * @return {Promise} - */ - deleteDocument: function(collectionId, documentId) { - if(collectionId === undefined) { - throw new Error('Missing required parameter: "collectionId"'); - } - - if(documentId === undefined) { - throw new Error('Missing required parameter: "documentId"'); - } - - let path = '/database/collections/{collectionId}/documents/{documentId}'.replace(new RegExp('{collectionId}', 'g'), collectionId).replace(new RegExp('{documentId}', 'g'), documentId); - - let payload = {}; - - return http - .delete(path, { - 'content-type': 'application/json', - }, payload); - } - }; - - let functions = { - - /** - * List Functions - * - * - * @param {string} search - * @param {number} limit - * @param {number} offset - * @param {string} orderType - * @throws {Error} - * @return {Promise} - */ - list: function(search = '', limit = 25, offset = 0, orderType = 'ASC') { - let path = '/functions'; - - let payload = {}; - - if(search) { - payload['search'] = search; - } - - if(limit) { - payload['limit'] = limit; - } - - if(offset) { - payload['offset'] = offset; - } - - if(orderType) { - payload['orderType'] = orderType; - } - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Create Function - * - * - * @param {string} name - * @param {string} env - * @param {object} vars - * @param {string[]} events - * @param {string} schedule - * @param {number} timeout - * @throws {Error} - * @return {Promise} - */ - create: function(name, env, vars = [], events = [], schedule = '', timeout = 15) { - if(name === undefined) { - throw new Error('Missing required parameter: "name"'); - } - - if(env === undefined) { - throw new Error('Missing required parameter: "env"'); - } - - let path = '/functions'; - - let payload = {}; - - if(name) { - payload['name'] = name; - } - - if(env) { - payload['env'] = env; - } - - if(vars) { - payload['vars'] = vars; - } - - if(events) { - payload['events'] = events; - } - - if(schedule) { - payload['schedule'] = schedule; - } - - if(timeout) { - payload['timeout'] = timeout; - } - - return http - .post(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Get Function - * - * - * @param {string} functionId - * @throws {Error} - * @return {Promise} - */ - get: function(functionId) { - if(functionId === undefined) { - throw new Error('Missing required parameter: "functionId"'); - } - - let path = '/functions/{functionId}'.replace(new RegExp('{functionId}', 'g'), functionId); - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Update Function - * - * - * @param {string} functionId - * @param {string} name - * @param {object} vars - * @param {string[]} events - * @param {string} schedule - * @param {number} timeout - * @throws {Error} - * @return {Promise} - */ - update: function(functionId, name, vars = [], events = [], schedule = '', timeout = 15) { - if(functionId === undefined) { - throw new Error('Missing required parameter: "functionId"'); - } - - if(name === undefined) { - throw new Error('Missing required parameter: "name"'); - } - - let path = '/functions/{functionId}'.replace(new RegExp('{functionId}', 'g'), functionId); - - let payload = {}; - - if(name) { - payload['name'] = name; - } - - if(vars) { - payload['vars'] = vars; - } - - if(events) { - payload['events'] = events; - } - - if(schedule) { - payload['schedule'] = schedule; - } - - if(timeout) { - payload['timeout'] = timeout; - } - - return http - .put(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Delete Function - * - * - * @param {string} functionId - * @throws {Error} - * @return {Promise} - */ - delete: function(functionId) { - if(functionId === undefined) { - throw new Error('Missing required parameter: "functionId"'); - } - - let path = '/functions/{functionId}'.replace(new RegExp('{functionId}', 'g'), functionId); - - let payload = {}; - - return http - .delete(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * List Executions - * - * - * @param {string} functionId - * @param {string} search - * @param {number} limit - * @param {number} offset - * @param {string} orderType - * @throws {Error} - * @return {Promise} - */ - listExecutions: function(functionId, search = '', limit = 25, offset = 0, orderType = 'ASC') { - if(functionId === undefined) { - throw new Error('Missing required parameter: "functionId"'); - } - - let path = '/functions/{functionId}/executions'.replace(new RegExp('{functionId}', 'g'), functionId); - - let payload = {}; - - if(search) { - payload['search'] = search; - } - - if(limit) { - payload['limit'] = limit; - } - - if(offset) { - payload['offset'] = offset; - } - - if(orderType) { - payload['orderType'] = orderType; - } - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Create Execution - * - * - * @param {string} functionId - * @param {number} async - * @throws {Error} - * @return {Promise} - */ - createExecution: function(functionId, async = 1) { - if(functionId === undefined) { - throw new Error('Missing required parameter: "functionId"'); - } - - let path = '/functions/{functionId}/executions'.replace(new RegExp('{functionId}', 'g'), functionId); - - let payload = {}; - - if(async) { - payload['async'] = async; - } - - return http - .post(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Get Execution - * - * - * @param {string} functionId - * @param {string} executionId - * @throws {Error} - * @return {Promise} - */ - getExecution: function(functionId, executionId) { - if(functionId === undefined) { - throw new Error('Missing required parameter: "functionId"'); - } - - if(executionId === undefined) { - throw new Error('Missing required parameter: "executionId"'); - } - - let path = '/functions/{functionId}/executions/{executionId}'.replace(new RegExp('{functionId}', 'g'), functionId).replace(new RegExp('{executionId}', 'g'), executionId); - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Update Function Tag - * - * - * @param {string} functionId - * @param {string} tag - * @throws {Error} - * @return {Promise} - */ - updateTag: function(functionId, tag) { - if(functionId === undefined) { - throw new Error('Missing required parameter: "functionId"'); - } - - if(tag === undefined) { - throw new Error('Missing required parameter: "tag"'); - } - - let path = '/functions/{functionId}/tag'.replace(new RegExp('{functionId}', 'g'), functionId); - - let payload = {}; - - if(tag) { - payload['tag'] = tag; - } - - return http - .patch(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * List Tags - * - * - * @param {string} functionId - * @param {string} search - * @param {number} limit - * @param {number} offset - * @param {string} orderType - * @throws {Error} - * @return {Promise} - */ - listTags: function(functionId, search = '', limit = 25, offset = 0, orderType = 'ASC') { - if(functionId === undefined) { - throw new Error('Missing required parameter: "functionId"'); - } - - let path = '/functions/{functionId}/tags'.replace(new RegExp('{functionId}', 'g'), functionId); - - let payload = {}; - - if(search) { - payload['search'] = search; - } - - if(limit) { - payload['limit'] = limit; - } - - if(offset) { - payload['offset'] = offset; - } - - if(orderType) { - payload['orderType'] = orderType; - } - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Create Tag - * - * - * @param {string} functionId - * @param {string} command - * @param {File} code - * @throws {Error} - * @return {Promise} - */ - createTag: function(functionId, command, code) { - if(functionId === undefined) { - throw new Error('Missing required parameter: "functionId"'); - } - - if(command === undefined) { - throw new Error('Missing required parameter: "command"'); - } - - if(code === undefined) { - throw new Error('Missing required parameter: "code"'); - } - - let path = '/functions/{functionId}/tags'.replace(new RegExp('{functionId}', 'g'), functionId); - - let payload = {}; - - if(command) { - payload['command'] = command; - } - - if(code) { - payload['code'] = code; - } - - return http - .post(path, { - 'content-type': 'multipart/form-data', - }, payload); - }, - - /** - * Get Tag - * - * - * @param {string} functionId - * @param {string} tagId - * @throws {Error} - * @return {Promise} - */ - getTag: function(functionId, tagId) { - if(functionId === undefined) { - throw new Error('Missing required parameter: "functionId"'); - } - - if(tagId === undefined) { - throw new Error('Missing required parameter: "tagId"'); - } - - let path = '/functions/{functionId}/tags/{tagId}'.replace(new RegExp('{functionId}', 'g'), functionId).replace(new RegExp('{tagId}', 'g'), tagId); - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Delete Tag - * - * - * @param {string} functionId - * @param {string} tagId - * @throws {Error} - * @return {Promise} - */ - deleteTag: function(functionId, tagId) { - if(functionId === undefined) { - throw new Error('Missing required parameter: "functionId"'); - } - - if(tagId === undefined) { - throw new Error('Missing required parameter: "tagId"'); - } - - let path = '/functions/{functionId}/tags/{tagId}'.replace(new RegExp('{functionId}', 'g'), functionId).replace(new RegExp('{tagId}', 'g'), tagId); - - let payload = {}; - - return http - .delete(path, { - 'content-type': 'application/json', - }, payload); - } - }; - - let health = { - - /** - * Get HTTP - * - * Check the Appwrite HTTP server is up and responsive. - * - * @throws {Error} - * @return {Promise} - */ - get: function() { - let path = '/health'; - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Get Anti virus - * - * Check the Appwrite Anti Virus server is up and connection is successful. - * - * @throws {Error} - * @return {Promise} - */ - getAntiVirus: function() { - let path = '/health/anti-virus'; - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Get Cache - * - * Check the Appwrite in-memory cache server is up and connection is - * successful. - * - * @throws {Error} - * @return {Promise} - */ - getCache: function() { - let path = '/health/cache'; - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Get DB - * - * Check the Appwrite database server is up and connection is successful. - * - * @throws {Error} - * @return {Promise} - */ - getDB: function() { - let path = '/health/db'; - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Get Certificate Queue - * - * Get the number of certificates that are waiting to be issued against - * [Letsencrypt](https://letsencrypt.org/) in the Appwrite internal queue - * server. - * - * @throws {Error} - * @return {Promise} - */ - getQueueCertificates: function() { - let path = '/health/queue/certificates'; - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Get Functions Queue - * - * - * @throws {Error} - * @return {Promise} - */ - getQueueFunctions: function() { - let path = '/health/queue/functions'; - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Get Logs Queue - * - * Get the number of logs that are waiting to be processed in the Appwrite - * internal queue server. - * - * @throws {Error} - * @return {Promise} - */ - getQueueLogs: function() { - let path = '/health/queue/logs'; - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Get Tasks Queue - * - * Get the number of tasks that are waiting to be processed in the Appwrite - * internal queue server. - * - * @throws {Error} - * @return {Promise} - */ - getQueueTasks: function() { - let path = '/health/queue/tasks'; - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Get Usage Queue - * - * Get the number of usage stats that are waiting to be processed in the - * Appwrite internal queue server. - * - * @throws {Error} - * @return {Promise} - */ - getQueueUsage: function() { - let path = '/health/queue/usage'; - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Get Webhooks Queue - * - * Get the number of webhooks that are waiting to be processed in the Appwrite - * internal queue server. - * - * @throws {Error} - * @return {Promise} - */ - getQueueWebhooks: function() { - let path = '/health/queue/webhooks'; - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Get Local Storage - * - * Check the Appwrite local storage device is up and connection is successful. - * - * @throws {Error} - * @return {Promise} - */ - getStorageLocal: function() { - let path = '/health/storage/local'; - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Get Time - * - * Check the Appwrite server time is synced with Google remote NTP server. We - * use this technology to smoothly handle leap seconds with no disruptive - * events. The [Network Time - * Protocol](https://en.wikipedia.org/wiki/Network_Time_Protocol) (NTP) is - * 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. - * - * @throws {Error} - * @return {Promise} - */ - getTime: function() { - let path = '/health/time'; - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - } - }; - - let locale = { - - /** - * Get User Locale - * - * Get the current user location based on IP. Returns an object with user - * country code, country name, continent name, continent code, ip address and - * suggested currency. You can use the locale header to get the data in a - * supported language. - * - * ([IP Geolocation by DB-IP](https://db-ip.com)) - * - * @throws {Error} - * @return {Promise} - */ - get: function() { - let path = '/locale'; - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * List Continents - * - * List of all continents. You can use the locale header to get the data in a - * supported language. - * - * @throws {Error} - * @return {Promise} - */ - getContinents: function() { - let path = '/locale/continents'; - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * List Countries - * - * List of all countries. You can use the locale header to get the data in a - * supported language. - * - * @throws {Error} - * @return {Promise} - */ - getCountries: function() { - let path = '/locale/countries'; - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * 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. - * - * @throws {Error} - * @return {Promise} - */ - getCountriesEU: function() { - let path = '/locale/countries/eu'; - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * List Countries Phone Codes - * - * List of all countries phone codes. You can use the locale header to get the - * data in a supported language. - * - * @throws {Error} - * @return {Promise} - */ - getCountriesPhones: function() { - let path = '/locale/countries/phones'; - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * 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. - * - * @throws {Error} - * @return {Promise} - */ - getCurrencies: function() { - let path = '/locale/currencies'; - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * List Languages - * - * List of all languages classified by ISO 639-1 including 2-letter code, name - * in English, and name in the respective language. - * - * @throws {Error} - * @return {Promise} - */ - getLanguages: function() { - let path = '/locale/languages'; - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - } - }; - - let projects = { - - /** - * List Projects - * - * - * @param {string} search - * @param {number} limit - * @param {number} offset - * @param {string} orderType - * @throws {Error} - * @return {Promise} - */ - list: function(search = '', limit = 25, offset = 0, orderType = 'ASC') { - let path = '/projects'; - - let payload = {}; - - if(search) { - payload['search'] = search; - } - - if(limit) { - payload['limit'] = limit; - } - - if(offset) { - payload['offset'] = offset; - } - - if(orderType) { - payload['orderType'] = orderType; - } - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Create Project - * - * - * @param {string} name - * @param {string} teamId - * @param {string} description - * @param {string} logo - * @param {string} url - * @param {string} legalName - * @param {string} legalCountry - * @param {string} legalState - * @param {string} legalCity - * @param {string} legalAddress - * @param {string} legalTaxId - * @throws {Error} - * @return {Promise} - */ - create: function(name, teamId, description = '', logo = '', url = '', legalName = '', legalCountry = '', legalState = '', legalCity = '', legalAddress = '', legalTaxId = '') { - if(name === undefined) { - throw new Error('Missing required parameter: "name"'); - } - - if(teamId === undefined) { - throw new Error('Missing required parameter: "teamId"'); - } - - let path = '/projects'; - - let payload = {}; - - if(name) { - payload['name'] = name; - } - - if(teamId) { - payload['teamId'] = teamId; - } - - if(description) { - payload['description'] = description; - } - - if(logo) { - payload['logo'] = logo; - } - - if(url) { - payload['url'] = url; - } - - if(legalName) { - payload['legalName'] = legalName; - } - - if(legalCountry) { - payload['legalCountry'] = legalCountry; - } - - if(legalState) { - payload['legalState'] = legalState; - } - - if(legalCity) { - payload['legalCity'] = legalCity; - } - - if(legalAddress) { - payload['legalAddress'] = legalAddress; - } - - if(legalTaxId) { - payload['legalTaxId'] = legalTaxId; - } - - return http - .post(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Get Project - * - * - * @param {string} projectId - * @throws {Error} - * @return {Promise} - */ - get: function(projectId) { - if(projectId === undefined) { - throw new Error('Missing required parameter: "projectId"'); - } - - let path = '/projects/{projectId}'.replace(new RegExp('{projectId}', 'g'), projectId); - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Update Project - * - * - * @param {string} projectId - * @param {string} name - * @param {string} description - * @param {string} logo - * @param {string} url - * @param {string} legalName - * @param {string} legalCountry - * @param {string} legalState - * @param {string} legalCity - * @param {string} legalAddress - * @param {string} legalTaxId - * @throws {Error} - * @return {Promise} - */ - update: function(projectId, name, description = '', logo = '', url = '', legalName = '', legalCountry = '', legalState = '', legalCity = '', legalAddress = '', legalTaxId = '') { - if(projectId === undefined) { - throw new Error('Missing required parameter: "projectId"'); - } - - if(name === undefined) { - throw new Error('Missing required parameter: "name"'); - } - - let path = '/projects/{projectId}'.replace(new RegExp('{projectId}', 'g'), projectId); - - let payload = {}; - - if(name) { - payload['name'] = name; - } - - if(description) { - payload['description'] = description; - } - - if(logo) { - payload['logo'] = logo; - } - - if(url) { - payload['url'] = url; - } - - if(legalName) { - payload['legalName'] = legalName; - } - - if(legalCountry) { - payload['legalCountry'] = legalCountry; - } - - if(legalState) { - payload['legalState'] = legalState; - } - - if(legalCity) { - payload['legalCity'] = legalCity; - } - - if(legalAddress) { - payload['legalAddress'] = legalAddress; - } - - if(legalTaxId) { - payload['legalTaxId'] = legalTaxId; - } - - return http - .patch(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Delete Project - * - * - * @param {string} projectId - * @param {string} password - * @throws {Error} - * @return {Promise} - */ - delete: function(projectId, password) { - if(projectId === undefined) { - throw new Error('Missing required parameter: "projectId"'); - } - - if(password === undefined) { - throw new Error('Missing required parameter: "password"'); - } - - let path = '/projects/{projectId}'.replace(new RegExp('{projectId}', 'g'), projectId); - - let payload = {}; - - if(password) { - payload['password'] = password; - } - - return http - .delete(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * List Domains - * - * - * @param {string} projectId - * @throws {Error} - * @return {Promise} - */ - listDomains: function(projectId) { - if(projectId === undefined) { - throw new Error('Missing required parameter: "projectId"'); - } - - let path = '/projects/{projectId}/domains'.replace(new RegExp('{projectId}', 'g'), projectId); - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Create Domain - * - * - * @param {string} projectId - * @param {string} domain - * @throws {Error} - * @return {Promise} - */ - createDomain: function(projectId, domain) { - if(projectId === undefined) { - throw new Error('Missing required parameter: "projectId"'); - } - - if(domain === undefined) { - throw new Error('Missing required parameter: "domain"'); - } - - let path = '/projects/{projectId}/domains'.replace(new RegExp('{projectId}', 'g'), projectId); - - let payload = {}; - - if(domain) { - payload['domain'] = domain; - } - - return http - .post(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Get Domain - * - * - * @param {string} projectId - * @param {string} domainId - * @throws {Error} - * @return {Promise} - */ - getDomain: function(projectId, domainId) { - if(projectId === undefined) { - throw new Error('Missing required parameter: "projectId"'); - } - - if(domainId === undefined) { - throw new Error('Missing required parameter: "domainId"'); - } - - let path = '/projects/{projectId}/domains/{domainId}'.replace(new RegExp('{projectId}', 'g'), projectId).replace(new RegExp('{domainId}', 'g'), domainId); - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Delete Domain - * - * - * @param {string} projectId - * @param {string} domainId - * @throws {Error} - * @return {Promise} - */ - deleteDomain: function(projectId, domainId) { - if(projectId === undefined) { - throw new Error('Missing required parameter: "projectId"'); - } - - if(domainId === undefined) { - throw new Error('Missing required parameter: "domainId"'); - } - - let path = '/projects/{projectId}/domains/{domainId}'.replace(new RegExp('{projectId}', 'g'), projectId).replace(new RegExp('{domainId}', 'g'), domainId); - - let payload = {}; - - return http - .delete(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Update Domain Verification Status - * - * - * @param {string} projectId - * @param {string} domainId - * @throws {Error} - * @return {Promise} - */ - updateDomainVerification: function(projectId, domainId) { - if(projectId === undefined) { - throw new Error('Missing required parameter: "projectId"'); - } - - if(domainId === undefined) { - throw new Error('Missing required parameter: "domainId"'); - } - - let path = '/projects/{projectId}/domains/{domainId}/verification'.replace(new RegExp('{projectId}', 'g'), projectId).replace(new RegExp('{domainId}', 'g'), domainId); - - let payload = {}; - - return http - .patch(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * List Keys - * - * - * @param {string} projectId - * @throws {Error} - * @return {Promise} - */ - listKeys: function(projectId) { - if(projectId === undefined) { - throw new Error('Missing required parameter: "projectId"'); - } - - let path = '/projects/{projectId}/keys'.replace(new RegExp('{projectId}', 'g'), projectId); - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Create Key - * - * - * @param {string} projectId - * @param {string} name - * @param {string[]} scopes - * @throws {Error} - * @return {Promise} - */ - createKey: function(projectId, name, scopes) { - if(projectId === undefined) { - throw new Error('Missing required parameter: "projectId"'); - } - - if(name === undefined) { - throw new Error('Missing required parameter: "name"'); - } - - if(scopes === undefined) { - throw new Error('Missing required parameter: "scopes"'); - } - - let path = '/projects/{projectId}/keys'.replace(new RegExp('{projectId}', 'g'), projectId); - - let payload = {}; - - if(name) { - payload['name'] = name; - } - - if(scopes) { - payload['scopes'] = scopes; - } - - return http - .post(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Get Key - * - * - * @param {string} projectId - * @param {string} keyId - * @throws {Error} - * @return {Promise} - */ - getKey: function(projectId, keyId) { - if(projectId === undefined) { - throw new Error('Missing required parameter: "projectId"'); - } - - if(keyId === undefined) { - throw new Error('Missing required parameter: "keyId"'); - } - - let path = '/projects/{projectId}/keys/{keyId}'.replace(new RegExp('{projectId}', 'g'), projectId).replace(new RegExp('{keyId}', 'g'), keyId); - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Update Key - * - * - * @param {string} projectId - * @param {string} keyId - * @param {string} name - * @param {string[]} scopes - * @throws {Error} - * @return {Promise} - */ - updateKey: function(projectId, keyId, name, scopes) { - if(projectId === undefined) { - throw new Error('Missing required parameter: "projectId"'); - } - - if(keyId === undefined) { - throw new Error('Missing required parameter: "keyId"'); - } - - if(name === undefined) { - throw new Error('Missing required parameter: "name"'); - } - - if(scopes === undefined) { - throw new Error('Missing required parameter: "scopes"'); - } - - let path = '/projects/{projectId}/keys/{keyId}'.replace(new RegExp('{projectId}', 'g'), projectId).replace(new RegExp('{keyId}', 'g'), keyId); - - let payload = {}; - - if(name) { - payload['name'] = name; - } - - if(scopes) { - payload['scopes'] = scopes; - } - - return http - .put(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Delete Key - * - * - * @param {string} projectId - * @param {string} keyId - * @throws {Error} - * @return {Promise} - */ - deleteKey: function(projectId, keyId) { - if(projectId === undefined) { - throw new Error('Missing required parameter: "projectId"'); - } - - if(keyId === undefined) { - throw new Error('Missing required parameter: "keyId"'); - } - - let path = '/projects/{projectId}/keys/{keyId}'.replace(new RegExp('{projectId}', 'g'), projectId).replace(new RegExp('{keyId}', 'g'), keyId); - - let payload = {}; - - return http - .delete(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Update Project OAuth2 - * - * - * @param {string} projectId - * @param {string} provider - * @param {string} appId - * @param {string} secret - * @throws {Error} - * @return {Promise} - */ - updateOAuth2: function(projectId, provider, appId = '', secret = '') { - if(projectId === undefined) { - throw new Error('Missing required parameter: "projectId"'); - } - - if(provider === undefined) { - throw new Error('Missing required parameter: "provider"'); - } - - let path = '/projects/{projectId}/oauth2'.replace(new RegExp('{projectId}', 'g'), projectId); - - let payload = {}; - - if(provider) { - payload['provider'] = provider; - } - - if(appId) { - payload['appId'] = appId; - } - - if(secret) { - payload['secret'] = secret; - } - - return http - .patch(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * List Platforms - * - * - * @param {string} projectId - * @throws {Error} - * @return {Promise} - */ - listPlatforms: function(projectId) { - if(projectId === undefined) { - throw new Error('Missing required parameter: "projectId"'); - } - - let path = '/projects/{projectId}/platforms'.replace(new RegExp('{projectId}', 'g'), projectId); - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Create Platform - * - * - * @param {string} projectId - * @param {string} type - * @param {string} name - * @param {string} key - * @param {string} store - * @param {string} hostname - * @throws {Error} - * @return {Promise} - */ - createPlatform: function(projectId, type, name, key = '', store = '', hostname = '') { - if(projectId === undefined) { - throw new Error('Missing required parameter: "projectId"'); - } - - if(type === undefined) { - throw new Error('Missing required parameter: "type"'); - } - - if(name === undefined) { - throw new Error('Missing required parameter: "name"'); - } - - let path = '/projects/{projectId}/platforms'.replace(new RegExp('{projectId}', 'g'), projectId); - - let payload = {}; - - if(type) { - payload['type'] = type; - } - - if(name) { - payload['name'] = name; - } - - if(key) { - payload['key'] = key; - } - - if(store) { - payload['store'] = store; - } - - if(hostname) { - payload['hostname'] = hostname; - } - - return http - .post(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Get Platform - * - * - * @param {string} projectId - * @param {string} platformId - * @throws {Error} - * @return {Promise} - */ - getPlatform: function(projectId, platformId) { - if(projectId === undefined) { - throw new Error('Missing required parameter: "projectId"'); - } - - if(platformId === undefined) { - throw new Error('Missing required parameter: "platformId"'); - } - - let path = '/projects/{projectId}/platforms/{platformId}'.replace(new RegExp('{projectId}', 'g'), projectId).replace(new RegExp('{platformId}', 'g'), platformId); - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Update Platform - * - * - * @param {string} projectId - * @param {string} platformId - * @param {string} name - * @param {string} key - * @param {string} store - * @param {string} hostname - * @throws {Error} - * @return {Promise} - */ - updatePlatform: function(projectId, platformId, name, key = '', store = '', hostname = '') { - if(projectId === undefined) { - throw new Error('Missing required parameter: "projectId"'); - } - - if(platformId === undefined) { - throw new Error('Missing required parameter: "platformId"'); - } - - if(name === undefined) { - throw new Error('Missing required parameter: "name"'); - } - - let path = '/projects/{projectId}/platforms/{platformId}'.replace(new RegExp('{projectId}', 'g'), projectId).replace(new RegExp('{platformId}', 'g'), platformId); - - let payload = {}; - - if(name) { - payload['name'] = name; - } - - if(key) { - payload['key'] = key; - } - - if(store) { - payload['store'] = store; - } - - if(hostname) { - payload['hostname'] = hostname; - } - - return http - .put(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Delete Platform - * - * - * @param {string} projectId - * @param {string} platformId - * @throws {Error} - * @return {Promise} - */ - deletePlatform: function(projectId, platformId) { - if(projectId === undefined) { - throw new Error('Missing required parameter: "projectId"'); - } - - if(platformId === undefined) { - throw new Error('Missing required parameter: "platformId"'); - } - - let path = '/projects/{projectId}/platforms/{platformId}'.replace(new RegExp('{projectId}', 'g'), projectId).replace(new RegExp('{platformId}', 'g'), platformId); - - let payload = {}; - - return http - .delete(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * List Tasks - * - * - * @param {string} projectId - * @throws {Error} - * @return {Promise} - */ - listTasks: function(projectId) { - if(projectId === undefined) { - throw new Error('Missing required parameter: "projectId"'); - } - - let path = '/projects/{projectId}/tasks'.replace(new RegExp('{projectId}', 'g'), projectId); - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Create Task - * - * - * @param {string} projectId - * @param {string} name - * @param {string} status - * @param {string} schedule - * @param {boolean} security - * @param {string} httpMethod - * @param {string} httpUrl - * @param {string[]} httpHeaders - * @param {string} httpUser - * @param {string} httpPass - * @throws {Error} - * @return {Promise} - */ - createTask: function(projectId, name, status, schedule, security, httpMethod, httpUrl, httpHeaders = [], httpUser = '', httpPass = '') { - if(projectId === undefined) { - throw new Error('Missing required parameter: "projectId"'); - } - - if(name === undefined) { - throw new Error('Missing required parameter: "name"'); - } - - if(status === undefined) { - throw new Error('Missing required parameter: "status"'); - } - - if(schedule === undefined) { - throw new Error('Missing required parameter: "schedule"'); - } - - if(security === undefined) { - throw new Error('Missing required parameter: "security"'); - } - - if(httpMethod === undefined) { - throw new Error('Missing required parameter: "httpMethod"'); - } - - if(httpUrl === undefined) { - throw new Error('Missing required parameter: "httpUrl"'); - } - - let path = '/projects/{projectId}/tasks'.replace(new RegExp('{projectId}', 'g'), projectId); - - let payload = {}; - - if(name) { - payload['name'] = name; - } - - if(status) { - payload['status'] = status; - } - - if(schedule) { - payload['schedule'] = schedule; - } - - if(security) { - payload['security'] = security; - } - - if(httpMethod) { - payload['httpMethod'] = httpMethod; - } - - if(httpUrl) { - payload['httpUrl'] = httpUrl; - } - - if(httpHeaders) { - payload['httpHeaders'] = httpHeaders; - } - - if(httpUser) { - payload['httpUser'] = httpUser; - } - - if(httpPass) { - payload['httpPass'] = httpPass; - } - - return http - .post(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Get Task - * - * - * @param {string} projectId - * @param {string} taskId - * @throws {Error} - * @return {Promise} - */ - getTask: function(projectId, taskId) { - if(projectId === undefined) { - throw new Error('Missing required parameter: "projectId"'); - } - - if(taskId === undefined) { - throw new Error('Missing required parameter: "taskId"'); - } - - let path = '/projects/{projectId}/tasks/{taskId}'.replace(new RegExp('{projectId}', 'g'), projectId).replace(new RegExp('{taskId}', 'g'), taskId); - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Update Task - * - * - * @param {string} projectId - * @param {string} taskId - * @param {string} name - * @param {string} status - * @param {string} schedule - * @param {boolean} security - * @param {string} httpMethod - * @param {string} httpUrl - * @param {string[]} httpHeaders - * @param {string} httpUser - * @param {string} httpPass - * @throws {Error} - * @return {Promise} - */ - updateTask: function(projectId, taskId, name, status, schedule, security, httpMethod, httpUrl, httpHeaders = [], httpUser = '', httpPass = '') { - if(projectId === undefined) { - throw new Error('Missing required parameter: "projectId"'); - } - - if(taskId === undefined) { - throw new Error('Missing required parameter: "taskId"'); - } - - if(name === undefined) { - throw new Error('Missing required parameter: "name"'); - } - - if(status === undefined) { - throw new Error('Missing required parameter: "status"'); - } - - if(schedule === undefined) { - throw new Error('Missing required parameter: "schedule"'); - } - - if(security === undefined) { - throw new Error('Missing required parameter: "security"'); - } - - if(httpMethod === undefined) { - throw new Error('Missing required parameter: "httpMethod"'); - } - - if(httpUrl === undefined) { - throw new Error('Missing required parameter: "httpUrl"'); - } - - let path = '/projects/{projectId}/tasks/{taskId}'.replace(new RegExp('{projectId}', 'g'), projectId).replace(new RegExp('{taskId}', 'g'), taskId); - - let payload = {}; - - if(name) { - payload['name'] = name; - } - - if(status) { - payload['status'] = status; - } - - if(schedule) { - payload['schedule'] = schedule; - } - - if(security) { - payload['security'] = security; - } - - if(httpMethod) { - payload['httpMethod'] = httpMethod; - } - - if(httpUrl) { - payload['httpUrl'] = httpUrl; - } - - if(httpHeaders) { - payload['httpHeaders'] = httpHeaders; - } - - if(httpUser) { - payload['httpUser'] = httpUser; - } - - if(httpPass) { - payload['httpPass'] = httpPass; - } - - return http - .put(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Delete Task - * - * - * @param {string} projectId - * @param {string} taskId - * @throws {Error} - * @return {Promise} - */ - deleteTask: function(projectId, taskId) { - if(projectId === undefined) { - throw new Error('Missing required parameter: "projectId"'); - } - - if(taskId === undefined) { - throw new Error('Missing required parameter: "taskId"'); - } - - let path = '/projects/{projectId}/tasks/{taskId}'.replace(new RegExp('{projectId}', 'g'), projectId).replace(new RegExp('{taskId}', 'g'), taskId); - - let payload = {}; - - return http - .delete(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Get Project - * - * - * @param {string} projectId - * @param {string} range - * @throws {Error} - * @return {Promise} - */ - getUsage: function(projectId, range = 'last30') { - if(projectId === undefined) { - throw new Error('Missing required parameter: "projectId"'); - } - - let path = '/projects/{projectId}/usage'.replace(new RegExp('{projectId}', 'g'), projectId); - - let payload = {}; - - if(range) { - payload['range'] = range; - } - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * List Webhooks - * - * - * @param {string} projectId - * @throws {Error} - * @return {Promise} - */ - listWebhooks: function(projectId) { - if(projectId === undefined) { - throw new Error('Missing required parameter: "projectId"'); - } - - let path = '/projects/{projectId}/webhooks'.replace(new RegExp('{projectId}', 'g'), projectId); - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Create Webhook - * - * - * @param {string} projectId - * @param {string} name - * @param {string[]} events - * @param {string} url - * @param {boolean} security - * @param {string} httpUser - * @param {string} httpPass - * @throws {Error} - * @return {Promise} - */ - createWebhook: function(projectId, name, events, url, security, httpUser = '', httpPass = '') { - if(projectId === undefined) { - throw new Error('Missing required parameter: "projectId"'); - } - - if(name === undefined) { - throw new Error('Missing required parameter: "name"'); - } - - if(events === undefined) { - throw new Error('Missing required parameter: "events"'); - } - - if(url === undefined) { - throw new Error('Missing required parameter: "url"'); - } - - if(security === undefined) { - throw new Error('Missing required parameter: "security"'); - } - - let path = '/projects/{projectId}/webhooks'.replace(new RegExp('{projectId}', 'g'), projectId); - - let payload = {}; - - if(name) { - payload['name'] = name; - } - - if(events) { - payload['events'] = events; - } - - if(url) { - payload['url'] = url; - } - - if(security) { - payload['security'] = security; - } - - if(httpUser) { - payload['httpUser'] = httpUser; - } - - if(httpPass) { - payload['httpPass'] = httpPass; - } - - return http - .post(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Get Webhook - * - * - * @param {string} projectId - * @param {string} webhookId - * @throws {Error} - * @return {Promise} - */ - getWebhook: function(projectId, webhookId) { - if(projectId === undefined) { - throw new Error('Missing required parameter: "projectId"'); - } - - if(webhookId === undefined) { - throw new Error('Missing required parameter: "webhookId"'); - } - - let path = '/projects/{projectId}/webhooks/{webhookId}'.replace(new RegExp('{projectId}', 'g'), projectId).replace(new RegExp('{webhookId}', 'g'), webhookId); - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Update Webhook - * - * - * @param {string} projectId - * @param {string} webhookId - * @param {string} name - * @param {string[]} events - * @param {string} url - * @param {boolean} security - * @param {string} httpUser - * @param {string} httpPass - * @throws {Error} - * @return {Promise} - */ - updateWebhook: function(projectId, webhookId, name, events, url, security, httpUser = '', httpPass = '') { - if(projectId === undefined) { - throw new Error('Missing required parameter: "projectId"'); - } - - if(webhookId === undefined) { - throw new Error('Missing required parameter: "webhookId"'); - } - - if(name === undefined) { - throw new Error('Missing required parameter: "name"'); - } - - if(events === undefined) { - throw new Error('Missing required parameter: "events"'); - } - - if(url === undefined) { - throw new Error('Missing required parameter: "url"'); - } - - if(security === undefined) { - throw new Error('Missing required parameter: "security"'); - } - - let path = '/projects/{projectId}/webhooks/{webhookId}'.replace(new RegExp('{projectId}', 'g'), projectId).replace(new RegExp('{webhookId}', 'g'), webhookId); - - let payload = {}; - - if(name) { - payload['name'] = name; - } - - if(events) { - payload['events'] = events; - } - - if(url) { - payload['url'] = url; - } - - if(security) { - payload['security'] = security; - } - - if(httpUser) { - payload['httpUser'] = httpUser; - } - - if(httpPass) { - payload['httpPass'] = httpPass; - } - - return http - .put(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Delete Webhook - * - * - * @param {string} projectId - * @param {string} webhookId - * @throws {Error} - * @return {Promise} - */ - deleteWebhook: function(projectId, webhookId) { - if(projectId === undefined) { - throw new Error('Missing required parameter: "projectId"'); - } - - if(webhookId === undefined) { - throw new Error('Missing required parameter: "webhookId"'); - } - - let path = '/projects/{projectId}/webhooks/{webhookId}'.replace(new RegExp('{projectId}', 'g'), projectId).replace(new RegExp('{webhookId}', 'g'), webhookId); - - let payload = {}; - - return http - .delete(path, { - 'content-type': 'application/json', - }, payload); - } - }; - - let storage = { - - /** - * List Files - * - * Get a list of all the user files. You can use the query params to filter - * your results. On admin mode, this endpoint will return a list of all of the - * project files. [Learn more about different API modes](/docs/admin). - * - * @param {string} search - * @param {number} limit - * @param {number} offset - * @param {string} orderType - * @throws {Error} - * @return {Promise} - */ - listFiles: function(search = '', limit = 25, offset = 0, orderType = 'ASC') { - let path = '/storage/files'; - - let payload = {}; - - if(search) { - payload['search'] = search; - } - - if(limit) { - payload['limit'] = limit; - } - - if(offset) { - payload['offset'] = offset; - } - - if(orderType) { - payload['orderType'] = orderType; - } - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Create File - * - * Create a new file. The user who creates the file will automatically be - * assigned to read and write access unless he has passed custom values for - * read and write arguments. - * - * @param {File} file - * @param {string[]} read - * @param {string[]} write - * @throws {Error} - * @return {Promise} - */ - createFile: function(file, read, write) { - if(file === undefined) { - throw new Error('Missing required parameter: "file"'); - } - - if(read === undefined) { - throw new Error('Missing required parameter: "read"'); - } - - if(write === undefined) { - throw new Error('Missing required parameter: "write"'); - } - - let path = '/storage/files'; - - let payload = {}; - - if(file) { - payload['file'] = file; - } - - if(read) { - payload['read'] = read; - } - - if(write) { - payload['write'] = write; - } - - return http - .post(path, { - 'content-type': 'multipart/form-data', - }, payload); - }, - - /** - * Get File - * - * Get file by its unique ID. This endpoint response returns a JSON object - * with the file metadata. - * - * @param {string} fileId - * @throws {Error} - * @return {Promise} - */ - getFile: function(fileId) { - if(fileId === undefined) { - throw new Error('Missing required parameter: "fileId"'); - } - - let path = '/storage/files/{fileId}'.replace(new RegExp('{fileId}', 'g'), fileId); - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Update File - * - * Update file by its unique ID. Only users with write permissions have access - * to update this resource. - * - * @param {string} fileId - * @param {string[]} read - * @param {string[]} write - * @throws {Error} - * @return {Promise} - */ - updateFile: function(fileId, read, write) { - if(fileId === undefined) { - throw new Error('Missing required parameter: "fileId"'); - } - - if(read === undefined) { - throw new Error('Missing required parameter: "read"'); - } - - if(write === undefined) { - throw new Error('Missing required parameter: "write"'); - } - - let path = '/storage/files/{fileId}'.replace(new RegExp('{fileId}', 'g'), fileId); - - let payload = {}; - - if(read) { - payload['read'] = read; - } - - if(write) { - payload['write'] = write; - } - - return http - .put(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Delete File - * - * Delete a file by its unique ID. Only users with write permissions have - * access to delete this resource. - * - * @param {string} fileId - * @throws {Error} - * @return {Promise} - */ - deleteFile: function(fileId) { - if(fileId === undefined) { - throw new Error('Missing required parameter: "fileId"'); - } - - let path = '/storage/files/{fileId}'.replace(new RegExp('{fileId}', 'g'), fileId); - - let payload = {}; - - return http - .delete(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Get File for Download - * - * Get 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. - * - * @param {string} fileId - * @throws {Error} - * @return {string} - */ - getFileDownload: function(fileId) { - if(fileId === undefined) { - throw new Error('Missing required parameter: "fileId"'); - } - - let path = '/storage/files/{fileId}/download'.replace(new RegExp('{fileId}', 'g'), fileId); - - let payload = {}; - - payload['project'] = config.project; - - payload['key'] = config.key; - - - let query = []; - - for (let p in payload) { - if(Array.isArray(payload[p])) { - for (let index = 0; index < payload[p].length; index++) { - let param = payload[p][index]; - query.push(encodeURIComponent(p + '[]') + "=" + encodeURIComponent(param)); - } - } - else { - query.push(encodeURIComponent(p) + "=" + encodeURIComponent(payload[p])); - } - } - - query = query.join("&"); - - return config.endpoint + path + ((query) ? '?' + query : ''); - }, - - /** - * Get File Preview - * - * Get a file preview image. Currently, this method supports preview for image - * files (jpg, png, and gif), other supported formats, like pdf, docs, slides, - * and spreadsheets, will return the file icon image. You can also pass query - * string arguments for cutting and resizing your preview image. - * - * @param {string} fileId - * @param {number} width - * @param {number} height - * @param {number} quality - * @param {string} background - * @param {string} output - * @throws {Error} - * @return {string} - */ - getFilePreview: function(fileId, width = 0, height = 0, quality = 100, background = '', output = '') { - if(fileId === undefined) { - throw new Error('Missing required parameter: "fileId"'); - } - - let path = '/storage/files/{fileId}/preview'.replace(new RegExp('{fileId}', 'g'), fileId); - - let payload = {}; - - if(width) { - payload['width'] = width; - } - - if(height) { - payload['height'] = height; - } - - if(quality) { - payload['quality'] = quality; - } - - if(background) { - payload['background'] = background; - } - - if(output) { - payload['output'] = output; - } - - payload['project'] = config.project; - - payload['key'] = config.key; - - - let query = []; - - for (let p in payload) { - if(Array.isArray(payload[p])) { - for (let index = 0; index < payload[p].length; index++) { - let param = payload[p][index]; - query.push(encodeURIComponent(p + '[]') + "=" + encodeURIComponent(param)); - } - } - else { - query.push(encodeURIComponent(p) + "=" + encodeURIComponent(payload[p])); - } - } - - query = query.join("&"); - - return config.endpoint + path + ((query) ? '?' + query : ''); - }, - - /** - * Get File for View - * - * Get file content by its unique ID. This endpoint is similar to the download - * method but returns with no 'Content-Disposition: attachment' header. - * - * @param {string} fileId - * @param {string} as - * @throws {Error} - * @return {string} - */ - getFileView: function(fileId, as = '') { - if(fileId === undefined) { - throw new Error('Missing required parameter: "fileId"'); - } - - let path = '/storage/files/{fileId}/view'.replace(new RegExp('{fileId}', 'g'), fileId); - - let payload = {}; - - if(as) { - payload['as'] = as; - } - - payload['project'] = config.project; - - payload['key'] = config.key; - - - let query = []; - - for (let p in payload) { - if(Array.isArray(payload[p])) { - for (let index = 0; index < payload[p].length; index++) { - let param = payload[p][index]; - query.push(encodeURIComponent(p + '[]') + "=" + encodeURIComponent(param)); - } - } - else { - query.push(encodeURIComponent(p) + "=" + encodeURIComponent(payload[p])); - } - } - - query = query.join("&"); - - return config.endpoint + path + ((query) ? '?' + query : ''); - } - }; - - let teams = { - - /** - * List Teams - * - * Get a list of all the current user teams. You can use the query params to - * filter your results. On admin mode, this endpoint will return a list of all - * of the project teams. [Learn more about different API modes](/docs/admin). - * - * @param {string} search - * @param {number} limit - * @param {number} offset - * @param {string} orderType - * @throws {Error} - * @return {Promise} - */ - list: function(search = '', limit = 25, offset = 0, orderType = 'ASC') { - let path = '/teams'; - - let payload = {}; - - if(search) { - payload['search'] = search; - } - - if(limit) { - payload['limit'] = limit; - } - - if(offset) { - payload['offset'] = offset; - } - - if(orderType) { - payload['orderType'] = orderType; - } - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Create Team - * - * Create a new team. The user who creates the team will automatically be - * assigned as the owner of the team. The team owner can invite new members, - * who will be able add new owners and update or delete the team from your - * project. - * - * @param {string} name - * @param {string[]} roles - * @throws {Error} - * @return {Promise} - */ - create: function(name, roles = ["owner"]) { - if(name === undefined) { - throw new Error('Missing required parameter: "name"'); - } - - let path = '/teams'; - - let payload = {}; - - if(name) { - payload['name'] = name; - } - - if(roles) { - payload['roles'] = roles; - } - - return http - .post(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Get Team - * - * Get team by its unique ID. All team members have read access for this - * resource. - * - * @param {string} teamId - * @throws {Error} - * @return {Promise} - */ - get: function(teamId) { - if(teamId === undefined) { - throw new Error('Missing required parameter: "teamId"'); - } - - let path = '/teams/{teamId}'.replace(new RegExp('{teamId}', 'g'), teamId); - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Update Team - * - * Update team by its unique ID. Only team owners have write access for this - * resource. - * - * @param {string} teamId - * @param {string} name - * @throws {Error} - * @return {Promise} - */ - update: function(teamId, name) { - if(teamId === undefined) { - throw new Error('Missing required parameter: "teamId"'); - } - - if(name === undefined) { - throw new Error('Missing required parameter: "name"'); - } - - let path = '/teams/{teamId}'.replace(new RegExp('{teamId}', 'g'), teamId); - - let payload = {}; - - if(name) { - payload['name'] = name; - } - - return http - .put(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Delete Team - * - * Delete team by its unique ID. Only team owners have write access for this - * resource. - * - * @param {string} teamId - * @throws {Error} - * @return {Promise} - */ - delete: function(teamId) { - if(teamId === undefined) { - throw new Error('Missing required parameter: "teamId"'); - } - - let path = '/teams/{teamId}'.replace(new RegExp('{teamId}', 'g'), teamId); - - let payload = {}; - - return http - .delete(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Get Team Memberships - * - * Get team members by the team unique ID. All team members have read access - * for this list of resources. - * - * @param {string} teamId - * @param {string} search - * @param {number} limit - * @param {number} offset - * @param {string} orderType - * @throws {Error} - * @return {Promise} - */ - getMemberships: function(teamId, search = '', limit = 25, offset = 0, orderType = 'ASC') { - if(teamId === undefined) { - throw new Error('Missing required parameter: "teamId"'); - } - - let path = '/teams/{teamId}/memberships'.replace(new RegExp('{teamId}', 'g'), teamId); - - let payload = {}; - - if(search) { - payload['search'] = search; - } - - if(limit) { - payload['limit'] = limit; - } - - if(offset) { - payload['offset'] = offset; - } - - if(orderType) { - payload['orderType'] = orderType; - } - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Create Team Membership - * - * Use this endpoint to invite a new member to join your team. An email with a - * link to join the team will be sent to the new member email address if the - * member doesn't exist in the project it will be created automatically. - * - * Use the 'URL' parameter to redirect the user from the invitation email back - * to your app. When the user is redirected, use the [Update Team Membership - * Status](/docs/client/teams#updateMembershipStatus) endpoint to allow the - * user to accept the invitation to the team. - * - * Please note that in order to avoid a [Redirect - * Attacks](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) - * the only valid redirect URL's are the once from domains you have set when - * added your platforms in the console interface. - * - * @param {string} teamId - * @param {string} email - * @param {string[]} roles - * @param {string} url - * @param {string} name - * @throws {Error} - * @return {Promise} - */ - createMembership: function(teamId, email, roles, url, name = '') { - if(teamId === undefined) { - throw new Error('Missing required parameter: "teamId"'); - } - - if(email === undefined) { - throw new Error('Missing required parameter: "email"'); - } - - if(roles === undefined) { - throw new Error('Missing required parameter: "roles"'); - } - - if(url === undefined) { - throw new Error('Missing required parameter: "url"'); - } - - let path = '/teams/{teamId}/memberships'.replace(new RegExp('{teamId}', 'g'), teamId); - - let payload = {}; - - if(email) { - payload['email'] = email; - } - - if(name) { - payload['name'] = name; - } - - if(roles) { - payload['roles'] = roles; - } - - if(url) { - payload['url'] = url; - } - - return http - .post(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * 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 he didn't accept it. - * - * @param {string} teamId - * @param {string} inviteId - * @throws {Error} - * @return {Promise} - */ - deleteMembership: function(teamId, inviteId) { - if(teamId === undefined) { - throw new Error('Missing required parameter: "teamId"'); - } - - if(inviteId === undefined) { - throw new Error('Missing required parameter: "inviteId"'); - } - - let path = '/teams/{teamId}/memberships/{inviteId}'.replace(new RegExp('{teamId}', 'g'), teamId).replace(new RegExp('{inviteId}', 'g'), inviteId); - - let payload = {}; - - return http - .delete(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Update Team Membership Status - * - * Use this endpoint to allow a user to accept an invitation to join a team - * after he is being redirected back to your app from the invitation email he - * was sent. - * - * @param {string} teamId - * @param {string} inviteId - * @param {string} userId - * @param {string} secret - * @throws {Error} - * @return {Promise} - */ - updateMembershipStatus: function(teamId, inviteId, userId, secret) { - if(teamId === undefined) { - throw new Error('Missing required parameter: "teamId"'); - } - - if(inviteId === undefined) { - throw new Error('Missing required parameter: "inviteId"'); - } - - if(userId === undefined) { - throw new Error('Missing required parameter: "userId"'); - } - - if(secret === undefined) { - throw new Error('Missing required parameter: "secret"'); - } - - let path = '/teams/{teamId}/memberships/{inviteId}/status'.replace(new RegExp('{teamId}', 'g'), teamId).replace(new RegExp('{inviteId}', 'g'), inviteId); - - let payload = {}; - - if(userId) { - payload['userId'] = userId; - } - - if(secret) { - payload['secret'] = secret; - } - - return http - .patch(path, { - 'content-type': 'application/json', - }, payload); - } - }; - - let users = { - - /** - * List Users - * - * Get a list of all the project users. You can use the query params to filter - * your results. - * - * @param {string} search - * @param {number} limit - * @param {number} offset - * @param {string} orderType - * @throws {Error} - * @return {Promise} - */ - list: function(search = '', limit = 25, offset = 0, orderType = 'ASC') { - let path = '/users'; - - let payload = {}; - - if(search) { - payload['search'] = search; - } - - if(limit) { - payload['limit'] = limit; - } - - if(offset) { - payload['offset'] = offset; - } - - if(orderType) { - payload['orderType'] = orderType; - } - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Create User - * - * Create a new user. - * - * @param {string} email - * @param {string} password - * @param {string} name - * @throws {Error} - * @return {Promise} - */ - create: function(email, password, name = '') { - if(email === undefined) { - throw new Error('Missing required parameter: "email"'); - } - - if(password === undefined) { - throw new Error('Missing required parameter: "password"'); - } - - let path = '/users'; - - let payload = {}; - - if(email) { - payload['email'] = email; - } - - if(password) { - payload['password'] = password; - } - - if(name) { - payload['name'] = name; - } - - return http - .post(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Get User - * - * Get user by its unique ID. - * - * @param {string} userId - * @throws {Error} - * @return {Promise} - */ - get: function(userId) { - if(userId === undefined) { - throw new Error('Missing required parameter: "userId"'); - } - - let path = '/users/{userId}'.replace(new RegExp('{userId}', 'g'), userId); - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Delete User - * - * Delete a user by its unique ID. - * - * @param {string} userId - * @throws {Error} - * @return {Promise} - */ - deleteUser: function(userId) { - if(userId === undefined) { - throw new Error('Missing required parameter: "userId"'); - } - - let path = '/users/{userId}'.replace(new RegExp('{userId}', 'g'), userId); - - let payload = {}; - - return http - .delete(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Get User Logs - * - * Get user activity logs list by its unique ID. - * - * @param {string} userId - * @throws {Error} - * @return {Promise} - */ - getLogs: function(userId) { - if(userId === undefined) { - throw new Error('Missing required parameter: "userId"'); - } - - let path = '/users/{userId}/logs'.replace(new RegExp('{userId}', 'g'), userId); - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Get User Preferences - * - * Get user preferences by its unique ID. - * - * @param {string} userId - * @throws {Error} - * @return {Promise} - */ - getPrefs: function(userId) { - if(userId === undefined) { - throw new Error('Missing required parameter: "userId"'); - } - - let path = '/users/{userId}/prefs'.replace(new RegExp('{userId}', 'g'), userId); - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Update User Preferences - * - * Update user preferences by its unique ID. You can pass only the specific - * settings you wish to update. - * - * @param {string} userId - * @param {object} prefs - * @throws {Error} - * @return {Promise} - */ - updatePrefs: function(userId, prefs) { - if(userId === undefined) { - throw new Error('Missing required parameter: "userId"'); - } - - if(prefs === undefined) { - throw new Error('Missing required parameter: "prefs"'); - } - - let path = '/users/{userId}/prefs'.replace(new RegExp('{userId}', 'g'), userId); - - let payload = {}; - - if(prefs) { - payload['prefs'] = prefs; - } - - return http - .patch(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Get User Sessions - * - * Get user sessions list by its unique ID. - * - * @param {string} userId - * @throws {Error} - * @return {Promise} - */ - getSessions: function(userId) { - if(userId === undefined) { - throw new Error('Missing required parameter: "userId"'); - } - - let path = '/users/{userId}/sessions'.replace(new RegExp('{userId}', 'g'), userId); - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Delete User Sessions - * - * Delete all user sessions by its unique ID. - * - * @param {string} userId - * @throws {Error} - * @return {Promise} - */ - deleteSessions: function(userId) { - if(userId === undefined) { - throw new Error('Missing required parameter: "userId"'); - } - - let path = '/users/{userId}/sessions'.replace(new RegExp('{userId}', 'g'), userId); - - let payload = {}; - - return http - .delete(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Delete User Session - * - * Delete user sessions by its unique ID. - * - * @param {string} userId - * @param {string} sessionId - * @throws {Error} - * @return {Promise} - */ - deleteSession: function(userId, sessionId) { - if(userId === undefined) { - throw new Error('Missing required parameter: "userId"'); - } - - if(sessionId === undefined) { - throw new Error('Missing required parameter: "sessionId"'); - } - - let path = '/users/{userId}/sessions/{sessionId}'.replace(new RegExp('{userId}', 'g'), userId).replace(new RegExp('{sessionId}', 'g'), sessionId); - - let payload = {}; - - return http - .delete(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Update User Status - * - * Update user status by its unique ID. - * - * @param {string} userId - * @param {string} status - * @throws {Error} - * @return {Promise} - */ - updateStatus: function(userId, status) { - if(userId === undefined) { - throw new Error('Missing required parameter: "userId"'); - } - - if(status === undefined) { - throw new Error('Missing required parameter: "status"'); - } - - let path = '/users/{userId}/status'.replace(new RegExp('{userId}', 'g'), userId); - - let payload = {}; - - if(status) { - payload['status'] = status; - } - - return http - .patch(path, { - 'content-type': 'application/json', - }, payload); - } - }; - - return { - setEndpoint: setEndpoint, - setProject: setProject, - setKey: setKey, - setLocale: setLocale, - setMode: setMode, - account: account, - avatars: avatars, - database: database, - functions: functions, - health: health, - locale: locale, - projects: projects, - storage: storage, - teams: teams, - users: users - }; - }; - - if(typeof module !== "undefined") { - module.exports = window.Appwrite; - } - -})((typeof window !== "undefined") ? window : {}); \ No newline at end of file diff --git a/app/sdks/0.6.2/console-web/src/sdk.min.js b/app/sdks/0.6.2/console-web/src/sdk.min.js deleted file mode 100644 index 2413458654..0000000000 --- a/app/sdks/0.6.2/console-web/src/sdk.min.js +++ /dev/null @@ -1,431 +0,0 @@ -(function(window){'use strict';window.Appwrite=function(){let config={endpoint:'https://appwrite.io/v1',project:'',key:'',locale:'',mode:'',};let setEndpoint=function(endpoint){config.endpoint=endpoint;return this};let setProject=function(value){http.addGlobalHeader('X-Appwrite-Project',value);config.project=value;return this};let setKey=function(value){http.addGlobalHeader('X-Appwrite-Key',value);config.key=value;return this};let setLocale=function(value){http.addGlobalHeader('X-Appwrite-Locale',value);config.locale=value;return this};let setMode=function(value){http.addGlobalHeader('X-Appwrite-Mode',value);config.mode=value;return this};let http=function(document){let globalParams=[],globalHeaders=[];let addParam=function(url,param,value){let a=document.createElement('a'),regex=/(?:\?|&|&)+([^=]+)(?:=([^&]*))*/g;let match,str=[];a.href=url;param=encodeURIComponent(param);while(match=regex.exec(a.search))if(param!==match[1])str.push(match[1]+(match[2]?"="+match[2]:""));str.push(param+(value?"="+encodeURIComponent(value):""));a.search=str.join("&");return a.href};let buildQuery=function(params){let str=[];for(let p in params){if(Array.isArray(params[p])){for(let index=0;index=request.status){resolve(data)}else{reject(data)}};if(progress){request.addEventListener('progress',progress);request.upload.addEventListener('progress',progress,!1)} -request.onerror=function(){reject(new Error("Network Error"))};request.send(params)})};return{'get':function(path,headers={},params={}){return call('GET',path+((Object.keys(params).length>0)?'?'+buildQuery(params):''),headers,{})},'post':function(path,headers={},params={},progress=null){return call('POST',path,headers,params,progress)},'put':function(path,headers={},params={},progress=null){return call('PUT',path,headers,params,progress)},'patch':function(path,headers={},params={},progress=null){return call('PATCH',path,headers,params,progress)},'delete':function(path,headers={},params={},progress=null){return call('DELETE',path,headers,params,progress)},'addGlobalParam':addGlobalParam,'addGlobalHeader':addGlobalHeader}}(window.document);let account={get:function(){let path='/account';let payload={};return http.get(path,{'content-type':'application/json',},payload)},create:function(email,password,name=''){if(email===undefined){throw new Error('Missing required parameter: "email"')} -if(password===undefined){throw new Error('Missing required parameter: "password"')} -let path='/account';let payload={};if(email){payload.email=email} -if(password){payload.password=password} -if(name){payload.name=name} -return http.post(path,{'content-type':'application/json',},payload)},delete:function(){let path='/account';let payload={};return http.delete(path,{'content-type':'application/json',},payload)},updateEmail:function(email,password){if(email===undefined){throw new Error('Missing required parameter: "email"')} -if(password===undefined){throw new Error('Missing required parameter: "password"')} -let path='/account/email';let payload={};if(email){payload.email=email} -if(password){payload.password=password} -return http.patch(path,{'content-type':'application/json',},payload)},getLogs:function(){let path='/account/logs';let payload={};return http.get(path,{'content-type':'application/json',},payload)},updateName:function(name){if(name===undefined){throw new Error('Missing required parameter: "name"')} -let path='/account/name';let payload={};if(name){payload.name=name} -return http.patch(path,{'content-type':'application/json',},payload)},updatePassword:function(password,oldPassword){if(password===undefined){throw new Error('Missing required parameter: "password"')} -if(oldPassword===undefined){throw new Error('Missing required parameter: "oldPassword"')} -let path='/account/password';let payload={};if(password){payload.password=password} -if(oldPassword){payload.oldPassword=oldPassword} -return http.patch(path,{'content-type':'application/json',},payload)},getPrefs:function(){let path='/account/prefs';let payload={};return http.get(path,{'content-type':'application/json',},payload)},updatePrefs:function(prefs){if(prefs===undefined){throw new Error('Missing required parameter: "prefs"')} -let path='/account/prefs';let payload={};if(prefs){payload.prefs=prefs} -return http.patch(path,{'content-type':'application/json',},payload)},createRecovery:function(email,url){if(email===undefined){throw new Error('Missing required parameter: "email"')} -if(url===undefined){throw new Error('Missing required parameter: "url"')} -let path='/account/recovery';let payload={};if(email){payload.email=email} -if(url){payload.url=url} -return http.post(path,{'content-type':'application/json',},payload)},updateRecovery:function(userId,secret,password,passwordAgain){if(userId===undefined){throw new Error('Missing required parameter: "userId"')} -if(secret===undefined){throw new Error('Missing required parameter: "secret"')} -if(password===undefined){throw new Error('Missing required parameter: "password"')} -if(passwordAgain===undefined){throw new Error('Missing required parameter: "passwordAgain"')} -let path='/account/recovery';let payload={};if(userId){payload.userId=userId} -if(secret){payload.secret=secret} -if(password){payload.password=password} -if(passwordAgain){payload.passwordAgain=passwordAgain} -return http.put(path,{'content-type':'application/json',},payload)},getSessions:function(){let path='/account/sessions';let payload={};return http.get(path,{'content-type':'application/json',},payload)},createSession:function(email,password){if(email===undefined){throw new Error('Missing required parameter: "email"')} -if(password===undefined){throw new Error('Missing required parameter: "password"')} -let path='/account/sessions';let payload={};if(email){payload.email=email} -if(password){payload.password=password} -return http.post(path,{'content-type':'application/json',},payload)},deleteSessions:function(){let path='/account/sessions';let payload={};return http.delete(path,{'content-type':'application/json',},payload)},createOAuth2Session:function(provider,success='https://appwrite.io/auth/oauth2/success',failure='https://appwrite.io/auth/oauth2/failure',scopes=[]){if(provider===undefined){throw new Error('Missing required parameter: "provider"')} -let path='/account/sessions/oauth2/{provider}'.replace(new RegExp('{provider}','g'),provider);let payload={};if(success){payload.success=success} -if(failure){payload.failure=failure} -if(scopes){payload.scopes=scopes} -payload.project=config.project;payload.key=config.key;let query=[];for(let p in payload){if(Array.isArray(payload[p])){for(let index=0;index; - - /** - * Create Account - * - * Use this endpoint to allow a new user to register a new account in your - * project. After the user registration completes successfully, you can use - * the [/account/verfication](/docs/client/account#createVerification) route - * to start verifying the user email address. To allow your new user to login - * to his new account, you need to create a new [account - * session](/docs/client/account#createSession). - * - * @param {string} email - * @param {string} password - * @param {string} name - * @throws {Error} - * @return {Promise} - */ - create(email: string, password: string, name: string): Promise; - - /** - * Delete Account - * - * Delete a currently logged in user account. Behind the scene, the user - * record is not deleted but permanently blocked from any access. This is done - * to avoid deleted accounts being overtaken by new users with the same email - * address. Any user-related resources like documents or storage files should - * be deleted separately. - * - * @throws {Error} - * @return {Promise} - */ - delete(): Promise; - - /** - * Update Account Email - * - * Update currently logged in user account email address. After changing user - * address, user confirmation status is being reset and a new confirmation - * mail is sent. For security measures, user password is required to complete - * this request. - * - * @param {string} email - * @param {string} password - * @throws {Error} - * @return {Promise} - */ - updateEmail(email: string, password: string): Promise; - - /** - * Get Account 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. - * - * @throws {Error} - * @return {Promise} - */ - getLogs(): Promise; - - /** - * Update Account Name - * - * Update currently logged in user account name. - * - * @param {string} name - * @throws {Error} - * @return {Promise} - */ - updateName(name: string): Promise; - - /** - * Update Account Password - * - * Update currently logged in user password. For validation, user is required - * to pass the password twice. - * - * @param {string} password - * @param {string} oldPassword - * @throws {Error} - * @return {Promise} - */ - updatePassword(password: string, oldPassword: string): Promise; - - /** - * Get Account Preferences - * - * Get currently logged in user preferences as a key-value object. - * - * @throws {Error} - * @return {Promise} - */ - getPrefs(): Promise; - - /** - * Update Account Preferences - * - * Update currently logged in user account preferences. You can pass only the - * specific settings you wish to update. - * - * @param {object} prefs - * @throws {Error} - * @return {Promise} - */ - updatePrefs(prefs: object): Promise; - - /** - * Create Password Recovery - * - * Sends the user an email with a temporary secret key for password reset. - * When the user clicks the confirmation link he is redirected back to your - * app password reset URL with the secret key and email address values - * attached to the URL query string. Use the query string params to submit a - * request to the [PUT /account/recovery](/docs/client/account#updateRecovery) - * endpoint to complete the process. - * - * @param {string} email - * @param {string} url - * @throws {Error} - * @return {Promise} - */ - createRecovery(email: string, url: string): Promise; - - /** - * Complete Password Recovery - * - * Use this endpoint to complete the user account password reset. Both the - * **userId** and **secret** arguments will be passed as query parameters to - * the redirect URL you have provided when sending your request to the [POST - * /account/recovery](/docs/client/account#createRecovery) endpoint. - * - * Please note that in order to avoid a [Redirect - * 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. - * - * @param {string} userId - * @param {string} secret - * @param {string} password - * @param {string} passwordAgain - * @throws {Error} - * @return {Promise} - */ - updateRecovery(userId: string, secret: string, password: string, passwordAgain: string): Promise; - - /** - * Get Account Sessions - * - * Get currently logged in user list of active sessions across different - * devices. - * - * @throws {Error} - * @return {Promise} - */ - getSessions(): Promise; - - /** - * Create Account Session - * - * Allow the user to login into his account by providing a valid email and - * password combination. This route will create a new session for the user. - * - * @param {string} email - * @param {string} password - * @throws {Error} - * @return {Promise} - */ - createSession(email: string, password: string): Promise; - - /** - * Delete All Account Sessions - * - * Delete all sessions from the user account and remove any sessions cookies - * from the end client. - * - * @throws {Error} - * @return {Promise} - */ - deleteSessions(): Promise; - - /** - * Create Account Session with OAuth2 - * - * Allow the user to login to his account using the OAuth2 provider of his - * choice. Each OAuth2 provider should be enabled from the Appwrite console - * first. Use the success and failure arguments to provide a redirect URL's - * back to your app when login is completed. - * - * @param {string} provider - * @param {string} success - * @param {string} failure - * @param {string[]} scopes - * @throws {Error} - * @return {Promise} - */ - createOAuth2Session(provider: string, success: string, failure: string, scopes: string[]): Promise; - - /** - * Delete Account Session - * - * Use this endpoint to log out the currently logged in user from all his - * account sessions across all his different devices. When using the option id - * argument, only the session unique ID provider will be deleted. - * - * @param {string} sessionId - * @throws {Error} - * @return {Promise} - */ - deleteSession(sessionId: string): Promise; - - /** - * Create Email Verification - * - * Use this endpoint to send a verification message to your user email address - * to confirm they are the valid owners of that address. Both the **userId** - * and **secret** arguments will be passed as query parameters to the URL you - * have provided to be attached to the verification email. The provided URL - * should redirect the user back to your app and allow you to complete the - * verification process by verifying both the **userId** and **secret** - * parameters. Learn more about how to [complete the verification - * process](/docs/client/account#updateAccountVerification). - * - * Please note that in order to avoid a [Redirect - * 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. - * - * - * @param {string} url - * @throws {Error} - * @return {Promise} - */ - createVerification(url: string): Promise; - - /** - * Complete Email Verification - * - * 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. - * - * @param {string} userId - * @param {string} secret - * @throws {Error} - * @return {Promise} - */ - updateVerification(userId: string, secret: string): Promise; - - } - - export interface Avatars { - - /** - * Get Browser Icon - * - * You can use this endpoint to show different browser icons to your users. - * The code argument receives the browser code as it appears in your user - * /account/sessions endpoint. Use width, height and quality arguments to - * change the output settings. - * - * @param {string} code - * @param {number} width - * @param {number} height - * @param {number} quality - * @throws {Error} - * @return {string} - */ - getBrowser(code: string, width: number, height: number, quality: number): string; - - /** - * Get Credit Card Icon - * - * Need to display your users with your billing method or their payment - * methods? The credit card endpoint will return you the icon of the credit - * card provider you need. Use width, height and quality arguments to change - * the output settings. - * - * @param {string} code - * @param {number} width - * @param {number} height - * @param {number} quality - * @throws {Error} - * @return {string} - */ - getCreditCard(code: string, width: number, height: number, quality: number): string; - - /** - * Get Favicon - * - * Use this endpoint to fetch the favorite icon (AKA favicon) of a any remote - * website URL. - * - * @param {string} url - * @throws {Error} - * @return {string} - */ - getFavicon(url: string): string; - - /** - * Get Country Flag - * - * You can use this endpoint to show different country flags icons to your - * users. The code argument receives the 2 letter country code. Use width, - * height and quality arguments to change the output settings. - * - * @param {string} code - * @param {number} width - * @param {number} height - * @param {number} quality - * @throws {Error} - * @return {string} - */ - getFlag(code: string, width: number, height: number, quality: number): string; - - /** - * Get Image from URL - * - * Use this endpoint to fetch a remote image URL and crop it to any image size - * you want. This endpoint is very useful if you need to crop and display - * remote images in your app or in case you want to make sure a 3rd party - * image is properly served using a TLS protocol. - * - * @param {string} url - * @param {number} width - * @param {number} height - * @throws {Error} - * @return {string} - */ - getImage(url: string, width: number, height: number): string; - - /** - * Get User Initials - * - * Use this endpoint to show your user initials avatar icon on your website or - * app. By default, this route will try to print your logged-in user name or - * email initials. You can also overwrite the user name if you pass the 'name' - * parameter. If no name is given and no user is logged, an empty avatar will - * be returned. - * - * You can use the color and background params to change the avatar colors. By - * default, a random theme will be selected. The random theme will persist for - * the user's initials when reloading the same theme will always return for - * the same initials. - * - * @param {string} name - * @param {number} width - * @param {number} height - * @param {string} color - * @param {string} background - * @throws {Error} - * @return {string} - */ - getInitials(name: string, width: number, height: number, color: string, background: string): string; - - /** - * 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. - * - * @param {string} text - * @param {number} size - * @param {number} margin - * @param {boolean} download - * @throws {Error} - * @return {string} - */ - getQR(text: string, size: number, margin: number, download: boolean): string; - - } - - export interface Database { - - /** - * List Collections - * - * Get a list of all the user collections. You can use the query params to - * filter your results. On admin mode, this endpoint will return a list of all - * of the project collections. [Learn more about different API - * modes](/docs/admin). - * - * @param {string} search - * @param {number} limit - * @param {number} offset - * @param {string} orderType - * @throws {Error} - * @return {Promise} - */ - listCollections(search: string, limit: number, offset: number, orderType: string): Promise; - - /** - * Create Collection - * - * Create a new Collection. - * - * @param {string} name - * @param {string[]} read - * @param {string[]} write - * @param {string[]} rules - * @throws {Error} - * @return {Promise} - */ - createCollection(name: string, read: string[], write: string[], rules: string[]): Promise; - - /** - * Get Collection - * - * Get collection by its unique ID. This endpoint response returns a JSON - * object with the collection metadata. - * - * @param {string} collectionId - * @throws {Error} - * @return {Promise} - */ - getCollection(collectionId: string): Promise; - - /** - * Update Collection - * - * Update collection by its unique ID. - * - * @param {string} collectionId - * @param {string} name - * @param {string[]} read - * @param {string[]} write - * @param {string[]} rules - * @throws {Error} - * @return {Promise} - */ - updateCollection(collectionId: string, name: string, read: string[], write: string[], rules: string[]): Promise; - - /** - * Delete Collection - * - * Delete a collection by its unique ID. Only users with write permissions - * have access to delete this resource. - * - * @param {string} collectionId - * @throws {Error} - * @return {Promise} - */ - deleteCollection(collectionId: string): Promise; - - /** - * List Documents - * - * Get a list of all the user documents. You can use the query params to - * filter your results. On admin mode, this endpoint will return a list of all - * of the project documents. [Learn more about different API - * modes](/docs/admin). - * - * @param {string} collectionId - * @param {string[]} filters - * @param {number} limit - * @param {number} offset - * @param {string} orderField - * @param {string} orderType - * @param {string} orderCast - * @param {string} search - * @throws {Error} - * @return {Promise} - */ - listDocuments(collectionId: string, filters: string[], limit: number, offset: number, orderField: string, orderType: string, orderCast: string, search: string): Promise; - - /** - * Create Document - * - * Create a new Document. Before using this route, you should create a new - * collection resource using either a [server - * integration](/docs/server/database?sdk=nodejs#createCollection) API or - * directly from your database console. - * - * @param {string} collectionId - * @param {object} data - * @param {string[]} read - * @param {string[]} write - * @param {string} parentDocument - * @param {string} parentProperty - * @param {string} parentPropertyType - * @throws {Error} - * @return {Promise} - */ - createDocument(collectionId: string, data: object, read: string[], write: string[], parentDocument: string, parentProperty: string, parentPropertyType: string): Promise; - - /** - * Get Document - * - * Get document by its unique ID. This endpoint response returns a JSON object - * with the document data. - * - * @param {string} collectionId - * @param {string} documentId - * @throws {Error} - * @return {Promise} - */ - getDocument(collectionId: string, documentId: string): Promise; - - /** - * Update Document - * - * - * @param {string} collectionId - * @param {string} documentId - * @param {object} data - * @param {string[]} read - * @param {string[]} write - * @throws {Error} - * @return {Promise} - */ - updateDocument(collectionId: string, documentId: string, data: object, read: string[], write: string[]): Promise; - - /** - * Delete Document - * - * Delete document by its unique ID. This endpoint deletes only the parent - * documents, his attributes and relations to other documents. Child documents - * **will not** be deleted. - * - * @param {string} collectionId - * @param {string} documentId - * @throws {Error} - * @return {Promise} - */ - deleteDocument(collectionId: string, documentId: string): Promise; - - } - - export interface Functions { - - /** - * List Functions - * - * - * @param {string} search - * @param {number} limit - * @param {number} offset - * @param {string} orderType - * @throws {Error} - * @return {Promise} - */ - list(search: string, limit: number, offset: number, orderType: string): Promise; - - /** - * Create Function - * - * - * @param {string} name - * @param {string} env - * @param {object} vars - * @param {string[]} events - * @param {string} schedule - * @param {number} timeout - * @throws {Error} - * @return {Promise} - */ - create(name: string, env: string, vars: object, events: string[], schedule: string, timeout: number): Promise; - - /** - * Get Function - * - * - * @param {string} functionId - * @throws {Error} - * @return {Promise} - */ - get(functionId: string): Promise; - - /** - * Update Function - * - * - * @param {string} functionId - * @param {string} name - * @param {object} vars - * @param {string[]} events - * @param {string} schedule - * @param {number} timeout - * @throws {Error} - * @return {Promise} - */ - update(functionId: string, name: string, vars: object, events: string[], schedule: string, timeout: number): Promise; - - /** - * Delete Function - * - * - * @param {string} functionId - * @throws {Error} - * @return {Promise} - */ - delete(functionId: string): Promise; - - /** - * List Executions - * - * - * @param {string} functionId - * @param {string} search - * @param {number} limit - * @param {number} offset - * @param {string} orderType - * @throws {Error} - * @return {Promise} - */ - listExecutions(functionId: string, search: string, limit: number, offset: number, orderType: string): Promise; - - /** - * Create Execution - * - * - * @param {string} functionId - * @param {number} async - * @throws {Error} - * @return {Promise} - */ - createExecution(functionId: string, async: number): Promise; - - /** - * Get Execution - * - * - * @param {string} functionId - * @param {string} executionId - * @throws {Error} - * @return {Promise} - */ - getExecution(functionId: string, executionId: string): Promise; - - /** - * Update Function Tag - * - * - * @param {string} functionId - * @param {string} tag - * @throws {Error} - * @return {Promise} - */ - updateTag(functionId: string, tag: string): Promise; - - /** - * List Tags - * - * - * @param {string} functionId - * @param {string} search - * @param {number} limit - * @param {number} offset - * @param {string} orderType - * @throws {Error} - * @return {Promise} - */ - listTags(functionId: string, search: string, limit: number, offset: number, orderType: string): Promise; - - /** - * Create Tag - * - * - * @param {string} functionId - * @param {string} command - * @param {File} code - * @throws {Error} - * @return {Promise} - */ - createTag(functionId: string, command: string, code: File): Promise; - - /** - * Get Tag - * - * - * @param {string} functionId - * @param {string} tagId - * @throws {Error} - * @return {Promise} - */ - getTag(functionId: string, tagId: string): Promise; - - /** - * Delete Tag - * - * - * @param {string} functionId - * @param {string} tagId - * @throws {Error} - * @return {Promise} - */ - deleteTag(functionId: string, tagId: string): Promise; - - } - - export interface Health { - - /** - * Get HTTP - * - * Check the Appwrite HTTP server is up and responsive. - * - * @throws {Error} - * @return {Promise} - */ - get(): Promise; - - /** - * Get Anti virus - * - * Check the Appwrite Anti Virus server is up and connection is successful. - * - * @throws {Error} - * @return {Promise} - */ - getAntiVirus(): Promise; - - /** - * Get Cache - * - * Check the Appwrite in-memory cache server is up and connection is - * successful. - * - * @throws {Error} - * @return {Promise} - */ - getCache(): Promise; - - /** - * Get DB - * - * Check the Appwrite database server is up and connection is successful. - * - * @throws {Error} - * @return {Promise} - */ - getDB(): Promise; - - /** - * Get Certificate Queue - * - * Get the number of certificates that are waiting to be issued against - * [Letsencrypt](https://letsencrypt.org/) in the Appwrite internal queue - * server. - * - * @throws {Error} - * @return {Promise} - */ - getQueueCertificates(): Promise; - - /** - * Get Functions Queue - * - * - * @throws {Error} - * @return {Promise} - */ - getQueueFunctions(): Promise; - - /** - * Get Logs Queue - * - * Get the number of logs that are waiting to be processed in the Appwrite - * internal queue server. - * - * @throws {Error} - * @return {Promise} - */ - getQueueLogs(): Promise; - - /** - * Get Tasks Queue - * - * Get the number of tasks that are waiting to be processed in the Appwrite - * internal queue server. - * - * @throws {Error} - * @return {Promise} - */ - getQueueTasks(): Promise; - - /** - * Get Usage Queue - * - * Get the number of usage stats that are waiting to be processed in the - * Appwrite internal queue server. - * - * @throws {Error} - * @return {Promise} - */ - getQueueUsage(): Promise; - - /** - * Get Webhooks Queue - * - * Get the number of webhooks that are waiting to be processed in the Appwrite - * internal queue server. - * - * @throws {Error} - * @return {Promise} - */ - getQueueWebhooks(): Promise; - - /** - * Get Local Storage - * - * Check the Appwrite local storage device is up and connection is successful. - * - * @throws {Error} - * @return {Promise} - */ - getStorageLocal(): Promise; - - /** - * Get Time - * - * Check the Appwrite server time is synced with Google remote NTP server. We - * use this technology to smoothly handle leap seconds with no disruptive - * events. The [Network Time - * Protocol](https://en.wikipedia.org/wiki/Network_Time_Protocol) (NTP) is - * 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. - * - * @throws {Error} - * @return {Promise} - */ - getTime(): Promise; - - } - - export interface Locale { - - /** - * Get User Locale - * - * Get the current user location based on IP. Returns an object with user - * country code, country name, continent name, continent code, ip address and - * suggested currency. You can use the locale header to get the data in a - * supported language. - * - * ([IP Geolocation by DB-IP](https://db-ip.com)) - * - * @throws {Error} - * @return {Promise} - */ - get(): Promise; - - /** - * List Continents - * - * List of all continents. You can use the locale header to get the data in a - * supported language. - * - * @throws {Error} - * @return {Promise} - */ - getContinents(): Promise; - - /** - * List Countries - * - * List of all countries. You can use the locale header to get the data in a - * supported language. - * - * @throws {Error} - * @return {Promise} - */ - getCountries(): Promise; - - /** - * 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. - * - * @throws {Error} - * @return {Promise} - */ - getCountriesEU(): Promise; - - /** - * List Countries Phone Codes - * - * List of all countries phone codes. You can use the locale header to get the - * data in a supported language. - * - * @throws {Error} - * @return {Promise} - */ - getCountriesPhones(): Promise; - - /** - * 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. - * - * @throws {Error} - * @return {Promise} - */ - getCurrencies(): Promise; - - /** - * List Languages - * - * List of all languages classified by ISO 639-1 including 2-letter code, name - * in English, and name in the respective language. - * - * @throws {Error} - * @return {Promise} - */ - getLanguages(): Promise; - - } - - export interface Projects { - - /** - * List Projects - * - * - * @param {string} search - * @param {number} limit - * @param {number} offset - * @param {string} orderType - * @throws {Error} - * @return {Promise} - */ - list(search: string, limit: number, offset: number, orderType: string): Promise; - - /** - * Create Project - * - * - * @param {string} name - * @param {string} teamId - * @param {string} description - * @param {string} logo - * @param {string} url - * @param {string} legalName - * @param {string} legalCountry - * @param {string} legalState - * @param {string} legalCity - * @param {string} legalAddress - * @param {string} legalTaxId - * @throws {Error} - * @return {Promise} - */ - create(name: string, teamId: string, description: string, logo: string, url: string, legalName: string, legalCountry: string, legalState: string, legalCity: string, legalAddress: string, legalTaxId: string): Promise; - - /** - * Get Project - * - * - * @param {string} projectId - * @throws {Error} - * @return {Promise} - */ - get(projectId: string): Promise; - - /** - * Update Project - * - * - * @param {string} projectId - * @param {string} name - * @param {string} description - * @param {string} logo - * @param {string} url - * @param {string} legalName - * @param {string} legalCountry - * @param {string} legalState - * @param {string} legalCity - * @param {string} legalAddress - * @param {string} legalTaxId - * @throws {Error} - * @return {Promise} - */ - update(projectId: string, name: string, description: string, logo: string, url: string, legalName: string, legalCountry: string, legalState: string, legalCity: string, legalAddress: string, legalTaxId: string): Promise; - - /** - * Delete Project - * - * - * @param {string} projectId - * @param {string} password - * @throws {Error} - * @return {Promise} - */ - delete(projectId: string, password: string): Promise; - - /** - * List Domains - * - * - * @param {string} projectId - * @throws {Error} - * @return {Promise} - */ - listDomains(projectId: string): Promise; - - /** - * Create Domain - * - * - * @param {string} projectId - * @param {string} domain - * @throws {Error} - * @return {Promise} - */ - createDomain(projectId: string, domain: string): Promise; - - /** - * Get Domain - * - * - * @param {string} projectId - * @param {string} domainId - * @throws {Error} - * @return {Promise} - */ - getDomain(projectId: string, domainId: string): Promise; - - /** - * Delete Domain - * - * - * @param {string} projectId - * @param {string} domainId - * @throws {Error} - * @return {Promise} - */ - deleteDomain(projectId: string, domainId: string): Promise; - - /** - * Update Domain Verification Status - * - * - * @param {string} projectId - * @param {string} domainId - * @throws {Error} - * @return {Promise} - */ - updateDomainVerification(projectId: string, domainId: string): Promise; - - /** - * List Keys - * - * - * @param {string} projectId - * @throws {Error} - * @return {Promise} - */ - listKeys(projectId: string): Promise; - - /** - * Create Key - * - * - * @param {string} projectId - * @param {string} name - * @param {string[]} scopes - * @throws {Error} - * @return {Promise} - */ - createKey(projectId: string, name: string, scopes: string[]): Promise; - - /** - * Get Key - * - * - * @param {string} projectId - * @param {string} keyId - * @throws {Error} - * @return {Promise} - */ - getKey(projectId: string, keyId: string): Promise; - - /** - * Update Key - * - * - * @param {string} projectId - * @param {string} keyId - * @param {string} name - * @param {string[]} scopes - * @throws {Error} - * @return {Promise} - */ - updateKey(projectId: string, keyId: string, name: string, scopes: string[]): Promise; - - /** - * Delete Key - * - * - * @param {string} projectId - * @param {string} keyId - * @throws {Error} - * @return {Promise} - */ - deleteKey(projectId: string, keyId: string): Promise; - - /** - * Update Project OAuth2 - * - * - * @param {string} projectId - * @param {string} provider - * @param {string} appId - * @param {string} secret - * @throws {Error} - * @return {Promise} - */ - updateOAuth2(projectId: string, provider: string, appId: string, secret: string): Promise; - - /** - * List Platforms - * - * - * @param {string} projectId - * @throws {Error} - * @return {Promise} - */ - listPlatforms(projectId: string): Promise; - - /** - * Create Platform - * - * - * @param {string} projectId - * @param {string} type - * @param {string} name - * @param {string} key - * @param {string} store - * @param {string} hostname - * @throws {Error} - * @return {Promise} - */ - createPlatform(projectId: string, type: string, name: string, key: string, store: string, hostname: string): Promise; - - /** - * Get Platform - * - * - * @param {string} projectId - * @param {string} platformId - * @throws {Error} - * @return {Promise} - */ - getPlatform(projectId: string, platformId: string): Promise; - - /** - * Update Platform - * - * - * @param {string} projectId - * @param {string} platformId - * @param {string} name - * @param {string} key - * @param {string} store - * @param {string} hostname - * @throws {Error} - * @return {Promise} - */ - updatePlatform(projectId: string, platformId: string, name: string, key: string, store: string, hostname: string): Promise; - - /** - * Delete Platform - * - * - * @param {string} projectId - * @param {string} platformId - * @throws {Error} - * @return {Promise} - */ - deletePlatform(projectId: string, platformId: string): Promise; - - /** - * List Tasks - * - * - * @param {string} projectId - * @throws {Error} - * @return {Promise} - */ - listTasks(projectId: string): Promise; - - /** - * Create Task - * - * - * @param {string} projectId - * @param {string} name - * @param {string} status - * @param {string} schedule - * @param {boolean} security - * @param {string} httpMethod - * @param {string} httpUrl - * @param {string[]} httpHeaders - * @param {string} httpUser - * @param {string} httpPass - * @throws {Error} - * @return {Promise} - */ - createTask(projectId: string, name: string, status: string, schedule: string, security: boolean, httpMethod: string, httpUrl: string, httpHeaders: string[], httpUser: string, httpPass: string): Promise; - - /** - * Get Task - * - * - * @param {string} projectId - * @param {string} taskId - * @throws {Error} - * @return {Promise} - */ - getTask(projectId: string, taskId: string): Promise; - - /** - * Update Task - * - * - * @param {string} projectId - * @param {string} taskId - * @param {string} name - * @param {string} status - * @param {string} schedule - * @param {boolean} security - * @param {string} httpMethod - * @param {string} httpUrl - * @param {string[]} httpHeaders - * @param {string} httpUser - * @param {string} httpPass - * @throws {Error} - * @return {Promise} - */ - updateTask(projectId: string, taskId: string, name: string, status: string, schedule: string, security: boolean, httpMethod: string, httpUrl: string, httpHeaders: string[], httpUser: string, httpPass: string): Promise; - - /** - * Delete Task - * - * - * @param {string} projectId - * @param {string} taskId - * @throws {Error} - * @return {Promise} - */ - deleteTask(projectId: string, taskId: string): Promise; - - /** - * Get Project - * - * - * @param {string} projectId - * @param {string} range - * @throws {Error} - * @return {Promise} - */ - getUsage(projectId: string, range: string): Promise; - - /** - * List Webhooks - * - * - * @param {string} projectId - * @throws {Error} - * @return {Promise} - */ - listWebhooks(projectId: string): Promise; - - /** - * Create Webhook - * - * - * @param {string} projectId - * @param {string} name - * @param {string[]} events - * @param {string} url - * @param {boolean} security - * @param {string} httpUser - * @param {string} httpPass - * @throws {Error} - * @return {Promise} - */ - createWebhook(projectId: string, name: string, events: string[], url: string, security: boolean, httpUser: string, httpPass: string): Promise; - - /** - * Get Webhook - * - * - * @param {string} projectId - * @param {string} webhookId - * @throws {Error} - * @return {Promise} - */ - getWebhook(projectId: string, webhookId: string): Promise; - - /** - * Update Webhook - * - * - * @param {string} projectId - * @param {string} webhookId - * @param {string} name - * @param {string[]} events - * @param {string} url - * @param {boolean} security - * @param {string} httpUser - * @param {string} httpPass - * @throws {Error} - * @return {Promise} - */ - updateWebhook(projectId: string, webhookId: string, name: string, events: string[], url: string, security: boolean, httpUser: string, httpPass: string): Promise; - - /** - * Delete Webhook - * - * - * @param {string} projectId - * @param {string} webhookId - * @throws {Error} - * @return {Promise} - */ - deleteWebhook(projectId: string, webhookId: string): Promise; - - } - - export interface Storage { - - /** - * List Files - * - * Get a list of all the user files. You can use the query params to filter - * your results. On admin mode, this endpoint will return a list of all of the - * project files. [Learn more about different API modes](/docs/admin). - * - * @param {string} search - * @param {number} limit - * @param {number} offset - * @param {string} orderType - * @throws {Error} - * @return {Promise} - */ - listFiles(search: string, limit: number, offset: number, orderType: string): Promise; - - /** - * Create File - * - * Create a new file. The user who creates the file will automatically be - * assigned to read and write access unless he has passed custom values for - * read and write arguments. - * - * @param {File} file - * @param {string[]} read - * @param {string[]} write - * @throws {Error} - * @return {Promise} - */ - createFile(file: File, read: string[], write: string[]): Promise; - - /** - * Get File - * - * Get file by its unique ID. This endpoint response returns a JSON object - * with the file metadata. - * - * @param {string} fileId - * @throws {Error} - * @return {Promise} - */ - getFile(fileId: string): Promise; - - /** - * Update File - * - * Update file by its unique ID. Only users with write permissions have access - * to update this resource. - * - * @param {string} fileId - * @param {string[]} read - * @param {string[]} write - * @throws {Error} - * @return {Promise} - */ - updateFile(fileId: string, read: string[], write: string[]): Promise; - - /** - * Delete File - * - * Delete a file by its unique ID. Only users with write permissions have - * access to delete this resource. - * - * @param {string} fileId - * @throws {Error} - * @return {Promise} - */ - deleteFile(fileId: string): Promise; - - /** - * Get File for Download - * - * Get 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. - * - * @param {string} fileId - * @throws {Error} - * @return {string} - */ - getFileDownload(fileId: string): string; - - /** - * Get File Preview - * - * Get a file preview image. Currently, this method supports preview for image - * files (jpg, png, and gif), other supported formats, like pdf, docs, slides, - * and spreadsheets, will return the file icon image. You can also pass query - * string arguments for cutting and resizing your preview image. - * - * @param {string} fileId - * @param {number} width - * @param {number} height - * @param {number} quality - * @param {string} background - * @param {string} output - * @throws {Error} - * @return {string} - */ - getFilePreview(fileId: string, width: number, height: number, quality: number, background: string, output: string): string; - - /** - * Get File for View - * - * Get file content by its unique ID. This endpoint is similar to the download - * method but returns with no 'Content-Disposition: attachment' header. - * - * @param {string} fileId - * @param {string} as - * @throws {Error} - * @return {string} - */ - getFileView(fileId: string, as: string): string; - - } - - export interface Teams { - - /** - * List Teams - * - * Get a list of all the current user teams. You can use the query params to - * filter your results. On admin mode, this endpoint will return a list of all - * of the project teams. [Learn more about different API modes](/docs/admin). - * - * @param {string} search - * @param {number} limit - * @param {number} offset - * @param {string} orderType - * @throws {Error} - * @return {Promise} - */ - list(search: string, limit: number, offset: number, orderType: string): Promise; - - /** - * Create Team - * - * Create a new team. The user who creates the team will automatically be - * assigned as the owner of the team. The team owner can invite new members, - * who will be able add new owners and update or delete the team from your - * project. - * - * @param {string} name - * @param {string[]} roles - * @throws {Error} - * @return {Promise} - */ - create(name: string, roles: string[]): Promise; - - /** - * Get Team - * - * Get team by its unique ID. All team members have read access for this - * resource. - * - * @param {string} teamId - * @throws {Error} - * @return {Promise} - */ - get(teamId: string): Promise; - - /** - * Update Team - * - * Update team by its unique ID. Only team owners have write access for this - * resource. - * - * @param {string} teamId - * @param {string} name - * @throws {Error} - * @return {Promise} - */ - update(teamId: string, name: string): Promise; - - /** - * Delete Team - * - * Delete team by its unique ID. Only team owners have write access for this - * resource. - * - * @param {string} teamId - * @throws {Error} - * @return {Promise} - */ - delete(teamId: string): Promise; - - /** - * Get Team Memberships - * - * Get team members by the team unique ID. All team members have read access - * for this list of resources. - * - * @param {string} teamId - * @param {string} search - * @param {number} limit - * @param {number} offset - * @param {string} orderType - * @throws {Error} - * @return {Promise} - */ - getMemberships(teamId: string, search: string, limit: number, offset: number, orderType: string): Promise; - - /** - * Create Team Membership - * - * Use this endpoint to invite a new member to join your team. An email with a - * link to join the team will be sent to the new member email address if the - * member doesn't exist in the project it will be created automatically. - * - * Use the 'URL' parameter to redirect the user from the invitation email back - * to your app. When the user is redirected, use the [Update Team Membership - * Status](/docs/client/teams#updateMembershipStatus) endpoint to allow the - * user to accept the invitation to the team. - * - * Please note that in order to avoid a [Redirect - * Attacks](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) - * the only valid redirect URL's are the once from domains you have set when - * added your platforms in the console interface. - * - * @param {string} teamId - * @param {string} email - * @param {string[]} roles - * @param {string} url - * @param {string} name - * @throws {Error} - * @return {Promise} - */ - createMembership(teamId: string, email: string, roles: string[], url: string, name: string): Promise; - - /** - * 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 he didn't accept it. - * - * @param {string} teamId - * @param {string} inviteId - * @throws {Error} - * @return {Promise} - */ - deleteMembership(teamId: string, inviteId: string): Promise; - - /** - * Update Team Membership Status - * - * Use this endpoint to allow a user to accept an invitation to join a team - * after he is being redirected back to your app from the invitation email he - * was sent. - * - * @param {string} teamId - * @param {string} inviteId - * @param {string} userId - * @param {string} secret - * @throws {Error} - * @return {Promise} - */ - updateMembershipStatus(teamId: string, inviteId: string, userId: string, secret: string): Promise; - - } - - export interface Users { - - /** - * List Users - * - * Get a list of all the project users. You can use the query params to filter - * your results. - * - * @param {string} search - * @param {number} limit - * @param {number} offset - * @param {string} orderType - * @throws {Error} - * @return {Promise} - */ - list(search: string, limit: number, offset: number, orderType: string): Promise; - - /** - * Create User - * - * Create a new user. - * - * @param {string} email - * @param {string} password - * @param {string} name - * @throws {Error} - * @return {Promise} - */ - create(email: string, password: string, name: string): Promise; - - /** - * Get User - * - * Get user by its unique ID. - * - * @param {string} userId - * @throws {Error} - * @return {Promise} - */ - get(userId: string): Promise; - - /** - * Delete User - * - * Delete a user by its unique ID. - * - * @param {string} userId - * @throws {Error} - * @return {Promise} - */ - deleteUser(userId: string): Promise; - - /** - * Get User Logs - * - * Get user activity logs list by its unique ID. - * - * @param {string} userId - * @throws {Error} - * @return {Promise} - */ - getLogs(userId: string): Promise; - - /** - * Get User Preferences - * - * Get user preferences by its unique ID. - * - * @param {string} userId - * @throws {Error} - * @return {Promise} - */ - getPrefs(userId: string): Promise; - - /** - * Update User Preferences - * - * Update user preferences by its unique ID. You can pass only the specific - * settings you wish to update. - * - * @param {string} userId - * @param {object} prefs - * @throws {Error} - * @return {Promise} - */ - updatePrefs(userId: string, prefs: object): Promise; - - /** - * Get User Sessions - * - * Get user sessions list by its unique ID. - * - * @param {string} userId - * @throws {Error} - * @return {Promise} - */ - getSessions(userId: string): Promise; - - /** - * Delete User Sessions - * - * Delete all user sessions by its unique ID. - * - * @param {string} userId - * @throws {Error} - * @return {Promise} - */ - deleteSessions(userId: string): Promise; - - /** - * Delete User Session - * - * Delete user sessions by its unique ID. - * - * @param {string} userId - * @param {string} sessionId - * @throws {Error} - * @return {Promise} - */ - deleteSession(userId: string, sessionId: string): Promise; - - /** - * Update User Status - * - * Update user status by its unique ID. - * - * @param {string} userId - * @param {string} status - * @throws {Error} - * @return {Promise} - */ - updateStatus(userId: string, status: string): Promise; - - } - - -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-deno/CHANGELOG.md b/app/sdks/0.6.2/server-deno/CHANGELOG.md deleted file mode 100644 index fa4d35e687..0000000000 --- a/app/sdks/0.6.2/server-deno/CHANGELOG.md +++ /dev/null @@ -1 +0,0 @@ -# Change Log \ No newline at end of file diff --git a/app/sdks/0.6.2/server-deno/LICENSE b/app/sdks/0.6.2/server-deno/LICENSE deleted file mode 100644 index fc7c051a91..0000000000 --- a/app/sdks/0.6.2/server-deno/LICENSE +++ /dev/null @@ -1,12 +0,0 @@ -Copyright (c) 2019 Appwrite (https://appwrite.io) and individual contributors. -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - - 3. Neither the name Appwrite nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/app/sdks/0.6.2/server-deno/README.md b/app/sdks/0.6.2/server-deno/README.md deleted file mode 100644 index 82bd02c8ef..0000000000 --- a/app/sdks/0.6.2/server-deno/README.md +++ /dev/null @@ -1,28 +0,0 @@ -# Appwrite Deno SDK - -![License](https://img.shields.io/github/license/appwrite/sdk-for-deno.svg?v=1) -![Version](https://img.shields.io/badge/api%20version-0.6.2-blue.svg?v=1) - -**This SDK is compatible with Appwrite server version 0.6.2. For older versions, please check previous releases.** - -Appwrite is an open-source backend as a service server that abstract and simplify complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way. - Use the Deno SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools. - For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs) - - - -![Appwrite](https://appwrite.io/images/github.png) - -## Installation - -```javascript -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; -``` - -## Contribution - -This library is auto-generated by Appwrite custom [SDK Generator](https://github.com/appwrite/sdk-generator). To learn more about how you can help us improve this SDK, please check the [contribution guide](https://github.com/appwrite/sdk-generator/blob/master/CONTRIBUTING.md) before sending a pull-request. - -## License - -Please see the [BSD-3-Clause license](https://raw.githubusercontent.com/appwrite/appwrite/master/LICENSE) file for more information. \ No newline at end of file diff --git a/app/sdks/0.6.2/server-deno/docs/examples/avatars/get-browser.md b/app/sdks/0.6.2/server-deno/docs/examples/avatars/get-browser.md deleted file mode 100644 index 27c0336054..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/avatars/get-browser.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let avatars = new sdk.Avatars(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = avatars.getBrowser('aa'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-deno/docs/examples/avatars/get-credit-card.md b/app/sdks/0.6.2/server-deno/docs/examples/avatars/get-credit-card.md deleted file mode 100644 index 998356a106..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/avatars/get-credit-card.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let avatars = new sdk.Avatars(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = avatars.getCreditCard('amex'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-deno/docs/examples/avatars/get-favicon.md b/app/sdks/0.6.2/server-deno/docs/examples/avatars/get-favicon.md deleted file mode 100644 index 43afe096c4..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/avatars/get-favicon.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let avatars = new sdk.Avatars(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = avatars.getFavicon('https://example.com'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-deno/docs/examples/avatars/get-flag.md b/app/sdks/0.6.2/server-deno/docs/examples/avatars/get-flag.md deleted file mode 100644 index 6b28e5db2f..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/avatars/get-flag.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let avatars = new sdk.Avatars(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = avatars.getFlag('af'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-deno/docs/examples/avatars/get-image.md b/app/sdks/0.6.2/server-deno/docs/examples/avatars/get-image.md deleted file mode 100644 index 0a2693c768..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/avatars/get-image.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let avatars = new sdk.Avatars(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = avatars.getImage('https://example.com'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-deno/docs/examples/avatars/get-q-r.md b/app/sdks/0.6.2/server-deno/docs/examples/avatars/get-q-r.md deleted file mode 100644 index 6d8446b105..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/avatars/get-q-r.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let avatars = new sdk.Avatars(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = avatars.getQR('[TEXT]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-deno/docs/examples/database/create-collection.md b/app/sdks/0.6.2/server-deno/docs/examples/database/create-collection.md deleted file mode 100644 index 316ae6b222..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/database/create-collection.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let database = new sdk.Database(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = database.createCollection('[NAME]', [], [], []); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-deno/docs/examples/database/create-document.md b/app/sdks/0.6.2/server-deno/docs/examples/database/create-document.md deleted file mode 100644 index ef78a839a4..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/database/create-document.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let database = new sdk.Database(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = database.createDocument('[COLLECTION_ID]', {}, [], []); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-deno/docs/examples/database/delete-collection.md b/app/sdks/0.6.2/server-deno/docs/examples/database/delete-collection.md deleted file mode 100644 index e9b5d6392b..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/database/delete-collection.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let database = new sdk.Database(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = database.deleteCollection('[COLLECTION_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-deno/docs/examples/database/delete-document.md b/app/sdks/0.6.2/server-deno/docs/examples/database/delete-document.md deleted file mode 100644 index b7d3f52c71..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/database/delete-document.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let database = new sdk.Database(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = database.deleteDocument('[COLLECTION_ID]', '[DOCUMENT_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-deno/docs/examples/database/get-collection-logs.md b/app/sdks/0.6.2/server-deno/docs/examples/database/get-collection-logs.md deleted file mode 100644 index a72c17bc16..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/database/get-collection-logs.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let database = new sdk.Database(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = database.getCollectionLogs('[COLLECTION_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-deno/docs/examples/database/get-collection.md b/app/sdks/0.6.2/server-deno/docs/examples/database/get-collection.md deleted file mode 100644 index 323bc7ec74..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/database/get-collection.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let database = new sdk.Database(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = database.getCollection('[COLLECTION_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-deno/docs/examples/database/get-document.md b/app/sdks/0.6.2/server-deno/docs/examples/database/get-document.md deleted file mode 100644 index 7a0332251a..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/database/get-document.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let database = new sdk.Database(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = database.getDocument('[COLLECTION_ID]', '[DOCUMENT_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-deno/docs/examples/database/list-collections.md b/app/sdks/0.6.2/server-deno/docs/examples/database/list-collections.md deleted file mode 100644 index 292e46f860..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/database/list-collections.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let database = new sdk.Database(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = database.listCollections(); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-deno/docs/examples/database/list-documents.md b/app/sdks/0.6.2/server-deno/docs/examples/database/list-documents.md deleted file mode 100644 index bb22a3956a..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/database/list-documents.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let database = new sdk.Database(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = database.listDocuments('[COLLECTION_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-deno/docs/examples/database/update-collection.md b/app/sdks/0.6.2/server-deno/docs/examples/database/update-collection.md deleted file mode 100644 index 8239e45f28..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/database/update-collection.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let database = new sdk.Database(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = database.updateCollection('[COLLECTION_ID]', '[NAME]', [], []); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-deno/docs/examples/database/update-document.md b/app/sdks/0.6.2/server-deno/docs/examples/database/update-document.md deleted file mode 100644 index cd079c8f2d..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/database/update-document.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let database = new sdk.Database(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = database.updateDocument('[COLLECTION_ID]', '[DOCUMENT_ID]', {}, [], []); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-deno/docs/examples/health/get-anti-virus.md b/app/sdks/0.6.2/server-deno/docs/examples/health/get-anti-virus.md deleted file mode 100644 index e06fbf86de..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/health/get-anti-virus.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let health = new sdk.Health(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = health.getAntiVirus(); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-deno/docs/examples/health/get-cache.md b/app/sdks/0.6.2/server-deno/docs/examples/health/get-cache.md deleted file mode 100644 index b58ca1bc15..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/health/get-cache.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let health = new sdk.Health(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = health.getCache(); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-deno/docs/examples/health/get-d-b.md b/app/sdks/0.6.2/server-deno/docs/examples/health/get-d-b.md deleted file mode 100644 index 946cfb03a8..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/health/get-d-b.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let health = new sdk.Health(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = health.getDB(); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-deno/docs/examples/health/get-queue-certificates.md b/app/sdks/0.6.2/server-deno/docs/examples/health/get-queue-certificates.md deleted file mode 100644 index a86358bb22..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/health/get-queue-certificates.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let health = new sdk.Health(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = health.getQueueCertificates(); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-deno/docs/examples/health/get-queue-functions.md b/app/sdks/0.6.2/server-deno/docs/examples/health/get-queue-functions.md deleted file mode 100644 index 033248b118..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/health/get-queue-functions.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let health = new sdk.Health(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = health.getQueueFunctions(); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-deno/docs/examples/health/get-queue-logs.md b/app/sdks/0.6.2/server-deno/docs/examples/health/get-queue-logs.md deleted file mode 100644 index d4c3300a35..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/health/get-queue-logs.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let health = new sdk.Health(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = health.getQueueLogs(); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-deno/docs/examples/health/get-queue-tasks.md b/app/sdks/0.6.2/server-deno/docs/examples/health/get-queue-tasks.md deleted file mode 100644 index 01e3094ffc..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/health/get-queue-tasks.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let health = new sdk.Health(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = health.getQueueTasks(); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-deno/docs/examples/health/get-queue-usage.md b/app/sdks/0.6.2/server-deno/docs/examples/health/get-queue-usage.md deleted file mode 100644 index d0d8faf7b6..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/health/get-queue-usage.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let health = new sdk.Health(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = health.getQueueUsage(); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-deno/docs/examples/health/get-queue-webhooks.md b/app/sdks/0.6.2/server-deno/docs/examples/health/get-queue-webhooks.md deleted file mode 100644 index 268c521373..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/health/get-queue-webhooks.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let health = new sdk.Health(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = health.getQueueWebhooks(); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-deno/docs/examples/health/get-storage-local.md b/app/sdks/0.6.2/server-deno/docs/examples/health/get-storage-local.md deleted file mode 100644 index 77bb658f9a..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/health/get-storage-local.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let health = new sdk.Health(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = health.getStorageLocal(); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-deno/docs/examples/health/get-time.md b/app/sdks/0.6.2/server-deno/docs/examples/health/get-time.md deleted file mode 100644 index 0e5205b075..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/health/get-time.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let health = new sdk.Health(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = health.getTime(); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-deno/docs/examples/health/get.md b/app/sdks/0.6.2/server-deno/docs/examples/health/get.md deleted file mode 100644 index c2e6ecdf65..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/health/get.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let health = new sdk.Health(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = health.get(); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-deno/docs/examples/locale/get-continents.md b/app/sdks/0.6.2/server-deno/docs/examples/locale/get-continents.md deleted file mode 100644 index 18221d44b4..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/locale/get-continents.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let locale = new sdk.Locale(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = locale.getContinents(); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-deno/docs/examples/locale/get-countries-e-u.md b/app/sdks/0.6.2/server-deno/docs/examples/locale/get-countries-e-u.md deleted file mode 100644 index 4a3e49f755..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/locale/get-countries-e-u.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let locale = new sdk.Locale(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = locale.getCountriesEU(); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-deno/docs/examples/locale/get-countries-phones.md b/app/sdks/0.6.2/server-deno/docs/examples/locale/get-countries-phones.md deleted file mode 100644 index 61a1790806..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/locale/get-countries-phones.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let locale = new sdk.Locale(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = locale.getCountriesPhones(); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-deno/docs/examples/locale/get-countries.md b/app/sdks/0.6.2/server-deno/docs/examples/locale/get-countries.md deleted file mode 100644 index 20f544e617..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/locale/get-countries.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let locale = new sdk.Locale(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = locale.getCountries(); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-deno/docs/examples/locale/get-currencies.md b/app/sdks/0.6.2/server-deno/docs/examples/locale/get-currencies.md deleted file mode 100644 index 13b975291d..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/locale/get-currencies.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let locale = new sdk.Locale(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = locale.getCurrencies(); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-deno/docs/examples/locale/get.md b/app/sdks/0.6.2/server-deno/docs/examples/locale/get.md deleted file mode 100644 index 2336c3289d..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/locale/get.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let locale = new sdk.Locale(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = locale.get(); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-deno/docs/examples/storage/create-file.md b/app/sdks/0.6.2/server-deno/docs/examples/storage/create-file.md deleted file mode 100644 index 5b446e1a38..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/storage/create-file.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let storage = new sdk.Storage(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = storage.createFile(new File([fileBlob], 'file.png'), [], []); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-deno/docs/examples/storage/delete-file.md b/app/sdks/0.6.2/server-deno/docs/examples/storage/delete-file.md deleted file mode 100644 index 6469308c74..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/storage/delete-file.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let storage = new sdk.Storage(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = storage.deleteFile('[FILE_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-deno/docs/examples/storage/get-file-download.md b/app/sdks/0.6.2/server-deno/docs/examples/storage/get-file-download.md deleted file mode 100644 index 4510257bad..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/storage/get-file-download.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let storage = new sdk.Storage(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = storage.getFileDownload('[FILE_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-deno/docs/examples/storage/get-file-preview.md b/app/sdks/0.6.2/server-deno/docs/examples/storage/get-file-preview.md deleted file mode 100644 index 282fb30324..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/storage/get-file-preview.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let storage = new sdk.Storage(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = storage.getFilePreview('[FILE_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-deno/docs/examples/storage/get-file-view.md b/app/sdks/0.6.2/server-deno/docs/examples/storage/get-file-view.md deleted file mode 100644 index 8af5391017..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/storage/get-file-view.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let storage = new sdk.Storage(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = storage.getFileView('[FILE_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-deno/docs/examples/storage/get-file.md b/app/sdks/0.6.2/server-deno/docs/examples/storage/get-file.md deleted file mode 100644 index 393ce229cb..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/storage/get-file.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let storage = new sdk.Storage(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = storage.getFile('[FILE_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-deno/docs/examples/storage/list-files.md b/app/sdks/0.6.2/server-deno/docs/examples/storage/list-files.md deleted file mode 100644 index 0e57cd01de..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/storage/list-files.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let storage = new sdk.Storage(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = storage.listFiles(); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-deno/docs/examples/storage/update-file.md b/app/sdks/0.6.2/server-deno/docs/examples/storage/update-file.md deleted file mode 100644 index 33b2263540..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/storage/update-file.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let storage = new sdk.Storage(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = storage.updateFile('[FILE_ID]', [], []); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-deno/docs/examples/teams/create-membership.md b/app/sdks/0.6.2/server-deno/docs/examples/teams/create-membership.md deleted file mode 100644 index b277899c91..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/teams/create-membership.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let teams = new sdk.Teams(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = teams.createMembership('[TEAM_ID]', 'email@example.com', [], 'https://example.com'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-deno/docs/examples/teams/create.md b/app/sdks/0.6.2/server-deno/docs/examples/teams/create.md deleted file mode 100644 index 1ef3e01b81..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/teams/create.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let teams = new sdk.Teams(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = teams.create('[NAME]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-deno/docs/examples/teams/delete-membership.md b/app/sdks/0.6.2/server-deno/docs/examples/teams/delete-membership.md deleted file mode 100644 index 911fa30075..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/teams/delete-membership.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let teams = new sdk.Teams(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = teams.deleteMembership('[TEAM_ID]', '[INVITE_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-deno/docs/examples/teams/delete.md b/app/sdks/0.6.2/server-deno/docs/examples/teams/delete.md deleted file mode 100644 index 61ac03483f..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/teams/delete.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let teams = new sdk.Teams(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = teams.delete('[TEAM_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-deno/docs/examples/teams/get-memberships.md b/app/sdks/0.6.2/server-deno/docs/examples/teams/get-memberships.md deleted file mode 100644 index b652f8e4e5..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/teams/get-memberships.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let teams = new sdk.Teams(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = teams.getMemberships('[TEAM_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-deno/docs/examples/teams/get.md b/app/sdks/0.6.2/server-deno/docs/examples/teams/get.md deleted file mode 100644 index 69496e3eef..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/teams/get.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let teams = new sdk.Teams(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = teams.get('[TEAM_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-deno/docs/examples/teams/list.md b/app/sdks/0.6.2/server-deno/docs/examples/teams/list.md deleted file mode 100644 index 70851dda51..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/teams/list.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let teams = new sdk.Teams(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = teams.list(); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-deno/docs/examples/teams/update.md b/app/sdks/0.6.2/server-deno/docs/examples/teams/update.md deleted file mode 100644 index 7b815b4050..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/teams/update.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let teams = new sdk.Teams(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = teams.update('[TEAM_ID]', '[NAME]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-deno/docs/examples/users/create.md b/app/sdks/0.6.2/server-deno/docs/examples/users/create.md deleted file mode 100644 index 593eee6e9f..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/users/create.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let users = new sdk.Users(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = users.create('email@example.com', 'password'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-deno/docs/examples/users/delete-session.md b/app/sdks/0.6.2/server-deno/docs/examples/users/delete-session.md deleted file mode 100644 index e4940773e4..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/users/delete-session.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let users = new sdk.Users(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = users.deleteSession('[USER_ID]', '[SESSION_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-deno/docs/examples/users/delete-sessions.md b/app/sdks/0.6.2/server-deno/docs/examples/users/delete-sessions.md deleted file mode 100644 index e772c00a5f..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/users/delete-sessions.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let users = new sdk.Users(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = users.deleteSessions('[USER_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-deno/docs/examples/users/get-logs.md b/app/sdks/0.6.2/server-deno/docs/examples/users/get-logs.md deleted file mode 100644 index 58cc4fc529..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/users/get-logs.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let users = new sdk.Users(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = users.getLogs('[USER_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-deno/docs/examples/users/get-prefs.md b/app/sdks/0.6.2/server-deno/docs/examples/users/get-prefs.md deleted file mode 100644 index 4cda0bb73e..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/users/get-prefs.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let users = new sdk.Users(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = users.getPrefs('[USER_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-deno/docs/examples/users/get-sessions.md b/app/sdks/0.6.2/server-deno/docs/examples/users/get-sessions.md deleted file mode 100644 index 6686e21564..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/users/get-sessions.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let users = new sdk.Users(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = users.getSessions('[USER_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-deno/docs/examples/users/get.md b/app/sdks/0.6.2/server-deno/docs/examples/users/get.md deleted file mode 100644 index dce73d62c5..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/users/get.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let users = new sdk.Users(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = users.get('[USER_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-deno/docs/examples/users/list.md b/app/sdks/0.6.2/server-deno/docs/examples/users/list.md deleted file mode 100644 index b089c3e7e9..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/users/list.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let users = new sdk.Users(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = users.list(); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-deno/docs/examples/users/update-prefs.md b/app/sdks/0.6.2/server-deno/docs/examples/users/update-prefs.md deleted file mode 100644 index b06185ee91..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/users/update-prefs.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let users = new sdk.Users(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = users.updatePrefs('[USER_ID]', {}); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-deno/docs/examples/users/update-status.md b/app/sdks/0.6.2/server-deno/docs/examples/users/update-status.md deleted file mode 100644 index a0f028bde5..0000000000 --- a/app/sdks/0.6.2/server-deno/docs/examples/users/update-status.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let users = new sdk.Users(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = users.updateStatus('[USER_ID]', '1'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-deno/mod.ts b/app/sdks/0.6.2/server-deno/mod.ts deleted file mode 100644 index 3e51466fe6..0000000000 --- a/app/sdks/0.6.2/server-deno/mod.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { Client } from "./src/client.ts"; -import { Avatars } from "./src/services/avatars.ts"; -import { Database } from "./src/services/database.ts"; -import { Health } from "./src/services/health.ts"; -import { Locale } from "./src/services/locale.ts"; -import { Storage } from "./src/services/storage.ts"; -import { Teams } from "./src/services/teams.ts"; -import { Users } from "./src/services/users.ts"; - -export { - Client, - Avatars, - Database, - Health, - Locale, - Storage, - Teams, - Users, -}; \ No newline at end of file diff --git a/app/sdks/0.6.2/server-deno/src/client.ts b/app/sdks/0.6.2/server-deno/src/client.ts deleted file mode 100644 index 3bf22034b8..0000000000 --- a/app/sdks/0.6.2/server-deno/src/client.ts +++ /dev/null @@ -1,138 +0,0 @@ -export interface DocumentData { - [key: string]: any; -} - -export class Client { - - endpoint: string = 'https://appwrite.io/v1'; - headers: DocumentData = { - 'content-type': '', - 'x-sdk-version': 'appwrite:deno:0.0.2', - }; - - /** - * Set Project - * - * Your project ID - * - * @param string value - * - * @return self - */ - setProject(value: string): this { - this.addHeader('X-Appwrite-Project', value); - - return this; - } - - /** - * Set Key - * - * Your secret API key - * - * @param string value - * - * @return self - */ - setKey(value: string): this { - this.addHeader('X-Appwrite-Key', value); - - return this; - } - - /** - * Set Locale - * - * @param string value - * - * @return self - */ - setLocale(value: string): this { - this.addHeader('X-Appwrite-Locale', value); - - return this; - } - - - /*** - * @param endpoint - * @return this - */ - setEndpoint(endpoint: string): this { - this.endpoint = endpoint; - - return this; - } - - /** - * @param key string - * @param value string - */ - addHeader(key: string, value: string): this { - this.headers[key.toLowerCase()] = value.toLowerCase(); - - return this; - } - - withoutHeader(key: string, headers: DocumentData): DocumentData { - return Object.keys(headers).reduce((acc: DocumentData, cv) => { - if (cv == 'content-type') return acc - acc[cv] = headers[cv] - return acc - }, {}) - } - - async call(method: string, path: string = '', headers: DocumentData = {}, params: DocumentData = {}) { - headers = Object.assign(this.headers, headers); - - let body; - const url = new URL(this.endpoint + path) - if (method.toUpperCase() === 'GET') { - url.search = new URLSearchParams(this.flatten(params)).toString() - body = null - } else if (headers['content-type'].toLowerCase().startsWith('multipart/form-data')) { - headers = this.withoutHeader('content-type', headers) - const formData = new FormData() - const flatParams = this.flatten(params) - for (const key in flatParams) { - formData.append(key, flatParams[key]); - } - body = formData - } else { - body = JSON.stringify(params) - } - - const options = { - method: method.toUpperCase(), - headers: headers, - body: body, - }; - - let response = await fetch(url.toString(), options); - const contentType = response.headers.get('content-type'); - - if (contentType && contentType.includes('application/json')) { - return response.json() - } - - return response; - } - - flatten(data: DocumentData, prefix = '') { - let output: DocumentData = {}; - - for (const key in data) { - let value = data[key]; - let finalKey = prefix ? prefix + '[' + key +']' : key; - - if (Array.isArray(value)) { - output = Object.assign(output, this.flatten(value, finalKey)); // @todo: handle name collision here if needed - } - else { - output[finalKey] = value; - } - } - - return output; - } -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-deno/src/service.ts b/app/sdks/0.6.2/server-deno/src/service.ts deleted file mode 100644 index ceedf1a0c3..0000000000 --- a/app/sdks/0.6.2/server-deno/src/service.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { Client } from "./client.ts"; - -export abstract class Service { - - client: Client; - - /** - * @param client - */ - constructor(client: Client) { - this.client = client; - } -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-deno/src/services/avatars.ts b/app/sdks/0.6.2/server-deno/src/services/avatars.ts deleted file mode 100644 index f70e950bed..0000000000 --- a/app/sdks/0.6.2/server-deno/src/services/avatars.ts +++ /dev/null @@ -1,163 +0,0 @@ -import { Service } from "../service.ts"; -import { DocumentData } from '../client.ts' - -export class Avatars extends Service { - - /** - * Get Browser Icon - * - * You can use this endpoint to show different browser icons to your users. - * The code argument receives the browser code as it appears in your user - * /account/sessions endpoint. Use width, height and quality arguments to - * change the output settings. - * - * @param string code - * @param number width - * @param number height - * @param number quality - * @throws Exception - * @return Promise - */ - async getBrowser(code: string, width: number = 100, height: number = 100, quality: number = 100): Promise { - let path = '/avatars/browsers/{code}'.replace(new RegExp('{code}', 'g'), code); - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - 'width': width, - 'height': height, - 'quality': quality - }); - } - - /** - * Get Credit Card Icon - * - * Need to display your users with your billing method or their payment - * methods? The credit card endpoint will return you the icon of the credit - * card provider you need. Use width, height and quality arguments to change - * the output settings. - * - * @param string code - * @param number width - * @param number height - * @param number quality - * @throws Exception - * @return Promise - */ - async getCreditCard(code: string, width: number = 100, height: number = 100, quality: number = 100): Promise { - let path = '/avatars/credit-cards/{code}'.replace(new RegExp('{code}', 'g'), code); - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - 'width': width, - 'height': height, - 'quality': quality - }); - } - - /** - * Get Favicon - * - * Use this endpoint to fetch the favorite icon (AKA favicon) of a any remote - * website URL. - * - * @param string url - * @throws Exception - * @return Promise - */ - async getFavicon(url: string): Promise { - let path = '/avatars/favicon'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - 'url': url - }); - } - - /** - * Get Country Flag - * - * You can use this endpoint to show different country flags icons to your - * users. The code argument receives the 2 letter country code. Use width, - * height and quality arguments to change the output settings. - * - * @param string code - * @param number width - * @param number height - * @param number quality - * @throws Exception - * @return Promise - */ - async getFlag(code: string, width: number = 100, height: number = 100, quality: number = 100): Promise { - let path = '/avatars/flags/{code}'.replace(new RegExp('{code}', 'g'), code); - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - 'width': width, - 'height': height, - 'quality': quality - }); - } - - /** - * Get Image from URL - * - * Use this endpoint to fetch a remote image URL and crop it to any image size - * you want. This endpoint is very useful if you need to crop and display - * remote images in your app or in case you want to make sure a 3rd party - * image is properly served using a TLS protocol. - * - * @param string url - * @param number width - * @param number height - * @throws Exception - * @return Promise - */ - async getImage(url: string, width: number = 400, height: number = 400): Promise { - let path = '/avatars/image'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - 'url': url, - 'width': width, - 'height': height - }); - } - - /** - * 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. - * - * @param string text - * @param number size - * @param number margin - * @param number download - * @throws Exception - * @return Promise - */ - async getQR(text: string, size: number = 400, margin: number = 1, download: number = 0): Promise { - let path = '/avatars/qr'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - 'text': text, - 'size': size, - 'margin': margin, - 'download': download - }); - } -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-deno/src/services/database.ts b/app/sdks/0.6.2/server-deno/src/services/database.ts deleted file mode 100644 index 164145ef82..0000000000 --- a/app/sdks/0.6.2/server-deno/src/services/database.ts +++ /dev/null @@ -1,285 +0,0 @@ -import { Service } from "../service.ts"; -import { DocumentData } from '../client.ts' - -export class Database extends Service { - - /** - * List Collections - * - * Get a list of all the user collections. You can use the query params to - * filter your results. On admin mode, this endpoint will return a list of all - * of the project collections. [Learn more about different API - * modes](/docs/admin). - * - * @param string search - * @param number limit - * @param number offset - * @param string orderType - * @throws Exception - * @return Promise - */ - async listCollections(search: string = '', limit: number = 25, offset: number = 0, orderType: string = 'ASC'): Promise { - let path = '/database/collections'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - 'search': search, - 'limit': limit, - 'offset': offset, - 'orderType': orderType - }); - } - - /** - * Create Collection - * - * Create a new Collection. - * - * @param string name - * @param Array read - * @param Array write - * @param Array rules - * @throws Exception - * @return Promise - */ - async createCollection(name: string, read: Array, write: Array, rules: Array): Promise { - let path = '/database/collections'; - - return await this.client.call('post', path, { - 'content-type': 'application/json', - }, - { - 'name': name, - 'read': read, - 'write': write, - 'rules': rules - }); - } - - /** - * Get Collection - * - * Get collection by its unique ID. This endpoint response returns a JSON - * object with the collection metadata. - * - * @param string collectionId - * @throws Exception - * @return Promise - */ - async getCollection(collectionId: string): Promise { - let path = '/database/collections/{collectionId}'.replace(new RegExp('{collectionId}', 'g'), collectionId); - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Update Collection - * - * Update collection by its unique ID. - * - * @param string collectionId - * @param string name - * @param Array read - * @param Array write - * @param Array rules - * @throws Exception - * @return Promise - */ - async updateCollection(collectionId: string, name: string, read: Array, write: Array, rules: Array = []): Promise { - let path = '/database/collections/{collectionId}'.replace(new RegExp('{collectionId}', 'g'), collectionId); - - return await this.client.call('put', path, { - 'content-type': 'application/json', - }, - { - 'name': name, - 'read': read, - 'write': write, - 'rules': rules - }); - } - - /** - * Delete Collection - * - * Delete a collection by its unique ID. Only users with write permissions - * have access to delete this resource. - * - * @param string collectionId - * @throws Exception - * @return Promise - */ - async deleteCollection(collectionId: string): Promise { - let path = '/database/collections/{collectionId}'.replace(new RegExp('{collectionId}', 'g'), collectionId); - - return await this.client.call('delete', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * List Documents - * - * Get a list of all the user documents. You can use the query params to - * filter your results. On admin mode, this endpoint will return a list of all - * of the project documents. [Learn more about different API - * modes](/docs/admin). - * - * @param string collectionId - * @param Array filters - * @param number offset - * @param number limit - * @param string orderField - * @param string orderType - * @param string orderCast - * @param string search - * @param number first - * @param number last - * @throws Exception - * @return Promise - */ - async listDocuments(collectionId: string, filters: Array = [], offset: number = 0, limit: number = 50, orderField: string = '$id', orderType: string = 'ASC', orderCast: string = 'string', search: string = '', first: number = 0, last: number = 0): Promise { - let path = '/database/collections/{collectionId}/documents'.replace(new RegExp('{collectionId}', 'g'), collectionId); - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - 'filters': filters, - 'offset': offset, - 'limit': limit, - 'orderField': orderField, - 'orderType': orderType, - 'orderCast': orderCast, - 'search': search, - 'first': first, - 'last': last - }); - } - - /** - * Create Document - * - * Create a new Document. Before using this route, you should create a new - * collection resource using either a [server - * integration](/docs/server/database?sdk=nodejs#createCollection) API or - * directly from your database console. - * - * @param string collectionId - * @param DocumentData data - * @param Array read - * @param Array write - * @param string parentDocument - * @param string parentProperty - * @param string parentPropertyType - * @throws Exception - * @return Promise - */ - async createDocument(collectionId: string, data: DocumentData, read: Array, write: Array, parentDocument: string = '', parentProperty: string = '', parentPropertyType: string = 'assign'): Promise { - let path = '/database/collections/{collectionId}/documents'.replace(new RegExp('{collectionId}', 'g'), collectionId); - - return await this.client.call('post', path, { - 'content-type': 'application/json', - }, - { - 'data': data, - 'read': read, - 'write': write, - 'parentDocument': parentDocument, - 'parentProperty': parentProperty, - 'parentPropertyType': parentPropertyType - }); - } - - /** - * Get Document - * - * Get document by its unique ID. This endpoint response returns a JSON object - * with the document data. - * - * @param string collectionId - * @param string documentId - * @throws Exception - * @return Promise - */ - async getDocument(collectionId: string, documentId: string): Promise { - let path = '/database/collections/{collectionId}/documents/{documentId}'.replace(new RegExp('{collectionId}', 'g'), collectionId).replace(new RegExp('{documentId}', 'g'), documentId); - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Update Document - * - * @param string collectionId - * @param string documentId - * @param DocumentData data - * @param Array read - * @param Array write - * @throws Exception - * @return Promise - */ - async updateDocument(collectionId: string, documentId: string, data: DocumentData, read: Array, write: Array): Promise { - let path = '/database/collections/{collectionId}/documents/{documentId}'.replace(new RegExp('{collectionId}', 'g'), collectionId).replace(new RegExp('{documentId}', 'g'), documentId); - - return await this.client.call('patch', path, { - 'content-type': 'application/json', - }, - { - 'data': data, - 'read': read, - 'write': write - }); - } - - /** - * Delete Document - * - * Delete document by its unique ID. This endpoint deletes only the parent - * documents, his attributes and relations to other documents. Child documents - * **will not** be deleted. - * - * @param string collectionId - * @param string documentId - * @throws Exception - * @return Promise - */ - async deleteDocument(collectionId: string, documentId: string): Promise { - let path = '/database/collections/{collectionId}/documents/{documentId}'.replace(new RegExp('{collectionId}', 'g'), collectionId).replace(new RegExp('{documentId}', 'g'), documentId); - - return await this.client.call('delete', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Get Collection Logs - * - * @param string collectionId - * @throws Exception - * @return Promise - */ - async getCollectionLogs(collectionId: string): Promise { - let path = '/database/collections/{collectionId}/logs'.replace(new RegExp('{collectionId}', 'g'), collectionId); - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-deno/src/services/health.ts b/app/sdks/0.6.2/server-deno/src/services/health.ts deleted file mode 100644 index df5c18a2cb..0000000000 --- a/app/sdks/0.6.2/server-deno/src/services/health.ts +++ /dev/null @@ -1,232 +0,0 @@ -import { Service } from "../service.ts"; -import { DocumentData } from '../client.ts' - -export class Health extends Service { - - /** - * Get HTTP - * - * Check the Appwrite HTTP server is up and responsive. - * - * @throws Exception - * @return Promise - */ - async get(): Promise { - let path = '/health'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Get Anti virus - * - * Check the Appwrite Anti Virus server is up and connection is successful. - * - * @throws Exception - * @return Promise - */ - async getAntiVirus(): Promise { - let path = '/health/anti-virus'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Get Cache - * - * Check the Appwrite in-memory cache server is up and connection is - * successful. - * - * @throws Exception - * @return Promise - */ - async getCache(): Promise { - let path = '/health/cache'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Get DB - * - * Check the Appwrite database server is up and connection is successful. - * - * @throws Exception - * @return Promise - */ - async getDB(): Promise { - let path = '/health/db'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Get Certificate Queue - * - * Get the number of certificates that are waiting to be issued against - * [Letsencrypt](https://letsencrypt.org/) in the Appwrite internal queue - * server. - * - * @throws Exception - * @return Promise - */ - async getQueueCertificates(): Promise { - let path = '/health/queue/certificates'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Get Functions Queue - * - * @throws Exception - * @return Promise - */ - async getQueueFunctions(): Promise { - let path = '/health/queue/functions'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Get Logs Queue - * - * Get the number of logs that are waiting to be processed in the Appwrite - * internal queue server. - * - * @throws Exception - * @return Promise - */ - async getQueueLogs(): Promise { - let path = '/health/queue/logs'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Get Tasks Queue - * - * Get the number of tasks that are waiting to be processed in the Appwrite - * internal queue server. - * - * @throws Exception - * @return Promise - */ - async getQueueTasks(): Promise { - let path = '/health/queue/tasks'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Get Usage Queue - * - * Get the number of usage stats that are waiting to be processed in the - * Appwrite internal queue server. - * - * @throws Exception - * @return Promise - */ - async getQueueUsage(): Promise { - let path = '/health/queue/usage'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Get Webhooks Queue - * - * Get the number of webhooks that are waiting to be processed in the Appwrite - * internal queue server. - * - * @throws Exception - * @return Promise - */ - async getQueueWebhooks(): Promise { - let path = '/health/queue/webhooks'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Get Local Storage - * - * Check the Appwrite local storage device is up and connection is successful. - * - * @throws Exception - * @return Promise - */ - async getStorageLocal(): Promise { - let path = '/health/storage/local'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Get Time - * - * Check the Appwrite server time is synced with Google remote NTP server. We - * use this technology to smoothly handle leap seconds with no disruptive - * events. The [Network Time - * Protocol](https://en.wikipedia.org/wiki/Network_Time_Protocol) (NTP) is - * 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. - * - * @throws Exception - * @return Promise - */ - async getTime(): Promise { - let path = '/health/time'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-deno/src/services/locale.ts b/app/sdks/0.6.2/server-deno/src/services/locale.ts deleted file mode 100644 index 0c42ac61d2..0000000000 --- a/app/sdks/0.6.2/server-deno/src/services/locale.ts +++ /dev/null @@ -1,124 +0,0 @@ -import { Service } from "../service.ts"; -import { DocumentData } from '../client.ts' - -export class Locale extends Service { - - /** - * Get User Locale - * - * Get the current user location based on IP. Returns an object with user - * country code, country name, continent name, continent code, ip address and - * suggested currency. You can use the locale header to get the data in a - * supported language. - * - * ([IP Geolocation by DB-IP](https://db-ip.com)) - * - * @throws Exception - * @return Promise - */ - async get(): Promise { - let path = '/locale'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * List Continents - * - * List of all continents. You can use the locale header to get the data in a - * supported language. - * - * @throws Exception - * @return Promise - */ - async getContinents(): Promise { - let path = '/locale/continents'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * List Countries - * - * List of all countries. You can use the locale header to get the data in a - * supported language. - * - * @throws Exception - * @return Promise - */ - async getCountries(): Promise { - let path = '/locale/countries'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * 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. - * - * @throws Exception - * @return Promise - */ - async getCountriesEU(): Promise { - let path = '/locale/countries/eu'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * List Countries Phone Codes - * - * List of all countries phone codes. You can use the locale header to get the - * data in a supported language. - * - * @throws Exception - * @return Promise - */ - async getCountriesPhones(): Promise { - let path = '/locale/countries/phones'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * List Currencies - * - * List of all currencies, including currency symol, 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. - * - * @throws Exception - * @return Promise - */ - async getCurrencies(): Promise { - let path = '/locale/currencies'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-deno/src/services/storage.ts b/app/sdks/0.6.2/server-deno/src/services/storage.ts deleted file mode 100644 index b663739e05..0000000000 --- a/app/sdks/0.6.2/server-deno/src/services/storage.ts +++ /dev/null @@ -1,198 +0,0 @@ -import { Service } from "../service.ts"; -import { DocumentData } from '../client.ts' - -export class Storage extends Service { - - /** - * List Files - * - * Get a list of all the user files. You can use the query params to filter - * your results. On admin mode, this endpoint will return a list of all of the - * project files. [Learn more about different API modes](/docs/admin). - * - * @param string search - * @param number limit - * @param number offset - * @param string orderType - * @throws Exception - * @return Promise - */ - async listFiles(search: string = '', limit: number = 25, offset: number = 0, orderType: string = 'ASC'): Promise { - let path = '/storage/files'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - 'search': search, - 'limit': limit, - 'offset': offset, - 'orderType': orderType - }); - } - - /** - * Create File - * - * Create a new file. The user who creates the file will automatically be - * assigned to read and write access unless he has passed custom values for - * read and write arguments. - * - * @param File | Blob file - * @param Array read - * @param Array write - * @throws Exception - * @return Promise - */ - async createFile(file: File | Blob, read: Array, write: Array): Promise { - let path = '/storage/files'; - - return await this.client.call('post', path, { - 'content-type': 'multipart/form-data', - }, - { - 'file': file, - 'read': read, - 'write': write - }); - } - - /** - * Get File - * - * Get file by its unique ID. This endpoint response returns a JSON object - * with the file metadata. - * - * @param string fileId - * @throws Exception - * @return Promise - */ - async getFile(fileId: string): Promise { - let path = '/storage/files/{fileId}'.replace(new RegExp('{fileId}', 'g'), fileId); - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Update File - * - * Update file by its unique ID. Only users with write permissions have access - * to update this resource. - * - * @param string fileId - * @param Array read - * @param Array write - * @throws Exception - * @return Promise - */ - async updateFile(fileId: string, read: Array, write: Array): Promise { - let path = '/storage/files/{fileId}'.replace(new RegExp('{fileId}', 'g'), fileId); - - return await this.client.call('put', path, { - 'content-type': 'application/json', - }, - { - 'read': read, - 'write': write - }); - } - - /** - * Delete File - * - * Delete a file by its unique ID. Only users with write permissions have - * access to delete this resource. - * - * @param string fileId - * @throws Exception - * @return Promise - */ - async deleteFile(fileId: string): Promise { - let path = '/storage/files/{fileId}'.replace(new RegExp('{fileId}', 'g'), fileId); - - return await this.client.call('delete', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Get File for Download - * - * Get 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. - * - * @param string fileId - * @throws Exception - * @return Promise - */ - async getFileDownload(fileId: string): Promise { - let path = '/storage/files/{fileId}/download'.replace(new RegExp('{fileId}', 'g'), fileId); - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Get File Preview - * - * Get a file preview image. Currently, this method supports preview for image - * files (jpg, png, and gif), other supported formats, like pdf, docs, slides, - * and spreadsheets, will return the file icon image. You can also pass query - * string arguments for cutting and resizing your preview image. - * - * @param string fileId - * @param number width - * @param number height - * @param number quality - * @param string background - * @param string output - * @throws Exception - * @return Promise - */ - async getFilePreview(fileId: string, width: number = 0, height: number = 0, quality: number = 100, background: string = '', output: string = ''): Promise { - let path = '/storage/files/{fileId}/preview'.replace(new RegExp('{fileId}', 'g'), fileId); - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - 'width': width, - 'height': height, - 'quality': quality, - 'background': background, - 'output': output - }); - } - - /** - * Get File for View - * - * Get file content by its unique ID. This endpoint is similar to the download - * method but returns with no 'Content-Disposition: attachment' header. - * - * @param string fileId - * @param string as - * @throws Exception - * @return Promise - */ - async getFileView(fileId: string, as: string = ''): Promise { - let path = '/storage/files/{fileId}/view'.replace(new RegExp('{fileId}', 'g'), fileId); - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - 'as': as - }); - } -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-deno/src/services/teams.ts b/app/sdks/0.6.2/server-deno/src/services/teams.ts deleted file mode 100644 index b80c2f6714..0000000000 --- a/app/sdks/0.6.2/server-deno/src/services/teams.ts +++ /dev/null @@ -1,201 +0,0 @@ -import { Service } from "../service.ts"; -import { DocumentData } from '../client.ts' - -export class Teams extends Service { - - /** - * List Teams - * - * Get a list of all the current user teams. You can use the query params to - * filter your results. On admin mode, this endpoint will return a list of all - * of the project teams. [Learn more about different API modes](/docs/admin). - * - * @param string search - * @param number limit - * @param number offset - * @param string orderType - * @throws Exception - * @return Promise - */ - async list(search: string = '', limit: number = 25, offset: number = 0, orderType: string = 'ASC'): Promise { - let path = '/teams'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - 'search': search, - 'limit': limit, - 'offset': offset, - 'orderType': orderType - }); - } - - /** - * Create Team - * - * Create a new team. The user who creates the team will automatically be - * assigned as the owner of the team. The team owner can invite new members, - * who will be able add new owners and update or delete the team from your - * project. - * - * @param string name - * @param Array roles - * @throws Exception - * @return Promise - */ - async create(name: string, roles: Array = ["owner"]): Promise { - let path = '/teams'; - - return await this.client.call('post', path, { - 'content-type': 'application/json', - }, - { - 'name': name, - 'roles': roles - }); - } - - /** - * Get Team - * - * Get team by its unique ID. All team members have read access for this - * resource. - * - * @param string teamId - * @throws Exception - * @return Promise - */ - async get(teamId: string): Promise { - let path = '/teams/{teamId}'.replace(new RegExp('{teamId}', 'g'), teamId); - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Update Team - * - * Update team by its unique ID. Only team owners have write access for this - * resource. - * - * @param string teamId - * @param string name - * @throws Exception - * @return Promise - */ - async update(teamId: string, name: string): Promise { - let path = '/teams/{teamId}'.replace(new RegExp('{teamId}', 'g'), teamId); - - return await this.client.call('put', path, { - 'content-type': 'application/json', - }, - { - 'name': name - }); - } - - /** - * Delete Team - * - * Delete team by its unique ID. Only team owners have write access for this - * resource. - * - * @param string teamId - * @throws Exception - * @return Promise - */ - async delete(teamId: string): Promise { - let path = '/teams/{teamId}'.replace(new RegExp('{teamId}', 'g'), teamId); - - return await this.client.call('delete', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Get Team Memberships - * - * Get team members by the team unique ID. All team members have read access - * for this list of resources. - * - * @param string teamId - * @throws Exception - * @return Promise - */ - async getMemberships(teamId: string): Promise { - let path = '/teams/{teamId}/memberships'.replace(new RegExp('{teamId}', 'g'), teamId); - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Create Team Membership - * - * Use this endpoint to invite a new member to join your team. An email with a - * link to join the team will be sent to the new member email address if the - * member doesn't exist in the project it will be created automatically. - * - * Use the 'URL' parameter to redirect the user from the invitation email back - * to your app. When the user is redirected, use the [Update Team Membership - * Status](/docs/client/teams#updateMembershipStatus) endpoint to allow the - * user to accept the invitation to the team. - * - * Please note that in order to avoid a [Redirect - * Attacks](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) - * the only valid redirect URL's are the once from domains you have set when - * added your platforms in the console interface. - * - * @param string teamId - * @param string email - * @param Array roles - * @param string url - * @param string name - * @throws Exception - * @return Promise - */ - async createMembership(teamId: string, email: string, roles: Array, url: string, name: string = ''): Promise { - let path = '/teams/{teamId}/memberships'.replace(new RegExp('{teamId}', 'g'), teamId); - - return await this.client.call('post', path, { - 'content-type': 'application/json', - }, - { - 'email': email, - 'name': name, - 'roles': roles, - 'url': url - }); - } - - /** - * 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 he didn't accept it. - * - * @param string teamId - * @param string inviteId - * @throws Exception - * @return Promise - */ - async deleteMembership(teamId: string, inviteId: string): Promise { - let path = '/teams/{teamId}/memberships/{inviteId}'.replace(new RegExp('{teamId}', 'g'), teamId).replace(new RegExp('{inviteId}', 'g'), inviteId); - - return await this.client.call('delete', path, { - 'content-type': 'application/json', - }, - { - }); - } -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-deno/src/services/users.ts b/app/sdks/0.6.2/server-deno/src/services/users.ts deleted file mode 100644 index ac48507f08..0000000000 --- a/app/sdks/0.6.2/server-deno/src/services/users.ts +++ /dev/null @@ -1,214 +0,0 @@ -import { Service } from "../service.ts"; -import { DocumentData } from '../client.ts' - -export class Users extends Service { - - /** - * List Users - * - * Get a list of all the project users. You can use the query params to filter - * your results. - * - * @param string search - * @param number limit - * @param number offset - * @param string orderType - * @throws Exception - * @return Promise - */ - async list(search: string = '', limit: number = 25, offset: number = 0, orderType: string = 'ASC'): Promise { - let path = '/users'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - 'search': search, - 'limit': limit, - 'offset': offset, - 'orderType': orderType - }); - } - - /** - * Create User - * - * Create a new user. - * - * @param string email - * @param string password - * @param string name - * @throws Exception - * @return Promise - */ - async create(email: string, password: string, name: string = ''): Promise { - let path = '/users'; - - return await this.client.call('post', path, { - 'content-type': 'application/json', - }, - { - 'email': email, - 'password': password, - 'name': name - }); - } - - /** - * Get User - * - * Get user by its unique ID. - * - * @param string userId - * @throws Exception - * @return Promise - */ - async get(userId: string): Promise { - let path = '/users/{userId}'.replace(new RegExp('{userId}', 'g'), userId); - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Get User Logs - * - * Get user activity logs list by its unique ID. - * - * @param string userId - * @throws Exception - * @return Promise - */ - async getLogs(userId: string): Promise { - let path = '/users/{userId}/logs'.replace(new RegExp('{userId}', 'g'), userId); - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Get User Preferences - * - * Get user preferences by its unique ID. - * - * @param string userId - * @throws Exception - * @return Promise - */ - async getPrefs(userId: string): Promise { - let path = '/users/{userId}/prefs'.replace(new RegExp('{userId}', 'g'), userId); - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Update User Preferences - * - * Update user preferences by its unique ID. You can pass only the specific - * settings you wish to update. - * - * @param string userId - * @param DocumentData prefs - * @throws Exception - * @return Promise - */ - async updatePrefs(userId: string, prefs: DocumentData): Promise { - let path = '/users/{userId}/prefs'.replace(new RegExp('{userId}', 'g'), userId); - - return await this.client.call('patch', path, { - 'content-type': 'application/json', - }, - { - 'prefs': prefs - }); - } - - /** - * Get User Sessions - * - * Get user sessions list by its unique ID. - * - * @param string userId - * @throws Exception - * @return Promise - */ - async getSessions(userId: string): Promise { - let path = '/users/{userId}/sessions'.replace(new RegExp('{userId}', 'g'), userId); - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Delete User Sessions - * - * Delete all user sessions by its unique ID. - * - * @param string userId - * @throws Exception - * @return Promise - */ - async deleteSessions(userId: string): Promise { - let path = '/users/{userId}/sessions'.replace(new RegExp('{userId}', 'g'), userId); - - return await this.client.call('delete', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Delete User Session - * - * Delete user sessions by its unique ID. - * - * @param string userId - * @param string sessionId - * @throws Exception - * @return Promise - */ - async deleteSession(userId: string, sessionId: string): Promise { - let path = '/users/{userId}/sessions/{sessionId}'.replace(new RegExp('{userId}', 'g'), userId).replace(new RegExp('{sessionId}', 'g'), sessionId); - - return await this.client.call('delete', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Update User Status - * - * Update user status by its unique ID. - * - * @param string userId - * @param string status - * @throws Exception - * @return Promise - */ - async updateStatus(userId: string, status: string): Promise { - let path = '/users/{userId}/status'.replace(new RegExp('{userId}', 'g'), userId); - - return await this.client.call('patch', path, { - 'content-type': 'application/json', - }, - { - 'status': status - }); - } -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-go/CHANGELOG.md b/app/sdks/0.6.2/server-go/CHANGELOG.md deleted file mode 100644 index fa4d35e687..0000000000 --- a/app/sdks/0.6.2/server-go/CHANGELOG.md +++ /dev/null @@ -1 +0,0 @@ -# Change Log \ No newline at end of file diff --git a/app/sdks/0.6.2/server-go/LICENSE b/app/sdks/0.6.2/server-go/LICENSE deleted file mode 100644 index fc7c051a91..0000000000 --- a/app/sdks/0.6.2/server-go/LICENSE +++ /dev/null @@ -1,12 +0,0 @@ -Copyright (c) 2019 Appwrite (https://appwrite.io) and individual contributors. -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - - 3. Neither the name Appwrite nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/app/sdks/0.6.2/server-go/README.md b/app/sdks/0.6.2/server-go/README.md deleted file mode 100644 index 3b46d51f79..0000000000 --- a/app/sdks/0.6.2/server-go/README.md +++ /dev/null @@ -1,30 +0,0 @@ -# Appwrite SDK for Go - -![License](https://img.shields.io/github/license/appwrite/sdk-for-go.svg?v=1) -![Version](https://img.shields.io/badge/api%20version-0.6.0-blue.svg?v=1) - -**This SDK is compatible with Appwrite server version 0.6.0. For older versions, please check previous releases.** - -Appwrite is an open-source backend as a service server that abstract and simplify complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way. - Use the Go SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools. - For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs) - - - -![Appwrite](https://appwrite.io/images/github.png) - -## Installation - -To install using `go get`: - -```bash -go get github.com/appwrite/sdk-for-go -``` - -## Contribution - -This library is auto-generated by Appwrite custom [SDK Generator](https://github.com/appwrite/sdk-generator). To learn more about how you can help us improve this SDK, please check the [contribution guide](https://github.com/appwrite/sdk-generator/blob/master/CONTRIBUTING.md) before sending a pull-request. - -## License - -Please see the [BSD-3-Clause license](https://raw.githubusercontent.com/appwrite/appwrite/master/LICENSE) file for more information. \ No newline at end of file diff --git a/app/sdks/0.6.2/server-go/avatars.go b/app/sdks/0.6.2/server-go/avatars.go deleted file mode 100644 index feafa9da31..0000000000 --- a/app/sdks/0.6.2/server-go/avatars.go +++ /dev/null @@ -1,111 +0,0 @@ -package appwrite - -import ( - "strings" -) - -// Avatars service -type Avatars struct { - client Client -} - -func NewAvatars(clt Client) Avatars { - service := Avatars{ - client: clt, - } - - return service -} - -// GetBrowser you can use this endpoint to show different browser icons to -// your users. The code argument receives the browser code as it appears in -// your user /account/sessions endpoint. Use width, height and quality -// arguments to change the output settings. -func (srv *Avatars) GetBrowser(Code string, Width int, Height int, Quality int) (map[string]interface{}, error) { - r := strings.NewReplacer("{code}", Code) - path := r.Replace("/avatars/browsers/{code}") - - params := map[string]interface{}{ - "width": Width, - "height": Height, - "quality": Quality, - } - - return srv.client.Call("GET", path, nil, params) -} - -// GetCreditCard need to display your users with your billing method or their -// payment methods? The credit card endpoint will return you the icon of the -// credit card provider you need. Use width, height and quality arguments to -// change the output settings. -func (srv *Avatars) GetCreditCard(Code string, Width int, Height int, Quality int) (map[string]interface{}, error) { - r := strings.NewReplacer("{code}", Code) - path := r.Replace("/avatars/credit-cards/{code}") - - params := map[string]interface{}{ - "width": Width, - "height": Height, - "quality": Quality, - } - - return srv.client.Call("GET", path, nil, params) -} - -// GetFavicon use this endpoint to fetch the favorite icon (AKA favicon) of a -// any remote website URL. -func (srv *Avatars) GetFavicon(Url string) (map[string]interface{}, error) { - path := "/avatars/favicon" - - params := map[string]interface{}{ - "url": Url, - } - - return srv.client.Call("GET", path, nil, params) -} - -// GetFlag you can use this endpoint to show different country flags icons to -// your users. The code argument receives the 2 letter country code. Use -// width, height and quality arguments to change the output settings. -func (srv *Avatars) GetFlag(Code string, Width int, Height int, Quality int) (map[string]interface{}, error) { - r := strings.NewReplacer("{code}", Code) - path := r.Replace("/avatars/flags/{code}") - - params := map[string]interface{}{ - "width": Width, - "height": Height, - "quality": Quality, - } - - return srv.client.Call("GET", path, nil, params) -} - -// GetImage use this endpoint to fetch a remote image URL and crop it to any -// image size you want. This endpoint is very useful if you need to crop and -// display remote images in your app or in case you want to make sure a 3rd -// party image is properly served using a TLS protocol. -func (srv *Avatars) GetImage(Url string, Width int, Height int) (map[string]interface{}, error) { - path := "/avatars/image" - - params := map[string]interface{}{ - "url": Url, - "width": Width, - "height": Height, - } - - return srv.client.Call("GET", path, nil, params) -} - -// GetQR 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. -func (srv *Avatars) GetQR(Text string, Size int, Margin int, Download int) (map[string]interface{}, error) { - path := "/avatars/qr" - - params := map[string]interface{}{ - "text": Text, - "size": Size, - "margin": Margin, - "download": Download, - } - - return srv.client.Call("GET", path, nil, params) -} diff --git a/app/sdks/0.6.2/server-go/client.go b/app/sdks/0.6.2/server-go/client.go deleted file mode 100644 index bd21f5f347..0000000000 --- a/app/sdks/0.6.2/server-go/client.go +++ /dev/null @@ -1,113 +0,0 @@ -package appwrite - -import ( - "encoding/json" - "io/ioutil" - "net/http" - "net/url" - "strings" -) - -// Client is the client struct to access Appwrite services -type Client struct { - client *http.Client - endpoint string - headers map[string]string - selfSigned bool -} - -// SetEndpoint sets the default endpoint to which the Client connects to -func (clt *Client) SetEndpoint(endpoint string) { - clt.endpoint = endpoint -} - -// SetSelfSigned sets the condition that specify if the Client should allow connections to a server using a self-signed certificate -func (clt *Client) SetSelfSigned(status bool) { - clt.selfSigned = status -} - -// AddHeader add a new custom header that the Client should send on each request -func (clt *Client) AddHeader(key string, value string) { - clt.headers[key] = value -} - -// Your project ID -func (clt *Client) SetProject(value string) { - clt.headers["X-Appwrite-Project"] = value -} - -// Your secret API key -func (clt *Client) SetKey(value string) { - clt.headers["X-Appwrite-Key"] = value -} - -func (clt *Client) SetLocale(value string) { - clt.headers["X-Appwrite-Locale"] = value -} - -// Call an API using Client -func (clt *Client) Call(method string, path string, headers map[string]interface{}, params map[string]interface{}) (map[string]interface{}, error) { - if clt.client == nil { - // Create HTTP client - clt.client = &http.Client{} - } - - if clt.selfSigned { - // Allow self signed requests - } - - urlPath := clt.endpoint + path - isGet := strings.ToUpper(method) == "GET" - - var reqBody *strings.Reader - if !isGet { - frm := url.Values{} - for key, val := range params { - frm.Add(key, ToString(val)) - } - reqBody = strings.NewReader(frm.Encode()) - } - - // Create and modify HTTP request before sending - req, err := http.NewRequest(method, urlPath, reqBody) - if err != nil { - return nil, err - } - - // Set Client headers - for key, val := range clt.headers { - req.Header.Set(key, ToString(val)) - } - - // Set Custom headers - for key, val := range headers { - req.Header.Set(key, ToString(val)) - } - - if isGet { - q := req.URL.Query() - for key, val := range params { - q.Add(key, ToString(val)) - } - req.URL.RawQuery = q.Encode() - } - - // Make request - response, err := clt.client.Do(req) - if err != nil { - return nil, err - } - - // Handle response - defer response.Body.Close() - - responseData, err := ioutil.ReadAll(response.Body) - if err != nil { - return nil, err - } - - var jsonResponse map[string]interface{} - json.Unmarshal(responseData, &jsonResponse) - - return jsonResponse, nil -} diff --git a/app/sdks/0.6.2/server-go/database.go b/app/sdks/0.6.2/server-go/database.go deleted file mode 100644 index d420d69fde..0000000000 --- a/app/sdks/0.6.2/server-go/database.go +++ /dev/null @@ -1,178 +0,0 @@ -package appwrite - -import ( - "strings" -) - -// Database service -type Database struct { - client Client -} - -func NewDatabase(clt Client) Database { - service := Database{ - client: clt, - } - - return service -} - -// ListCollections get a list of all the user collections. You can use the -// query params to filter your results. On admin mode, this endpoint will -// return a list of all of the project collections. [Learn more about -// different API modes](/docs/admin). -func (srv *Database) ListCollections(Search string, Limit int, Offset int, OrderType string) (map[string]interface{}, error) { - path := "/database/collections" - - params := map[string]interface{}{ - "search": Search, - "limit": Limit, - "offset": Offset, - "orderType": OrderType, - } - - return srv.client.Call("GET", path, nil, params) -} - -// CreateCollection create a new Collection. -func (srv *Database) CreateCollection(Name string, Read []interface{}, Write []interface{}, Rules []interface{}) (map[string]interface{}, error) { - path := "/database/collections" - - params := map[string]interface{}{ - "name": Name, - "read": Read, - "write": Write, - "rules": Rules, - } - - return srv.client.Call("POST", path, nil, params) -} - -// GetCollection get collection by its unique ID. This endpoint response -// returns a JSON object with the collection metadata. -func (srv *Database) GetCollection(CollectionId string) (map[string]interface{}, error) { - r := strings.NewReplacer("{collectionId}", CollectionId) - path := r.Replace("/database/collections/{collectionId}") - - params := map[string]interface{}{ - } - - return srv.client.Call("GET", path, nil, params) -} - -// UpdateCollection update collection by its unique ID. -func (srv *Database) UpdateCollection(CollectionId string, Name string, Read []interface{}, Write []interface{}, Rules []interface{}) (map[string]interface{}, error) { - r := strings.NewReplacer("{collectionId}", CollectionId) - path := r.Replace("/database/collections/{collectionId}") - - params := map[string]interface{}{ - "name": Name, - "read": Read, - "write": Write, - "rules": Rules, - } - - return srv.client.Call("PUT", path, nil, params) -} - -// DeleteCollection delete a collection by its unique ID. Only users with -// write permissions have access to delete this resource. -func (srv *Database) DeleteCollection(CollectionId string) (map[string]interface{}, error) { - r := strings.NewReplacer("{collectionId}", CollectionId) - path := r.Replace("/database/collections/{collectionId}") - - params := map[string]interface{}{ - } - - return srv.client.Call("DELETE", path, nil, params) -} - -// ListDocuments get a list of all the user documents. You can use the query -// params to filter your results. On admin mode, this endpoint will return a -// list of all of the project documents. [Learn more about different API -// modes](/docs/admin). -func (srv *Database) ListDocuments(CollectionId string, Filters []interface{}, Offset int, Limit int, OrderField string, OrderType string, OrderCast string, Search string, First int, Last int) (map[string]interface{}, error) { - r := strings.NewReplacer("{collectionId}", CollectionId) - path := r.Replace("/database/collections/{collectionId}/documents") - - params := map[string]interface{}{ - "filters": Filters, - "offset": Offset, - "limit": Limit, - "orderField": OrderField, - "orderType": OrderType, - "orderCast": OrderCast, - "search": Search, - "first": First, - "last": Last, - } - - return srv.client.Call("GET", path, nil, params) -} - -// CreateDocument create a new Document. -func (srv *Database) CreateDocument(CollectionId string, Data object, Read []interface{}, Write []interface{}, ParentDocument string, ParentProperty string, ParentPropertyType string) (map[string]interface{}, error) { - r := strings.NewReplacer("{collectionId}", CollectionId) - path := r.Replace("/database/collections/{collectionId}/documents") - - params := map[string]interface{}{ - "data": Data, - "read": Read, - "write": Write, - "parentDocument": ParentDocument, - "parentProperty": ParentProperty, - "parentPropertyType": ParentPropertyType, - } - - return srv.client.Call("POST", path, nil, params) -} - -// GetDocument get document by its unique ID. This endpoint response returns a -// JSON object with the document data. -func (srv *Database) GetDocument(CollectionId string, DocumentId string) (map[string]interface{}, error) { - r := strings.NewReplacer("{collectionId}", CollectionId, "{documentId}", DocumentId) - path := r.Replace("/database/collections/{collectionId}/documents/{documentId}") - - params := map[string]interface{}{ - } - - return srv.client.Call("GET", path, nil, params) -} - -// UpdateDocument -func (srv *Database) UpdateDocument(CollectionId string, DocumentId string, Data object, Read []interface{}, Write []interface{}) (map[string]interface{}, error) { - r := strings.NewReplacer("{collectionId}", CollectionId, "{documentId}", DocumentId) - path := r.Replace("/database/collections/{collectionId}/documents/{documentId}") - - params := map[string]interface{}{ - "data": Data, - "read": Read, - "write": Write, - } - - return srv.client.Call("PATCH", path, nil, params) -} - -// DeleteDocument delete document by its unique ID. This endpoint deletes only -// the parent documents, his attributes and relations to other documents. -// Child documents **will not** be deleted. -func (srv *Database) DeleteDocument(CollectionId string, DocumentId string) (map[string]interface{}, error) { - r := strings.NewReplacer("{collectionId}", CollectionId, "{documentId}", DocumentId) - path := r.Replace("/database/collections/{collectionId}/documents/{documentId}") - - params := map[string]interface{}{ - } - - return srv.client.Call("DELETE", path, nil, params) -} - -// GetCollectionLogs -func (srv *Database) GetCollectionLogs(CollectionId string) (map[string]interface{}, error) { - r := strings.NewReplacer("{collectionId}", CollectionId) - path := r.Replace("/database/collections/{collectionId}/logs") - - params := map[string]interface{}{ - } - - return srv.client.Call("GET", path, nil, params) -} diff --git a/app/sdks/0.6.2/server-go/docs/examples/avatars/get-browser.md b/app/sdks/0.6.2/server-go/docs/examples/avatars/get-browser.md deleted file mode 100644 index b307cd8dbc..0000000000 --- a/app/sdks/0.6.2/server-go/docs/examples/avatars/get-browser.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Avatars{ - client: &client - } - - var response, error := service.GetBrowser("aa", 0, 0, 0) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-go/docs/examples/avatars/get-credit-card.md b/app/sdks/0.6.2/server-go/docs/examples/avatars/get-credit-card.md deleted file mode 100644 index ffc748d052..0000000000 --- a/app/sdks/0.6.2/server-go/docs/examples/avatars/get-credit-card.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Avatars{ - client: &client - } - - var response, error := service.GetCreditCard("amex", 0, 0, 0) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-go/docs/examples/avatars/get-favicon.md b/app/sdks/0.6.2/server-go/docs/examples/avatars/get-favicon.md deleted file mode 100644 index 596a9d9fd3..0000000000 --- a/app/sdks/0.6.2/server-go/docs/examples/avatars/get-favicon.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Avatars{ - client: &client - } - - var response, error := service.GetFavicon("https://example.com") - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-go/docs/examples/avatars/get-flag.md b/app/sdks/0.6.2/server-go/docs/examples/avatars/get-flag.md deleted file mode 100644 index 63042ef0a6..0000000000 --- a/app/sdks/0.6.2/server-go/docs/examples/avatars/get-flag.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Avatars{ - client: &client - } - - var response, error := service.GetFlag("af", 0, 0, 0) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-go/docs/examples/avatars/get-image.md b/app/sdks/0.6.2/server-go/docs/examples/avatars/get-image.md deleted file mode 100644 index 7095ee3658..0000000000 --- a/app/sdks/0.6.2/server-go/docs/examples/avatars/get-image.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Avatars{ - client: &client - } - - var response, error := service.GetImage("https://example.com", 0, 0) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-go/docs/examples/avatars/get-q-r.md b/app/sdks/0.6.2/server-go/docs/examples/avatars/get-q-r.md deleted file mode 100644 index 37425a463e..0000000000 --- a/app/sdks/0.6.2/server-go/docs/examples/avatars/get-q-r.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Avatars{ - client: &client - } - - var response, error := service.GetQR("[TEXT]", 0, 0, 0) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-go/docs/examples/database/create-collection.md b/app/sdks/0.6.2/server-go/docs/examples/database/create-collection.md deleted file mode 100644 index 947ce799ff..0000000000 --- a/app/sdks/0.6.2/server-go/docs/examples/database/create-collection.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Database{ - client: &client - } - - var response, error := service.CreateCollection("[NAME]", [], [], []) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-go/docs/examples/database/create-document.md b/app/sdks/0.6.2/server-go/docs/examples/database/create-document.md deleted file mode 100644 index 5b63002464..0000000000 --- a/app/sdks/0.6.2/server-go/docs/examples/database/create-document.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Database{ - client: &client - } - - var response, error := service.CreateDocument("[COLLECTION_ID]", , [], [], "[PARENT_DOCUMENT]", "", "assign") - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-go/docs/examples/database/delete-collection.md b/app/sdks/0.6.2/server-go/docs/examples/database/delete-collection.md deleted file mode 100644 index 2b5744730b..0000000000 --- a/app/sdks/0.6.2/server-go/docs/examples/database/delete-collection.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Database{ - client: &client - } - - var response, error := service.DeleteCollection("[COLLECTION_ID]") - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-go/docs/examples/database/delete-document.md b/app/sdks/0.6.2/server-go/docs/examples/database/delete-document.md deleted file mode 100644 index 5dfa23e1b1..0000000000 --- a/app/sdks/0.6.2/server-go/docs/examples/database/delete-document.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Database{ - client: &client - } - - var response, error := service.DeleteDocument("[COLLECTION_ID]", "[DOCUMENT_ID]") - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-go/docs/examples/database/get-collection-logs.md b/app/sdks/0.6.2/server-go/docs/examples/database/get-collection-logs.md deleted file mode 100644 index 4427295371..0000000000 --- a/app/sdks/0.6.2/server-go/docs/examples/database/get-collection-logs.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Database{ - client: &client - } - - var response, error := service.GetCollectionLogs("[COLLECTION_ID]") - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-go/docs/examples/database/get-collection.md b/app/sdks/0.6.2/server-go/docs/examples/database/get-collection.md deleted file mode 100644 index bc6d9f7746..0000000000 --- a/app/sdks/0.6.2/server-go/docs/examples/database/get-collection.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Database{ - client: &client - } - - var response, error := service.GetCollection("[COLLECTION_ID]") - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-go/docs/examples/database/get-document.md b/app/sdks/0.6.2/server-go/docs/examples/database/get-document.md deleted file mode 100644 index ba4b063f57..0000000000 --- a/app/sdks/0.6.2/server-go/docs/examples/database/get-document.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Database{ - client: &client - } - - var response, error := service.GetDocument("[COLLECTION_ID]", "[DOCUMENT_ID]") - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-go/docs/examples/database/list-collections.md b/app/sdks/0.6.2/server-go/docs/examples/database/list-collections.md deleted file mode 100644 index 0dda37d5e3..0000000000 --- a/app/sdks/0.6.2/server-go/docs/examples/database/list-collections.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Database{ - client: &client - } - - var response, error := service.ListCollections("[SEARCH]", 0, 0, "ASC") - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-go/docs/examples/database/list-documents.md b/app/sdks/0.6.2/server-go/docs/examples/database/list-documents.md deleted file mode 100644 index 9f2e36d591..0000000000 --- a/app/sdks/0.6.2/server-go/docs/examples/database/list-documents.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Database{ - client: &client - } - - var response, error := service.ListDocuments("[COLLECTION_ID]", [], 0, 0, "[ORDER_FIELD]", "DESC", "int", "[SEARCH]", 0, 0) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-go/docs/examples/database/update-collection.md b/app/sdks/0.6.2/server-go/docs/examples/database/update-collection.md deleted file mode 100644 index 2b5e7f6d37..0000000000 --- a/app/sdks/0.6.2/server-go/docs/examples/database/update-collection.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Database{ - client: &client - } - - var response, error := service.UpdateCollection("[COLLECTION_ID]", "[NAME]", [], [], []) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-go/docs/examples/database/update-document.md b/app/sdks/0.6.2/server-go/docs/examples/database/update-document.md deleted file mode 100644 index 65a3eefa4a..0000000000 --- a/app/sdks/0.6.2/server-go/docs/examples/database/update-document.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Database{ - client: &client - } - - var response, error := service.UpdateDocument("[COLLECTION_ID]", "[DOCUMENT_ID]", , [], []) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-go/docs/examples/functions/create-execution.md b/app/sdks/0.6.2/server-go/docs/examples/functions/create-execution.md deleted file mode 100644 index ea060d6f7f..0000000000 --- a/app/sdks/0.6.2/server-go/docs/examples/functions/create-execution.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Functions{ - client: &client - } - - var response, error := service.CreateExecution("[FUNCTION_ID]", 0) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-go/docs/examples/functions/create-tag.md b/app/sdks/0.6.2/server-go/docs/examples/functions/create-tag.md deleted file mode 100644 index 84d5e80787..0000000000 --- a/app/sdks/0.6.2/server-go/docs/examples/functions/create-tag.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Functions{ - client: &client - } - - var response, error := service.CreateTag("[FUNCTION_ID]", "node-14", "[COMMAND]", "[CODE]") - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-go/docs/examples/functions/create.md b/app/sdks/0.6.2/server-go/docs/examples/functions/create.md deleted file mode 100644 index a87a23b944..0000000000 --- a/app/sdks/0.6.2/server-go/docs/examples/functions/create.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Functions{ - client: &client - } - - var response, error := service.Create("[NAME]", , [], "", 0) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-go/docs/examples/functions/delete-tag.md b/app/sdks/0.6.2/server-go/docs/examples/functions/delete-tag.md deleted file mode 100644 index caf36146da..0000000000 --- a/app/sdks/0.6.2/server-go/docs/examples/functions/delete-tag.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Functions{ - client: &client - } - - var response, error := service.DeleteTag("[FUNCTION_ID]", "[TAG_ID]") - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-go/docs/examples/functions/delete.md b/app/sdks/0.6.2/server-go/docs/examples/functions/delete.md deleted file mode 100644 index e49addb2b1..0000000000 --- a/app/sdks/0.6.2/server-go/docs/examples/functions/delete.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Functions{ - client: &client - } - - var response, error := service.Delete("[FUNCTION_ID]") - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-go/docs/examples/functions/get-execution.md b/app/sdks/0.6.2/server-go/docs/examples/functions/get-execution.md deleted file mode 100644 index 13a3ad4685..0000000000 --- a/app/sdks/0.6.2/server-go/docs/examples/functions/get-execution.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Functions{ - client: &client - } - - var response, error := service.GetExecution("[FUNCTION_ID]", "[EXECUTION_ID]") - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-go/docs/examples/functions/get-tag.md b/app/sdks/0.6.2/server-go/docs/examples/functions/get-tag.md deleted file mode 100644 index 640543d94b..0000000000 --- a/app/sdks/0.6.2/server-go/docs/examples/functions/get-tag.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Functions{ - client: &client - } - - var response, error := service.GetTag("[FUNCTION_ID]", "[TAG_ID]") - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-go/docs/examples/functions/get.md b/app/sdks/0.6.2/server-go/docs/examples/functions/get.md deleted file mode 100644 index 2bba5028c0..0000000000 --- a/app/sdks/0.6.2/server-go/docs/examples/functions/get.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Functions{ - client: &client - } - - var response, error := service.Get("[FUNCTION_ID]") - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-go/docs/examples/functions/list-executions.md b/app/sdks/0.6.2/server-go/docs/examples/functions/list-executions.md deleted file mode 100644 index 5115928c29..0000000000 --- a/app/sdks/0.6.2/server-go/docs/examples/functions/list-executions.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Functions{ - client: &client - } - - var response, error := service.ListExecutions("[FUNCTION_ID]", "[SEARCH]", 0, 0, "ASC") - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-go/docs/examples/functions/list-tags.md b/app/sdks/0.6.2/server-go/docs/examples/functions/list-tags.md deleted file mode 100644 index b6e495988e..0000000000 --- a/app/sdks/0.6.2/server-go/docs/examples/functions/list-tags.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Functions{ - client: &client - } - - var response, error := service.ListTags("[FUNCTION_ID]", "[SEARCH]", 0, 0, "ASC") - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-go/docs/examples/functions/list.md b/app/sdks/0.6.2/server-go/docs/examples/functions/list.md deleted file mode 100644 index 0a208e367d..0000000000 --- a/app/sdks/0.6.2/server-go/docs/examples/functions/list.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Functions{ - client: &client - } - - var response, error := service.List("[SEARCH]", 0, 0, "ASC") - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-go/docs/examples/functions/update-active.md b/app/sdks/0.6.2/server-go/docs/examples/functions/update-active.md deleted file mode 100644 index da3b0f1227..0000000000 --- a/app/sdks/0.6.2/server-go/docs/examples/functions/update-active.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Functions{ - client: &client - } - - var response, error := service.UpdateActive("[FUNCTION_ID]", "[ACTIVE]") - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-go/docs/examples/functions/update-tag.md b/app/sdks/0.6.2/server-go/docs/examples/functions/update-tag.md deleted file mode 100644 index 299b095736..0000000000 --- a/app/sdks/0.6.2/server-go/docs/examples/functions/update-tag.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Functions{ - client: &client - } - - var response, error := service.UpdateTag("[FUNCTION_ID]", "[TAG]") - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-go/docs/examples/functions/update.md b/app/sdks/0.6.2/server-go/docs/examples/functions/update.md deleted file mode 100644 index 0f8f9e0190..0000000000 --- a/app/sdks/0.6.2/server-go/docs/examples/functions/update.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Functions{ - client: &client - } - - var response, error := service.Update("[FUNCTION_ID]", "[NAME]", , [], "", 0) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-go/docs/examples/health/get-anti-virus.md b/app/sdks/0.6.2/server-go/docs/examples/health/get-anti-virus.md deleted file mode 100644 index a6f363dde1..0000000000 --- a/app/sdks/0.6.2/server-go/docs/examples/health/get-anti-virus.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Health{ - client: &client - } - - var response, error := service.GetAntiVirus() - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-go/docs/examples/health/get-cache.md b/app/sdks/0.6.2/server-go/docs/examples/health/get-cache.md deleted file mode 100644 index ce7b1c6f93..0000000000 --- a/app/sdks/0.6.2/server-go/docs/examples/health/get-cache.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Health{ - client: &client - } - - var response, error := service.GetCache() - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-go/docs/examples/health/get-d-b.md b/app/sdks/0.6.2/server-go/docs/examples/health/get-d-b.md deleted file mode 100644 index 6d86894417..0000000000 --- a/app/sdks/0.6.2/server-go/docs/examples/health/get-d-b.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Health{ - client: &client - } - - var response, error := service.GetDB() - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-go/docs/examples/health/get-queue-certificates.md b/app/sdks/0.6.2/server-go/docs/examples/health/get-queue-certificates.md deleted file mode 100644 index 9954551580..0000000000 --- a/app/sdks/0.6.2/server-go/docs/examples/health/get-queue-certificates.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Health{ - client: &client - } - - var response, error := service.GetQueueCertificates() - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-go/docs/examples/health/get-queue-functions.md b/app/sdks/0.6.2/server-go/docs/examples/health/get-queue-functions.md deleted file mode 100644 index 5df453068b..0000000000 --- a/app/sdks/0.6.2/server-go/docs/examples/health/get-queue-functions.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Health{ - client: &client - } - - var response, error := service.GetQueueFunctions() - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-go/docs/examples/health/get-queue-logs.md b/app/sdks/0.6.2/server-go/docs/examples/health/get-queue-logs.md deleted file mode 100644 index 0b6280a42a..0000000000 --- a/app/sdks/0.6.2/server-go/docs/examples/health/get-queue-logs.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Health{ - client: &client - } - - var response, error := service.GetQueueLogs() - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-go/docs/examples/health/get-queue-tasks.md b/app/sdks/0.6.2/server-go/docs/examples/health/get-queue-tasks.md deleted file mode 100644 index 28d615dc2c..0000000000 --- a/app/sdks/0.6.2/server-go/docs/examples/health/get-queue-tasks.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Health{ - client: &client - } - - var response, error := service.GetQueueTasks() - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-go/docs/examples/health/get-queue-usage.md b/app/sdks/0.6.2/server-go/docs/examples/health/get-queue-usage.md deleted file mode 100644 index e9fe988aa2..0000000000 --- a/app/sdks/0.6.2/server-go/docs/examples/health/get-queue-usage.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Health{ - client: &client - } - - var response, error := service.GetQueueUsage() - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-go/docs/examples/health/get-queue-webhooks.md b/app/sdks/0.6.2/server-go/docs/examples/health/get-queue-webhooks.md deleted file mode 100644 index 2f92835a12..0000000000 --- a/app/sdks/0.6.2/server-go/docs/examples/health/get-queue-webhooks.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Health{ - client: &client - } - - var response, error := service.GetQueueWebhooks() - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-go/docs/examples/health/get-storage-anti-virus.md b/app/sdks/0.6.2/server-go/docs/examples/health/get-storage-anti-virus.md deleted file mode 100644 index 8369b5ba07..0000000000 --- a/app/sdks/0.6.2/server-go/docs/examples/health/get-storage-anti-virus.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Health{ - client: &client - } - - var response, error := service.GetStorageAntiVirus() - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-go/docs/examples/health/get-storage-local.md b/app/sdks/0.6.2/server-go/docs/examples/health/get-storage-local.md deleted file mode 100644 index db0d5a5b21..0000000000 --- a/app/sdks/0.6.2/server-go/docs/examples/health/get-storage-local.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Health{ - client: &client - } - - var response, error := service.GetStorageLocal() - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-go/docs/examples/health/get-time.md b/app/sdks/0.6.2/server-go/docs/examples/health/get-time.md deleted file mode 100644 index dd8486a484..0000000000 --- a/app/sdks/0.6.2/server-go/docs/examples/health/get-time.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Health{ - client: &client - } - - var response, error := service.GetTime() - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-go/docs/examples/health/get.md b/app/sdks/0.6.2/server-go/docs/examples/health/get.md deleted file mode 100644 index df1cb27243..0000000000 --- a/app/sdks/0.6.2/server-go/docs/examples/health/get.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Health{ - client: &client - } - - var response, error := service.Get() - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-go/docs/examples/locale/get-continents.md b/app/sdks/0.6.2/server-go/docs/examples/locale/get-continents.md deleted file mode 100644 index dd9b96ca66..0000000000 --- a/app/sdks/0.6.2/server-go/docs/examples/locale/get-continents.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Locale{ - client: &client - } - - var response, error := service.GetContinents() - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-go/docs/examples/locale/get-countries-e-u.md b/app/sdks/0.6.2/server-go/docs/examples/locale/get-countries-e-u.md deleted file mode 100644 index 01a2fedc1b..0000000000 --- a/app/sdks/0.6.2/server-go/docs/examples/locale/get-countries-e-u.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Locale{ - client: &client - } - - var response, error := service.GetCountriesEU() - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-go/docs/examples/locale/get-countries-phones.md b/app/sdks/0.6.2/server-go/docs/examples/locale/get-countries-phones.md deleted file mode 100644 index 87de9bb2f5..0000000000 --- a/app/sdks/0.6.2/server-go/docs/examples/locale/get-countries-phones.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Locale{ - client: &client - } - - var response, error := service.GetCountriesPhones() - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-go/docs/examples/locale/get-countries.md b/app/sdks/0.6.2/server-go/docs/examples/locale/get-countries.md deleted file mode 100644 index 58c74f5f73..0000000000 --- a/app/sdks/0.6.2/server-go/docs/examples/locale/get-countries.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Locale{ - client: &client - } - - var response, error := service.GetCountries() - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-go/docs/examples/locale/get-currencies.md b/app/sdks/0.6.2/server-go/docs/examples/locale/get-currencies.md deleted file mode 100644 index c736db8336..0000000000 --- a/app/sdks/0.6.2/server-go/docs/examples/locale/get-currencies.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Locale{ - client: &client - } - - var response, error := service.GetCurrencies() - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-go/docs/examples/locale/get.md b/app/sdks/0.6.2/server-go/docs/examples/locale/get.md deleted file mode 100644 index 3245b79cb5..0000000000 --- a/app/sdks/0.6.2/server-go/docs/examples/locale/get.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Locale{ - client: &client - } - - var response, error := service.Get() - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-go/docs/examples/storage/create-file.md b/app/sdks/0.6.2/server-go/docs/examples/storage/create-file.md deleted file mode 100644 index 1348acb40b..0000000000 --- a/app/sdks/0.6.2/server-go/docs/examples/storage/create-file.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Storage{ - client: &client - } - - var response, error := service.CreateFile(file, [], []) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-go/docs/examples/storage/delete-file.md b/app/sdks/0.6.2/server-go/docs/examples/storage/delete-file.md deleted file mode 100644 index 6b00581d75..0000000000 --- a/app/sdks/0.6.2/server-go/docs/examples/storage/delete-file.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Storage{ - client: &client - } - - var response, error := service.DeleteFile("[FILE_ID]") - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-go/docs/examples/storage/get-file-download.md b/app/sdks/0.6.2/server-go/docs/examples/storage/get-file-download.md deleted file mode 100644 index 6c68b14c3b..0000000000 --- a/app/sdks/0.6.2/server-go/docs/examples/storage/get-file-download.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Storage{ - client: &client - } - - var response, error := service.GetFileDownload("[FILE_ID]") - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-go/docs/examples/storage/get-file-preview.md b/app/sdks/0.6.2/server-go/docs/examples/storage/get-file-preview.md deleted file mode 100644 index 86212c82d3..0000000000 --- a/app/sdks/0.6.2/server-go/docs/examples/storage/get-file-preview.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Storage{ - client: &client - } - - var response, error := service.GetFilePreview("[FILE_ID]", 0, 0, 0, "", "jpg") - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-go/docs/examples/storage/get-file-view.md b/app/sdks/0.6.2/server-go/docs/examples/storage/get-file-view.md deleted file mode 100644 index b9ddb637de..0000000000 --- a/app/sdks/0.6.2/server-go/docs/examples/storage/get-file-view.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Storage{ - client: &client - } - - var response, error := service.GetFileView("[FILE_ID]", "pdf") - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-go/docs/examples/storage/get-file.md b/app/sdks/0.6.2/server-go/docs/examples/storage/get-file.md deleted file mode 100644 index f9aaa6eb81..0000000000 --- a/app/sdks/0.6.2/server-go/docs/examples/storage/get-file.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Storage{ - client: &client - } - - var response, error := service.GetFile("[FILE_ID]") - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-go/docs/examples/storage/list-files.md b/app/sdks/0.6.2/server-go/docs/examples/storage/list-files.md deleted file mode 100644 index 53e7e37d5c..0000000000 --- a/app/sdks/0.6.2/server-go/docs/examples/storage/list-files.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Storage{ - client: &client - } - - var response, error := service.ListFiles("[SEARCH]", 0, 0, "ASC") - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-go/docs/examples/storage/update-file.md b/app/sdks/0.6.2/server-go/docs/examples/storage/update-file.md deleted file mode 100644 index 1ec409de9f..0000000000 --- a/app/sdks/0.6.2/server-go/docs/examples/storage/update-file.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Storage{ - client: &client - } - - var response, error := service.UpdateFile("[FILE_ID]", [], []) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-go/docs/examples/teams/create-membership.md b/app/sdks/0.6.2/server-go/docs/examples/teams/create-membership.md deleted file mode 100644 index a346deaa64..0000000000 --- a/app/sdks/0.6.2/server-go/docs/examples/teams/create-membership.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Teams{ - client: &client - } - - var response, error := service.CreateMembership("[TEAM_ID]", "email@example.com", [], "https://example.com", "[NAME]") - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-go/docs/examples/teams/create.md b/app/sdks/0.6.2/server-go/docs/examples/teams/create.md deleted file mode 100644 index 8e3a100573..0000000000 --- a/app/sdks/0.6.2/server-go/docs/examples/teams/create.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Teams{ - client: &client - } - - var response, error := service.Create("[NAME]", []) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-go/docs/examples/teams/delete-membership.md b/app/sdks/0.6.2/server-go/docs/examples/teams/delete-membership.md deleted file mode 100644 index 809413a3bf..0000000000 --- a/app/sdks/0.6.2/server-go/docs/examples/teams/delete-membership.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Teams{ - client: &client - } - - var response, error := service.DeleteMembership("[TEAM_ID]", "[INVITE_ID]") - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-go/docs/examples/teams/delete.md b/app/sdks/0.6.2/server-go/docs/examples/teams/delete.md deleted file mode 100644 index 5cf65c2f6f..0000000000 --- a/app/sdks/0.6.2/server-go/docs/examples/teams/delete.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Teams{ - client: &client - } - - var response, error := service.Delete("[TEAM_ID]") - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-go/docs/examples/teams/get-memberships.md b/app/sdks/0.6.2/server-go/docs/examples/teams/get-memberships.md deleted file mode 100644 index b59a8ff33b..0000000000 --- a/app/sdks/0.6.2/server-go/docs/examples/teams/get-memberships.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Teams{ - client: &client - } - - var response, error := service.GetMemberships("[TEAM_ID]") - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-go/docs/examples/teams/get.md b/app/sdks/0.6.2/server-go/docs/examples/teams/get.md deleted file mode 100644 index 2920f547f2..0000000000 --- a/app/sdks/0.6.2/server-go/docs/examples/teams/get.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Teams{ - client: &client - } - - var response, error := service.Get("[TEAM_ID]") - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-go/docs/examples/teams/list.md b/app/sdks/0.6.2/server-go/docs/examples/teams/list.md deleted file mode 100644 index 5cd9e3e29e..0000000000 --- a/app/sdks/0.6.2/server-go/docs/examples/teams/list.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Teams{ - client: &client - } - - var response, error := service.List("[SEARCH]", 0, 0, "ASC") - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-go/docs/examples/teams/update.md b/app/sdks/0.6.2/server-go/docs/examples/teams/update.md deleted file mode 100644 index 40178c8424..0000000000 --- a/app/sdks/0.6.2/server-go/docs/examples/teams/update.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Teams{ - client: &client - } - - var response, error := service.Update("[TEAM_ID]", "[NAME]") - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-go/docs/examples/users/create.md b/app/sdks/0.6.2/server-go/docs/examples/users/create.md deleted file mode 100644 index 3a27b00f54..0000000000 --- a/app/sdks/0.6.2/server-go/docs/examples/users/create.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Users{ - client: &client - } - - var response, error := service.Create("email@example.com", "password", "[NAME]") - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-go/docs/examples/users/delete-session.md b/app/sdks/0.6.2/server-go/docs/examples/users/delete-session.md deleted file mode 100644 index e1840ba133..0000000000 --- a/app/sdks/0.6.2/server-go/docs/examples/users/delete-session.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Users{ - client: &client - } - - var response, error := service.DeleteSession("[USER_ID]", "[SESSION_ID]") - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-go/docs/examples/users/delete-sessions.md b/app/sdks/0.6.2/server-go/docs/examples/users/delete-sessions.md deleted file mode 100644 index 682ea0cada..0000000000 --- a/app/sdks/0.6.2/server-go/docs/examples/users/delete-sessions.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Users{ - client: &client - } - - var response, error := service.DeleteSessions("[USER_ID]") - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-go/docs/examples/users/get-logs.md b/app/sdks/0.6.2/server-go/docs/examples/users/get-logs.md deleted file mode 100644 index 6917cc71db..0000000000 --- a/app/sdks/0.6.2/server-go/docs/examples/users/get-logs.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Users{ - client: &client - } - - var response, error := service.GetLogs("[USER_ID]") - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-go/docs/examples/users/get-prefs.md b/app/sdks/0.6.2/server-go/docs/examples/users/get-prefs.md deleted file mode 100644 index 17676eaa36..0000000000 --- a/app/sdks/0.6.2/server-go/docs/examples/users/get-prefs.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Users{ - client: &client - } - - var response, error := service.GetPrefs("[USER_ID]") - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-go/docs/examples/users/get-sessions.md b/app/sdks/0.6.2/server-go/docs/examples/users/get-sessions.md deleted file mode 100644 index cc53abfdab..0000000000 --- a/app/sdks/0.6.2/server-go/docs/examples/users/get-sessions.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Users{ - client: &client - } - - var response, error := service.GetSessions("[USER_ID]") - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-go/docs/examples/users/get.md b/app/sdks/0.6.2/server-go/docs/examples/users/get.md deleted file mode 100644 index 8809d1b29b..0000000000 --- a/app/sdks/0.6.2/server-go/docs/examples/users/get.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Users{ - client: &client - } - - var response, error := service.Get("[USER_ID]") - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-go/docs/examples/users/list.md b/app/sdks/0.6.2/server-go/docs/examples/users/list.md deleted file mode 100644 index ad37e72219..0000000000 --- a/app/sdks/0.6.2/server-go/docs/examples/users/list.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Users{ - client: &client - } - - var response, error := service.List("[SEARCH]", 0, 0, "ASC") - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-go/docs/examples/users/update-prefs.md b/app/sdks/0.6.2/server-go/docs/examples/users/update-prefs.md deleted file mode 100644 index 9789b90f25..0000000000 --- a/app/sdks/0.6.2/server-go/docs/examples/users/update-prefs.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Users{ - client: &client - } - - var response, error := service.UpdatePrefs("[USER_ID]", ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-go/docs/examples/users/update-status.md b/app/sdks/0.6.2/server-go/docs/examples/users/update-status.md deleted file mode 100644 index eff2fb5072..0000000000 --- a/app/sdks/0.6.2/server-go/docs/examples/users/update-status.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Users{ - client: &client - } - - var response, error := service.UpdateStatus("[USER_ID]", "1") - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-go/functions.go b/app/sdks/0.6.2/server-go/functions.go deleted file mode 100644 index 3f82eb1fb2..0000000000 --- a/app/sdks/0.6.2/server-go/functions.go +++ /dev/null @@ -1,186 +0,0 @@ -package appwrite - -import ( - "strings" -) - -// Functions service -type Functions struct { - client Client -} - -func NewFunctions(clt Client) Functions { - service := Functions{ - client: clt, - } - - return service -} - -// List -func (srv *Functions) List(Search string, Limit int, Offset int, OrderType string) (map[string]interface{}, error) { - path := "/functions" - - params := map[string]interface{}{ - "search": Search, - "limit": Limit, - "offset": Offset, - "orderType": OrderType, - } - - return srv.client.Call("GET", path, nil, params) -} - -// Create -func (srv *Functions) Create(Name string, Vars object, Events []interface{}, Schedule string, Timeout int) (map[string]interface{}, error) { - path := "/functions" - - params := map[string]interface{}{ - "name": Name, - "vars": Vars, - "events": Events, - "schedule": Schedule, - "timeout": Timeout, - } - - return srv.client.Call("POST", path, nil, params) -} - -// Get -func (srv *Functions) Get(FunctionId string) (map[string]interface{}, error) { - r := strings.NewReplacer("{functionId}", FunctionId) - path := r.Replace("/functions/{functionId}") - - params := map[string]interface{}{ - } - - return srv.client.Call("GET", path, nil, params) -} - -// Update -func (srv *Functions) Update(FunctionId string, Name string, Vars object, Events []interface{}, Schedule string, Timeout int) (map[string]interface{}, error) { - r := strings.NewReplacer("{functionId}", FunctionId) - path := r.Replace("/functions/{functionId}") - - params := map[string]interface{}{ - "name": Name, - "vars": Vars, - "events": Events, - "schedule": Schedule, - "timeout": Timeout, - } - - return srv.client.Call("PUT", path, nil, params) -} - -// Delete -func (srv *Functions) Delete(FunctionId string) (map[string]interface{}, error) { - r := strings.NewReplacer("{functionId}", FunctionId) - path := r.Replace("/functions/{functionId}") - - params := map[string]interface{}{ - } - - return srv.client.Call("DELETE", path, nil, params) -} - -// ListExecutions -func (srv *Functions) ListExecutions(FunctionId string, Search string, Limit int, Offset int, OrderType string) (map[string]interface{}, error) { - r := strings.NewReplacer("{functionId}", FunctionId) - path := r.Replace("/functions/{functionId}/executions") - - params := map[string]interface{}{ - "search": Search, - "limit": Limit, - "offset": Offset, - "orderType": OrderType, - } - - return srv.client.Call("GET", path, nil, params) -} - -// CreateExecution -func (srv *Functions) CreateExecution(FunctionId string, Async int) (map[string]interface{}, error) { - r := strings.NewReplacer("{functionId}", FunctionId) - path := r.Replace("/functions/{functionId}/executions") - - params := map[string]interface{}{ - "async": Async, - } - - return srv.client.Call("POST", path, nil, params) -} - -// GetExecution -func (srv *Functions) GetExecution(FunctionId string, ExecutionId string) (map[string]interface{}, error) { - r := strings.NewReplacer("{functionId}", FunctionId, "{executionId}", ExecutionId) - path := r.Replace("/functions/{functionId}/executions/{executionId}") - - params := map[string]interface{}{ - } - - return srv.client.Call("GET", path, nil, params) -} - -// UpdateTag -func (srv *Functions) UpdateTag(FunctionId string, Tag string) (map[string]interface{}, error) { - r := strings.NewReplacer("{functionId}", FunctionId) - path := r.Replace("/functions/{functionId}/tag") - - params := map[string]interface{}{ - "tag": Tag, - } - - return srv.client.Call("PATCH", path, nil, params) -} - -// ListTags -func (srv *Functions) ListTags(FunctionId string, Search string, Limit int, Offset int, OrderType string) (map[string]interface{}, error) { - r := strings.NewReplacer("{functionId}", FunctionId) - path := r.Replace("/functions/{functionId}/tags") - - params := map[string]interface{}{ - "search": Search, - "limit": Limit, - "offset": Offset, - "orderType": OrderType, - } - - return srv.client.Call("GET", path, nil, params) -} - -// CreateTag -func (srv *Functions) CreateTag(FunctionId string, Env string, Command string, Code string) (map[string]interface{}, error) { - r := strings.NewReplacer("{functionId}", FunctionId) - path := r.Replace("/functions/{functionId}/tags") - - params := map[string]interface{}{ - "env": Env, - "command": Command, - "code": Code, - } - - return srv.client.Call("POST", path, nil, params) -} - -// GetTag -func (srv *Functions) GetTag(FunctionId string, TagId string) (map[string]interface{}, error) { - r := strings.NewReplacer("{functionId}", FunctionId, "{tagId}", TagId) - path := r.Replace("/functions/{functionId}/tags/{tagId}") - - params := map[string]interface{}{ - } - - return srv.client.Call("GET", path, nil, params) -} - -// DeleteTag -func (srv *Functions) DeleteTag(FunctionId string, TagId string) (map[string]interface{}, error) { - r := strings.NewReplacer("{functionId}", FunctionId, "{tagId}", TagId) - path := r.Replace("/functions/{functionId}/tags/{tagId}") - - params := map[string]interface{}{ - } - - return srv.client.Call("DELETE", path, nil, params) -} diff --git a/app/sdks/0.6.2/server-go/health.go b/app/sdks/0.6.2/server-go/health.go deleted file mode 100644 index d3b6b3a926..0000000000 --- a/app/sdks/0.6.2/server-go/health.go +++ /dev/null @@ -1,153 +0,0 @@ -package appwrite - -import ( -) - -// Health service -type Health struct { - client Client -} - -func NewHealth(clt Client) Health { - service := Health{ - client: clt, - } - - return service -} - -// Get check the Appwrite HTTP server is up and responsive. -func (srv *Health) Get() (map[string]interface{}, error) { - path := "/health" - - params := map[string]interface{}{ - } - - return srv.client.Call("GET", path, nil, params) -} - -// GetAntiVirus check the Appwrite Anti Virus server is up and connection is -// successful. -func (srv *Health) GetAntiVirus() (map[string]interface{}, error) { - path := "/health/anti-virus" - - params := map[string]interface{}{ - } - - return srv.client.Call("GET", path, nil, params) -} - -// GetCache check the Appwrite in-memory cache server is up and connection is -// successful. -func (srv *Health) GetCache() (map[string]interface{}, error) { - path := "/health/cache" - - params := map[string]interface{}{ - } - - return srv.client.Call("GET", path, nil, params) -} - -// GetDB check the Appwrite database server is up and connection is -// successful. -func (srv *Health) GetDB() (map[string]interface{}, error) { - path := "/health/db" - - params := map[string]interface{}{ - } - - return srv.client.Call("GET", path, nil, params) -} - -// GetQueueCertificates get the number of certificates that are waiting to be -// issued against [Letsencrypt](https://letsencrypt.org/) in the Appwrite -// internal queue server. -func (srv *Health) GetQueueCertificates() (map[string]interface{}, error) { - path := "/health/queue/certificates" - - params := map[string]interface{}{ - } - - return srv.client.Call("GET", path, nil, params) -} - -// GetQueueFunctions -func (srv *Health) GetQueueFunctions() (map[string]interface{}, error) { - path := "/health/queue/functions" - - params := map[string]interface{}{ - } - - return srv.client.Call("GET", path, nil, params) -} - -// GetQueueLogs get the number of logs that are waiting to be processed in the -// Appwrite internal queue server. -func (srv *Health) GetQueueLogs() (map[string]interface{}, error) { - path := "/health/queue/logs" - - params := map[string]interface{}{ - } - - return srv.client.Call("GET", path, nil, params) -} - -// GetQueueTasks get the number of tasks that are waiting to be processed in -// the Appwrite internal queue server. -func (srv *Health) GetQueueTasks() (map[string]interface{}, error) { - path := "/health/queue/tasks" - - params := map[string]interface{}{ - } - - return srv.client.Call("GET", path, nil, params) -} - -// GetQueueUsage get the number of usage stats that are waiting to be -// processed in the Appwrite internal queue server. -func (srv *Health) GetQueueUsage() (map[string]interface{}, error) { - path := "/health/queue/usage" - - params := map[string]interface{}{ - } - - return srv.client.Call("GET", path, nil, params) -} - -// GetQueueWebhooks get the number of webhooks that are waiting to be -// processed in the Appwrite internal queue server. -func (srv *Health) GetQueueWebhooks() (map[string]interface{}, error) { - path := "/health/queue/webhooks" - - params := map[string]interface{}{ - } - - return srv.client.Call("GET", path, nil, params) -} - -// GetStorageLocal check the Appwrite local storage device is up and -// connection is successful. -func (srv *Health) GetStorageLocal() (map[string]interface{}, error) { - path := "/health/storage/local" - - params := map[string]interface{}{ - } - - return srv.client.Call("GET", path, nil, params) -} - -// GetTime check the Appwrite server time is synced with Google remote NTP -// server. We use this technology to smoothly handle leap seconds with no -// disruptive events. The [Network Time -// Protocol](https://en.wikipedia.org/wiki/Network_Time_Protocol) (NTP) is -// 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. -func (srv *Health) GetTime() (map[string]interface{}, error) { - path := "/health/time" - - params := map[string]interface{}{ - } - - return srv.client.Call("GET", path, nil, params) -} diff --git a/app/sdks/0.6.2/server-go/locale.go b/app/sdks/0.6.2/server-go/locale.go deleted file mode 100644 index ecadd889cb..0000000000 --- a/app/sdks/0.6.2/server-go/locale.go +++ /dev/null @@ -1,88 +0,0 @@ -package appwrite - -import ( -) - -// Locale service -type Locale struct { - client Client -} - -func NewLocale(clt Client) Locale { - service := Locale{ - client: clt, - } - - return service -} - -// Get get the current user location based on IP. Returns an object with user -// country code, country name, continent name, continent code, ip address and -// suggested currency. You can use the locale header to get the data in a -// supported language. -// -// ([IP Geolocation by DB-IP](https://db-ip.com)) -func (srv *Locale) Get() (map[string]interface{}, error) { - path := "/locale" - - params := map[string]interface{}{ - } - - return srv.client.Call("GET", path, nil, params) -} - -// GetContinents list of all continents. You can use the locale header to get -// the data in a supported language. -func (srv *Locale) GetContinents() (map[string]interface{}, error) { - path := "/locale/continents" - - params := map[string]interface{}{ - } - - return srv.client.Call("GET", path, nil, params) -} - -// GetCountries list of all countries. You can use the locale header to get -// the data in a supported language. -func (srv *Locale) GetCountries() (map[string]interface{}, error) { - path := "/locale/countries" - - params := map[string]interface{}{ - } - - return srv.client.Call("GET", path, nil, params) -} - -// GetCountriesEU 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. -func (srv *Locale) GetCountriesEU() (map[string]interface{}, error) { - path := "/locale/countries/eu" - - params := map[string]interface{}{ - } - - return srv.client.Call("GET", path, nil, params) -} - -// GetCountriesPhones list of all countries phone codes. You can use the -// locale header to get the data in a supported language. -func (srv *Locale) GetCountriesPhones() (map[string]interface{}, error) { - path := "/locale/countries/phones" - - params := map[string]interface{}{ - } - - return srv.client.Call("GET", path, nil, params) -} - -// GetCurrencies list of all currencies, including currency symol, 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. -func (srv *Locale) GetCurrencies() (map[string]interface{}, error) { - path := "/locale/currencies" - - params := map[string]interface{}{ - } - - return srv.client.Call("GET", path, nil, params) -} diff --git a/app/sdks/0.6.2/server-go/main.go b/app/sdks/0.6.2/server-go/main.go deleted file mode 100644 index 13df7fc1b5..0000000000 --- a/app/sdks/0.6.2/server-go/main.go +++ /dev/null @@ -1,6 +0,0 @@ -package appwrite - -// NewClient initializes a new Appwrite client -func NewClient() Client { - return Client{} -} diff --git a/app/sdks/0.6.2/server-go/storage.go b/app/sdks/0.6.2/server-go/storage.go deleted file mode 100644 index 7ede9c3255..0000000000 --- a/app/sdks/0.6.2/server-go/storage.go +++ /dev/null @@ -1,134 +0,0 @@ -package appwrite - -import ( - "strings" -) - -// Storage service -type Storage struct { - client Client -} - -func NewStorage(clt Client) Storage { - service := Storage{ - client: clt, - } - - return service -} - -// ListFiles get a list of all the user files. You can use the query params to -// filter your results. On admin mode, this endpoint will return a list of all -// of the project files. [Learn more about different API modes](/docs/admin). -func (srv *Storage) ListFiles(Search string, Limit int, Offset int, OrderType string) (map[string]interface{}, error) { - path := "/storage/files" - - params := map[string]interface{}{ - "search": Search, - "limit": Limit, - "offset": Offset, - "orderType": OrderType, - } - - return srv.client.Call("GET", path, nil, params) -} - -// CreateFile create a new file. The user who creates the file will -// automatically be assigned to read and write access unless he has passed -// custom values for read and write arguments. -func (srv *Storage) CreateFile(File string, Read []interface{}, Write []interface{}) (map[string]interface{}, error) { - path := "/storage/files" - - params := map[string]interface{}{ - "file": File, - "read": Read, - "write": Write, - } - - return srv.client.Call("POST", path, nil, params) -} - -// GetFile get file by its unique ID. This endpoint response returns a JSON -// object with the file metadata. -func (srv *Storage) GetFile(FileId string) (map[string]interface{}, error) { - r := strings.NewReplacer("{fileId}", FileId) - path := r.Replace("/storage/files/{fileId}") - - params := map[string]interface{}{ - } - - return srv.client.Call("GET", path, nil, params) -} - -// UpdateFile update file by its unique ID. Only users with write permissions -// have access to update this resource. -func (srv *Storage) UpdateFile(FileId string, Read []interface{}, Write []interface{}) (map[string]interface{}, error) { - r := strings.NewReplacer("{fileId}", FileId) - path := r.Replace("/storage/files/{fileId}") - - params := map[string]interface{}{ - "read": Read, - "write": Write, - } - - return srv.client.Call("PUT", path, nil, params) -} - -// DeleteFile delete a file by its unique ID. Only users with write -// permissions have access to delete this resource. -func (srv *Storage) DeleteFile(FileId string) (map[string]interface{}, error) { - r := strings.NewReplacer("{fileId}", FileId) - path := r.Replace("/storage/files/{fileId}") - - params := map[string]interface{}{ - } - - return srv.client.Call("DELETE", path, nil, params) -} - -// GetFileDownload get 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. -func (srv *Storage) GetFileDownload(FileId string) (map[string]interface{}, error) { - r := strings.NewReplacer("{fileId}", FileId) - path := r.Replace("/storage/files/{fileId}/download") - - params := map[string]interface{}{ - } - - return srv.client.Call("GET", path, nil, params) -} - -// GetFilePreview get a file preview image. Currently, this method supports -// preview for image files (jpg, png, and gif), other supported formats, like -// pdf, docs, slides, and spreadsheets, will return the file icon image. You -// can also pass query string arguments for cutting and resizing your preview -// image. -func (srv *Storage) GetFilePreview(FileId string, Width int, Height int, Quality int, Background string, Output string) (map[string]interface{}, error) { - r := strings.NewReplacer("{fileId}", FileId) - path := r.Replace("/storage/files/{fileId}/preview") - - params := map[string]interface{}{ - "width": Width, - "height": Height, - "quality": Quality, - "background": Background, - "output": Output, - } - - return srv.client.Call("GET", path, nil, params) -} - -// GetFileView get file content by its unique ID. This endpoint is similar to -// the download method but returns with no 'Content-Disposition: attachment' -// header. -func (srv *Storage) GetFileView(FileId string, As string) (map[string]interface{}, error) { - r := strings.NewReplacer("{fileId}", FileId) - path := r.Replace("/storage/files/{fileId}/view") - - params := map[string]interface{}{ - "as": As, - } - - return srv.client.Call("GET", path, nil, params) -} diff --git a/app/sdks/0.6.2/server-go/teams.go b/app/sdks/0.6.2/server-go/teams.go deleted file mode 100644 index 14b89e0dda..0000000000 --- a/app/sdks/0.6.2/server-go/teams.go +++ /dev/null @@ -1,140 +0,0 @@ -package appwrite - -import ( - "strings" -) - -// Teams service -type Teams struct { - client Client -} - -func NewTeams(clt Client) Teams { - service := Teams{ - client: clt, - } - - return service -} - -// List get a list of all the current user teams. You can use the query params -// to filter your results. On admin mode, this endpoint will return a list of -// all of the project teams. [Learn more about different API -// modes](/docs/admin). -func (srv *Teams) List(Search string, Limit int, Offset int, OrderType string) (map[string]interface{}, error) { - path := "/teams" - - params := map[string]interface{}{ - "search": Search, - "limit": Limit, - "offset": Offset, - "orderType": OrderType, - } - - return srv.client.Call("GET", path, nil, params) -} - -// Create create a new team. The user who creates the team will automatically -// be assigned as the owner of the team. The team owner can invite new -// members, who will be able add new owners and update or delete the team from -// your project. -func (srv *Teams) Create(Name string, Roles []interface{}) (map[string]interface{}, error) { - path := "/teams" - - params := map[string]interface{}{ - "name": Name, - "roles": Roles, - } - - return srv.client.Call("POST", path, nil, params) -} - -// Get get team by its unique ID. All team members have read access for this -// resource. -func (srv *Teams) Get(TeamId string) (map[string]interface{}, error) { - r := strings.NewReplacer("{teamId}", TeamId) - path := r.Replace("/teams/{teamId}") - - params := map[string]interface{}{ - } - - return srv.client.Call("GET", path, nil, params) -} - -// Update update team by its unique ID. Only team owners have write access for -// this resource. -func (srv *Teams) Update(TeamId string, Name string) (map[string]interface{}, error) { - r := strings.NewReplacer("{teamId}", TeamId) - path := r.Replace("/teams/{teamId}") - - params := map[string]interface{}{ - "name": Name, - } - - return srv.client.Call("PUT", path, nil, params) -} - -// Delete delete team by its unique ID. Only team owners have write access for -// this resource. -func (srv *Teams) Delete(TeamId string) (map[string]interface{}, error) { - r := strings.NewReplacer("{teamId}", TeamId) - path := r.Replace("/teams/{teamId}") - - params := map[string]interface{}{ - } - - return srv.client.Call("DELETE", path, nil, params) -} - -// GetMemberships get team members by the team unique ID. All team members -// have read access for this list of resources. -func (srv *Teams) GetMemberships(TeamId string) (map[string]interface{}, error) { - r := strings.NewReplacer("{teamId}", TeamId) - path := r.Replace("/teams/{teamId}/memberships") - - params := map[string]interface{}{ - } - - return srv.client.Call("GET", path, nil, params) -} - -// CreateMembership use this endpoint to invite a new member to join your -// team. An email with a link to join the team will be sent to the new member -// email address if the member doesn't exist in the project it will be created -// automatically. -// -// Use the 'URL' parameter to redirect the user from the invitation email back -// to your app. When the user is redirected, use the [Update Team Membership -// Status](/docs/teams#updateMembershipStatus) endpoint to allow the user to -// accept the invitation to the team. -// -// Please note that in order to avoid a [Redirect -// Attacks](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) -// the only valid redirect URL's are the once from domains you have set when -// added your platforms in the console interface. -func (srv *Teams) CreateMembership(TeamId string, Email string, Roles []interface{}, Url string, Name string) (map[string]interface{}, error) { - r := strings.NewReplacer("{teamId}", TeamId) - path := r.Replace("/teams/{teamId}/memberships") - - params := map[string]interface{}{ - "email": Email, - "name": Name, - "roles": Roles, - "url": Url, - } - - return srv.client.Call("POST", path, nil, params) -} - -// DeleteMembership 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 he didn't accept it. -func (srv *Teams) DeleteMembership(TeamId string, InviteId string) (map[string]interface{}, error) { - r := strings.NewReplacer("{teamId}", TeamId, "{inviteId}", InviteId) - path := r.Replace("/teams/{teamId}/memberships/{inviteId}") - - params := map[string]interface{}{ - } - - return srv.client.Call("DELETE", path, nil, params) -} diff --git a/app/sdks/0.6.2/server-go/users.go b/app/sdks/0.6.2/server-go/users.go deleted file mode 100644 index 405b5a3209..0000000000 --- a/app/sdks/0.6.2/server-go/users.go +++ /dev/null @@ -1,137 +0,0 @@ -package appwrite - -import ( - "strings" -) - -// Users service -type Users struct { - client Client -} - -func NewUsers(clt Client) Users { - service := Users{ - client: clt, - } - - return service -} - -// List get a list of all the project users. You can use the query params to -// filter your results. -func (srv *Users) List(Search string, Limit int, Offset int, OrderType string) (map[string]interface{}, error) { - path := "/users" - - params := map[string]interface{}{ - "search": Search, - "limit": Limit, - "offset": Offset, - "orderType": OrderType, - } - - return srv.client.Call("GET", path, nil, params) -} - -// Create create a new user. -func (srv *Users) Create(Email string, Password string, Name string) (map[string]interface{}, error) { - path := "/users" - - params := map[string]interface{}{ - "email": Email, - "password": Password, - "name": Name, - } - - return srv.client.Call("POST", path, nil, params) -} - -// Get get user by its unique ID. -func (srv *Users) Get(UserId string) (map[string]interface{}, error) { - r := strings.NewReplacer("{userId}", UserId) - path := r.Replace("/users/{userId}") - - params := map[string]interface{}{ - } - - return srv.client.Call("GET", path, nil, params) -} - -// GetLogs get user activity logs list by its unique ID. -func (srv *Users) GetLogs(UserId string) (map[string]interface{}, error) { - r := strings.NewReplacer("{userId}", UserId) - path := r.Replace("/users/{userId}/logs") - - params := map[string]interface{}{ - } - - return srv.client.Call("GET", path, nil, params) -} - -// GetPrefs get user preferences by its unique ID. -func (srv *Users) GetPrefs(UserId string) (map[string]interface{}, error) { - r := strings.NewReplacer("{userId}", UserId) - path := r.Replace("/users/{userId}/prefs") - - params := map[string]interface{}{ - } - - return srv.client.Call("GET", path, nil, params) -} - -// UpdatePrefs update user preferences by its unique ID. You can pass only the -// specific settings you wish to update. -func (srv *Users) UpdatePrefs(UserId string, Prefs object) (map[string]interface{}, error) { - r := strings.NewReplacer("{userId}", UserId) - path := r.Replace("/users/{userId}/prefs") - - params := map[string]interface{}{ - "prefs": Prefs, - } - - return srv.client.Call("PATCH", path, nil, params) -} - -// GetSessions get user sessions list by its unique ID. -func (srv *Users) GetSessions(UserId string) (map[string]interface{}, error) { - r := strings.NewReplacer("{userId}", UserId) - path := r.Replace("/users/{userId}/sessions") - - params := map[string]interface{}{ - } - - return srv.client.Call("GET", path, nil, params) -} - -// DeleteSessions delete all user sessions by its unique ID. -func (srv *Users) DeleteSessions(UserId string) (map[string]interface{}, error) { - r := strings.NewReplacer("{userId}", UserId) - path := r.Replace("/users/{userId}/sessions") - - params := map[string]interface{}{ - } - - return srv.client.Call("DELETE", path, nil, params) -} - -// DeleteSession delete user sessions by its unique ID. -func (srv *Users) DeleteSession(UserId string, SessionId string) (map[string]interface{}, error) { - r := strings.NewReplacer("{userId}", UserId, "{sessionId}", SessionId) - path := r.Replace("/users/{userId}/sessions/{sessionId}") - - params := map[string]interface{}{ - } - - return srv.client.Call("DELETE", path, nil, params) -} - -// UpdateStatus update user status by its unique ID. -func (srv *Users) UpdateStatus(UserId string, Status string) (map[string]interface{}, error) { - r := strings.NewReplacer("{userId}", UserId) - path := r.Replace("/users/{userId}/status") - - params := map[string]interface{}{ - "status": Status, - } - - return srv.client.Call("PATCH", path, nil, params) -} diff --git a/app/sdks/0.6.2/server-go/utils.go b/app/sdks/0.6.2/server-go/utils.go deleted file mode 100644 index ca36149cf1..0000000000 --- a/app/sdks/0.6.2/server-go/utils.go +++ /dev/null @@ -1,36 +0,0 @@ -package appwrite - -import ( - "fmt" - "reflect" - "strconv" -) - -// ToString changes arg to string -func ToString(arg interface{}) string { - var tmp = reflect.Indirect(reflect.ValueOf(arg)).Interface() - switch v := tmp.(type) { - case int: - return strconv.Itoa(v) - case int8: - return strconv.FormatInt(int64(v), 10) - case int16: - return strconv.FormatInt(int64(v), 10) - case int32: - return strconv.FormatInt(int64(v), 10) - case int64: - return strconv.FormatInt(v, 10) - case string: - return v - case float32: - return strconv.FormatFloat(float64(v), 'f', -1, 32) - case float64: - return strconv.FormatFloat(v, 'f', -1, 64) - case fmt.Stringer: - return v.String() - case reflect.Value: - return ToString(v.Interface()) - default: - return "" - } -} diff --git a/app/sdks/0.6.2/server-java/CHANGELOG.md b/app/sdks/0.6.2/server-java/CHANGELOG.md deleted file mode 100644 index fa4d35e687..0000000000 --- a/app/sdks/0.6.2/server-java/CHANGELOG.md +++ /dev/null @@ -1 +0,0 @@ -# Change Log \ No newline at end of file diff --git a/app/sdks/0.6.2/server-java/LICENSE b/app/sdks/0.6.2/server-java/LICENSE deleted file mode 100644 index fc7c051a91..0000000000 --- a/app/sdks/0.6.2/server-java/LICENSE +++ /dev/null @@ -1,12 +0,0 @@ -Copyright (c) 2019 Appwrite (https://appwrite.io) and individual contributors. -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - - 3. Neither the name Appwrite nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/app/sdks/0.6.2/server-java/README.md b/app/sdks/0.6.2/server-java/README.md deleted file mode 100644 index 05e7d85945..0000000000 --- a/app/sdks/0.6.2/server-java/README.md +++ /dev/null @@ -1,43 +0,0 @@ -# Appwrite SDK for Java - -![License](https://img.shields.io/github/license/appwrite/sdk-for-java.svg?v=1) -![Version](https://img.shields.io/badge/api%20version-0.6.0-blue.svg?v=1) - -**This SDK is compatible with Appwrite server version 0.6.0. For older versions, please check previous releases.** - -Appwrite is an open-source backend as a service server that abstract and simplify complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way. - Use the Java SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools. - For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs) - - - -![Appwrite](https://appwrite.io/images/github.png) - -## Installation - -### Maven -Add this to your project's `pom.xml` file: - -```xml - - - com.squareup.okhttp3 - appwrite - 0.0.1 - - -``` - -You can install packages from the command line: - -```bash -mvn install appwrite -``` - -## Contribution - -This library is auto-generated by Appwrite custom [SDK Generator](https://github.com/appwrite/sdk-generator). To learn more about how you can help us improve this SDK, please check the [contribution guide](https://github.com/appwrite/sdk-generator/blob/master/CONTRIBUTING.md) before sending a pull-request. - -## License - -Please see the [BSD-3-Clause license](https://raw.githubusercontent.com/appwrite/appwrite/master/LICENSE) file for more information. \ No newline at end of file diff --git a/app/sdks/0.6.2/server-java/pom.xml b/app/sdks/0.6.2/server-java/pom.xml deleted file mode 100644 index 6d3098a6ea..0000000000 --- a/app/sdks/0.6.2/server-java/pom.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - 4.0.0 - - - appwrite - 0.0.1 - - Appwrite is an open-source self-hosted backend server that abstract and simplify complex and repetitive development tasks behind a very simple REST API - https://appwrite.io - - - 1.9 - 1.9 - - - - - com.squareup.okhttp3 - okhttp - 4.5.0 - - - com.google.code.gson - gson - 2.8.2 - - - - org.junit.jupiter - junit-jupiter-api - 5.6.2 - test - - - org.junit.jupiter - junit-jupiter-engine - 5.6.2 - test - - - - - - - maven-surefire-plugin - 2.22.2 - - - maven-failsafe-plugin - 2.22.2 - - - - \ No newline at end of file diff --git a/app/sdks/0.6.2/server-java/src/main/java/Client.java b/app/sdks/0.6.2/server-java/src/main/java/Client.java deleted file mode 100644 index 51c52aebb5..0000000000 --- a/app/sdks/0.6.2/server-java/src/main/java/Client.java +++ /dev/null @@ -1,143 +0,0 @@ -package ; - -import com.google.gson.Gson; -import okhttp3.Call; -import okhttp3.CookieJar; -import okhttp3.Headers; -import okhttp3.HttpUrl; -import okhttp3.FormBody; -import okhttp3.MediaType; -import okhttp3.OkHttpClient; -import okhttp3.Request; -import okhttp3.RequestBody; - -import java.util.List; -import java.util.HashMap; -import java.util.Map; - -import static java.util.Map.entry; - -public class Client { - private final OkHttpClient http; - private final Map headers; - private final Map config; - private String endPoint; - private boolean selfSigned; - private CookieJar cookieJar = CookieJar.NO_COOKIES; - - public Client() { - this("https://appwrite.io/v1", false, new OkHttpClient()); - } - - public Client(String endPoint, boolean selfSigned, OkHttpClient http) { - this.endPoint = endPoint; - this.selfSigned = selfSigned; - this.headers = new HashMap<>(Map.ofEntries( - entry("content-type", "application/json"), - entry("x-sdk-version", "appwrite:java:0.0.1") - )); - this.config = new HashMap<>(); - this.http = http.newBuilder() - .cookieJar(cookieJar) - .build(); - } - - public String getEndPoint(){ - return endPoint; - } - - public Map getConfig(){ - return config; - } - -// private Future getCookiePath() { -// final directory = getApplicationDocumentsDirectory(); -// final path = directory.path; -// final Directory dir = new Directory("$path/cookies"); -// dir.create(); -// return dir; -// } - - /// Your project ID - public Client setProject(String value) { - config.put("project", value); - addHeader("X-Appwrite-Project", value); - return this; - } - - /// Your secret API key - public Client setKey(String value) { - config.put("key", value); - addHeader("X-Appwrite-Key", value); - return this; - } - - public Client setLocale(String value) { - config.put("locale", value); - addHeader("X-Appwrite-Locale", value); - return this; - } - - public Client setSelfSigned(boolean status) { - selfSigned = status; - return this; - } - - public Client setEndpoint(String endPoint) { - this.endPoint = endPoint; - return this; - } - - public Client addHeader(String key, String value) { - headers.put(key, value); - return this; - } - - public Call call(String method, String path, Map headers, Map params) { - if(selfSigned) { - // Allow self signed requests - - } - - Headers requestHeaders = Headers.of(this.headers).newBuilder() - .addAll(Headers.of(headers)) - .build(); - - HttpUrl.Builder httpBuilder = HttpUrl.get(endPoint + path).newBuilder(); - if("GET".equals(method)) { - params.forEach((k, v) -> { - if(v instanceof List){ - httpBuilder.addQueryParameter(k+"[]", v.toString()); - }else{ - httpBuilder.addQueryParameter(k, v.toString()); - } - }); - Request request = new Request.Builder() - .url(httpBuilder.build()) - .headers(requestHeaders) - .get() - .build(); - - return http.newCall(request); - } - - RequestBody body; - if("multipart/form-data".equals(headers.get("content-type"))) { - FormBody.Builder builder = new FormBody.Builder(); - params.forEach((k, v) -> builder.add(k, v.toString())); - body = builder.build(); - } else { - Gson gson = new Gson(); - String json = gson.toJson(params); - body = RequestBody.create(json, MediaType.get("application/json")); - } - - Request request = new Request.Builder() - .url(httpBuilder.build()) - .headers(requestHeaders) - .method(method, body) - .build(); - - return http.newCall(request); - } -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-java/src/main/java/enums/OrderType.java b/app/sdks/0.6.2/server-java/src/main/java/enums/OrderType.java deleted file mode 100644 index d4a73a3886..0000000000 --- a/app/sdks/0.6.2/server-java/src/main/java/enums/OrderType.java +++ /dev/null @@ -1,6 +0,0 @@ -package .enums; - -public enum OrderType { - ASC, DESC -} - diff --git a/app/sdks/0.6.2/server-java/src/main/java/services/Avatars.java b/app/sdks/0.6.2/server-java/src/main/java/services/Avatars.java deleted file mode 100644 index 3c0bb4e6c8..0000000000 --- a/app/sdks/0.6.2/server-java/src/main/java/services/Avatars.java +++ /dev/null @@ -1,164 +0,0 @@ -package .services; - - - -import okhttp3.Call; -import .Client; -import .enums.OrderType; - -import java.io.File; -import java.util.List; -import java.util.HashMap; -import java.util.Map; - -import static java.util.Map.entry; - -public class Avatars extends Service { - public Avatars(Client client){ - super(client); - } - - /// Get Browser Icon - /* - * You can use this endpoint to show different browser icons to your users. - * The code argument receives the browser code as it appears in your user - * /account/sessions endpoint. Use width, height and quality arguments to - * change the output settings. - */ - public Call getBrowser(String code, int width, int height, int quality) { - final String path = "/avatars/browsers/{code}".replace("{code}", code); - - final Map params = Map.ofEntries( - entry("width", width), - entry("height", height), - entry("quality", quality) - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("GET", path, headers, params); - } - - /// Get Credit Card Icon - /* - * Need to display your users with your billing method or their payment - * methods? The credit card endpoint will return you the icon of the credit - * card provider you need. Use width, height and quality arguments to change - * the output settings. - */ - public Call getCreditCard(String code, int width, int height, int quality) { - final String path = "/avatars/credit-cards/{code}".replace("{code}", code); - - final Map params = Map.ofEntries( - entry("width", width), - entry("height", height), - entry("quality", quality) - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("GET", path, headers, params); - } - - /// Get Favicon - /* - * Use this endpoint to fetch the favorite icon (AKA favicon) of a any remote - * website URL. - */ - public Call getFavicon(String url) { - final String path = "/avatars/favicon"; - - final Map params = Map.ofEntries( - entry("url", url) - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("GET", path, headers, params); - } - - /// Get Country Flag - /* - * You can use this endpoint to show different country flags icons to your - * users. The code argument receives the 2 letter country code. Use width, - * height and quality arguments to change the output settings. - */ - public Call getFlag(String code, int width, int height, int quality) { - final String path = "/avatars/flags/{code}".replace("{code}", code); - - final Map params = Map.ofEntries( - entry("width", width), - entry("height", height), - entry("quality", quality) - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("GET", path, headers, params); - } - - /// Get Image from URL - /* - * Use this endpoint to fetch a remote image URL and crop it to any image size - * you want. This endpoint is very useful if you need to crop and display - * remote images in your app or in case you want to make sure a 3rd party - * image is properly served using a TLS protocol. - */ - public Call getImage(String url, int width, int height) { - final String path = "/avatars/image"; - - final Map params = Map.ofEntries( - entry("url", url), - entry("width", width), - entry("height", height) - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("GET", path, headers, params); - } - - /// 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. - */ - public Call getQR(String text, int size, int margin, int download) { - final String path = "/avatars/qr"; - - final Map params = Map.ofEntries( - entry("text", text), - entry("size", size), - entry("margin", margin), - entry("download", download) - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("GET", path, headers, params); - } -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-java/src/main/java/services/Database.java b/app/sdks/0.6.2/server-java/src/main/java/services/Database.java deleted file mode 100644 index 84161de9fc..0000000000 --- a/app/sdks/0.6.2/server-java/src/main/java/services/Database.java +++ /dev/null @@ -1,264 +0,0 @@ -package .services; - - - -import okhttp3.Call; -import .Client; -import .enums.OrderType; - -import java.io.File; -import java.util.List; -import java.util.HashMap; -import java.util.Map; - -import static java.util.Map.entry; - -public class Database extends Service { - public Database(Client client){ - super(client); - } - - /// List Collections - /* - * Get a list of all the user collections. You can use the query params to - * filter your results. On admin mode, this endpoint will return a list of all - * of the project collections. [Learn more about different API - * modes](/docs/admin). - */ - public Call listCollections(String search, int limit, int offset, OrderType orderType) { - final String path = "/database/collections"; - - final Map params = Map.ofEntries( - entry("search", search), - entry("limit", limit), - entry("offset", offset), - entry("orderType", orderType.name()) - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("GET", path, headers, params); - } - - /// Create Collection - /* - * Create a new Collection. - */ - public Call createCollection(String name, List read, List write, List rules) { - final String path = "/database/collections"; - - final Map params = Map.ofEntries( - entry("name", name), - entry("read", read), - entry("write", write), - entry("rules", rules) - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("POST", path, headers, params); - } - - /// Get Collection - /* - * Get collection by its unique ID. This endpoint response returns a JSON - * object with the collection metadata. - */ - public Call getCollection(String collectionId) { - final String path = "/database/collections/{collectionId}".replace("{collectionId}", collectionId); - - final Map params = Map.ofEntries( - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("GET", path, headers, params); - } - - /// Update Collection - /* - * Update collection by its unique ID. - */ - public Call updateCollection(String collectionId, String name, List read, List write, List rules) { - final String path = "/database/collections/{collectionId}".replace("{collectionId}", collectionId); - - final Map params = Map.ofEntries( - entry("name", name), - entry("read", read), - entry("write", write), - entry("rules", rules) - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("PUT", path, headers, params); - } - - /// Delete Collection - /* - * Delete a collection by its unique ID. Only users with write permissions - * have access to delete this resource. - */ - public Call deleteCollection(String collectionId) { - final String path = "/database/collections/{collectionId}".replace("{collectionId}", collectionId); - - final Map params = Map.ofEntries( - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("DELETE", path, headers, params); - } - - /// List Documents - /* - * Get a list of all the user documents. You can use the query params to - * filter your results. On admin mode, this endpoint will return a list of all - * of the project documents. [Learn more about different API - * modes](/docs/admin). - */ - public Call listDocuments(String collectionId, List filters, int offset, int limit, String orderField, OrderType orderType, String orderCast, String search, int first, int last) { - final String path = "/database/collections/{collectionId}/documents".replace("{collectionId}", collectionId); - - final Map params = Map.ofEntries( - entry("filters", filters), - entry("offset", offset), - entry("limit", limit), - entry("orderField", orderField), - entry("orderType", orderType.name()), - entry("orderCast", orderCast), - entry("search", search), - entry("first", first), - entry("last", last) - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("GET", path, headers, params); - } - - /// Create Document - /* - * Create a new Document. - */ - public Call createDocument(String collectionId, Object data, List read, List write, String parentDocument, String parentProperty, String parentPropertyType) { - final String path = "/database/collections/{collectionId}/documents".replace("{collectionId}", collectionId); - - final Map params = Map.ofEntries( - entry("data", data), - entry("read", read), - entry("write", write), - entry("parentDocument", parentDocument), - entry("parentProperty", parentProperty), - entry("parentPropertyType", parentPropertyType) - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("POST", path, headers, params); - } - - /// Get Document - /* - * Get document by its unique ID. This endpoint response returns a JSON object - * with the document data. - */ - public Call getDocument(String collectionId, String documentId) { - final String path = "/database/collections/{collectionId}/documents/{documentId}".replace("{collectionId}", collectionId).replace("{documentId}", documentId); - - final Map params = Map.ofEntries( - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("GET", path, headers, params); - } - - /// Update Document - public Call updateDocument(String collectionId, String documentId, Object data, List read, List write) { - final String path = "/database/collections/{collectionId}/documents/{documentId}".replace("{collectionId}", collectionId).replace("{documentId}", documentId); - - final Map params = Map.ofEntries( - entry("data", data), - entry("read", read), - entry("write", write) - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("PATCH", path, headers, params); - } - - /// Delete Document - /* - * Delete document by its unique ID. This endpoint deletes only the parent - * documents, his attributes and relations to other documents. Child documents - * **will not** be deleted. - */ - public Call deleteDocument(String collectionId, String documentId) { - final String path = "/database/collections/{collectionId}/documents/{documentId}".replace("{collectionId}", collectionId).replace("{documentId}", documentId); - - final Map params = Map.ofEntries( - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("DELETE", path, headers, params); - } - - /// Get Collection Logs - public Call getCollectionLogs(String collectionId) { - final String path = "/database/collections/{collectionId}/logs".replace("{collectionId}", collectionId); - - final Map params = Map.ofEntries( - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("GET", path, headers, params); - } -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-java/src/main/java/services/Functions.java b/app/sdks/0.6.2/server-java/src/main/java/services/Functions.java deleted file mode 100644 index a04ad1b5a9..0000000000 --- a/app/sdks/0.6.2/server-java/src/main/java/services/Functions.java +++ /dev/null @@ -1,255 +0,0 @@ -package .services; - - - -import okhttp3.Call; -import .Client; -import .enums.OrderType; - -import java.io.File; -import java.util.List; -import java.util.HashMap; -import java.util.Map; - -import static java.util.Map.entry; - -public class Functions extends Service { - public Functions(Client client){ - super(client); - } - - /// List Functions - public Call list(String search, int limit, int offset, OrderType orderType) { - final String path = "/functions"; - - final Map params = Map.ofEntries( - entry("search", search), - entry("limit", limit), - entry("offset", offset), - entry("orderType", orderType.name()) - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("GET", path, headers, params); - } - - /// Create Function - public Call create(String name, Object vars, List events, String schedule, int timeout) { - final String path = "/functions"; - - final Map params = Map.ofEntries( - entry("name", name), - entry("vars", vars), - entry("events", events), - entry("schedule", schedule), - entry("timeout", timeout) - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("POST", path, headers, params); - } - - /// Get Function - public Call get(String functionId) { - final String path = "/functions/{functionId}".replace("{functionId}", functionId); - - final Map params = Map.ofEntries( - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("GET", path, headers, params); - } - - /// Update Function - public Call update(String functionId, String name, Object vars, List events, String schedule, int timeout) { - final String path = "/functions/{functionId}".replace("{functionId}", functionId); - - final Map params = Map.ofEntries( - entry("name", name), - entry("vars", vars), - entry("events", events), - entry("schedule", schedule), - entry("timeout", timeout) - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("PUT", path, headers, params); - } - - /// Delete Function - public Call delete(String functionId) { - final String path = "/functions/{functionId}".replace("{functionId}", functionId); - - final Map params = Map.ofEntries( - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("DELETE", path, headers, params); - } - - /// List Executions - public Call listExecutions(String functionId, String search, int limit, int offset, OrderType orderType) { - final String path = "/functions/{functionId}/executions".replace("{functionId}", functionId); - - final Map params = Map.ofEntries( - entry("search", search), - entry("limit", limit), - entry("offset", offset), - entry("orderType", orderType.name()) - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("GET", path, headers, params); - } - - /// Create Execution - public Call createExecution(String functionId, int async) { - final String path = "/functions/{functionId}/executions".replace("{functionId}", functionId); - - final Map params = Map.ofEntries( - entry("async", async) - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("POST", path, headers, params); - } - - /// Get Execution - public Call getExecution(String functionId, String executionId) { - final String path = "/functions/{functionId}/executions/{executionId}".replace("{functionId}", functionId).replace("{executionId}", executionId); - - final Map params = Map.ofEntries( - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("GET", path, headers, params); - } - - /// Update Function Tag - public Call updateTag(String functionId, String tag) { - final String path = "/functions/{functionId}/tag".replace("{functionId}", functionId); - - final Map params = Map.ofEntries( - entry("tag", tag) - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("PATCH", path, headers, params); - } - - /// List Tags - public Call listTags(String functionId, String search, int limit, int offset, OrderType orderType) { - final String path = "/functions/{functionId}/tags".replace("{functionId}", functionId); - - final Map params = Map.ofEntries( - entry("search", search), - entry("limit", limit), - entry("offset", offset), - entry("orderType", orderType.name()) - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("GET", path, headers, params); - } - - /// Create Tag - public Call createTag(String functionId, String env, String command, String code) { - final String path = "/functions/{functionId}/tags".replace("{functionId}", functionId); - - final Map params = Map.ofEntries( - entry("env", env), - entry("command", command), - entry("code", code) - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("POST", path, headers, params); - } - - /// Get Tag - public Call getTag(String functionId, String tagId) { - final String path = "/functions/{functionId}/tags/{tagId}".replace("{functionId}", functionId).replace("{tagId}", tagId); - - final Map params = Map.ofEntries( - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("GET", path, headers, params); - } - - /// Delete Tag - public Call deleteTag(String functionId, String tagId) { - final String path = "/functions/{functionId}/tags/{tagId}".replace("{functionId}", functionId).replace("{tagId}", tagId); - - final Map params = Map.ofEntries( - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("DELETE", path, headers, params); - } -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-java/src/main/java/services/Health.java b/app/sdks/0.6.2/server-java/src/main/java/services/Health.java deleted file mode 100644 index 08e23433d1..0000000000 --- a/app/sdks/0.6.2/server-java/src/main/java/services/Health.java +++ /dev/null @@ -1,258 +0,0 @@ -package .services; - - - -import okhttp3.Call; -import .Client; -import .enums.OrderType; - -import java.io.File; -import java.util.List; -import java.util.HashMap; -import java.util.Map; - -import static java.util.Map.entry; - -public class Health extends Service { - public Health(Client client){ - super(client); - } - - /// Get HTTP - /* - * Check the Appwrite HTTP server is up and responsive. - */ - public Call get() { - final String path = "/health"; - - final Map params = Map.ofEntries( - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("GET", path, headers, params); - } - - /// Get Anti virus - /* - * Check the Appwrite Anti Virus server is up and connection is successful. - */ - public Call getAntiVirus() { - final String path = "/health/anti-virus"; - - final Map params = Map.ofEntries( - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("GET", path, headers, params); - } - - /// Get Cache - /* - * Check the Appwrite in-memory cache server is up and connection is - * successful. - */ - public Call getCache() { - final String path = "/health/cache"; - - final Map params = Map.ofEntries( - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("GET", path, headers, params); - } - - /// Get DB - /* - * Check the Appwrite database server is up and connection is successful. - */ - public Call getDB() { - final String path = "/health/db"; - - final Map params = Map.ofEntries( - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("GET", path, headers, params); - } - - /// Get Certificate Queue - /* - * Get the number of certificates that are waiting to be issued against - * [Letsencrypt](https://letsencrypt.org/) in the Appwrite internal queue - * server. - */ - public Call getQueueCertificates() { - final String path = "/health/queue/certificates"; - - final Map params = Map.ofEntries( - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("GET", path, headers, params); - } - - /// Get Functions Queue - public Call getQueueFunctions() { - final String path = "/health/queue/functions"; - - final Map params = Map.ofEntries( - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("GET", path, headers, params); - } - - /// Get Logs Queue - /* - * Get the number of logs that are waiting to be processed in the Appwrite - * internal queue server. - */ - public Call getQueueLogs() { - final String path = "/health/queue/logs"; - - final Map params = Map.ofEntries( - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("GET", path, headers, params); - } - - /// Get Tasks Queue - /* - * Get the number of tasks that are waiting to be processed in the Appwrite - * internal queue server. - */ - public Call getQueueTasks() { - final String path = "/health/queue/tasks"; - - final Map params = Map.ofEntries( - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("GET", path, headers, params); - } - - /// Get Usage Queue - /* - * Get the number of usage stats that are waiting to be processed in the - * Appwrite internal queue server. - */ - public Call getQueueUsage() { - final String path = "/health/queue/usage"; - - final Map params = Map.ofEntries( - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("GET", path, headers, params); - } - - /// Get Webhooks Queue - /* - * Get the number of webhooks that are waiting to be processed in the Appwrite - * internal queue server. - */ - public Call getQueueWebhooks() { - final String path = "/health/queue/webhooks"; - - final Map params = Map.ofEntries( - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("GET", path, headers, params); - } - - /// Get Local Storage - /* - * Check the Appwrite local storage device is up and connection is successful. - */ - public Call getStorageLocal() { - final String path = "/health/storage/local"; - - final Map params = Map.ofEntries( - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("GET", path, headers, params); - } - - /// Get Time - /* - * Check the Appwrite server time is synced with Google remote NTP server. We - * use this technology to smoothly handle leap seconds with no disruptive - * events. The [Network Time - * Protocol](https://en.wikipedia.org/wiki/Network_Time_Protocol) (NTP) is - * 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. - */ - public Call getTime() { - final String path = "/health/time"; - - final Map params = Map.ofEntries( - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("GET", path, headers, params); - } -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-java/src/main/java/services/Locale.java b/app/sdks/0.6.2/server-java/src/main/java/services/Locale.java deleted file mode 100644 index 695b04a679..0000000000 --- a/app/sdks/0.6.2/server-java/src/main/java/services/Locale.java +++ /dev/null @@ -1,145 +0,0 @@ -package .services; - - - -import okhttp3.Call; -import .Client; -import .enums.OrderType; - -import java.io.File; -import java.util.List; -import java.util.HashMap; -import java.util.Map; - -import static java.util.Map.entry; - -public class Locale extends Service { - public Locale(Client client){ - super(client); - } - - /// Get User Locale - /* - * Get the current user location based on IP. Returns an object with user - * country code, country name, continent name, continent code, ip address and - * suggested currency. You can use the locale header to get the data in a - * supported language. - * - * ([IP Geolocation by DB-IP](https://db-ip.com)) - */ - public Call get() { - final String path = "/locale"; - - final Map params = Map.ofEntries( - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("GET", path, headers, params); - } - - /// List Continents - /* - * List of all continents. You can use the locale header to get the data in a - * supported language. - */ - public Call getContinents() { - final String path = "/locale/continents"; - - final Map params = Map.ofEntries( - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("GET", path, headers, params); - } - - /// List Countries - /* - * List of all countries. You can use the locale header to get the data in a - * supported language. - */ - public Call getCountries() { - final String path = "/locale/countries"; - - final Map params = Map.ofEntries( - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("GET", path, headers, params); - } - - /// 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. - */ - public Call getCountriesEU() { - final String path = "/locale/countries/eu"; - - final Map params = Map.ofEntries( - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("GET", path, headers, params); - } - - /// List Countries Phone Codes - /* - * List of all countries phone codes. You can use the locale header to get the - * data in a supported language. - */ - public Call getCountriesPhones() { - final String path = "/locale/countries/phones"; - - final Map params = Map.ofEntries( - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("GET", path, headers, params); - } - - /// List Currencies - /* - * List of all currencies, including currency symol, 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. - */ - public Call getCurrencies() { - final String path = "/locale/currencies"; - - final Map params = Map.ofEntries( - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("GET", path, headers, params); - } -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-java/src/main/java/services/Service.java b/app/sdks/0.6.2/server-java/src/main/java/services/Service.java deleted file mode 100644 index 477b0ba724..0000000000 --- a/app/sdks/0.6.2/server-java/src/main/java/services/Service.java +++ /dev/null @@ -1,11 +0,0 @@ -package .services; - -import .Client; - -abstract class Service { - final Client client; - - Service(Client client) { - this.client = client; - } -} diff --git a/app/sdks/0.6.2/server-java/src/main/java/services/Storage.java b/app/sdks/0.6.2/server-java/src/main/java/services/Storage.java deleted file mode 100644 index 0233868d0d..0000000000 --- a/app/sdks/0.6.2/server-java/src/main/java/services/Storage.java +++ /dev/null @@ -1,204 +0,0 @@ -package .services; - - - -import okhttp3.Call; -import okhttp3.HttpUrl; -import .Client; -import .enums.OrderType; - -import java.io.File; -import java.util.List; -import java.util.HashMap; -import java.util.Map; - -import static java.util.Map.entry; - -public class Storage extends Service { - public Storage(Client client){ - super(client); - } - - /// List Files - /* - * Get a list of all the user files. You can use the query params to filter - * your results. On admin mode, this endpoint will return a list of all of the - * project files. [Learn more about different API modes](/docs/admin). - */ - public Call listFiles(String search, int limit, int offset, OrderType orderType) { - final String path = "/storage/files"; - - final Map params = Map.ofEntries( - entry("search", search), - entry("limit", limit), - entry("offset", offset), - entry("orderType", orderType.name()) - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("GET", path, headers, params); - } - - /// Create File - /* - * Create a new file. The user who creates the file will automatically be - * assigned to read and write access unless he has passed custom values for - * read and write arguments. - */ - public Call createFile(File file, List read, List write) { - final String path = "/storage/files"; - - final Map params = Map.ofEntries( - entry("file", file), - entry("read", read), - entry("write", write) - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "multipart/form-data") - ); - - return client.call("POST", path, headers, params); - } - - /// Get File - /* - * Get file by its unique ID. This endpoint response returns a JSON object - * with the file metadata. - */ - public Call getFile(String fileId) { - final String path = "/storage/files/{fileId}".replace("{fileId}", fileId); - - final Map params = Map.ofEntries( - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("GET", path, headers, params); - } - - /// Update File - /* - * Update file by its unique ID. Only users with write permissions have access - * to update this resource. - */ - public Call updateFile(String fileId, List read, List write) { - final String path = "/storage/files/{fileId}".replace("{fileId}", fileId); - - final Map params = Map.ofEntries( - entry("read", read), - entry("write", write) - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("PUT", path, headers, params); - } - - /// Delete File - /* - * Delete a file by its unique ID. Only users with write permissions have - * access to delete this resource. - */ - public Call deleteFile(String fileId) { - final String path = "/storage/files/{fileId}".replace("{fileId}", fileId); - - final Map params = Map.ofEntries( - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("DELETE", path, headers, params); - } - - /// Get File for Download - /* - * Get 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. - */ - public String getFileDownload(String fileId) { - final String path = "/storage/files/{fileId}/download".replace("{fileId}", fileId); - - final Map params = Map.ofEntries( - entry("project", client.getConfig().get("project")), - entry("key", client.getConfig().get("key")) - ); - - - - HttpUrl.Builder httpBuilder = new HttpUrl.Builder().build().newBuilder(client.getEndPoint() + path); - params.forEach((k, v) -> httpBuilder.addQueryParameter(k, v.toString())); - - return httpBuilder.build().toString(); - } - - /// Get File Preview - /* - * Get a file preview image. Currently, this method supports preview for image - * files (jpg, png, and gif), other supported formats, like pdf, docs, slides, - * and spreadsheets, will return the file icon image. You can also pass query - * string arguments for cutting and resizing your preview image. - */ - public String getFilePreview(String fileId, int width, int height, int quality, String background, String output) { - final String path = "/storage/files/{fileId}/preview".replace("{fileId}", fileId); - - final Map params = Map.ofEntries( - entry("width", width), - entry("height", height), - entry("quality", quality), - entry("background", background), - entry("output", output), - entry("project", client.getConfig().get("project")), - entry("key", client.getConfig().get("key")) - ); - - - - HttpUrl.Builder httpBuilder = new HttpUrl.Builder().build().newBuilder(client.getEndPoint() + path); - params.forEach((k, v) -> httpBuilder.addQueryParameter(k, v.toString())); - - return httpBuilder.build().toString(); - } - - /// Get File for View - /* - * Get file content by its unique ID. This endpoint is similar to the download - * method but returns with no 'Content-Disposition: attachment' header. - */ - public String getFileView(String fileId, String as) { - final String path = "/storage/files/{fileId}/view".replace("{fileId}", fileId); - - final Map params = Map.ofEntries( - entry("as", as), - entry("project", client.getConfig().get("project")), - entry("key", client.getConfig().get("key")) - ); - - - - HttpUrl.Builder httpBuilder = new HttpUrl.Builder().build().newBuilder(client.getEndPoint() + path); - params.forEach((k, v) -> httpBuilder.addQueryParameter(k, v.toString())); - - return httpBuilder.build().toString(); - } -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-java/src/main/java/services/Teams.java b/app/sdks/0.6.2/server-java/src/main/java/services/Teams.java deleted file mode 100644 index 46cff57f8c..0000000000 --- a/app/sdks/0.6.2/server-java/src/main/java/services/Teams.java +++ /dev/null @@ -1,206 +0,0 @@ -package .services; - - - -import okhttp3.Call; -import .Client; -import .enums.OrderType; - -import java.io.File; -import java.util.List; -import java.util.HashMap; -import java.util.Map; - -import static java.util.Map.entry; - -public class Teams extends Service { - public Teams(Client client){ - super(client); - } - - /// List Teams - /* - * Get a list of all the current user teams. You can use the query params to - * filter your results. On admin mode, this endpoint will return a list of all - * of the project teams. [Learn more about different API modes](/docs/admin). - */ - public Call list(String search, int limit, int offset, OrderType orderType) { - final String path = "/teams"; - - final Map params = Map.ofEntries( - entry("search", search), - entry("limit", limit), - entry("offset", offset), - entry("orderType", orderType.name()) - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("GET", path, headers, params); - } - - /// Create Team - /* - * Create a new team. The user who creates the team will automatically be - * assigned as the owner of the team. The team owner can invite new members, - * who will be able add new owners and update or delete the team from your - * project. - */ - public Call create(String name, List roles) { - final String path = "/teams"; - - final Map params = Map.ofEntries( - entry("name", name), - entry("roles", roles) - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("POST", path, headers, params); - } - - /// Get Team - /* - * Get team by its unique ID. All team members have read access for this - * resource. - */ - public Call get(String teamId) { - final String path = "/teams/{teamId}".replace("{teamId}", teamId); - - final Map params = Map.ofEntries( - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("GET", path, headers, params); - } - - /// Update Team - /* - * Update team by its unique ID. Only team owners have write access for this - * resource. - */ - public Call update(String teamId, String name) { - final String path = "/teams/{teamId}".replace("{teamId}", teamId); - - final Map params = Map.ofEntries( - entry("name", name) - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("PUT", path, headers, params); - } - - /// Delete Team - /* - * Delete team by its unique ID. Only team owners have write access for this - * resource. - */ - public Call delete(String teamId) { - final String path = "/teams/{teamId}".replace("{teamId}", teamId); - - final Map params = Map.ofEntries( - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("DELETE", path, headers, params); - } - - /// Get Team Memberships - /* - * Get team members by the team unique ID. All team members have read access - * for this list of resources. - */ - public Call getMemberships(String teamId) { - final String path = "/teams/{teamId}/memberships".replace("{teamId}", teamId); - - final Map params = Map.ofEntries( - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("GET", path, headers, params); - } - - /// Create Team Membership - /* - * Use this endpoint to invite a new member to join your team. An email with a - * link to join the team will be sent to the new member email address if the - * member doesn't exist in the project it will be created automatically. - * - * Use the 'URL' parameter to redirect the user from the invitation email back - * to your app. When the user is redirected, use the [Update Team Membership - * Status](/docs/teams#updateMembershipStatus) endpoint to allow the user to - * accept the invitation to the team. - * - * Please note that in order to avoid a [Redirect - * Attacks](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) - * the only valid redirect URL's are the once from domains you have set when - * added your platforms in the console interface. - */ - public Call createMembership(String teamId, String email, List roles, String url, String name) { - final String path = "/teams/{teamId}/memberships".replace("{teamId}", teamId); - - final Map params = Map.ofEntries( - entry("email", email), - entry("name", name), - entry("roles", roles), - entry("url", url) - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("POST", path, headers, params); - } - - /// 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 he didn't accept it. - */ - public Call deleteMembership(String teamId, String inviteId) { - final String path = "/teams/{teamId}/memberships/{inviteId}".replace("{teamId}", teamId).replace("{inviteId}", inviteId); - - final Map params = Map.ofEntries( - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("DELETE", path, headers, params); - } -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-java/src/main/java/services/Users.java b/app/sdks/0.6.2/server-java/src/main/java/services/Users.java deleted file mode 100644 index 921a7c1296..0000000000 --- a/app/sdks/0.6.2/server-java/src/main/java/services/Users.java +++ /dev/null @@ -1,221 +0,0 @@ -package .services; - - - -import okhttp3.Call; -import .Client; -import .enums.OrderType; - -import java.io.File; -import java.util.List; -import java.util.HashMap; -import java.util.Map; - -import static java.util.Map.entry; - -public class Users extends Service { - public Users(Client client){ - super(client); - } - - /// List Users - /* - * Get a list of all the project users. You can use the query params to filter - * your results. - */ - public Call list(String search, int limit, int offset, OrderType orderType) { - final String path = "/users"; - - final Map params = Map.ofEntries( - entry("search", search), - entry("limit", limit), - entry("offset", offset), - entry("orderType", orderType.name()) - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("GET", path, headers, params); - } - - /// Create User - /* - * Create a new user. - */ - public Call create(String email, String password, String name) { - final String path = "/users"; - - final Map params = Map.ofEntries( - entry("email", email), - entry("password", password), - entry("name", name) - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("POST", path, headers, params); - } - - /// Get User - /* - * Get user by its unique ID. - */ - public Call get(String userId) { - final String path = "/users/{userId}".replace("{userId}", userId); - - final Map params = Map.ofEntries( - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("GET", path, headers, params); - } - - /// Get User Logs - /* - * Get user activity logs list by its unique ID. - */ - public Call getLogs(String userId) { - final String path = "/users/{userId}/logs".replace("{userId}", userId); - - final Map params = Map.ofEntries( - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("GET", path, headers, params); - } - - /// Get User Preferences - /* - * Get user preferences by its unique ID. - */ - public Call getPrefs(String userId) { - final String path = "/users/{userId}/prefs".replace("{userId}", userId); - - final Map params = Map.ofEntries( - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("GET", path, headers, params); - } - - /// Update User Preferences - /* - * Update user preferences by its unique ID. You can pass only the specific - * settings you wish to update. - */ - public Call updatePrefs(String userId, Object prefs) { - final String path = "/users/{userId}/prefs".replace("{userId}", userId); - - final Map params = Map.ofEntries( - entry("prefs", prefs) - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("PATCH", path, headers, params); - } - - /// Get User Sessions - /* - * Get user sessions list by its unique ID. - */ - public Call getSessions(String userId) { - final String path = "/users/{userId}/sessions".replace("{userId}", userId); - - final Map params = Map.ofEntries( - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("GET", path, headers, params); - } - - /// Delete User Sessions - /* - * Delete all user sessions by its unique ID. - */ - public Call deleteSessions(String userId) { - final String path = "/users/{userId}/sessions".replace("{userId}", userId); - - final Map params = Map.ofEntries( - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("DELETE", path, headers, params); - } - - /// Delete User Session - /* - * Delete user sessions by its unique ID. - */ - public Call deleteSession(String userId, String sessionId) { - final String path = "/users/{userId}/sessions/{sessionId}".replace("{userId}", userId).replace("{sessionId}", sessionId); - - final Map params = Map.ofEntries( - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("DELETE", path, headers, params); - } - - /// Update User Status - /* - * Update user status by its unique ID. - */ - public Call updateStatus(String userId, String status) { - final String path = "/users/{userId}/status".replace("{userId}", userId); - - final Map params = Map.ofEntries( - entry("status", status) - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("PATCH", path, headers, params); - } -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-nodejs/CHANGELOG.md b/app/sdks/0.6.2/server-nodejs/CHANGELOG.md deleted file mode 100644 index fa4d35e687..0000000000 --- a/app/sdks/0.6.2/server-nodejs/CHANGELOG.md +++ /dev/null @@ -1 +0,0 @@ -# Change Log \ No newline at end of file diff --git a/app/sdks/0.6.2/server-nodejs/LICENSE b/app/sdks/0.6.2/server-nodejs/LICENSE deleted file mode 100644 index fc7c051a91..0000000000 --- a/app/sdks/0.6.2/server-nodejs/LICENSE +++ /dev/null @@ -1,12 +0,0 @@ -Copyright (c) 2019 Appwrite (https://appwrite.io) and individual contributors. -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - - 3. Neither the name Appwrite nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/app/sdks/0.6.2/server-nodejs/README.md b/app/sdks/0.6.2/server-nodejs/README.md deleted file mode 100644 index abf67fea4e..0000000000 --- a/app/sdks/0.6.2/server-nodejs/README.md +++ /dev/null @@ -1,28 +0,0 @@ -# Appwrite Node.js SDK - -![License](https://img.shields.io/github/license/appwrite/sdk-for-node.svg?v=1) -![Version](https://img.shields.io/badge/api%20version-0.6.1-blue.svg?v=1) - -Appwrite is an open-source backend as a service server that abstract and simplify complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way. - Use the Node.js SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools. - For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs) - - - -![Appwrite](https://appwrite.io/images/github.png) - -## Installation - -To install via [NPM](https://www.npmjs.com/): - -```bash -npm install node-appwrite --save -``` - -## Contribution - -This library is auto-generated by Appwrite custom [SDK Generator](https://github.com/appwrite/sdk-generator). To learn more about how you can help us improve this SDK, please check the [contribution guide](https://github.com/appwrite/sdk-generator/blob/master/CONTRIBUTING.md) before sending a pull-request. - -## License - -Please see the [BSD-3-Clause license](https://raw.githubusercontent.com/appwrite/appwrite/master/LICENSE) file for more information. \ No newline at end of file diff --git a/app/sdks/0.6.2/server-nodejs/docs/examples/avatars/get-browser.md b/app/sdks/0.6.2/server-nodejs/docs/examples/avatars/get-browser.md deleted file mode 100644 index 2a670ce08b..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/avatars/get-browser.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let avatars = new sdk.Avatars(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = avatars.getBrowser('aa'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-nodejs/docs/examples/avatars/get-credit-card.md b/app/sdks/0.6.2/server-nodejs/docs/examples/avatars/get-credit-card.md deleted file mode 100644 index afd38f5a97..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/avatars/get-credit-card.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let avatars = new sdk.Avatars(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = avatars.getCreditCard('amex'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-nodejs/docs/examples/avatars/get-favicon.md b/app/sdks/0.6.2/server-nodejs/docs/examples/avatars/get-favicon.md deleted file mode 100644 index bb347371d4..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/avatars/get-favicon.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let avatars = new sdk.Avatars(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = avatars.getFavicon('https://example.com'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-nodejs/docs/examples/avatars/get-flag.md b/app/sdks/0.6.2/server-nodejs/docs/examples/avatars/get-flag.md deleted file mode 100644 index db677bc4f8..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/avatars/get-flag.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let avatars = new sdk.Avatars(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = avatars.getFlag('af'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-nodejs/docs/examples/avatars/get-image.md b/app/sdks/0.6.2/server-nodejs/docs/examples/avatars/get-image.md deleted file mode 100644 index efa871ea63..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/avatars/get-image.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let avatars = new sdk.Avatars(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = avatars.getImage('https://example.com'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-nodejs/docs/examples/avatars/get-q-r.md b/app/sdks/0.6.2/server-nodejs/docs/examples/avatars/get-q-r.md deleted file mode 100644 index e79b3235af..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/avatars/get-q-r.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let avatars = new sdk.Avatars(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = avatars.getQR('[TEXT]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-nodejs/docs/examples/database/create-collection.md b/app/sdks/0.6.2/server-nodejs/docs/examples/database/create-collection.md deleted file mode 100644 index c0207f30f0..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/database/create-collection.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let database = new sdk.Database(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = database.createCollection('[NAME]', [], [], []); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-nodejs/docs/examples/database/create-document.md b/app/sdks/0.6.2/server-nodejs/docs/examples/database/create-document.md deleted file mode 100644 index 8676dfb84d..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/database/create-document.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let database = new sdk.Database(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = database.createDocument('[COLLECTION_ID]', {}, [], []); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-nodejs/docs/examples/database/delete-collection.md b/app/sdks/0.6.2/server-nodejs/docs/examples/database/delete-collection.md deleted file mode 100644 index 503da98a73..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/database/delete-collection.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let database = new sdk.Database(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = database.deleteCollection('[COLLECTION_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-nodejs/docs/examples/database/delete-document.md b/app/sdks/0.6.2/server-nodejs/docs/examples/database/delete-document.md deleted file mode 100644 index f14c985e83..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/database/delete-document.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let database = new sdk.Database(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = database.deleteDocument('[COLLECTION_ID]', '[DOCUMENT_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-nodejs/docs/examples/database/get-collection-logs.md b/app/sdks/0.6.2/server-nodejs/docs/examples/database/get-collection-logs.md deleted file mode 100644 index 5bc911624b..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/database/get-collection-logs.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let database = new sdk.Database(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = database.getCollectionLogs('[COLLECTION_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-nodejs/docs/examples/database/get-collection.md b/app/sdks/0.6.2/server-nodejs/docs/examples/database/get-collection.md deleted file mode 100644 index a14ce0d49a..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/database/get-collection.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let database = new sdk.Database(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = database.getCollection('[COLLECTION_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-nodejs/docs/examples/database/get-document.md b/app/sdks/0.6.2/server-nodejs/docs/examples/database/get-document.md deleted file mode 100644 index 55cce32b9b..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/database/get-document.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let database = new sdk.Database(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = database.getDocument('[COLLECTION_ID]', '[DOCUMENT_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-nodejs/docs/examples/database/list-collections.md b/app/sdks/0.6.2/server-nodejs/docs/examples/database/list-collections.md deleted file mode 100644 index bacfdb062c..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/database/list-collections.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let database = new sdk.Database(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = database.listCollections(); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-nodejs/docs/examples/database/list-documents.md b/app/sdks/0.6.2/server-nodejs/docs/examples/database/list-documents.md deleted file mode 100644 index ad02d05e2a..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/database/list-documents.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let database = new sdk.Database(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = database.listDocuments('[COLLECTION_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-nodejs/docs/examples/database/update-collection.md b/app/sdks/0.6.2/server-nodejs/docs/examples/database/update-collection.md deleted file mode 100644 index eb9326565a..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/database/update-collection.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let database = new sdk.Database(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = database.updateCollection('[COLLECTION_ID]', '[NAME]', [], []); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-nodejs/docs/examples/database/update-document.md b/app/sdks/0.6.2/server-nodejs/docs/examples/database/update-document.md deleted file mode 100644 index 131722cd26..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/database/update-document.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let database = new sdk.Database(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = database.updateDocument('[COLLECTION_ID]', '[DOCUMENT_ID]', {}, [], []); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-nodejs/docs/examples/functions/create-execution.md b/app/sdks/0.6.2/server-nodejs/docs/examples/functions/create-execution.md deleted file mode 100644 index 9ed33ae50b..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/functions/create-execution.md +++ /dev/null @@ -1,19 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let functions = new sdk.Functions(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = functions.createExecution('[FUNCTION_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-nodejs/docs/examples/functions/create-tag.md b/app/sdks/0.6.2/server-nodejs/docs/examples/functions/create-tag.md deleted file mode 100644 index 5048701d05..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/functions/create-tag.md +++ /dev/null @@ -1,19 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let functions = new sdk.Functions(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = functions.createTag('[FUNCTION_ID]', 'node-14', '[COMMAND]', '[CODE]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-nodejs/docs/examples/functions/create.md b/app/sdks/0.6.2/server-nodejs/docs/examples/functions/create.md deleted file mode 100644 index 3ac02eb506..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/functions/create.md +++ /dev/null @@ -1,19 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let functions = new sdk.Functions(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = functions.create('[NAME]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-nodejs/docs/examples/functions/delete-tag.md b/app/sdks/0.6.2/server-nodejs/docs/examples/functions/delete-tag.md deleted file mode 100644 index fc2fe8a53b..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/functions/delete-tag.md +++ /dev/null @@ -1,19 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let functions = new sdk.Functions(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = functions.deleteTag('[FUNCTION_ID]', '[TAG_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-nodejs/docs/examples/functions/delete.md b/app/sdks/0.6.2/server-nodejs/docs/examples/functions/delete.md deleted file mode 100644 index 048c96d99c..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/functions/delete.md +++ /dev/null @@ -1,19 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let functions = new sdk.Functions(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = functions.delete('[FUNCTION_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-nodejs/docs/examples/functions/get-execution.md b/app/sdks/0.6.2/server-nodejs/docs/examples/functions/get-execution.md deleted file mode 100644 index 482f7ee713..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/functions/get-execution.md +++ /dev/null @@ -1,19 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let functions = new sdk.Functions(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = functions.getExecution('[FUNCTION_ID]', '[EXECUTION_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-nodejs/docs/examples/functions/get-tag.md b/app/sdks/0.6.2/server-nodejs/docs/examples/functions/get-tag.md deleted file mode 100644 index 5caa2134b6..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/functions/get-tag.md +++ /dev/null @@ -1,19 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let functions = new sdk.Functions(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = functions.getTag('[FUNCTION_ID]', '[TAG_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-nodejs/docs/examples/functions/get.md b/app/sdks/0.6.2/server-nodejs/docs/examples/functions/get.md deleted file mode 100644 index cfc2d0fae2..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/functions/get.md +++ /dev/null @@ -1,19 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let functions = new sdk.Functions(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = functions.get('[FUNCTION_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-nodejs/docs/examples/functions/list-executions.md b/app/sdks/0.6.2/server-nodejs/docs/examples/functions/list-executions.md deleted file mode 100644 index ceecf677a6..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/functions/list-executions.md +++ /dev/null @@ -1,19 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let functions = new sdk.Functions(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = functions.listExecutions('[FUNCTION_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-nodejs/docs/examples/functions/list-tags.md b/app/sdks/0.6.2/server-nodejs/docs/examples/functions/list-tags.md deleted file mode 100644 index 147d65afe2..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/functions/list-tags.md +++ /dev/null @@ -1,19 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let functions = new sdk.Functions(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = functions.listTags('[FUNCTION_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-nodejs/docs/examples/functions/list.md b/app/sdks/0.6.2/server-nodejs/docs/examples/functions/list.md deleted file mode 100644 index 3cb999c51b..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/functions/list.md +++ /dev/null @@ -1,19 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let functions = new sdk.Functions(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = functions.list(); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-nodejs/docs/examples/functions/update-active.md b/app/sdks/0.6.2/server-nodejs/docs/examples/functions/update-active.md deleted file mode 100644 index 1c2f0da2e2..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/functions/update-active.md +++ /dev/null @@ -1,19 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let functions = new sdk.Functions(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = functions.updateActive('[FUNCTION_ID]', '[ACTIVE]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-nodejs/docs/examples/functions/update-tag.md b/app/sdks/0.6.2/server-nodejs/docs/examples/functions/update-tag.md deleted file mode 100644 index 8b9baefaf0..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/functions/update-tag.md +++ /dev/null @@ -1,19 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let functions = new sdk.Functions(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = functions.updateTag('[FUNCTION_ID]', '[TAG]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-nodejs/docs/examples/functions/update.md b/app/sdks/0.6.2/server-nodejs/docs/examples/functions/update.md deleted file mode 100644 index 73672ae162..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/functions/update.md +++ /dev/null @@ -1,19 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let functions = new sdk.Functions(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = functions.update('[FUNCTION_ID]', '[NAME]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-nodejs/docs/examples/health/get-anti-virus.md b/app/sdks/0.6.2/server-nodejs/docs/examples/health/get-anti-virus.md deleted file mode 100644 index c08e612bcf..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/health/get-anti-virus.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let health = new sdk.Health(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = health.getAntiVirus(); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-nodejs/docs/examples/health/get-cache.md b/app/sdks/0.6.2/server-nodejs/docs/examples/health/get-cache.md deleted file mode 100644 index d19cc8abd5..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/health/get-cache.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let health = new sdk.Health(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = health.getCache(); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-nodejs/docs/examples/health/get-d-b.md b/app/sdks/0.6.2/server-nodejs/docs/examples/health/get-d-b.md deleted file mode 100644 index 08505367d4..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/health/get-d-b.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let health = new sdk.Health(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = health.getDB(); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-nodejs/docs/examples/health/get-queue-certificates.md b/app/sdks/0.6.2/server-nodejs/docs/examples/health/get-queue-certificates.md deleted file mode 100644 index 2eb69e0126..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/health/get-queue-certificates.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let health = new sdk.Health(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = health.getQueueCertificates(); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-nodejs/docs/examples/health/get-queue-functions.md b/app/sdks/0.6.2/server-nodejs/docs/examples/health/get-queue-functions.md deleted file mode 100644 index 9470e11646..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/health/get-queue-functions.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let health = new sdk.Health(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = health.getQueueFunctions(); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-nodejs/docs/examples/health/get-queue-logs.md b/app/sdks/0.6.2/server-nodejs/docs/examples/health/get-queue-logs.md deleted file mode 100644 index 10f1cb24e3..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/health/get-queue-logs.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let health = new sdk.Health(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = health.getQueueLogs(); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-nodejs/docs/examples/health/get-queue-tasks.md b/app/sdks/0.6.2/server-nodejs/docs/examples/health/get-queue-tasks.md deleted file mode 100644 index c159f4e6ee..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/health/get-queue-tasks.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let health = new sdk.Health(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = health.getQueueTasks(); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-nodejs/docs/examples/health/get-queue-usage.md b/app/sdks/0.6.2/server-nodejs/docs/examples/health/get-queue-usage.md deleted file mode 100644 index 6286c741ee..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/health/get-queue-usage.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let health = new sdk.Health(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = health.getQueueUsage(); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-nodejs/docs/examples/health/get-queue-webhooks.md b/app/sdks/0.6.2/server-nodejs/docs/examples/health/get-queue-webhooks.md deleted file mode 100644 index 3a788eb895..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/health/get-queue-webhooks.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let health = new sdk.Health(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = health.getQueueWebhooks(); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-nodejs/docs/examples/health/get-storage-anti-virus.md b/app/sdks/0.6.2/server-nodejs/docs/examples/health/get-storage-anti-virus.md deleted file mode 100644 index 70c3850375..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/health/get-storage-anti-virus.md +++ /dev/null @@ -1,19 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let health = new sdk.Health(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = health.getStorageAntiVirus(); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-nodejs/docs/examples/health/get-storage-local.md b/app/sdks/0.6.2/server-nodejs/docs/examples/health/get-storage-local.md deleted file mode 100644 index 84b8fb47a6..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/health/get-storage-local.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let health = new sdk.Health(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = health.getStorageLocal(); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-nodejs/docs/examples/health/get-time.md b/app/sdks/0.6.2/server-nodejs/docs/examples/health/get-time.md deleted file mode 100644 index 563bf2fb52..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/health/get-time.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let health = new sdk.Health(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = health.getTime(); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-nodejs/docs/examples/health/get.md b/app/sdks/0.6.2/server-nodejs/docs/examples/health/get.md deleted file mode 100644 index 20c3d40801..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/health/get.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let health = new sdk.Health(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = health.get(); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-nodejs/docs/examples/locale/get-continents.md b/app/sdks/0.6.2/server-nodejs/docs/examples/locale/get-continents.md deleted file mode 100644 index 323237b4ab..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/locale/get-continents.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let locale = new sdk.Locale(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = locale.getContinents(); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-nodejs/docs/examples/locale/get-countries-e-u.md b/app/sdks/0.6.2/server-nodejs/docs/examples/locale/get-countries-e-u.md deleted file mode 100644 index fc9170dba4..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/locale/get-countries-e-u.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let locale = new sdk.Locale(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = locale.getCountriesEU(); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-nodejs/docs/examples/locale/get-countries-phones.md b/app/sdks/0.6.2/server-nodejs/docs/examples/locale/get-countries-phones.md deleted file mode 100644 index 42be901677..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/locale/get-countries-phones.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let locale = new sdk.Locale(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = locale.getCountriesPhones(); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-nodejs/docs/examples/locale/get-countries.md b/app/sdks/0.6.2/server-nodejs/docs/examples/locale/get-countries.md deleted file mode 100644 index 437c9bb502..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/locale/get-countries.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let locale = new sdk.Locale(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = locale.getCountries(); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-nodejs/docs/examples/locale/get-currencies.md b/app/sdks/0.6.2/server-nodejs/docs/examples/locale/get-currencies.md deleted file mode 100644 index 1b7d605760..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/locale/get-currencies.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let locale = new sdk.Locale(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = locale.getCurrencies(); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-nodejs/docs/examples/locale/get.md b/app/sdks/0.6.2/server-nodejs/docs/examples/locale/get.md deleted file mode 100644 index 2f2eb95d90..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/locale/get.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let locale = new sdk.Locale(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = locale.get(); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-nodejs/docs/examples/storage/create-file.md b/app/sdks/0.6.2/server-nodejs/docs/examples/storage/create-file.md deleted file mode 100644 index 1eda9fd868..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/storage/create-file.md +++ /dev/null @@ -1,21 +0,0 @@ -const sdk = require('node-appwrite'); -const fs = require('fs'); - -// Init SDK -let client = new sdk.Client(); - -let storage = new sdk.Storage(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = storage.createFile(fs.createReadStream(__dirname + '/file.png')), [], []); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-nodejs/docs/examples/storage/delete-file.md b/app/sdks/0.6.2/server-nodejs/docs/examples/storage/delete-file.md deleted file mode 100644 index 9ce0ff7f2e..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/storage/delete-file.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let storage = new sdk.Storage(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = storage.deleteFile('[FILE_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-nodejs/docs/examples/storage/get-file-download.md b/app/sdks/0.6.2/server-nodejs/docs/examples/storage/get-file-download.md deleted file mode 100644 index 1683ed87e0..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/storage/get-file-download.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let storage = new sdk.Storage(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = storage.getFileDownload('[FILE_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-nodejs/docs/examples/storage/get-file-preview.md b/app/sdks/0.6.2/server-nodejs/docs/examples/storage/get-file-preview.md deleted file mode 100644 index 771dcd35f0..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/storage/get-file-preview.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let storage = new sdk.Storage(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = storage.getFilePreview('[FILE_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-nodejs/docs/examples/storage/get-file-view.md b/app/sdks/0.6.2/server-nodejs/docs/examples/storage/get-file-view.md deleted file mode 100644 index 83029ecdee..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/storage/get-file-view.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let storage = new sdk.Storage(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = storage.getFileView('[FILE_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-nodejs/docs/examples/storage/get-file.md b/app/sdks/0.6.2/server-nodejs/docs/examples/storage/get-file.md deleted file mode 100644 index 2a76fdf189..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/storage/get-file.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let storage = new sdk.Storage(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = storage.getFile('[FILE_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-nodejs/docs/examples/storage/list-files.md b/app/sdks/0.6.2/server-nodejs/docs/examples/storage/list-files.md deleted file mode 100644 index e11fd95300..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/storage/list-files.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let storage = new sdk.Storage(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = storage.listFiles(); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-nodejs/docs/examples/storage/update-file.md b/app/sdks/0.6.2/server-nodejs/docs/examples/storage/update-file.md deleted file mode 100644 index 4726169146..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/storage/update-file.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let storage = new sdk.Storage(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = storage.updateFile('[FILE_ID]', [], []); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-nodejs/docs/examples/teams/create-membership.md b/app/sdks/0.6.2/server-nodejs/docs/examples/teams/create-membership.md deleted file mode 100644 index cd17042e58..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/teams/create-membership.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let teams = new sdk.Teams(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = teams.createMembership('[TEAM_ID]', 'email@example.com', [], 'https://example.com'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-nodejs/docs/examples/teams/create.md b/app/sdks/0.6.2/server-nodejs/docs/examples/teams/create.md deleted file mode 100644 index c0d0611a49..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/teams/create.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let teams = new sdk.Teams(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = teams.create('[NAME]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-nodejs/docs/examples/teams/delete-membership.md b/app/sdks/0.6.2/server-nodejs/docs/examples/teams/delete-membership.md deleted file mode 100644 index f9a76f3ec0..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/teams/delete-membership.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let teams = new sdk.Teams(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = teams.deleteMembership('[TEAM_ID]', '[INVITE_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-nodejs/docs/examples/teams/delete.md b/app/sdks/0.6.2/server-nodejs/docs/examples/teams/delete.md deleted file mode 100644 index e833fdfb9b..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/teams/delete.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let teams = new sdk.Teams(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = teams.delete('[TEAM_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-nodejs/docs/examples/teams/get-memberships.md b/app/sdks/0.6.2/server-nodejs/docs/examples/teams/get-memberships.md deleted file mode 100644 index 75cdf38e5c..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/teams/get-memberships.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let teams = new sdk.Teams(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = teams.getMemberships('[TEAM_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-nodejs/docs/examples/teams/get.md b/app/sdks/0.6.2/server-nodejs/docs/examples/teams/get.md deleted file mode 100644 index a51322df27..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/teams/get.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let teams = new sdk.Teams(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = teams.get('[TEAM_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-nodejs/docs/examples/teams/list.md b/app/sdks/0.6.2/server-nodejs/docs/examples/teams/list.md deleted file mode 100644 index 259bbd22b2..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/teams/list.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let teams = new sdk.Teams(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = teams.list(); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-nodejs/docs/examples/teams/update.md b/app/sdks/0.6.2/server-nodejs/docs/examples/teams/update.md deleted file mode 100644 index 2118e8a90f..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/teams/update.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let teams = new sdk.Teams(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = teams.update('[TEAM_ID]', '[NAME]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-nodejs/docs/examples/users/create.md b/app/sdks/0.6.2/server-nodejs/docs/examples/users/create.md deleted file mode 100644 index 83704cbd9d..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/users/create.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let users = new sdk.Users(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = users.create('email@example.com', 'password'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-nodejs/docs/examples/users/delete-session.md b/app/sdks/0.6.2/server-nodejs/docs/examples/users/delete-session.md deleted file mode 100644 index 22308d4fa6..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/users/delete-session.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let users = new sdk.Users(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = users.deleteSession('[USER_ID]', '[SESSION_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-nodejs/docs/examples/users/delete-sessions.md b/app/sdks/0.6.2/server-nodejs/docs/examples/users/delete-sessions.md deleted file mode 100644 index 75f8f96bda..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/users/delete-sessions.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let users = new sdk.Users(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = users.deleteSessions('[USER_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-nodejs/docs/examples/users/get-logs.md b/app/sdks/0.6.2/server-nodejs/docs/examples/users/get-logs.md deleted file mode 100644 index 1287b5ef5f..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/users/get-logs.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let users = new sdk.Users(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = users.getLogs('[USER_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-nodejs/docs/examples/users/get-prefs.md b/app/sdks/0.6.2/server-nodejs/docs/examples/users/get-prefs.md deleted file mode 100644 index 088e6b0811..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/users/get-prefs.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let users = new sdk.Users(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = users.getPrefs('[USER_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-nodejs/docs/examples/users/get-sessions.md b/app/sdks/0.6.2/server-nodejs/docs/examples/users/get-sessions.md deleted file mode 100644 index f5ad029ebe..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/users/get-sessions.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let users = new sdk.Users(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = users.getSessions('[USER_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-nodejs/docs/examples/users/get.md b/app/sdks/0.6.2/server-nodejs/docs/examples/users/get.md deleted file mode 100644 index 5b91577284..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/users/get.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let users = new sdk.Users(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = users.get('[USER_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-nodejs/docs/examples/users/list.md b/app/sdks/0.6.2/server-nodejs/docs/examples/users/list.md deleted file mode 100644 index 0bc83b06bf..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/users/list.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let users = new sdk.Users(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = users.list(); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-nodejs/docs/examples/users/update-prefs.md b/app/sdks/0.6.2/server-nodejs/docs/examples/users/update-prefs.md deleted file mode 100644 index 7d1011d6be..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/users/update-prefs.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let users = new sdk.Users(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = users.updatePrefs('[USER_ID]', {}); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-nodejs/docs/examples/users/update-status.md b/app/sdks/0.6.2/server-nodejs/docs/examples/users/update-status.md deleted file mode 100644 index 86f54381da..0000000000 --- a/app/sdks/0.6.2/server-nodejs/docs/examples/users/update-status.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let users = new sdk.Users(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = users.updateStatus('[USER_ID]', '1'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-nodejs/index.js b/app/sdks/0.6.2/server-nodejs/index.js deleted file mode 100644 index deb571190d..0000000000 --- a/app/sdks/0.6.2/server-nodejs/index.js +++ /dev/null @@ -1,21 +0,0 @@ -const Client = require('./lib/client.js'); -const Avatars = require('./lib/services/avatars.js'); -const Database = require('./lib/services/database.js'); -const Functions = require('./lib/services/functions.js'); -const Health = require('./lib/services/health.js'); -const Locale = require('./lib/services/locale.js'); -const Storage = require('./lib/services/storage.js'); -const Teams = require('./lib/services/teams.js'); -const Users = require('./lib/services/users.js'); - -module.exports = { - Client, - Avatars, - Database, - Functions, - Health, - Locale, - Storage, - Teams, - Users, -}; \ No newline at end of file diff --git a/app/sdks/0.6.2/server-nodejs/lib/client.js b/app/sdks/0.6.2/server-nodejs/lib/client.js deleted file mode 100644 index add1956056..0000000000 --- a/app/sdks/0.6.2/server-nodejs/lib/client.js +++ /dev/null @@ -1,135 +0,0 @@ -const URL = require('url').URL; -const request = require('request-promise-native'); - -class Client { - - constructor() { - this.endpoint = 'https://appwrite.io/v1'; - this.headers = { - 'content-type': '', - 'x-sdk-version': 'appwrite:nodejs:1.1.0', - }; - this.selfSigned = false; - } - - /** - * Set Project - * - * Your project ID - * - * @param string value - * - * @return self - */ - setProject(value) { - this.addHeader('X-Appwrite-Project', value); - - return this; - } - - /** - * Set Key - * - * Your secret API key - * - * @param string value - * - * @return self - */ - setKey(value) { - this.addHeader('X-Appwrite-Key', value); - - return this; - } - - /** - * Set Locale - * - * @param string value - * - * @return self - */ - setLocale(value) { - this.addHeader('X-Appwrite-Locale', value); - - return this; - } - - /*** - * @param bool status - * @return this - */ - setSelfSigned(status = true) { - this.selfSigned = status; - - return this; - } - - /*** - * @param endpoint - * @return this - */ - setEndpoint(endpoint) - { - this.endpoint = endpoint; - - return this; - } - - /** - * @param key string - * @param value string - */ - addHeader(key, value) { - this.headers[key.toLowerCase()] = value.toLowerCase(); - - return this; - } - - async call(method, path = '', headers = {}, params = {}) { - if(this.selfSigned) { // Allow self signed requests - process.env["NODE_TLS_REJECT_UNAUTHORIZED"] = 0; - } - - headers = Object.assign(this.headers, headers); - - let contentType = headers['content-type'].toLowerCase(); - let options = { - method: method.toUpperCase(), - uri: this.endpoint + path, - qs: (method.toUpperCase() === 'GET') ? params : {}, - headers: headers, - body: (method.toUpperCase() === 'GET' || contentType.startsWith('multipart/form-data')) ? null : params, - json: (contentType.startsWith('application/json')), - formData: (contentType.startsWith('multipart/form-data')) ? this.flatten(params) : null, - }; - - let response = await request(options); - - if(contentType.startsWith('multipart/form-data')) { - response = JSON.parse(response); - } - - return response; - } - - flatten(data, prefix = '') { - let output = {}; - - for (const key in data) { - let value = data[key]; - let finalKey = prefix ? prefix + '[' + key +']' : key; - - if (Array.isArray(value)) { - output = Object.assign(output, this.flatten(value, finalKey)); // @todo: handle name collision here if needed - } - else { - output[finalKey] = value; - } - } - - return output; - } -} - -module.exports = Client; \ No newline at end of file diff --git a/app/sdks/0.6.2/server-nodejs/lib/service.js b/app/sdks/0.6.2/server-nodejs/lib/service.js deleted file mode 100644 index e799c064be..0000000000 --- a/app/sdks/0.6.2/server-nodejs/lib/service.js +++ /dev/null @@ -1,10 +0,0 @@ -class Service { - /** - * @param client - */ - constructor(client) { - this.client = client; - } -} - -module.exports = Service; \ No newline at end of file diff --git a/app/sdks/0.6.2/server-nodejs/lib/services/avatars.js b/app/sdks/0.6.2/server-nodejs/lib/services/avatars.js deleted file mode 100644 index c34bdde966..0000000000 --- a/app/sdks/0.6.2/server-nodejs/lib/services/avatars.js +++ /dev/null @@ -1,164 +0,0 @@ -const Service = require('../service.js'); - -class Avatars extends Service { - - /** - * Get Browser Icon - * - * You can use this endpoint to show different browser icons to your users. - * The code argument receives the browser code as it appears in your user - * /account/sessions endpoint. Use width, height and quality arguments to - * change the output settings. - * - * @param string code - * @param number width - * @param number height - * @param number quality - * @throws Exception - * @return {} - */ - async getBrowser(code, width = 100, height = 100, quality = 100) { - let path = '/avatars/browsers/{code}'.replace(new RegExp('{code}', 'g'), code); - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - 'width': width, - 'height': height, - 'quality': quality - }); - } - - /** - * Get Credit Card Icon - * - * Need to display your users with your billing method or their payment - * methods? The credit card endpoint will return you the icon of the credit - * card provider you need. Use width, height and quality arguments to change - * the output settings. - * - * @param string code - * @param number width - * @param number height - * @param number quality - * @throws Exception - * @return {} - */ - async getCreditCard(code, width = 100, height = 100, quality = 100) { - let path = '/avatars/credit-cards/{code}'.replace(new RegExp('{code}', 'g'), code); - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - 'width': width, - 'height': height, - 'quality': quality - }); - } - - /** - * Get Favicon - * - * Use this endpoint to fetch the favorite icon (AKA favicon) of a any remote - * website URL. - * - * @param string url - * @throws Exception - * @return {} - */ - async getFavicon(url) { - let path = '/avatars/favicon'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - 'url': url - }); - } - - /** - * Get Country Flag - * - * You can use this endpoint to show different country flags icons to your - * users. The code argument receives the 2 letter country code. Use width, - * height and quality arguments to change the output settings. - * - * @param string code - * @param number width - * @param number height - * @param number quality - * @throws Exception - * @return {} - */ - async getFlag(code, width = 100, height = 100, quality = 100) { - let path = '/avatars/flags/{code}'.replace(new RegExp('{code}', 'g'), code); - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - 'width': width, - 'height': height, - 'quality': quality - }); - } - - /** - * Get Image from URL - * - * Use this endpoint to fetch a remote image URL and crop it to any image size - * you want. This endpoint is very useful if you need to crop and display - * remote images in your app or in case you want to make sure a 3rd party - * image is properly served using a TLS protocol. - * - * @param string url - * @param number width - * @param number height - * @throws Exception - * @return {} - */ - async getImage(url, width = 400, height = 400) { - let path = '/avatars/image'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - 'url': url, - 'width': width, - 'height': height - }); - } - - /** - * 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. - * - * @param string text - * @param number size - * @param number margin - * @param number download - * @throws Exception - * @return {} - */ - async getQR(text, size = 400, margin = 1, download = 0) { - let path = '/avatars/qr'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - 'text': text, - 'size': size, - 'margin': margin, - 'download': download - }); - } -} - -module.exports = Avatars; \ No newline at end of file diff --git a/app/sdks/0.6.2/server-nodejs/lib/services/database.js b/app/sdks/0.6.2/server-nodejs/lib/services/database.js deleted file mode 100644 index ce1c09e391..0000000000 --- a/app/sdks/0.6.2/server-nodejs/lib/services/database.js +++ /dev/null @@ -1,283 +0,0 @@ -const Service = require('../service.js'); - -class Database extends Service { - - /** - * List Collections - * - * Get a list of all the user collections. You can use the query params to - * filter your results. On admin mode, this endpoint will return a list of all - * of the project collections. [Learn more about different API - * modes](/docs/admin). - * - * @param string search - * @param number limit - * @param number offset - * @param string orderType - * @throws Exception - * @return {} - */ - async listCollections(search = '', limit = 25, offset = 0, orderType = 'ASC') { - let path = '/database/collections'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - 'search': search, - 'limit': limit, - 'offset': offset, - 'orderType': orderType - }); - } - - /** - * Create Collection - * - * Create a new Collection. - * - * @param string name - * @param string[] read - * @param string[] write - * @param string[] rules - * @throws Exception - * @return {} - */ - async createCollection(name, read, write, rules) { - let path = '/database/collections'; - - return await this.client.call('post', path, { - 'content-type': 'application/json', - }, - { - 'name': name, - 'read': read, - 'write': write, - 'rules': rules - }); - } - - /** - * Get Collection - * - * Get collection by its unique ID. This endpoint response returns a JSON - * object with the collection metadata. - * - * @param string collectionId - * @throws Exception - * @return {} - */ - async getCollection(collectionId) { - let path = '/database/collections/{collectionId}'.replace(new RegExp('{collectionId}', 'g'), collectionId); - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Update Collection - * - * Update collection by its unique ID. - * - * @param string collectionId - * @param string name - * @param string[] read - * @param string[] write - * @param string[] rules - * @throws Exception - * @return {} - */ - async updateCollection(collectionId, name, read, write, rules = []) { - let path = '/database/collections/{collectionId}'.replace(new RegExp('{collectionId}', 'g'), collectionId); - - return await this.client.call('put', path, { - 'content-type': 'application/json', - }, - { - 'name': name, - 'read': read, - 'write': write, - 'rules': rules - }); - } - - /** - * Delete Collection - * - * Delete a collection by its unique ID. Only users with write permissions - * have access to delete this resource. - * - * @param string collectionId - * @throws Exception - * @return {} - */ - async deleteCollection(collectionId) { - let path = '/database/collections/{collectionId}'.replace(new RegExp('{collectionId}', 'g'), collectionId); - - return await this.client.call('delete', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * List Documents - * - * Get a list of all the user documents. You can use the query params to - * filter your results. On admin mode, this endpoint will return a list of all - * of the project documents. [Learn more about different API - * modes](/docs/admin). - * - * @param string collectionId - * @param string[] filters - * @param number offset - * @param number limit - * @param string orderField - * @param string orderType - * @param string orderCast - * @param string search - * @param number first - * @param number last - * @throws Exception - * @return {} - */ - async listDocuments(collectionId, filters = [], offset = 0, limit = 50, orderField = '$id', orderType = 'ASC', orderCast = 'string', search = '', first = 0, last = 0) { - let path = '/database/collections/{collectionId}/documents'.replace(new RegExp('{collectionId}', 'g'), collectionId); - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - 'filters': filters, - 'offset': offset, - 'limit': limit, - 'orderField': orderField, - 'orderType': orderType, - 'orderCast': orderCast, - 'search': search, - 'first': first, - 'last': last - }); - } - - /** - * Create Document - * - * Create a new Document. - * - * @param string collectionId - * @param object data - * @param string[] read - * @param string[] write - * @param string parentDocument - * @param string parentProperty - * @param string parentPropertyType - * @throws Exception - * @return {} - */ - async createDocument(collectionId, data, read, write, parentDocument = '', parentProperty = '', parentPropertyType = 'assign') { - let path = '/database/collections/{collectionId}/documents'.replace(new RegExp('{collectionId}', 'g'), collectionId); - - return await this.client.call('post', path, { - 'content-type': 'application/json', - }, - { - 'data': data, - 'read': read, - 'write': write, - 'parentDocument': parentDocument, - 'parentProperty': parentProperty, - 'parentPropertyType': parentPropertyType - }); - } - - /** - * Get Document - * - * Get document by its unique ID. This endpoint response returns a JSON object - * with the document data. - * - * @param string collectionId - * @param string documentId - * @throws Exception - * @return {} - */ - async getDocument(collectionId, documentId) { - let path = '/database/collections/{collectionId}/documents/{documentId}'.replace(new RegExp('{collectionId}', 'g'), collectionId).replace(new RegExp('{documentId}', 'g'), documentId); - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Update Document - * - * @param string collectionId - * @param string documentId - * @param object data - * @param string[] read - * @param string[] write - * @throws Exception - * @return {} - */ - async updateDocument(collectionId, documentId, data, read, write) { - let path = '/database/collections/{collectionId}/documents/{documentId}'.replace(new RegExp('{collectionId}', 'g'), collectionId).replace(new RegExp('{documentId}', 'g'), documentId); - - return await this.client.call('patch', path, { - 'content-type': 'application/json', - }, - { - 'data': data, - 'read': read, - 'write': write - }); - } - - /** - * Delete Document - * - * Delete document by its unique ID. This endpoint deletes only the parent - * documents, his attributes and relations to other documents. Child documents - * **will not** be deleted. - * - * @param string collectionId - * @param string documentId - * @throws Exception - * @return {} - */ - async deleteDocument(collectionId, documentId) { - let path = '/database/collections/{collectionId}/documents/{documentId}'.replace(new RegExp('{collectionId}', 'g'), collectionId).replace(new RegExp('{documentId}', 'g'), documentId); - - return await this.client.call('delete', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Get Collection Logs - * - * @param string collectionId - * @throws Exception - * @return {} - */ - async getCollectionLogs(collectionId) { - let path = '/database/collections/{collectionId}/logs'.replace(new RegExp('{collectionId}', 'g'), collectionId); - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } -} - -module.exports = Database; \ No newline at end of file diff --git a/app/sdks/0.6.2/server-nodejs/lib/services/functions.js b/app/sdks/0.6.2/server-nodejs/lib/services/functions.js deleted file mode 100644 index 0dfd8d945d..0000000000 --- a/app/sdks/0.6.2/server-nodejs/lib/services/functions.js +++ /dev/null @@ -1,282 +0,0 @@ -const Service = require('../service.js'); - -class Functions extends Service { - - /** - * List Functions - * - * @param string search - * @param number limit - * @param number offset - * @param string orderType - * @throws Exception - * @return {} - */ - async list(search = '', limit = 25, offset = 0, orderType = 'ASC') { - let path = '/functions'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - 'search': search, - 'limit': limit, - 'offset': offset, - 'orderType': orderType - }); - } - - /** - * Create Function - * - * @param string name - * @param object vars - * @param string[] events - * @param string schedule - * @param number timeout - * @throws Exception - * @return {} - */ - async create(name, vars = [], events = [], schedule = '', timeout = 15) { - let path = '/functions'; - - return await this.client.call('post', path, { - 'content-type': 'application/json', - }, - { - 'name': name, - 'vars': vars, - 'events': events, - 'schedule': schedule, - 'timeout': timeout - }); - } - - /** - * Get Function - * - * @param string functionId - * @throws Exception - * @return {} - */ - async get(functionId) { - let path = '/functions/{functionId}'.replace(new RegExp('{functionId}', 'g'), functionId); - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Update Function - * - * @param string functionId - * @param string name - * @param object vars - * @param string[] events - * @param string schedule - * @param number timeout - * @throws Exception - * @return {} - */ - async update(functionId, name, vars = [], events = [], schedule = '', timeout = 15) { - let path = '/functions/{functionId}'.replace(new RegExp('{functionId}', 'g'), functionId); - - return await this.client.call('put', path, { - 'content-type': 'application/json', - }, - { - 'name': name, - 'vars': vars, - 'events': events, - 'schedule': schedule, - 'timeout': timeout - }); - } - - /** - * Delete Function - * - * @param string functionId - * @throws Exception - * @return {} - */ - async delete(functionId) { - let path = '/functions/{functionId}'.replace(new RegExp('{functionId}', 'g'), functionId); - - return await this.client.call('delete', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * List Executions - * - * @param string functionId - * @param string search - * @param number limit - * @param number offset - * @param string orderType - * @throws Exception - * @return {} - */ - async listExecutions(functionId, search = '', limit = 25, offset = 0, orderType = 'ASC') { - let path = '/functions/{functionId}/executions'.replace(new RegExp('{functionId}', 'g'), functionId); - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - 'search': search, - 'limit': limit, - 'offset': offset, - 'orderType': orderType - }); - } - - /** - * Create Execution - * - * @param string functionId - * @param number async - * @throws Exception - * @return {} - */ - async createExecution(functionId, async = 1) { - let path = '/functions/{functionId}/executions'.replace(new RegExp('{functionId}', 'g'), functionId); - - return await this.client.call('post', path, { - 'content-type': 'application/json', - }, - { - 'async': async - }); - } - - /** - * Get Execution - * - * @param string functionId - * @param string executionId - * @throws Exception - * @return {} - */ - async getExecution(functionId, executionId) { - let path = '/functions/{functionId}/executions/{executionId}'.replace(new RegExp('{functionId}', 'g'), functionId).replace(new RegExp('{executionId}', 'g'), executionId); - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Update Function Tag - * - * @param string functionId - * @param string tag - * @throws Exception - * @return {} - */ - async updateTag(functionId, tag) { - let path = '/functions/{functionId}/tag'.replace(new RegExp('{functionId}', 'g'), functionId); - - return await this.client.call('patch', path, { - 'content-type': 'application/json', - }, - { - 'tag': tag - }); - } - - /** - * List Tags - * - * @param string functionId - * @param string search - * @param number limit - * @param number offset - * @param string orderType - * @throws Exception - * @return {} - */ - async listTags(functionId, search = '', limit = 25, offset = 0, orderType = 'ASC') { - let path = '/functions/{functionId}/tags'.replace(new RegExp('{functionId}', 'g'), functionId); - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - 'search': search, - 'limit': limit, - 'offset': offset, - 'orderType': orderType - }); - } - - /** - * Create Tag - * - * @param string functionId - * @param string env - * @param string command - * @param string code - * @throws Exception - * @return {} - */ - async createTag(functionId, env, command, code) { - let path = '/functions/{functionId}/tags'.replace(new RegExp('{functionId}', 'g'), functionId); - - return await this.client.call('post', path, { - 'content-type': 'application/json', - }, - { - 'env': env, - 'command': command, - 'code': code - }); - } - - /** - * Get Tag - * - * @param string functionId - * @param string tagId - * @throws Exception - * @return {} - */ - async getTag(functionId, tagId) { - let path = '/functions/{functionId}/tags/{tagId}'.replace(new RegExp('{functionId}', 'g'), functionId).replace(new RegExp('{tagId}', 'g'), tagId); - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Delete Tag - * - * @param string functionId - * @param string tagId - * @throws Exception - * @return {} - */ - async deleteTag(functionId, tagId) { - let path = '/functions/{functionId}/tags/{tagId}'.replace(new RegExp('{functionId}', 'g'), functionId).replace(new RegExp('{tagId}', 'g'), tagId); - - return await this.client.call('delete', path, { - 'content-type': 'application/json', - }, - { - }); - } -} - -module.exports = Functions; \ No newline at end of file diff --git a/app/sdks/0.6.2/server-nodejs/lib/services/health.js b/app/sdks/0.6.2/server-nodejs/lib/services/health.js deleted file mode 100644 index a0aed052ce..0000000000 --- a/app/sdks/0.6.2/server-nodejs/lib/services/health.js +++ /dev/null @@ -1,233 +0,0 @@ -const Service = require('../service.js'); - -class Health extends Service { - - /** - * Get HTTP - * - * Check the Appwrite HTTP server is up and responsive. - * - * @throws Exception - * @return {} - */ - async get() { - let path = '/health'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Get Anti virus - * - * Check the Appwrite Anti Virus server is up and connection is successful. - * - * @throws Exception - * @return {} - */ - async getAntiVirus() { - let path = '/health/anti-virus'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Get Cache - * - * Check the Appwrite in-memory cache server is up and connection is - * successful. - * - * @throws Exception - * @return {} - */ - async getCache() { - let path = '/health/cache'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Get DB - * - * Check the Appwrite database server is up and connection is successful. - * - * @throws Exception - * @return {} - */ - async getDB() { - let path = '/health/db'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Get Certificate Queue - * - * Get the number of certificates that are waiting to be issued against - * [Letsencrypt](https://letsencrypt.org/) in the Appwrite internal queue - * server. - * - * @throws Exception - * @return {} - */ - async getQueueCertificates() { - let path = '/health/queue/certificates'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Get Functions Queue - * - * @throws Exception - * @return {} - */ - async getQueueFunctions() { - let path = '/health/queue/functions'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Get Logs Queue - * - * Get the number of logs that are waiting to be processed in the Appwrite - * internal queue server. - * - * @throws Exception - * @return {} - */ - async getQueueLogs() { - let path = '/health/queue/logs'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Get Tasks Queue - * - * Get the number of tasks that are waiting to be processed in the Appwrite - * internal queue server. - * - * @throws Exception - * @return {} - */ - async getQueueTasks() { - let path = '/health/queue/tasks'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Get Usage Queue - * - * Get the number of usage stats that are waiting to be processed in the - * Appwrite internal queue server. - * - * @throws Exception - * @return {} - */ - async getQueueUsage() { - let path = '/health/queue/usage'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Get Webhooks Queue - * - * Get the number of webhooks that are waiting to be processed in the Appwrite - * internal queue server. - * - * @throws Exception - * @return {} - */ - async getQueueWebhooks() { - let path = '/health/queue/webhooks'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Get Local Storage - * - * Check the Appwrite local storage device is up and connection is successful. - * - * @throws Exception - * @return {} - */ - async getStorageLocal() { - let path = '/health/storage/local'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Get Time - * - * Check the Appwrite server time is synced with Google remote NTP server. We - * use this technology to smoothly handle leap seconds with no disruptive - * events. The [Network Time - * Protocol](https://en.wikipedia.org/wiki/Network_Time_Protocol) (NTP) is - * 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. - * - * @throws Exception - * @return {} - */ - async getTime() { - let path = '/health/time'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } -} - -module.exports = Health; \ No newline at end of file diff --git a/app/sdks/0.6.2/server-nodejs/lib/services/locale.js b/app/sdks/0.6.2/server-nodejs/lib/services/locale.js deleted file mode 100644 index bc1efa4688..0000000000 --- a/app/sdks/0.6.2/server-nodejs/lib/services/locale.js +++ /dev/null @@ -1,125 +0,0 @@ -const Service = require('../service.js'); - -class Locale extends Service { - - /** - * Get User Locale - * - * Get the current user location based on IP. Returns an object with user - * country code, country name, continent name, continent code, ip address and - * suggested currency. You can use the locale header to get the data in a - * supported language. - * - * ([IP Geolocation by DB-IP](https://db-ip.com)) - * - * @throws Exception - * @return {} - */ - async get() { - let path = '/locale'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * List Continents - * - * List of all continents. You can use the locale header to get the data in a - * supported language. - * - * @throws Exception - * @return {} - */ - async getContinents() { - let path = '/locale/continents'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * List Countries - * - * List of all countries. You can use the locale header to get the data in a - * supported language. - * - * @throws Exception - * @return {} - */ - async getCountries() { - let path = '/locale/countries'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * 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. - * - * @throws Exception - * @return {} - */ - async getCountriesEU() { - let path = '/locale/countries/eu'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * List Countries Phone Codes - * - * List of all countries phone codes. You can use the locale header to get the - * data in a supported language. - * - * @throws Exception - * @return {} - */ - async getCountriesPhones() { - let path = '/locale/countries/phones'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * List Currencies - * - * List of all currencies, including currency symol, 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. - * - * @throws Exception - * @return {} - */ - async getCurrencies() { - let path = '/locale/currencies'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } -} - -module.exports = Locale; \ No newline at end of file diff --git a/app/sdks/0.6.2/server-nodejs/lib/services/storage.js b/app/sdks/0.6.2/server-nodejs/lib/services/storage.js deleted file mode 100644 index 2b670db31a..0000000000 --- a/app/sdks/0.6.2/server-nodejs/lib/services/storage.js +++ /dev/null @@ -1,199 +0,0 @@ -const Service = require('../service.js'); - -class Storage extends Service { - - /** - * List Files - * - * Get a list of all the user files. You can use the query params to filter - * your results. On admin mode, this endpoint will return a list of all of the - * project files. [Learn more about different API modes](/docs/admin). - * - * @param string search - * @param number limit - * @param number offset - * @param string orderType - * @throws Exception - * @return {} - */ - async listFiles(search = '', limit = 25, offset = 0, orderType = 'ASC') { - let path = '/storage/files'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - 'search': search, - 'limit': limit, - 'offset': offset, - 'orderType': orderType - }); - } - - /** - * Create File - * - * Create a new file. The user who creates the file will automatically be - * assigned to read and write access unless he has passed custom values for - * read and write arguments. - * - * @param File file - * @param string[] read - * @param string[] write - * @throws Exception - * @return {} - */ - async createFile(file, read, write) { - let path = '/storage/files'; - - return await this.client.call('post', path, { - 'content-type': 'multipart/form-data', - }, - { - 'file': file, - 'read': read, - 'write': write - }); - } - - /** - * Get File - * - * Get file by its unique ID. This endpoint response returns a JSON object - * with the file metadata. - * - * @param string fileId - * @throws Exception - * @return {} - */ - async getFile(fileId) { - let path = '/storage/files/{fileId}'.replace(new RegExp('{fileId}', 'g'), fileId); - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Update File - * - * Update file by its unique ID. Only users with write permissions have access - * to update this resource. - * - * @param string fileId - * @param string[] read - * @param string[] write - * @throws Exception - * @return {} - */ - async updateFile(fileId, read, write) { - let path = '/storage/files/{fileId}'.replace(new RegExp('{fileId}', 'g'), fileId); - - return await this.client.call('put', path, { - 'content-type': 'application/json', - }, - { - 'read': read, - 'write': write - }); - } - - /** - * Delete File - * - * Delete a file by its unique ID. Only users with write permissions have - * access to delete this resource. - * - * @param string fileId - * @throws Exception - * @return {} - */ - async deleteFile(fileId) { - let path = '/storage/files/{fileId}'.replace(new RegExp('{fileId}', 'g'), fileId); - - return await this.client.call('delete', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Get File for Download - * - * Get 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. - * - * @param string fileId - * @throws Exception - * @return {} - */ - async getFileDownload(fileId) { - let path = '/storage/files/{fileId}/download'.replace(new RegExp('{fileId}', 'g'), fileId); - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Get File Preview - * - * Get a file preview image. Currently, this method supports preview for image - * files (jpg, png, and gif), other supported formats, like pdf, docs, slides, - * and spreadsheets, will return the file icon image. You can also pass query - * string arguments for cutting and resizing your preview image. - * - * @param string fileId - * @param number width - * @param number height - * @param number quality - * @param string background - * @param string output - * @throws Exception - * @return {} - */ - async getFilePreview(fileId, width = 0, height = 0, quality = 100, background = '', output = '') { - let path = '/storage/files/{fileId}/preview'.replace(new RegExp('{fileId}', 'g'), fileId); - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - 'width': width, - 'height': height, - 'quality': quality, - 'background': background, - 'output': output - }); - } - - /** - * Get File for View - * - * Get file content by its unique ID. This endpoint is similar to the download - * method but returns with no 'Content-Disposition: attachment' header. - * - * @param string fileId - * @param string as - * @throws Exception - * @return {} - */ - async getFileView(fileId, as = '') { - let path = '/storage/files/{fileId}/view'.replace(new RegExp('{fileId}', 'g'), fileId); - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - 'as': as - }); - } -} - -module.exports = Storage; \ No newline at end of file diff --git a/app/sdks/0.6.2/server-nodejs/lib/services/teams.js b/app/sdks/0.6.2/server-nodejs/lib/services/teams.js deleted file mode 100644 index a17dd50aa3..0000000000 --- a/app/sdks/0.6.2/server-nodejs/lib/services/teams.js +++ /dev/null @@ -1,202 +0,0 @@ -const Service = require('../service.js'); - -class Teams extends Service { - - /** - * List Teams - * - * Get a list of all the current user teams. You can use the query params to - * filter your results. On admin mode, this endpoint will return a list of all - * of the project teams. [Learn more about different API modes](/docs/admin). - * - * @param string search - * @param number limit - * @param number offset - * @param string orderType - * @throws Exception - * @return {} - */ - async list(search = '', limit = 25, offset = 0, orderType = 'ASC') { - let path = '/teams'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - 'search': search, - 'limit': limit, - 'offset': offset, - 'orderType': orderType - }); - } - - /** - * Create Team - * - * Create a new team. The user who creates the team will automatically be - * assigned as the owner of the team. The team owner can invite new members, - * who will be able add new owners and update or delete the team from your - * project. - * - * @param string name - * @param string[] roles - * @throws Exception - * @return {} - */ - async create(name, roles = ["owner"]) { - let path = '/teams'; - - return await this.client.call('post', path, { - 'content-type': 'application/json', - }, - { - 'name': name, - 'roles': roles - }); - } - - /** - * Get Team - * - * Get team by its unique ID. All team members have read access for this - * resource. - * - * @param string teamId - * @throws Exception - * @return {} - */ - async get(teamId) { - let path = '/teams/{teamId}'.replace(new RegExp('{teamId}', 'g'), teamId); - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Update Team - * - * Update team by its unique ID. Only team owners have write access for this - * resource. - * - * @param string teamId - * @param string name - * @throws Exception - * @return {} - */ - async update(teamId, name) { - let path = '/teams/{teamId}'.replace(new RegExp('{teamId}', 'g'), teamId); - - return await this.client.call('put', path, { - 'content-type': 'application/json', - }, - { - 'name': name - }); - } - - /** - * Delete Team - * - * Delete team by its unique ID. Only team owners have write access for this - * resource. - * - * @param string teamId - * @throws Exception - * @return {} - */ - async delete(teamId) { - let path = '/teams/{teamId}'.replace(new RegExp('{teamId}', 'g'), teamId); - - return await this.client.call('delete', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Get Team Memberships - * - * Get team members by the team unique ID. All team members have read access - * for this list of resources. - * - * @param string teamId - * @throws Exception - * @return {} - */ - async getMemberships(teamId) { - let path = '/teams/{teamId}/memberships'.replace(new RegExp('{teamId}', 'g'), teamId); - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Create Team Membership - * - * Use this endpoint to invite a new member to join your team. An email with a - * link to join the team will be sent to the new member email address if the - * member doesn't exist in the project it will be created automatically. - * - * Use the 'URL' parameter to redirect the user from the invitation email back - * to your app. When the user is redirected, use the [Update Team Membership - * Status](/docs/teams#updateMembershipStatus) endpoint to allow the user to - * accept the invitation to the team. - * - * Please note that in order to avoid a [Redirect - * Attacks](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) - * the only valid redirect URL's are the once from domains you have set when - * added your platforms in the console interface. - * - * @param string teamId - * @param string email - * @param string[] roles - * @param string url - * @param string name - * @throws Exception - * @return {} - */ - async createMembership(teamId, email, roles, url, name = '') { - let path = '/teams/{teamId}/memberships'.replace(new RegExp('{teamId}', 'g'), teamId); - - return await this.client.call('post', path, { - 'content-type': 'application/json', - }, - { - 'email': email, - 'name': name, - 'roles': roles, - 'url': url - }); - } - - /** - * 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 he didn't accept it. - * - * @param string teamId - * @param string inviteId - * @throws Exception - * @return {} - */ - async deleteMembership(teamId, inviteId) { - let path = '/teams/{teamId}/memberships/{inviteId}'.replace(new RegExp('{teamId}', 'g'), teamId).replace(new RegExp('{inviteId}', 'g'), inviteId); - - return await this.client.call('delete', path, { - 'content-type': 'application/json', - }, - { - }); - } -} - -module.exports = Teams; \ No newline at end of file diff --git a/app/sdks/0.6.2/server-nodejs/lib/services/users.js b/app/sdks/0.6.2/server-nodejs/lib/services/users.js deleted file mode 100644 index 2292fb2664..0000000000 --- a/app/sdks/0.6.2/server-nodejs/lib/services/users.js +++ /dev/null @@ -1,215 +0,0 @@ -const Service = require('../service.js'); - -class Users extends Service { - - /** - * List Users - * - * Get a list of all the project users. You can use the query params to filter - * your results. - * - * @param string search - * @param number limit - * @param number offset - * @param string orderType - * @throws Exception - * @return {} - */ - async list(search = '', limit = 25, offset = 0, orderType = 'ASC') { - let path = '/users'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - 'search': search, - 'limit': limit, - 'offset': offset, - 'orderType': orderType - }); - } - - /** - * Create User - * - * Create a new user. - * - * @param string email - * @param string password - * @param string name - * @throws Exception - * @return {} - */ - async create(email, password, name = '') { - let path = '/users'; - - return await this.client.call('post', path, { - 'content-type': 'application/json', - }, - { - 'email': email, - 'password': password, - 'name': name - }); - } - - /** - * Get User - * - * Get user by its unique ID. - * - * @param string userId - * @throws Exception - * @return {} - */ - async get(userId) { - let path = '/users/{userId}'.replace(new RegExp('{userId}', 'g'), userId); - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Get User Logs - * - * Get user activity logs list by its unique ID. - * - * @param string userId - * @throws Exception - * @return {} - */ - async getLogs(userId) { - let path = '/users/{userId}/logs'.replace(new RegExp('{userId}', 'g'), userId); - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Get User Preferences - * - * Get user preferences by its unique ID. - * - * @param string userId - * @throws Exception - * @return {} - */ - async getPrefs(userId) { - let path = '/users/{userId}/prefs'.replace(new RegExp('{userId}', 'g'), userId); - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Update User Preferences - * - * Update user preferences by its unique ID. You can pass only the specific - * settings you wish to update. - * - * @param string userId - * @param object prefs - * @throws Exception - * @return {} - */ - async updatePrefs(userId, prefs) { - let path = '/users/{userId}/prefs'.replace(new RegExp('{userId}', 'g'), userId); - - return await this.client.call('patch', path, { - 'content-type': 'application/json', - }, - { - 'prefs': prefs - }); - } - - /** - * Get User Sessions - * - * Get user sessions list by its unique ID. - * - * @param string userId - * @throws Exception - * @return {} - */ - async getSessions(userId) { - let path = '/users/{userId}/sessions'.replace(new RegExp('{userId}', 'g'), userId); - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Delete User Sessions - * - * Delete all user sessions by its unique ID. - * - * @param string userId - * @throws Exception - * @return {} - */ - async deleteSessions(userId) { - let path = '/users/{userId}/sessions'.replace(new RegExp('{userId}', 'g'), userId); - - return await this.client.call('delete', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Delete User Session - * - * Delete user sessions by its unique ID. - * - * @param string userId - * @param string sessionId - * @throws Exception - * @return {} - */ - async deleteSession(userId, sessionId) { - let path = '/users/{userId}/sessions/{sessionId}'.replace(new RegExp('{userId}', 'g'), userId).replace(new RegExp('{sessionId}', 'g'), sessionId); - - return await this.client.call('delete', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Update User Status - * - * Update user status by its unique ID. - * - * @param string userId - * @param string status - * @throws Exception - * @return {} - */ - async updateStatus(userId, status) { - let path = '/users/{userId}/status'.replace(new RegExp('{userId}', 'g'), userId); - - return await this.client.call('patch', path, { - 'content-type': 'application/json', - }, - { - 'status': status - }); - } -} - -module.exports = Users; \ No newline at end of file diff --git a/app/sdks/0.6.2/server-nodejs/package.json b/app/sdks/0.6.2/server-nodejs/package.json deleted file mode 100644 index 377ea48db2..0000000000 --- a/app/sdks/0.6.2/server-nodejs/package.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "node-appwrite", - "homepage": "https://appwrite.io/support", - "description": "Appwrite is an open-source self-hosted backend server that abstract and simplify complex and repetitive development tasks behind a very simple REST API", - "version": "1.1.0", - "license": "BSD-3-Clause", - "main": "index.js", - "repository": { - "type": "git", - "url": "https://github.com/appwrite/sdk-for-node" - }, - "devDependencies": {}, - "dependencies": { - "request": "^2.88.0", - "request-promise-native": "^1.0.7" - } -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-php/CHANGELOG.md b/app/sdks/0.6.2/server-php/CHANGELOG.md deleted file mode 100644 index fa4d35e687..0000000000 --- a/app/sdks/0.6.2/server-php/CHANGELOG.md +++ /dev/null @@ -1 +0,0 @@ -# Change Log \ No newline at end of file diff --git a/app/sdks/0.6.2/server-php/LICENSE b/app/sdks/0.6.2/server-php/LICENSE deleted file mode 100644 index fc7c051a91..0000000000 --- a/app/sdks/0.6.2/server-php/LICENSE +++ /dev/null @@ -1,12 +0,0 @@ -Copyright (c) 2019 Appwrite (https://appwrite.io) and individual contributors. -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - - 3. Neither the name Appwrite nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/app/sdks/0.6.2/server-php/README.md b/app/sdks/0.6.2/server-php/README.md deleted file mode 100644 index 0d64f84fca..0000000000 --- a/app/sdks/0.6.2/server-php/README.md +++ /dev/null @@ -1,28 +0,0 @@ -# Appwrite PHP SDK - -![License](https://img.shields.io/github/license/appwrite/sdk-for-php.svg?v=1) -![Version](https://img.shields.io/badge/api%20version-0.6.1-blue.svg?v=1) - -Appwrite is an open-source backend as a service server that abstract and simplify complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way. - Use the PHP SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools. - For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs) - - - -![Appwrite](https://appwrite.io/images/github.png) - -## Installation - -To install via [Composer](http://getcomposer.org/): - -```bash -composer require appwrite/appwrite -``` - -## Contribution - -This library is auto-generated by Appwrite custom [SDK Generator](https://github.com/appwrite/sdk-generator). To learn more about how you can help us improve this SDK, please check the [contribution guide](https://github.com/appwrite/sdk-generator/blob/master/CONTRIBUTING.md) before sending a pull-request. - -## License - -Please see the [BSD-3-Clause license](https://raw.githubusercontent.com/appwrite/appwrite/master/LICENSE) file for more information. \ No newline at end of file diff --git a/app/sdks/0.6.2/server-php/composer.json b/app/sdks/0.6.2/server-php/composer.json deleted file mode 100644 index 64d2e1746f..0000000000 --- a/app/sdks/0.6.2/server-php/composer.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "name": "appwrite/appwrite", - "description": "Appwrite is an open-source backend as a service server that abstract and simplify complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way. - Use the PHP SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools. - For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs)", - "type": "library", - "license": "BSD-3-Clause", - "support": { - "url": "https://appwrite.io/support", - "email": "team@localhost.test" - }, - "autoload": { - "psr-4": { - "Appwrite\\": "src/Appwrite" - } - }, - "require": { - "php": ">=7.1.0", - "ext-curl": "*", - "ext-json": "*" - }, - "require-dev": { - "phpunit/phpunit": "3.7.35" - }, - "minimum-stability": "dev" -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-php/docs/avatars.md b/app/sdks/0.6.2/server-php/docs/avatars.md deleted file mode 100644 index 9fa1ee61f1..0000000000 --- a/app/sdks/0.6.2/server-php/docs/avatars.md +++ /dev/null @@ -1,100 +0,0 @@ -# Avatars Service - -## Get Browser Icon - -```http request -GET https://appwrite.io/v1/avatars/browsers/{code} -``` - -** You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user /account/sessions endpoint. Use width, height and quality arguments to change the output settings. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| code | string | **Required** Browser Code. | | -| width | integer | Image width. Pass an integer between 0 to 2000. Defaults to 100. | 100 | -| height | integer | Image height. Pass an integer between 0 to 2000. Defaults to 100. | 100 | -| quality | integer | Image quality. Pass an integer between 0 to 100. Defaults to 100. | 100 | - -## Get Credit Card Icon - -```http request -GET https://appwrite.io/v1/avatars/credit-cards/{code} -``` - -** Need to display your users with your billing method or their payment methods? The credit card endpoint will return you the icon of the credit card provider you need. Use width, height and quality arguments to change the output settings. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| code | string | **Required** Credit Card Code. Possible values: amex, argencard, cabal, censosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa. | | -| width | integer | Image width. Pass an integer between 0 to 2000. Defaults to 100. | 100 | -| height | integer | Image height. Pass an integer between 0 to 2000. Defaults to 100. | 100 | -| quality | integer | Image quality. Pass an integer between 0 to 100. Defaults to 100. | 100 | - -## Get Favicon - -```http request -GET https://appwrite.io/v1/avatars/favicon -``` - -** Use this endpoint to fetch the favorite icon (AKA favicon) of a any remote website URL. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| url | string | **Required** Website URL which you want to fetch the favicon from. | | - -## Get Country Flag - -```http request -GET https://appwrite.io/v1/avatars/flags/{code} -``` - -** You can use this endpoint to show different country flags icons to your users. The code argument receives the 2 letter country code. Use width, height and quality arguments to change the output settings. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| code | string | **Required** Country Code. ISO Alpha-2 country code format. | | -| width | integer | Image width. Pass an integer between 0 to 2000. Defaults to 100. | 100 | -| height | integer | Image height. Pass an integer between 0 to 2000. Defaults to 100. | 100 | -| quality | integer | Image quality. Pass an integer between 0 to 100. Defaults to 100. | 100 | - -## Get Image from URL - -```http request -GET https://appwrite.io/v1/avatars/image -``` - -** Use this endpoint to fetch a remote image URL and crop it to any image size you want. This endpoint is very useful if you need to crop and display remote images in your app or in case you want to make sure a 3rd party image is properly served using a TLS protocol. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| url | string | **Required** Image URL which you want to crop. | | -| width | integer | Resize preview image width, Pass an integer between 0 to 2000. | 400 | -| height | integer | Resize preview image height, Pass an integer between 0 to 2000. | 400 | - -## Get QR Code - -```http request -GET https://appwrite.io/v1/avatars/qr -``` - -** 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. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| text | string | **Required** Plain text to be converted to QR code image. | | -| size | integer | QR code size. Pass an integer between 0 to 1000. Defaults to 400. | 400 | -| margin | integer | Margin from edge. Pass an integer between 0 to 10. Defaults to 1. | 1 | -| download | integer | Return resulting image with 'Content-Disposition: attachment ' headers for the browser to start downloading it. Pass 0 for no header, or 1 for otherwise. Default value is set to 0. | 0 | - diff --git a/app/sdks/0.6.2/server-php/docs/database.md b/app/sdks/0.6.2/server-php/docs/database.md deleted file mode 100644 index f192a92fc8..0000000000 --- a/app/sdks/0.6.2/server-php/docs/database.md +++ /dev/null @@ -1,183 +0,0 @@ -# Database Service - -## List Collections - -```http request -GET https://appwrite.io/v1/database/collections -``` - -** Get a list of all the user collections. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project collections. [Learn more about different API modes](/docs/admin). ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| search | string | Search term to filter your list results. | | -| limit | integer | Results limit value. By default will return maximum 25 results. Maximum of 100 results allowed per request. | 25 | -| offset | integer | Results offset. The default value is 0. Use this param to manage pagination. | 0 | -| orderType | string | Order result by ASC or DESC order. | ASC | - -## Create Collection - -```http request -POST https://appwrite.io/v1/database/collections -``` - -** Create a new Collection. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| name | string | Collection name. | | -| read | array | An array of strings with read permissions. By default no user is granted with any read permissions. [learn more about permissions](/docs/permissions) and get a full list of available permissions. | | -| write | array | An array of strings with write permissions. By default no user is granted with any write permissions. [learn more about permissions](/docs/permissions) and get a full list of available permissions. | | -| rules | array | Array of [rule objects](/docs/rules). Each rule define a collection field name, data type and validation. | | - -## Get Collection - -```http request -GET https://appwrite.io/v1/database/collections/{collectionId} -``` - -** Get collection by its unique ID. This endpoint response returns a JSON object with the collection metadata. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| collectionId | string | **Required** Collection unique ID. | | - -## Update Collection - -```http request -PUT https://appwrite.io/v1/database/collections/{collectionId} -``` - -** Update collection by its unique ID. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| collectionId | string | **Required** Collection unique ID. | | -| name | string | Collection name. | | -| read | array | An array of strings with read permissions. By default no user is granted with any read permissions. [learn more about permissions(/docs/permissions) and get a full list of available permissions. | | -| write | array | An array of strings with write permissions. By default no user is granted with any write permissions. [learn more about permissions](/docs/permissions) and get a full list of available permissions. | | -| rules | array | Array of [rule objects](/docs/rules). Each rule define a collection field name, data type and validation. | [] | - -## Delete Collection - -```http request -DELETE https://appwrite.io/v1/database/collections/{collectionId} -``` - -** Delete a collection by its unique ID. Only users with write permissions have access to delete this resource. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| collectionId | string | **Required** Collection unique ID. | | - -## List Documents - -```http request -GET https://appwrite.io/v1/database/collections/{collectionId}/documents -``` - -** Get a list of all the user documents. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project documents. [Learn more about different API modes](/docs/admin). ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| collectionId | string | **Required** Collection unique ID. You can create a new collection with validation rules using the Database service [server integration](/docs/database?platform=server#createCollection). | | -| filters | array | Array of filter strings. Each filter is constructed from a key name, comparison operator (=, !=, >, <, <=, >=) and a value. You can also use a dot (.) separator in attribute names to filter by child document attributes. Examples: 'name=John Doe' or 'category.$id>=5bed2d152c362'. | [] | -| offset | integer | Offset value. Use this value to manage pagination. | 0 | -| limit | integer | Maximum number of documents to return in response. Use this value to manage pagination. | 50 | -| orderField | string | Document field that results will be sorted by. | $id | -| orderType | string | Order direction. Possible values are DESC for descending order, or ASC for ascending order. | ASC | -| orderCast | string | Order field type casting. Possible values are int, string, date, time or datetime. The database will attempt to cast the order field to the value you pass here. The default value is a string. | string | -| search | string | Search query. Enter any free text search. The database will try to find a match against all document attributes and children. | | -| first | integer | Return only the first document. Pass 1 for true or 0 for false. The default value is 0. | 0 | -| last | integer | Return only the last document. Pass 1 for true or 0 for false. The default value is 0. | 0 | - -## Create Document - -```http request -POST https://appwrite.io/v1/database/collections/{collectionId}/documents -``` - -** Create a new Document. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| collectionId | string | **Required** Collection unique ID. You can create a new collection with validation rules using the Database service [server integration](/docs/database?platform=server#createCollection). | | -| data | object | Document data as JSON object. | | -| read | array | An array of strings with read permissions. By default no user is granted with any read permissions. [learn more about permissions](/docs/permissions) and get a full list of available permissions. | | -| write | array | An array of strings with write permissions. By default no user is granted with any write permissions. [learn more about permissions](/docs/permissions) and get a full list of available permissions. | | -| parentDocument | string | Parent document unique ID. Use when you want your new document to be a child of a parent document. | | -| parentProperty | string | Parent document property name. Use when you want your new document to be a child of a parent document. | | -| parentPropertyType | string | Parent document property connection type. You can set this value to **assign**, **append** or **prepend**, default value is assign. Use when you want your new document to be a child of a parent document. | assign | - -## Get Document - -```http request -GET https://appwrite.io/v1/database/collections/{collectionId}/documents/{documentId} -``` - -** Get document by its unique ID. This endpoint response returns a JSON object with the document data. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| collectionId | string | **Required** Collection unique ID. You can create a new collection with validation rules using the Database service [server integration](/docs/database?platform=server#createCollection). | | -| documentId | string | **Required** Document unique ID. | | - -## Update Document - -```http request -PATCH https://appwrite.io/v1/database/collections/{collectionId}/documents/{documentId} -``` - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| collectionId | string | **Required** Collection unique ID. You can create a new collection with validation rules using the Database service [server integration](/docs/database?platform=server#createCollection). | | -| documentId | string | **Required** Document unique ID. | | -| data | object | Document data as JSON object. | | -| read | array | An array of strings with read permissions. By default no user is granted with any read permissions. [learn more about permissions](/docs/permissions) and get a full list of available permissions. | | -| write | array | An array of strings with write permissions. By default no user is granted with any write permissions. [learn more about permissions](/docs/permissions) and get a full list of available permissions. | | - -## Delete Document - -```http request -DELETE https://appwrite.io/v1/database/collections/{collectionId}/documents/{documentId} -``` - -** Delete document by its unique ID. This endpoint deletes only the parent documents, his attributes and relations to other documents. Child documents **will not** be deleted. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| collectionId | string | **Required** Collection unique ID. You can create a new collection with validation rules using the Database service [server integration](/docs/database?platform=server#createCollection). | | -| documentId | string | **Required** Document unique ID. | | - -## Get Collection Logs - -```http request -GET https://appwrite.io/v1/database/collections/{collectionId}/logs -``` - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| collectionId | string | **Required** Collection unique ID. | | - diff --git a/app/sdks/0.6.2/server-php/docs/examples/avatars/get-browser.md b/app/sdks/0.6.2/server-php/docs/examples/avatars/get-browser.md deleted file mode 100644 index 795d79157e..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/avatars/get-browser.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$avatars = new Avatars($client); - -$result = $avatars->getBrowser('aa'); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-php/docs/examples/avatars/get-credit-card.md b/app/sdks/0.6.2/server-php/docs/examples/avatars/get-credit-card.md deleted file mode 100644 index 33879d0179..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/avatars/get-credit-card.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$avatars = new Avatars($client); - -$result = $avatars->getCreditCard('amex'); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-php/docs/examples/avatars/get-favicon.md b/app/sdks/0.6.2/server-php/docs/examples/avatars/get-favicon.md deleted file mode 100644 index dee19dbf04..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/avatars/get-favicon.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$avatars = new Avatars($client); - -$result = $avatars->getFavicon('https://example.com'); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-php/docs/examples/avatars/get-flag.md b/app/sdks/0.6.2/server-php/docs/examples/avatars/get-flag.md deleted file mode 100644 index d70d7e43ec..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/avatars/get-flag.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$avatars = new Avatars($client); - -$result = $avatars->getFlag('af'); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-php/docs/examples/avatars/get-image.md b/app/sdks/0.6.2/server-php/docs/examples/avatars/get-image.md deleted file mode 100644 index a46b9fbe37..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/avatars/get-image.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$avatars = new Avatars($client); - -$result = $avatars->getImage('https://example.com'); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-php/docs/examples/avatars/get-q-r.md b/app/sdks/0.6.2/server-php/docs/examples/avatars/get-q-r.md deleted file mode 100644 index 95b5a6d7b3..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/avatars/get-q-r.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$avatars = new Avatars($client); - -$result = $avatars->getQR('[TEXT]'); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-php/docs/examples/database/create-collection.md b/app/sdks/0.6.2/server-php/docs/examples/database/create-collection.md deleted file mode 100644 index 276d5049fe..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/database/create-collection.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$database = new Database($client); - -$result = $database->createCollection('[NAME]', [], [], []); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-php/docs/examples/database/create-document.md b/app/sdks/0.6.2/server-php/docs/examples/database/create-document.md deleted file mode 100644 index 6c32cdf950..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/database/create-document.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$database = new Database($client); - -$result = $database->createDocument('[COLLECTION_ID]', [], [], []); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-php/docs/examples/database/delete-collection.md b/app/sdks/0.6.2/server-php/docs/examples/database/delete-collection.md deleted file mode 100644 index 4018420188..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/database/delete-collection.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$database = new Database($client); - -$result = $database->deleteCollection('[COLLECTION_ID]'); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-php/docs/examples/database/delete-document.md b/app/sdks/0.6.2/server-php/docs/examples/database/delete-document.md deleted file mode 100644 index 3ed45d6ee1..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/database/delete-document.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$database = new Database($client); - -$result = $database->deleteDocument('[COLLECTION_ID]', '[DOCUMENT_ID]'); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-php/docs/examples/database/get-collection-logs.md b/app/sdks/0.6.2/server-php/docs/examples/database/get-collection-logs.md deleted file mode 100644 index 22c547eb39..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/database/get-collection-logs.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$database = new Database($client); - -$result = $database->getCollectionLogs('[COLLECTION_ID]'); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-php/docs/examples/database/get-collection.md b/app/sdks/0.6.2/server-php/docs/examples/database/get-collection.md deleted file mode 100644 index a088b24bb6..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/database/get-collection.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$database = new Database($client); - -$result = $database->getCollection('[COLLECTION_ID]'); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-php/docs/examples/database/get-document.md b/app/sdks/0.6.2/server-php/docs/examples/database/get-document.md deleted file mode 100644 index d506bd8414..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/database/get-document.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$database = new Database($client); - -$result = $database->getDocument('[COLLECTION_ID]', '[DOCUMENT_ID]'); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-php/docs/examples/database/list-collections.md b/app/sdks/0.6.2/server-php/docs/examples/database/list-collections.md deleted file mode 100644 index 4f4aa1b775..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/database/list-collections.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$database = new Database($client); - -$result = $database->listCollections(); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-php/docs/examples/database/list-documents.md b/app/sdks/0.6.2/server-php/docs/examples/database/list-documents.md deleted file mode 100644 index 359da4ce33..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/database/list-documents.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$database = new Database($client); - -$result = $database->listDocuments('[COLLECTION_ID]'); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-php/docs/examples/database/update-collection.md b/app/sdks/0.6.2/server-php/docs/examples/database/update-collection.md deleted file mode 100644 index 70d596066a..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/database/update-collection.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$database = new Database($client); - -$result = $database->updateCollection('[COLLECTION_ID]', '[NAME]', [], []); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-php/docs/examples/database/update-document.md b/app/sdks/0.6.2/server-php/docs/examples/database/update-document.md deleted file mode 100644 index 4389034640..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/database/update-document.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$database = new Database($client); - -$result = $database->updateDocument('[COLLECTION_ID]', '[DOCUMENT_ID]', [], [], []); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-php/docs/examples/functions/create-execution.md b/app/sdks/0.6.2/server-php/docs/examples/functions/create-execution.md deleted file mode 100644 index ca232c8771..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/functions/create-execution.md +++ /dev/null @@ -1,15 +0,0 @@ -setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$functions = new Functions($client); - -$result = $functions->createExecution('[FUNCTION_ID]'); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-php/docs/examples/functions/create-tag.md b/app/sdks/0.6.2/server-php/docs/examples/functions/create-tag.md deleted file mode 100644 index cc4ff73e90..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/functions/create-tag.md +++ /dev/null @@ -1,15 +0,0 @@ -setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$functions = new Functions($client); - -$result = $functions->createTag('[FUNCTION_ID]', 'node-14', '[COMMAND]', '[CODE]'); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-php/docs/examples/functions/create.md b/app/sdks/0.6.2/server-php/docs/examples/functions/create.md deleted file mode 100644 index 7ec5dc2831..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/functions/create.md +++ /dev/null @@ -1,15 +0,0 @@ -setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$functions = new Functions($client); - -$result = $functions->create('[NAME]'); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-php/docs/examples/functions/delete-tag.md b/app/sdks/0.6.2/server-php/docs/examples/functions/delete-tag.md deleted file mode 100644 index 681c9c3aa7..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/functions/delete-tag.md +++ /dev/null @@ -1,15 +0,0 @@ -setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$functions = new Functions($client); - -$result = $functions->deleteTag('[FUNCTION_ID]', '[TAG_ID]'); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-php/docs/examples/functions/delete.md b/app/sdks/0.6.2/server-php/docs/examples/functions/delete.md deleted file mode 100644 index 12476f1d6a..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/functions/delete.md +++ /dev/null @@ -1,15 +0,0 @@ -setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$functions = new Functions($client); - -$result = $functions->delete('[FUNCTION_ID]'); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-php/docs/examples/functions/get-execution.md b/app/sdks/0.6.2/server-php/docs/examples/functions/get-execution.md deleted file mode 100644 index 774c7ecc3f..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/functions/get-execution.md +++ /dev/null @@ -1,15 +0,0 @@ -setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$functions = new Functions($client); - -$result = $functions->getExecution('[FUNCTION_ID]', '[EXECUTION_ID]'); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-php/docs/examples/functions/get-tag.md b/app/sdks/0.6.2/server-php/docs/examples/functions/get-tag.md deleted file mode 100644 index b1c2f23dcf..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/functions/get-tag.md +++ /dev/null @@ -1,15 +0,0 @@ -setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$functions = new Functions($client); - -$result = $functions->getTag('[FUNCTION_ID]', '[TAG_ID]'); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-php/docs/examples/functions/get.md b/app/sdks/0.6.2/server-php/docs/examples/functions/get.md deleted file mode 100644 index 0b6b438c65..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/functions/get.md +++ /dev/null @@ -1,15 +0,0 @@ -setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$functions = new Functions($client); - -$result = $functions->get('[FUNCTION_ID]'); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-php/docs/examples/functions/list-executions.md b/app/sdks/0.6.2/server-php/docs/examples/functions/list-executions.md deleted file mode 100644 index a0403c653d..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/functions/list-executions.md +++ /dev/null @@ -1,15 +0,0 @@ -setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$functions = new Functions($client); - -$result = $functions->listExecutions('[FUNCTION_ID]'); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-php/docs/examples/functions/list-tags.md b/app/sdks/0.6.2/server-php/docs/examples/functions/list-tags.md deleted file mode 100644 index 3c2e6b6e87..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/functions/list-tags.md +++ /dev/null @@ -1,15 +0,0 @@ -setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$functions = new Functions($client); - -$result = $functions->listTags('[FUNCTION_ID]'); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-php/docs/examples/functions/list.md b/app/sdks/0.6.2/server-php/docs/examples/functions/list.md deleted file mode 100644 index bfbfde406f..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/functions/list.md +++ /dev/null @@ -1,15 +0,0 @@ -setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$functions = new Functions($client); - -$result = $functions->list(); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-php/docs/examples/functions/update-active.md b/app/sdks/0.6.2/server-php/docs/examples/functions/update-active.md deleted file mode 100644 index 18b7316f3b..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/functions/update-active.md +++ /dev/null @@ -1,15 +0,0 @@ -setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$functions = new Functions($client); - -$result = $functions->updateActive('[FUNCTION_ID]', '[ACTIVE]'); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-php/docs/examples/functions/update-tag.md b/app/sdks/0.6.2/server-php/docs/examples/functions/update-tag.md deleted file mode 100644 index 68099d8fbb..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/functions/update-tag.md +++ /dev/null @@ -1,15 +0,0 @@ -setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$functions = new Functions($client); - -$result = $functions->updateTag('[FUNCTION_ID]', '[TAG]'); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-php/docs/examples/functions/update.md b/app/sdks/0.6.2/server-php/docs/examples/functions/update.md deleted file mode 100644 index 34315a129a..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/functions/update.md +++ /dev/null @@ -1,15 +0,0 @@ -setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$functions = new Functions($client); - -$result = $functions->update('[FUNCTION_ID]', '[NAME]'); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-php/docs/examples/health/get-anti-virus.md b/app/sdks/0.6.2/server-php/docs/examples/health/get-anti-virus.md deleted file mode 100644 index 89a5fb2a7a..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/health/get-anti-virus.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$health = new Health($client); - -$result = $health->getAntiVirus(); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-php/docs/examples/health/get-cache.md b/app/sdks/0.6.2/server-php/docs/examples/health/get-cache.md deleted file mode 100644 index e654c26f51..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/health/get-cache.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$health = new Health($client); - -$result = $health->getCache(); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-php/docs/examples/health/get-d-b.md b/app/sdks/0.6.2/server-php/docs/examples/health/get-d-b.md deleted file mode 100644 index 2d37991a3d..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/health/get-d-b.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$health = new Health($client); - -$result = $health->getDB(); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-php/docs/examples/health/get-queue-certificates.md b/app/sdks/0.6.2/server-php/docs/examples/health/get-queue-certificates.md deleted file mode 100644 index 57f2c5793e..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/health/get-queue-certificates.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$health = new Health($client); - -$result = $health->getQueueCertificates(); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-php/docs/examples/health/get-queue-functions.md b/app/sdks/0.6.2/server-php/docs/examples/health/get-queue-functions.md deleted file mode 100644 index 8ff6510e1c..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/health/get-queue-functions.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$health = new Health($client); - -$result = $health->getQueueFunctions(); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-php/docs/examples/health/get-queue-logs.md b/app/sdks/0.6.2/server-php/docs/examples/health/get-queue-logs.md deleted file mode 100644 index fa723d7391..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/health/get-queue-logs.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$health = new Health($client); - -$result = $health->getQueueLogs(); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-php/docs/examples/health/get-queue-tasks.md b/app/sdks/0.6.2/server-php/docs/examples/health/get-queue-tasks.md deleted file mode 100644 index b8f1794a1a..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/health/get-queue-tasks.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$health = new Health($client); - -$result = $health->getQueueTasks(); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-php/docs/examples/health/get-queue-usage.md b/app/sdks/0.6.2/server-php/docs/examples/health/get-queue-usage.md deleted file mode 100644 index 371d02f5b4..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/health/get-queue-usage.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$health = new Health($client); - -$result = $health->getQueueUsage(); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-php/docs/examples/health/get-queue-webhooks.md b/app/sdks/0.6.2/server-php/docs/examples/health/get-queue-webhooks.md deleted file mode 100644 index af48a72d06..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/health/get-queue-webhooks.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$health = new Health($client); - -$result = $health->getQueueWebhooks(); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-php/docs/examples/health/get-storage-anti-virus.md b/app/sdks/0.6.2/server-php/docs/examples/health/get-storage-anti-virus.md deleted file mode 100644 index 0d1958e4f2..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/health/get-storage-anti-virus.md +++ /dev/null @@ -1,15 +0,0 @@ -setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$health = new Health($client); - -$result = $health->getStorageAntiVirus(); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-php/docs/examples/health/get-storage-local.md b/app/sdks/0.6.2/server-php/docs/examples/health/get-storage-local.md deleted file mode 100644 index eba15a1652..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/health/get-storage-local.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$health = new Health($client); - -$result = $health->getStorageLocal(); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-php/docs/examples/health/get-time.md b/app/sdks/0.6.2/server-php/docs/examples/health/get-time.md deleted file mode 100644 index 849f499460..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/health/get-time.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$health = new Health($client); - -$result = $health->getTime(); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-php/docs/examples/health/get.md b/app/sdks/0.6.2/server-php/docs/examples/health/get.md deleted file mode 100644 index 9f1ec8970c..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/health/get.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$health = new Health($client); - -$result = $health->get(); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-php/docs/examples/locale/get-continents.md b/app/sdks/0.6.2/server-php/docs/examples/locale/get-continents.md deleted file mode 100644 index bb099d31f5..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/locale/get-continents.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$locale = new Locale($client); - -$result = $locale->getContinents(); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-php/docs/examples/locale/get-countries-e-u.md b/app/sdks/0.6.2/server-php/docs/examples/locale/get-countries-e-u.md deleted file mode 100644 index 87287a5cea..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/locale/get-countries-e-u.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$locale = new Locale($client); - -$result = $locale->getCountriesEU(); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-php/docs/examples/locale/get-countries-phones.md b/app/sdks/0.6.2/server-php/docs/examples/locale/get-countries-phones.md deleted file mode 100644 index 71a39303da..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/locale/get-countries-phones.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$locale = new Locale($client); - -$result = $locale->getCountriesPhones(); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-php/docs/examples/locale/get-countries.md b/app/sdks/0.6.2/server-php/docs/examples/locale/get-countries.md deleted file mode 100644 index 1c8f863a76..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/locale/get-countries.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$locale = new Locale($client); - -$result = $locale->getCountries(); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-php/docs/examples/locale/get-currencies.md b/app/sdks/0.6.2/server-php/docs/examples/locale/get-currencies.md deleted file mode 100644 index b799bf6b80..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/locale/get-currencies.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$locale = new Locale($client); - -$result = $locale->getCurrencies(); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-php/docs/examples/locale/get.md b/app/sdks/0.6.2/server-php/docs/examples/locale/get.md deleted file mode 100644 index 8e11f17689..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/locale/get.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$locale = new Locale($client); - -$result = $locale->get(); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-php/docs/examples/storage/create-file.md b/app/sdks/0.6.2/server-php/docs/examples/storage/create-file.md deleted file mode 100644 index ba533dd2e7..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/storage/create-file.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$storage = new Storage($client); - -$result = $storage->createFile(new \CURLFile('/path/to/file.png', 'image/png', 'file.png'), [], []); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-php/docs/examples/storage/delete-file.md b/app/sdks/0.6.2/server-php/docs/examples/storage/delete-file.md deleted file mode 100644 index 23d4013d22..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/storage/delete-file.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$storage = new Storage($client); - -$result = $storage->deleteFile('[FILE_ID]'); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-php/docs/examples/storage/get-file-download.md b/app/sdks/0.6.2/server-php/docs/examples/storage/get-file-download.md deleted file mode 100644 index 3064481141..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/storage/get-file-download.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$storage = new Storage($client); - -$result = $storage->getFileDownload('[FILE_ID]'); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-php/docs/examples/storage/get-file-preview.md b/app/sdks/0.6.2/server-php/docs/examples/storage/get-file-preview.md deleted file mode 100644 index 00cb63696b..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/storage/get-file-preview.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$storage = new Storage($client); - -$result = $storage->getFilePreview('[FILE_ID]'); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-php/docs/examples/storage/get-file-view.md b/app/sdks/0.6.2/server-php/docs/examples/storage/get-file-view.md deleted file mode 100644 index 07b7ab32ba..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/storage/get-file-view.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$storage = new Storage($client); - -$result = $storage->getFileView('[FILE_ID]'); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-php/docs/examples/storage/get-file.md b/app/sdks/0.6.2/server-php/docs/examples/storage/get-file.md deleted file mode 100644 index c8b6495f18..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/storage/get-file.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$storage = new Storage($client); - -$result = $storage->getFile('[FILE_ID]'); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-php/docs/examples/storage/list-files.md b/app/sdks/0.6.2/server-php/docs/examples/storage/list-files.md deleted file mode 100644 index 787c38e320..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/storage/list-files.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$storage = new Storage($client); - -$result = $storage->listFiles(); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-php/docs/examples/storage/update-file.md b/app/sdks/0.6.2/server-php/docs/examples/storage/update-file.md deleted file mode 100644 index 7515217b97..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/storage/update-file.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$storage = new Storage($client); - -$result = $storage->updateFile('[FILE_ID]', [], []); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-php/docs/examples/teams/create-membership.md b/app/sdks/0.6.2/server-php/docs/examples/teams/create-membership.md deleted file mode 100644 index 9c88b1bba5..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/teams/create-membership.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$teams = new Teams($client); - -$result = $teams->createMembership('[TEAM_ID]', 'email@example.com', [], 'https://example.com'); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-php/docs/examples/teams/create.md b/app/sdks/0.6.2/server-php/docs/examples/teams/create.md deleted file mode 100644 index 7b0946bc83..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/teams/create.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$teams = new Teams($client); - -$result = $teams->create('[NAME]'); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-php/docs/examples/teams/delete-membership.md b/app/sdks/0.6.2/server-php/docs/examples/teams/delete-membership.md deleted file mode 100644 index ca9d3d57c0..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/teams/delete-membership.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$teams = new Teams($client); - -$result = $teams->deleteMembership('[TEAM_ID]', '[INVITE_ID]'); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-php/docs/examples/teams/delete.md b/app/sdks/0.6.2/server-php/docs/examples/teams/delete.md deleted file mode 100644 index 394a1940fc..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/teams/delete.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$teams = new Teams($client); - -$result = $teams->delete('[TEAM_ID]'); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-php/docs/examples/teams/get-memberships.md b/app/sdks/0.6.2/server-php/docs/examples/teams/get-memberships.md deleted file mode 100644 index 56f6d59063..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/teams/get-memberships.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$teams = new Teams($client); - -$result = $teams->getMemberships('[TEAM_ID]'); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-php/docs/examples/teams/get.md b/app/sdks/0.6.2/server-php/docs/examples/teams/get.md deleted file mode 100644 index 6f0b705707..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/teams/get.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$teams = new Teams($client); - -$result = $teams->get('[TEAM_ID]'); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-php/docs/examples/teams/list.md b/app/sdks/0.6.2/server-php/docs/examples/teams/list.md deleted file mode 100644 index d17bb7689b..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/teams/list.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$teams = new Teams($client); - -$result = $teams->list(); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-php/docs/examples/teams/update.md b/app/sdks/0.6.2/server-php/docs/examples/teams/update.md deleted file mode 100644 index 945001dc36..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/teams/update.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$teams = new Teams($client); - -$result = $teams->update('[TEAM_ID]', '[NAME]'); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-php/docs/examples/users/create.md b/app/sdks/0.6.2/server-php/docs/examples/users/create.md deleted file mode 100644 index 53497b4277..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/users/create.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$users = new Users($client); - -$result = $users->create('email@example.com', 'password'); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-php/docs/examples/users/delete-session.md b/app/sdks/0.6.2/server-php/docs/examples/users/delete-session.md deleted file mode 100644 index ead6de7549..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/users/delete-session.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$users = new Users($client); - -$result = $users->deleteSession('[USER_ID]', '[SESSION_ID]'); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-php/docs/examples/users/delete-sessions.md b/app/sdks/0.6.2/server-php/docs/examples/users/delete-sessions.md deleted file mode 100644 index 968d788ea7..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/users/delete-sessions.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$users = new Users($client); - -$result = $users->deleteSessions('[USER_ID]'); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-php/docs/examples/users/get-logs.md b/app/sdks/0.6.2/server-php/docs/examples/users/get-logs.md deleted file mode 100644 index 5602536920..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/users/get-logs.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$users = new Users($client); - -$result = $users->getLogs('[USER_ID]'); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-php/docs/examples/users/get-prefs.md b/app/sdks/0.6.2/server-php/docs/examples/users/get-prefs.md deleted file mode 100644 index 1c9978a0fb..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/users/get-prefs.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$users = new Users($client); - -$result = $users->getPrefs('[USER_ID]'); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-php/docs/examples/users/get-sessions.md b/app/sdks/0.6.2/server-php/docs/examples/users/get-sessions.md deleted file mode 100644 index fef9f1db74..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/users/get-sessions.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$users = new Users($client); - -$result = $users->getSessions('[USER_ID]'); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-php/docs/examples/users/get.md b/app/sdks/0.6.2/server-php/docs/examples/users/get.md deleted file mode 100644 index 16c29f9a5a..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/users/get.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$users = new Users($client); - -$result = $users->get('[USER_ID]'); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-php/docs/examples/users/list.md b/app/sdks/0.6.2/server-php/docs/examples/users/list.md deleted file mode 100644 index efce771ea1..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/users/list.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$users = new Users($client); - -$result = $users->list(); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-php/docs/examples/users/update-prefs.md b/app/sdks/0.6.2/server-php/docs/examples/users/update-prefs.md deleted file mode 100644 index 9e9141f8a7..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/users/update-prefs.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$users = new Users($client); - -$result = $users->updatePrefs('[USER_ID]', []); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-php/docs/examples/users/update-status.md b/app/sdks/0.6.2/server-php/docs/examples/users/update-status.md deleted file mode 100644 index 87f9bceb46..0000000000 --- a/app/sdks/0.6.2/server-php/docs/examples/users/update-status.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$users = new Users($client); - -$result = $users->updateStatus('[USER_ID]', '1'); \ No newline at end of file diff --git a/app/sdks/0.6.2/server-php/docs/functions.md b/app/sdks/0.6.2/server-php/docs/functions.md deleted file mode 100644 index 39e28d55b8..0000000000 --- a/app/sdks/0.6.2/server-php/docs/functions.md +++ /dev/null @@ -1,186 +0,0 @@ -# Functions Service - -## List Functions - -```http request -GET https://appwrite.io/v1/functions -``` - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| search | string | Search term to filter your list results. | | -| limit | integer | Results limit value. By default will return maximum 25 results. Maximum of 100 results allowed per request. | 25 | -| offset | integer | Results offset. The default value is 0. Use this param to manage pagination. | 0 | -| orderType | string | Order result by ASC or DESC order. | ASC | - -## Create Function - -```http request -POST https://appwrite.io/v1/functions -``` - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| name | string | Function name. | | -| vars | object | Key-value JSON object. | [] | -| events | array | Events list. | [] | -| schedule | string | Schedule CRON syntax. | | -| timeout | integer | Function maximum execution time in seconds. | 15 | - -## Get Function - -```http request -GET https://appwrite.io/v1/functions/{functionId} -``` - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| functionId | string | **Required** Function unique ID. | | - -## Update Function - -```http request -PUT https://appwrite.io/v1/functions/{functionId} -``` - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| functionId | string | **Required** Function unique ID. | | -| name | string | Function name. | | -| vars | object | Key-value JSON object. | [] | -| events | array | Events list. | [] | -| schedule | string | Schedule CRON syntax. | | -| timeout | integer | Function maximum execution time in seconds. | 15 | - -## Delete Function - -```http request -DELETE https://appwrite.io/v1/functions/{functionId} -``` - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| functionId | string | **Required** Function unique ID. | | - -## List Executions - -```http request -GET https://appwrite.io/v1/functions/{functionId}/executions -``` - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| functionId | string | **Required** Function unique ID. | | -| search | string | Search term to filter your list results. | | -| limit | integer | Results limit value. By default will return maximum 25 results. Maximum of 100 results allowed per request. | 25 | -| offset | integer | Results offset. The default value is 0. Use this param to manage pagination. | 0 | -| orderType | string | Order result by ASC or DESC order. | ASC | - -## Create Execution - -```http request -POST https://appwrite.io/v1/functions/{functionId}/executions -``` - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| functionId | string | **Required** Function unique ID. | | -| async | integer | Execute code asynchronously. Pass 1 for true, 0 for false. Default value is 1. | 1 | - -## Get Execution - -```http request -GET https://appwrite.io/v1/functions/{functionId}/executions/{executionId} -``` - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| functionId | string | **Required** Function unique ID. | | -| executionId | string | **Required** Execution unique ID. | | - -## Update Function Tag - -```http request -PATCH https://appwrite.io/v1/functions/{functionId}/tag -``` - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| functionId | string | **Required** Function unique ID. | | -| tag | string | Tag unique ID. | | - -## List Tags - -```http request -GET https://appwrite.io/v1/functions/{functionId}/tags -``` - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| functionId | string | **Required** Function unique ID. | | -| search | string | Search term to filter your list results. | | -| limit | integer | Results limit value. By default will return maximum 25 results. Maximum of 100 results allowed per request. | 25 | -| offset | integer | Results offset. The default value is 0. Use this param to manage pagination. | 0 | -| orderType | string | Order result by ASC or DESC order. | ASC | - -## Create Tag - -```http request -POST https://appwrite.io/v1/functions/{functionId}/tags -``` - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| functionId | string | **Required** Function unique ID. | | -| env | string | Execution enviornment. | | -| command | string | Code execution command. | | -| code | string | Code package. Use the Appwrite code packager to create a deployable package file. | | - -## Get Tag - -```http request -GET https://appwrite.io/v1/functions/{functionId}/tags/{tagId} -``` - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| functionId | string | **Required** Function unique ID. | | -| tagId | string | **Required** Tag unique ID. | | - -## Delete Tag - -```http request -DELETE https://appwrite.io/v1/functions/{functionId}/tags/{tagId} -``` - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| functionId | string | **Required** Function unique ID. | | -| tagId | string | **Required** Tag unique ID. | | - diff --git a/app/sdks/0.6.2/server-php/docs/health.md b/app/sdks/0.6.2/server-php/docs/health.md deleted file mode 100644 index 38b814b633..0000000000 --- a/app/sdks/0.6.2/server-php/docs/health.md +++ /dev/null @@ -1,96 +0,0 @@ -# Health Service - -## Get HTTP - -```http request -GET https://appwrite.io/v1/health -``` - -** Check the Appwrite HTTP server is up and responsive. ** - -## Get Anti virus - -```http request -GET https://appwrite.io/v1/health/anti-virus -``` - -** Check the Appwrite Anti Virus server is up and connection is successful. ** - -## Get Cache - -```http request -GET https://appwrite.io/v1/health/cache -``` - -** Check the Appwrite in-memory cache server is up and connection is successful. ** - -## Get DB - -```http request -GET https://appwrite.io/v1/health/db -``` - -** Check the Appwrite database server is up and connection is successful. ** - -## Get Certificate Queue - -```http request -GET https://appwrite.io/v1/health/queue/certificates -``` - -** Get the number of certificates that are waiting to be issued against [Letsencrypt](https://letsencrypt.org/) in the Appwrite internal queue server. ** - -## Get Functions Queue - -```http request -GET https://appwrite.io/v1/health/queue/functions -``` - -## Get Logs Queue - -```http request -GET https://appwrite.io/v1/health/queue/logs -``` - -** Get the number of logs that are waiting to be processed in the Appwrite internal queue server. ** - -## Get Tasks Queue - -```http request -GET https://appwrite.io/v1/health/queue/tasks -``` - -** Get the number of tasks that are waiting to be processed in the Appwrite internal queue server. ** - -## Get Usage Queue - -```http request -GET https://appwrite.io/v1/health/queue/usage -``` - -** Get the number of usage stats that are waiting to be processed in the Appwrite internal queue server. ** - -## Get Webhooks Queue - -```http request -GET https://appwrite.io/v1/health/queue/webhooks -``` - -** Get the number of webhooks that are waiting to be processed in the Appwrite internal queue server. ** - -## Get Local Storage - -```http request -GET https://appwrite.io/v1/health/storage/local -``` - -** Check the Appwrite local storage device is up and connection is successful. ** - -## Get Time - -```http request -GET https://appwrite.io/v1/health/time -``` - -** Check the Appwrite server time is synced with Google remote NTP server. We use this technology to smoothly handle leap seconds with no disruptive events. The [Network Time Protocol](https://en.wikipedia.org/wiki/Network_Time_Protocol) (NTP) is 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. ** - diff --git a/app/sdks/0.6.2/server-php/docs/locale.md b/app/sdks/0.6.2/server-php/docs/locale.md deleted file mode 100644 index 7e99b08829..0000000000 --- a/app/sdks/0.6.2/server-php/docs/locale.md +++ /dev/null @@ -1,52 +0,0 @@ -# Locale Service - -## Get User Locale - -```http request -GET https://appwrite.io/v1/locale -``` - -** Get the current user location based on IP. Returns an object with user country code, country name, continent name, continent code, ip address and suggested currency. You can use the locale header to get the data in a supported language. - -([IP Geolocation by DB-IP](https://db-ip.com)) ** - -## List Continents - -```http request -GET https://appwrite.io/v1/locale/continents -``` - -** List of all continents. You can use the locale header to get the data in a supported language. ** - -## List Countries - -```http request -GET https://appwrite.io/v1/locale/countries -``` - -** List of all countries. You can use the locale header to get the data in a supported language. ** - -## List EU Countries - -```http request -GET https://appwrite.io/v1/locale/countries/eu -``` - -** 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. ** - -## List Countries Phone Codes - -```http request -GET https://appwrite.io/v1/locale/countries/phones -``` - -** List of all countries phone codes. You can use the locale header to get the data in a supported language. ** - -## List Currencies - -```http request -GET https://appwrite.io/v1/locale/currencies -``` - -** List of all currencies, including currency symol, 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. ** - diff --git a/app/sdks/0.6.2/server-php/docs/storage.md b/app/sdks/0.6.2/server-php/docs/storage.md deleted file mode 100644 index 2138f901a8..0000000000 --- a/app/sdks/0.6.2/server-php/docs/storage.md +++ /dev/null @@ -1,127 +0,0 @@ -# Storage Service - -## List Files - -```http request -GET https://appwrite.io/v1/storage/files -``` - -** Get a list of all the user files. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project files. [Learn more about different API modes](/docs/admin). ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| search | string | Search term to filter your list results. | | -| limit | integer | Results limit value. By default will return maximum 25 results. Maximum of 100 results allowed per request. | 25 | -| offset | integer | Results offset. The default value is 0. Use this param to manage pagination. | 0 | -| orderType | string | Order result by ASC or DESC order. | ASC | - -## Create File - -```http request -POST https://appwrite.io/v1/storage/files -``` - -** Create a new file. The user who creates the file will automatically be assigned to read and write access unless he has passed custom values for read and write arguments. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| file | file | Binary File. | | -| read | array | An array of strings with read permissions. By default no user is granted with any read permissions. [learn more about permissions](/docs/permissions) and get a full list of available permissions. | | -| write | array | An array of strings with write permissions. By default no user is granted with any write permissions. [learn more about permissions](/docs/permissions) and get a full list of available permissions. | | - -## Get File - -```http request -GET https://appwrite.io/v1/storage/files/{fileId} -``` - -** Get file by its unique ID. This endpoint response returns a JSON object with the file metadata. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| fileId | string | **Required** File unique ID. | | - -## Update File - -```http request -PUT https://appwrite.io/v1/storage/files/{fileId} -``` - -** Update file by its unique ID. Only users with write permissions have access to update this resource. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| fileId | string | **Required** File unique ID. | | -| read | array | An array of strings with read permissions. By default no user is granted with any read permissions. [learn more about permissions](/docs/permissions) and get a full list of available permissions. | | -| write | array | An array of strings with write permissions. By default no user is granted with any write permissions. [learn more about permissions](/docs/permissions) and get a full list of available permissions. | | - -## Delete File - -```http request -DELETE https://appwrite.io/v1/storage/files/{fileId} -``` - -** Delete a file by its unique ID. Only users with write permissions have access to delete this resource. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| fileId | string | **Required** File unique ID. | | - -## Get File for Download - -```http request -GET https://appwrite.io/v1/storage/files/{fileId}/download -``` - -** Get 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. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| fileId | string | **Required** File unique ID. | | - -## Get File Preview - -```http request -GET https://appwrite.io/v1/storage/files/{fileId}/preview -``` - -** Get a file preview image. Currently, this method supports preview for image files (jpg, png, and gif), other supported formats, like pdf, docs, slides, and spreadsheets, will return the file icon image. You can also pass query string arguments for cutting and resizing your preview image. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| fileId | string | **Required** File unique ID | | -| width | integer | Resize preview image width, Pass an integer between 0 to 4000. | 0 | -| height | integer | Resize preview image height, Pass an integer between 0 to 4000. | 0 | -| quality | integer | Preview image quality. Pass an integer between 0 to 100. Defaults to 100. | 100 | -| background | string | Preview image background color. Only works with transparent images (png). Use a valid HEX color, no # is needed for prefix. | | -| output | string | Output format type (jpeg, jpg, png, gif and webp). | | - -## Get File for View - -```http request -GET https://appwrite.io/v1/storage/files/{fileId}/view -``` - -** Get file content by its unique ID. This endpoint is similar to the download method but returns with no 'Content-Disposition: attachment' header. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| fileId | string | **Required** File unique ID. | | -| as | string | Choose a file format to convert your file to. Currently you can only convert word and pdf files to pdf or txt. This option is currently experimental only, use at your own risk. | | - diff --git a/app/sdks/0.6.2/server-php/docs/teams.md b/app/sdks/0.6.2/server-php/docs/teams.md deleted file mode 100644 index 7b2646c0ce..0000000000 --- a/app/sdks/0.6.2/server-php/docs/teams.md +++ /dev/null @@ -1,128 +0,0 @@ -# Teams Service - -## List Teams - -```http request -GET https://appwrite.io/v1/teams -``` - -** Get a list of all the current user teams. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project teams. [Learn more about different API modes](/docs/admin). ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| search | string | Search term to filter your list results. | | -| limit | integer | Results limit value. By default will return maximum 25 results. Maximum of 100 results allowed per request. | 25 | -| offset | integer | Results offset. The default value is 0. Use this param to manage pagination. | 0 | -| orderType | string | Order result by ASC or DESC order. | ASC | - -## Create Team - -```http request -POST https://appwrite.io/v1/teams -``` - -** Create a new team. The user who creates the team will automatically be assigned as the owner of the team. The team owner can invite new members, who will be able add new owners and update or delete the team from your project. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| name | string | Team name. | | -| roles | array | Array of strings. Use this param to set the roles in the team for the user who created it. The default role is **owner**. A role can be any string. Learn more about [roles and permissions](/docs/permissions). | ["owner"] | - -## Get Team - -```http request -GET https://appwrite.io/v1/teams/{teamId} -``` - -** Get team by its unique ID. All team members have read access for this resource. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| teamId | string | **Required** Team unique ID. | | - -## Update Team - -```http request -PUT https://appwrite.io/v1/teams/{teamId} -``` - -** Update team by its unique ID. Only team owners have write access for this resource. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| teamId | string | **Required** Team unique ID. | | -| name | string | Team name. | | - -## Delete Team - -```http request -DELETE https://appwrite.io/v1/teams/{teamId} -``` - -** Delete team by its unique ID. Only team owners have write access for this resource. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| teamId | string | **Required** Team unique ID. | | - -## Get Team Memberships - -```http request -GET https://appwrite.io/v1/teams/{teamId}/memberships -``` - -** Get team members by the team unique ID. All team members have read access for this list of resources. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| teamId | string | **Required** Team unique ID. | | - -## Create Team Membership - -```http request -POST https://appwrite.io/v1/teams/{teamId}/memberships -``` - -** Use this endpoint to invite a new member to join your team. An email with a link to join the team will be sent to the new member email address if the member doesn't exist in the project it will be created automatically. - -Use the 'URL' parameter to redirect the user from the invitation email back to your app. When the user is redirected, use the [Update Team Membership Status](/docs/teams#updateMembershipStatus) endpoint to allow the user to accept the invitation to the team. - -Please note that in order to avoid a [Redirect Attacks](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URL's are the once from domains you have set when added your platforms in the console interface. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| teamId | string | **Required** Team unique ID. | | -| email | string | New team member email. | | -| name | string | New team member name. | | -| roles | array | Array of strings. Use this param to set the user roles in the team. A role can be any string. Learn more about [roles and permissions](/docs/permissions). | | -| url | string | URL to redirect the user back to your app from the invitation email. | | - -## Delete Team Membership - -```http request -DELETE https://appwrite.io/v1/teams/{teamId}/memberships/{inviteId} -``` - -** 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 he didn't accept it. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| teamId | string | **Required** Team unique ID. | | -| inviteId | string | **Required** Invite unique ID. | | - diff --git a/app/sdks/0.6.2/server-php/docs/users.md b/app/sdks/0.6.2/server-php/docs/users.md deleted file mode 100644 index fd884b254f..0000000000 --- a/app/sdks/0.6.2/server-php/docs/users.md +++ /dev/null @@ -1,150 +0,0 @@ -# Users Service - -## List Users - -```http request -GET https://appwrite.io/v1/users -``` - -** Get a list of all the project users. You can use the query params to filter your results. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| search | string | Search term to filter your list results. | | -| limit | integer | Results limit value. By default will return maximum 25 results. Maximum of 100 results allowed per request. | 25 | -| offset | integer | Results offset. The default value is 0. Use this param to manage pagination. | 0 | -| orderType | string | Order result by ASC or DESC order. | ASC | - -## Create User - -```http request -POST https://appwrite.io/v1/users -``` - -** Create a new user. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| email | string | User email. | | -| password | string | User password. | | -| name | string | User name. | | - -## Get User - -```http request -GET https://appwrite.io/v1/users/{userId} -``` - -** Get user by its unique ID. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| userId | string | **Required** User unique ID. | | - -## Get User Logs - -```http request -GET https://appwrite.io/v1/users/{userId}/logs -``` - -** Get user activity logs list by its unique ID. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| userId | string | **Required** User unique ID. | | - -## Get User Preferences - -```http request -GET https://appwrite.io/v1/users/{userId}/prefs -``` - -** Get user preferences by its unique ID. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| userId | string | **Required** User unique ID. | | - -## Update User Preferences - -```http request -PATCH https://appwrite.io/v1/users/{userId}/prefs -``` - -** Update user preferences by its unique ID. You can pass only the specific settings you wish to update. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| userId | string | **Required** User unique ID. | | -| prefs | object | Prefs key-value JSON object. | | - -## Get User Sessions - -```http request -GET https://appwrite.io/v1/users/{userId}/sessions -``` - -** Get user sessions list by its unique ID. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| userId | string | **Required** User unique ID. | | - -## Delete User Sessions - -```http request -DELETE https://appwrite.io/v1/users/{userId}/sessions -``` - -** Delete all user sessions by its unique ID. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| userId | string | **Required** User unique ID. | | - -## Delete User Session - -```http request -DELETE https://appwrite.io/v1/users/{userId}/sessions/{sessionId} -``` - -** Delete user sessions by its unique ID. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| userId | string | **Required** User unique ID. | | -| sessionId | string | **Required** User unique session ID. | | - -## Update User Status - -```http request -PATCH https://appwrite.io/v1/users/{userId}/status -``` - -** Update user status by its unique ID. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| userId | string | **Required** User unique ID. | | -| status | string | User Status code. To activate the user pass 1, to block the user pass 2 and for disabling the user pass 0 | | - diff --git a/app/sdks/0.6.2/server-php/src/Appwrite/Client.php b/app/sdks/0.6.2/server-php/src/Appwrite/Client.php deleted file mode 100644 index f44d0c9233..0000000000 --- a/app/sdks/0.6.2/server-php/src/Appwrite/Client.php +++ /dev/null @@ -1,240 +0,0 @@ - '', - 'x-sdk-version' => 'appwrite:php:1.1.0', - ]; - - /** - * SDK constructor. - */ - public function __construct() - { - } - - /** - * Set Project - * - * Your project ID - * - * @param string $value - * - * @return Client - */ - public function setProject($value) - { - $this->addHeader('X-Appwrite-Project', $value); - - return $this; - } - - /** - * Set Key - * - * Your secret API key - * - * @param string $value - * - * @return Client - */ - public function setKey($value) - { - $this->addHeader('X-Appwrite-Key', $value); - - return $this; - } - - /** - * Set Locale - * - * @param string $value - * - * @return Client - */ - public function setLocale($value) - { - $this->addHeader('X-Appwrite-Locale', $value); - - return $this; - } - - - /*** - * @param bool $status - * @return $this - */ - public function setSelfSigned($status = true) - { - $this->selfSigned = $status; - - return $this; - } - - /*** - * @param $endpoint - * @return $this - */ - public function setEndpoint($endpoint) - { - $this->endpoint = $endpoint; - - return $this; - } - - /** - * @param $key - * @param $value - */ - public function addHeader($key, $value) - { - $this->headers[strtolower($key)] = strtolower($value); - - return $this; - } - - /** - * Call - * - * Make an API call - * - * @param string $method - * @param string $path - * @param array $params - * @param array $headers - * @return array|string - * @throws Exception - */ - public function call($method, $path = '', $headers = array(), array $params = array()) - { - $headers = array_merge($this->headers, $headers); - $ch = curl_init($this->endpoint . $path . (($method == self::METHOD_GET && !empty($params)) ? '?' . http_build_query($params) : '')); - $responseHeaders = []; - $responseStatus = -1; - $responseType = ''; - $responseBody = ''; - - switch ($headers['content-type']) { - case 'application/json': - $query = json_encode($params); - break; - - case 'multipart/form-data': - $query = $this->flatten($params); - break; - - default: - $query = http_build_query($params); - break; - } - - foreach ($headers as $i => $header) { - $headers[] = $i . ':' . $header; - unset($headers[$i]); - } - - curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $method); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); - curl_setopt($ch, CURLOPT_USERAGENT, php_uname('s') . '-' . php_uname('r') . ':php-' . phpversion()); - curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); - curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); - curl_setopt($ch, CURLOPT_HEADERFUNCTION, function($curl, $header) use (&$responseHeaders) { - $len = strlen($header); - $header = explode(':', strtolower($header), 2); - - if (count($header) < 2) { // ignore invalid headers - return $len; - } - - $responseHeaders[strtolower(trim($header[0]))] = trim($header[1]); - - return $len; - }); - - if($method != self::METHOD_GET) { - curl_setopt($ch, CURLOPT_POSTFIELDS, $query); - } - - // Allow self signed certificates - if($this->selfSigned) { - curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); - curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); - } - - $responseBody = curl_exec($ch); - $responseType = (isset($responseHeaders['content-type'])) ? $responseHeaders['content-type'] : ''; - $responseStatus = curl_getinfo($ch, CURLINFO_HTTP_CODE); - - switch(substr($responseType, 0, strpos($responseType, ';'))) { - case 'application/json': - $responseBody = json_decode($responseBody, true); - break; - } - - if ((curl_errno($ch)/* || 200 != $responseStatus*/)) { - throw new Exception(curl_error($ch) . ' with status code ' . $responseStatus, $responseStatus); - } - - curl_close($ch); - - return $responseBody; - } - - /** - * Flatten params array to PHP multiple format - * - * @param array $data - * @param string $prefix - * @return array - */ - protected function flatten(array $data, $prefix = '') { - $output = []; - - foreach($data as $key => $value) { - $finalKey = $prefix ? "{$prefix}[{$key}]" : $key; - - if (is_array($value)) { - $output += $this->flatten($value, $finalKey); // @todo: handle name collision here if needed - } - else { - $output[$finalKey] = $value; - } - } - - return $output; - } -} diff --git a/app/sdks/0.6.2/server-php/src/Appwrite/Service.php b/app/sdks/0.6.2/server-php/src/Appwrite/Service.php deleted file mode 100644 index ea3ad92e2d..0000000000 --- a/app/sdks/0.6.2/server-php/src/Appwrite/Service.php +++ /dev/null @@ -1,19 +0,0 @@ -client = $client; - } -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-php/src/Appwrite/Services/Avatars.php b/app/sdks/0.6.2/server-php/src/Appwrite/Services/Avatars.php deleted file mode 100644 index 90f39f8535..0000000000 --- a/app/sdks/0.6.2/server-php/src/Appwrite/Services/Avatars.php +++ /dev/null @@ -1,175 +0,0 @@ -client->call(Client::METHOD_GET, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Get Credit Card Icon - * - * Need to display your users with your billing method or their payment - * methods? The credit card endpoint will return you the icon of the credit - * card provider you need. Use width, height and quality arguments to change - * the output settings. - * - * @param string $code - * @param int $width - * @param int $height - * @param int $quality - * @throws Exception - * @return array - */ - public function getCreditCard(string $code, int $width = 100, int $height = 100, int $quality = 100):array - { - $path = str_replace(['{code}'], [$code], '/avatars/credit-cards/{code}'); - $params = []; - - $params['width'] = $width; - $params['height'] = $height; - $params['quality'] = $quality; - - return $this->client->call(Client::METHOD_GET, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Get Favicon - * - * Use this endpoint to fetch the favorite icon (AKA favicon) of a any remote - * website URL. - * - * @param string $url - * @throws Exception - * @return array - */ - public function getFavicon(string $url):array - { - $path = str_replace([], [], '/avatars/favicon'); - $params = []; - - $params['url'] = $url; - - return $this->client->call(Client::METHOD_GET, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Get Country Flag - * - * You can use this endpoint to show different country flags icons to your - * users. The code argument receives the 2 letter country code. Use width, - * height and quality arguments to change the output settings. - * - * @param string $code - * @param int $width - * @param int $height - * @param int $quality - * @throws Exception - * @return array - */ - public function getFlag(string $code, int $width = 100, int $height = 100, int $quality = 100):array - { - $path = str_replace(['{code}'], [$code], '/avatars/flags/{code}'); - $params = []; - - $params['width'] = $width; - $params['height'] = $height; - $params['quality'] = $quality; - - return $this->client->call(Client::METHOD_GET, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Get Image from URL - * - * Use this endpoint to fetch a remote image URL and crop it to any image size - * you want. This endpoint is very useful if you need to crop and display - * remote images in your app or in case you want to make sure a 3rd party - * image is properly served using a TLS protocol. - * - * @param string $url - * @param int $width - * @param int $height - * @throws Exception - * @return array - */ - public function getImage(string $url, int $width = 400, int $height = 400):array - { - $path = str_replace([], [], '/avatars/image'); - $params = []; - - $params['url'] = $url; - $params['width'] = $width; - $params['height'] = $height; - - return $this->client->call(Client::METHOD_GET, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * 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. - * - * @param string $text - * @param int $size - * @param int $margin - * @param int $download - * @throws Exception - * @return array - */ - public function getQR(string $text, int $size = 400, int $margin = 1, int $download = 0):array - { - $path = str_replace([], [], '/avatars/qr'); - $params = []; - - $params['text'] = $text; - $params['size'] = $size; - $params['margin'] = $margin; - $params['download'] = $download; - - return $this->client->call(Client::METHOD_GET, $path, [ - 'content-type' => 'application/json', - ], $params); - } - -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-php/src/Appwrite/Services/Database.php b/app/sdks/0.6.2/server-php/src/Appwrite/Services/Database.php deleted file mode 100644 index 7ce8ac359f..0000000000 --- a/app/sdks/0.6.2/server-php/src/Appwrite/Services/Database.php +++ /dev/null @@ -1,299 +0,0 @@ -client->call(Client::METHOD_GET, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Create Collection - * - * Create a new Collection. - * - * @param string $name - * @param array $read - * @param array $write - * @param array $rules - * @throws Exception - * @return array - */ - public function createCollection(string $name, array $read, array $write, array $rules):array - { - $path = str_replace([], [], '/database/collections'); - $params = []; - - $params['name'] = $name; - $params['read'] = $read; - $params['write'] = $write; - $params['rules'] = $rules; - - return $this->client->call(Client::METHOD_POST, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Get Collection - * - * Get collection by its unique ID. This endpoint response returns a JSON - * object with the collection metadata. - * - * @param string $collectionId - * @throws Exception - * @return array - */ - public function getCollection(string $collectionId):array - { - $path = str_replace(['{collectionId}'], [$collectionId], '/database/collections/{collectionId}'); - $params = []; - - - return $this->client->call(Client::METHOD_GET, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Update Collection - * - * Update collection by its unique ID. - * - * @param string $collectionId - * @param string $name - * @param array $read - * @param array $write - * @param array $rules - * @throws Exception - * @return array - */ - public function updateCollection(string $collectionId, string $name, array $read, array $write, array $rules = []):array - { - $path = str_replace(['{collectionId}'], [$collectionId], '/database/collections/{collectionId}'); - $params = []; - - $params['name'] = $name; - $params['read'] = $read; - $params['write'] = $write; - $params['rules'] = $rules; - - return $this->client->call(Client::METHOD_PUT, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Delete Collection - * - * Delete a collection by its unique ID. Only users with write permissions - * have access to delete this resource. - * - * @param string $collectionId - * @throws Exception - * @return array - */ - public function deleteCollection(string $collectionId):array - { - $path = str_replace(['{collectionId}'], [$collectionId], '/database/collections/{collectionId}'); - $params = []; - - - return $this->client->call(Client::METHOD_DELETE, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * List Documents - * - * Get a list of all the user documents. You can use the query params to - * filter your results. On admin mode, this endpoint will return a list of all - * of the project documents. [Learn more about different API - * modes](/docs/admin). - * - * @param string $collectionId - * @param array $filters - * @param int $offset - * @param int $limit - * @param string $orderField - * @param string $orderType - * @param string $orderCast - * @param string $search - * @param int $first - * @param int $last - * @throws Exception - * @return array - */ - public function listDocuments(string $collectionId, array $filters = [], int $offset = 0, int $limit = 50, string $orderField = '$id', string $orderType = 'ASC', string $orderCast = 'string', string $search = '', int $first = 0, int $last = 0):array - { - $path = str_replace(['{collectionId}'], [$collectionId], '/database/collections/{collectionId}/documents'); - $params = []; - - $params['filters'] = $filters; - $params['offset'] = $offset; - $params['limit'] = $limit; - $params['orderField'] = $orderField; - $params['orderType'] = $orderType; - $params['orderCast'] = $orderCast; - $params['search'] = $search; - $params['first'] = $first; - $params['last'] = $last; - - return $this->client->call(Client::METHOD_GET, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Create Document - * - * Create a new Document. - * - * @param string $collectionId - * @param array $data - * @param array $read - * @param array $write - * @param string $parentDocument - * @param string $parentProperty - * @param string $parentPropertyType - * @throws Exception - * @return array - */ - public function createDocument(string $collectionId, array $data, array $read, array $write, string $parentDocument = '', string $parentProperty = '', string $parentPropertyType = 'assign'):array - { - $path = str_replace(['{collectionId}'], [$collectionId], '/database/collections/{collectionId}/documents'); - $params = []; - - $params['data'] = $data; - $params['read'] = $read; - $params['write'] = $write; - $params['parentDocument'] = $parentDocument; - $params['parentProperty'] = $parentProperty; - $params['parentPropertyType'] = $parentPropertyType; - - return $this->client->call(Client::METHOD_POST, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Get Document - * - * Get document by its unique ID. This endpoint response returns a JSON object - * with the document data. - * - * @param string $collectionId - * @param string $documentId - * @throws Exception - * @return array - */ - public function getDocument(string $collectionId, string $documentId):array - { - $path = str_replace(['{collectionId}', '{documentId}'], [$collectionId, $documentId], '/database/collections/{collectionId}/documents/{documentId}'); - $params = []; - - - return $this->client->call(Client::METHOD_GET, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Update Document - * - * @param string $collectionId - * @param string $documentId - * @param array $data - * @param array $read - * @param array $write - * @throws Exception - * @return array - */ - public function updateDocument(string $collectionId, string $documentId, array $data, array $read, array $write):array - { - $path = str_replace(['{collectionId}', '{documentId}'], [$collectionId, $documentId], '/database/collections/{collectionId}/documents/{documentId}'); - $params = []; - - $params['data'] = $data; - $params['read'] = $read; - $params['write'] = $write; - - return $this->client->call(Client::METHOD_PATCH, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Delete Document - * - * Delete document by its unique ID. This endpoint deletes only the parent - * documents, his attributes and relations to other documents. Child documents - * **will not** be deleted. - * - * @param string $collectionId - * @param string $documentId - * @throws Exception - * @return array - */ - public function deleteDocument(string $collectionId, string $documentId):array - { - $path = str_replace(['{collectionId}', '{documentId}'], [$collectionId, $documentId], '/database/collections/{collectionId}/documents/{documentId}'); - $params = []; - - - return $this->client->call(Client::METHOD_DELETE, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Get Collection Logs - * - * @param string $collectionId - * @throws Exception - * @return array - */ - public function getCollectionLogs(string $collectionId):array - { - $path = str_replace(['{collectionId}'], [$collectionId], '/database/collections/{collectionId}/logs'); - $params = []; - - - return $this->client->call(Client::METHOD_GET, $path, [ - 'content-type' => 'application/json', - ], $params); - } - -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-php/src/Appwrite/Services/Functions.php b/app/sdks/0.6.2/server-php/src/Appwrite/Services/Functions.php deleted file mode 100644 index 1771652072..0000000000 --- a/app/sdks/0.6.2/server-php/src/Appwrite/Services/Functions.php +++ /dev/null @@ -1,300 +0,0 @@ -client->call(Client::METHOD_GET, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Create Function - * - * @param string $name - * @param array $vars - * @param array $events - * @param string $schedule - * @param int $timeout - * @throws Exception - * @return array - */ - public function create(string $name, array $vars = , array $events = [], string $schedule = '', int $timeout = 15):array - { - $path = str_replace([], [], '/functions'); - $params = []; - - $params['name'] = $name; - $params['vars'] = $vars; - $params['events'] = $events; - $params['schedule'] = $schedule; - $params['timeout'] = $timeout; - - return $this->client->call(Client::METHOD_POST, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Get Function - * - * @param string $functionId - * @throws Exception - * @return array - */ - public function get(string $functionId):array - { - $path = str_replace(['{functionId}'], [$functionId], '/functions/{functionId}'); - $params = []; - - - return $this->client->call(Client::METHOD_GET, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Update Function - * - * @param string $functionId - * @param string $name - * @param array $vars - * @param array $events - * @param string $schedule - * @param int $timeout - * @throws Exception - * @return array - */ - public function update(string $functionId, string $name, array $vars = , array $events = [], string $schedule = '', int $timeout = 15):array - { - $path = str_replace(['{functionId}'], [$functionId], '/functions/{functionId}'); - $params = []; - - $params['name'] = $name; - $params['vars'] = $vars; - $params['events'] = $events; - $params['schedule'] = $schedule; - $params['timeout'] = $timeout; - - return $this->client->call(Client::METHOD_PUT, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Delete Function - * - * @param string $functionId - * @throws Exception - * @return array - */ - public function delete(string $functionId):array - { - $path = str_replace(['{functionId}'], [$functionId], '/functions/{functionId}'); - $params = []; - - - return $this->client->call(Client::METHOD_DELETE, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * List Executions - * - * @param string $functionId - * @param string $search - * @param int $limit - * @param int $offset - * @param string $orderType - * @throws Exception - * @return array - */ - public function listExecutions(string $functionId, string $search = '', int $limit = 25, int $offset = 0, string $orderType = 'ASC'):array - { - $path = str_replace(['{functionId}'], [$functionId], '/functions/{functionId}/executions'); - $params = []; - - $params['search'] = $search; - $params['limit'] = $limit; - $params['offset'] = $offset; - $params['orderType'] = $orderType; - - return $this->client->call(Client::METHOD_GET, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Create Execution - * - * @param string $functionId - * @param int $async - * @throws Exception - * @return array - */ - public function createExecution(string $functionId, int $async = 1):array - { - $path = str_replace(['{functionId}'], [$functionId], '/functions/{functionId}/executions'); - $params = []; - - $params['async'] = $async; - - return $this->client->call(Client::METHOD_POST, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Get Execution - * - * @param string $functionId - * @param string $executionId - * @throws Exception - * @return array - */ - public function getExecution(string $functionId, string $executionId):array - { - $path = str_replace(['{functionId}', '{executionId}'], [$functionId, $executionId], '/functions/{functionId}/executions/{executionId}'); - $params = []; - - - return $this->client->call(Client::METHOD_GET, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Update Function Tag - * - * @param string $functionId - * @param string $tag - * @throws Exception - * @return array - */ - public function updateTag(string $functionId, string $tag):array - { - $path = str_replace(['{functionId}'], [$functionId], '/functions/{functionId}/tag'); - $params = []; - - $params['tag'] = $tag; - - return $this->client->call(Client::METHOD_PATCH, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * List Tags - * - * @param string $functionId - * @param string $search - * @param int $limit - * @param int $offset - * @param string $orderType - * @throws Exception - * @return array - */ - public function listTags(string $functionId, string $search = '', int $limit = 25, int $offset = 0, string $orderType = 'ASC'):array - { - $path = str_replace(['{functionId}'], [$functionId], '/functions/{functionId}/tags'); - $params = []; - - $params['search'] = $search; - $params['limit'] = $limit; - $params['offset'] = $offset; - $params['orderType'] = $orderType; - - return $this->client->call(Client::METHOD_GET, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Create Tag - * - * @param string $functionId - * @param string $env - * @param string $command - * @param string $code - * @throws Exception - * @return array - */ - public function createTag(string $functionId, string $env, string $command, string $code):array - { - $path = str_replace(['{functionId}'], [$functionId], '/functions/{functionId}/tags'); - $params = []; - - $params['env'] = $env; - $params['command'] = $command; - $params['code'] = $code; - - return $this->client->call(Client::METHOD_POST, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Get Tag - * - * @param string $functionId - * @param string $tagId - * @throws Exception - * @return array - */ - public function getTag(string $functionId, string $tagId):array - { - $path = str_replace(['{functionId}', '{tagId}'], [$functionId, $tagId], '/functions/{functionId}/tags/{tagId}'); - $params = []; - - - return $this->client->call(Client::METHOD_GET, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Delete Tag - * - * @param string $functionId - * @param string $tagId - * @throws Exception - * @return array - */ - public function deleteTag(string $functionId, string $tagId):array - { - $path = str_replace(['{functionId}', '{tagId}'], [$functionId, $tagId], '/functions/{functionId}/tags/{tagId}'); - $params = []; - - - return $this->client->call(Client::METHOD_DELETE, $path, [ - 'content-type' => 'application/json', - ], $params); - } - -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-php/src/Appwrite/Services/Health.php b/app/sdks/0.6.2/server-php/src/Appwrite/Services/Health.php deleted file mode 100644 index d39f1f406d..0000000000 --- a/app/sdks/0.6.2/server-php/src/Appwrite/Services/Health.php +++ /dev/null @@ -1,250 +0,0 @@ -client->call(Client::METHOD_GET, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Get Anti virus - * - * Check the Appwrite Anti Virus server is up and connection is successful. - * - * @throws Exception - * @return array - */ - public function getAntiVirus():array - { - $path = str_replace([], [], '/health/anti-virus'); - $params = []; - - - return $this->client->call(Client::METHOD_GET, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Get Cache - * - * Check the Appwrite in-memory cache server is up and connection is - * successful. - * - * @throws Exception - * @return array - */ - public function getCache():array - { - $path = str_replace([], [], '/health/cache'); - $params = []; - - - return $this->client->call(Client::METHOD_GET, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Get DB - * - * Check the Appwrite database server is up and connection is successful. - * - * @throws Exception - * @return array - */ - public function getDB():array - { - $path = str_replace([], [], '/health/db'); - $params = []; - - - return $this->client->call(Client::METHOD_GET, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Get Certificate Queue - * - * Get the number of certificates that are waiting to be issued against - * [Letsencrypt](https://letsencrypt.org/) in the Appwrite internal queue - * server. - * - * @throws Exception - * @return array - */ - public function getQueueCertificates():array - { - $path = str_replace([], [], '/health/queue/certificates'); - $params = []; - - - return $this->client->call(Client::METHOD_GET, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Get Functions Queue - * - * @throws Exception - * @return array - */ - public function getQueueFunctions():array - { - $path = str_replace([], [], '/health/queue/functions'); - $params = []; - - - return $this->client->call(Client::METHOD_GET, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Get Logs Queue - * - * Get the number of logs that are waiting to be processed in the Appwrite - * internal queue server. - * - * @throws Exception - * @return array - */ - public function getQueueLogs():array - { - $path = str_replace([], [], '/health/queue/logs'); - $params = []; - - - return $this->client->call(Client::METHOD_GET, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Get Tasks Queue - * - * Get the number of tasks that are waiting to be processed in the Appwrite - * internal queue server. - * - * @throws Exception - * @return array - */ - public function getQueueTasks():array - { - $path = str_replace([], [], '/health/queue/tasks'); - $params = []; - - - return $this->client->call(Client::METHOD_GET, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Get Usage Queue - * - * Get the number of usage stats that are waiting to be processed in the - * Appwrite internal queue server. - * - * @throws Exception - * @return array - */ - public function getQueueUsage():array - { - $path = str_replace([], [], '/health/queue/usage'); - $params = []; - - - return $this->client->call(Client::METHOD_GET, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Get Webhooks Queue - * - * Get the number of webhooks that are waiting to be processed in the Appwrite - * internal queue server. - * - * @throws Exception - * @return array - */ - public function getQueueWebhooks():array - { - $path = str_replace([], [], '/health/queue/webhooks'); - $params = []; - - - return $this->client->call(Client::METHOD_GET, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Get Local Storage - * - * Check the Appwrite local storage device is up and connection is successful. - * - * @throws Exception - * @return array - */ - public function getStorageLocal():array - { - $path = str_replace([], [], '/health/storage/local'); - $params = []; - - - return $this->client->call(Client::METHOD_GET, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Get Time - * - * Check the Appwrite server time is synced with Google remote NTP server. We - * use this technology to smoothly handle leap seconds with no disruptive - * events. The [Network Time - * Protocol](https://en.wikipedia.org/wiki/Network_Time_Protocol) (NTP) is - * 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. - * - * @throws Exception - * @return array - */ - public function getTime():array - { - $path = str_replace([], [], '/health/time'); - $params = []; - - - return $this->client->call(Client::METHOD_GET, $path, [ - 'content-type' => 'application/json', - ], $params); - } - -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-php/src/Appwrite/Services/Locale.php b/app/sdks/0.6.2/server-php/src/Appwrite/Services/Locale.php deleted file mode 100644 index 25255c81a0..0000000000 --- a/app/sdks/0.6.2/server-php/src/Appwrite/Services/Locale.php +++ /dev/null @@ -1,136 +0,0 @@ -client->call(Client::METHOD_GET, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * List Continents - * - * List of all continents. You can use the locale header to get the data in a - * supported language. - * - * @throws Exception - * @return array - */ - public function getContinents():array - { - $path = str_replace([], [], '/locale/continents'); - $params = []; - - - return $this->client->call(Client::METHOD_GET, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * List Countries - * - * List of all countries. You can use the locale header to get the data in a - * supported language. - * - * @throws Exception - * @return array - */ - public function getCountries():array - { - $path = str_replace([], [], '/locale/countries'); - $params = []; - - - return $this->client->call(Client::METHOD_GET, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * 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. - * - * @throws Exception - * @return array - */ - public function getCountriesEU():array - { - $path = str_replace([], [], '/locale/countries/eu'); - $params = []; - - - return $this->client->call(Client::METHOD_GET, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * List Countries Phone Codes - * - * List of all countries phone codes. You can use the locale header to get the - * data in a supported language. - * - * @throws Exception - * @return array - */ - public function getCountriesPhones():array - { - $path = str_replace([], [], '/locale/countries/phones'); - $params = []; - - - return $this->client->call(Client::METHOD_GET, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * List Currencies - * - * List of all currencies, including currency symol, 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. - * - * @throws Exception - * @return array - */ - public function getCurrencies():array - { - $path = str_replace([], [], '/locale/currencies'); - $params = []; - - - return $this->client->call(Client::METHOD_GET, $path, [ - 'content-type' => 'application/json', - ], $params); - } - -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-php/src/Appwrite/Services/Storage.php b/app/sdks/0.6.2/server-php/src/Appwrite/Services/Storage.php deleted file mode 100644 index 09b74fbf8f..0000000000 --- a/app/sdks/0.6.2/server-php/src/Appwrite/Services/Storage.php +++ /dev/null @@ -1,212 +0,0 @@ -client->call(Client::METHOD_GET, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Create File - * - * Create a new file. The user who creates the file will automatically be - * assigned to read and write access unless he has passed custom values for - * read and write arguments. - * - * @param \CurlFile $file - * @param array $read - * @param array $write - * @throws Exception - * @return array - */ - public function createFile(\CurlFile $file, array $read, array $write):array - { - $path = str_replace([], [], '/storage/files'); - $params = []; - - $params['file'] = $file; - $params['read'] = $read; - $params['write'] = $write; - - return $this->client->call(Client::METHOD_POST, $path, [ - 'content-type' => 'multipart/form-data', - ], $params); - } - - /** - * Get File - * - * Get file by its unique ID. This endpoint response returns a JSON object - * with the file metadata. - * - * @param string $fileId - * @throws Exception - * @return array - */ - public function getFile(string $fileId):array - { - $path = str_replace(['{fileId}'], [$fileId], '/storage/files/{fileId}'); - $params = []; - - - return $this->client->call(Client::METHOD_GET, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Update File - * - * Update file by its unique ID. Only users with write permissions have access - * to update this resource. - * - * @param string $fileId - * @param array $read - * @param array $write - * @throws Exception - * @return array - */ - public function updateFile(string $fileId, array $read, array $write):array - { - $path = str_replace(['{fileId}'], [$fileId], '/storage/files/{fileId}'); - $params = []; - - $params['read'] = $read; - $params['write'] = $write; - - return $this->client->call(Client::METHOD_PUT, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Delete File - * - * Delete a file by its unique ID. Only users with write permissions have - * access to delete this resource. - * - * @param string $fileId - * @throws Exception - * @return array - */ - public function deleteFile(string $fileId):array - { - $path = str_replace(['{fileId}'], [$fileId], '/storage/files/{fileId}'); - $params = []; - - - return $this->client->call(Client::METHOD_DELETE, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Get File for Download - * - * Get 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. - * - * @param string $fileId - * @throws Exception - * @return array - */ - public function getFileDownload(string $fileId):array - { - $path = str_replace(['{fileId}'], [$fileId], '/storage/files/{fileId}/download'); - $params = []; - - - return $this->client->call(Client::METHOD_GET, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Get File Preview - * - * Get a file preview image. Currently, this method supports preview for image - * files (jpg, png, and gif), other supported formats, like pdf, docs, slides, - * and spreadsheets, will return the file icon image. You can also pass query - * string arguments for cutting and resizing your preview image. - * - * @param string $fileId - * @param int $width - * @param int $height - * @param int $quality - * @param string $background - * @param string $output - * @throws Exception - * @return array - */ - public function getFilePreview(string $fileId, int $width = 0, int $height = 0, int $quality = 100, string $background = '', string $output = ''):array - { - $path = str_replace(['{fileId}'], [$fileId], '/storage/files/{fileId}/preview'); - $params = []; - - $params['width'] = $width; - $params['height'] = $height; - $params['quality'] = $quality; - $params['background'] = $background; - $params['output'] = $output; - - return $this->client->call(Client::METHOD_GET, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Get File for View - * - * Get file content by its unique ID. This endpoint is similar to the download - * method but returns with no 'Content-Disposition: attachment' header. - * - * @param string $fileId - * @param string $as - * @throws Exception - * @return array - */ - public function getFileView(string $fileId, string $as = ''):array - { - $path = str_replace(['{fileId}'], [$fileId], '/storage/files/{fileId}/view'); - $params = []; - - $params['as'] = $as; - - return $this->client->call(Client::METHOD_GET, $path, [ - 'content-type' => 'application/json', - ], $params); - } - -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-php/src/Appwrite/Services/Teams.php b/app/sdks/0.6.2/server-php/src/Appwrite/Services/Teams.php deleted file mode 100644 index 7ef2240ab7..0000000000 --- a/app/sdks/0.6.2/server-php/src/Appwrite/Services/Teams.php +++ /dev/null @@ -1,215 +0,0 @@ -client->call(Client::METHOD_GET, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Create Team - * - * Create a new team. The user who creates the team will automatically be - * assigned as the owner of the team. The team owner can invite new members, - * who will be able add new owners and update or delete the team from your - * project. - * - * @param string $name - * @param array $roles - * @throws Exception - * @return array - */ - public function create(string $name, array $roles = ["owner"]):array - { - $path = str_replace([], [], '/teams'); - $params = []; - - $params['name'] = $name; - $params['roles'] = $roles; - - return $this->client->call(Client::METHOD_POST, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Get Team - * - * Get team by its unique ID. All team members have read access for this - * resource. - * - * @param string $teamId - * @throws Exception - * @return array - */ - public function get(string $teamId):array - { - $path = str_replace(['{teamId}'], [$teamId], '/teams/{teamId}'); - $params = []; - - - return $this->client->call(Client::METHOD_GET, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Update Team - * - * Update team by its unique ID. Only team owners have write access for this - * resource. - * - * @param string $teamId - * @param string $name - * @throws Exception - * @return array - */ - public function update(string $teamId, string $name):array - { - $path = str_replace(['{teamId}'], [$teamId], '/teams/{teamId}'); - $params = []; - - $params['name'] = $name; - - return $this->client->call(Client::METHOD_PUT, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Delete Team - * - * Delete team by its unique ID. Only team owners have write access for this - * resource. - * - * @param string $teamId - * @throws Exception - * @return array - */ - public function delete(string $teamId):array - { - $path = str_replace(['{teamId}'], [$teamId], '/teams/{teamId}'); - $params = []; - - - return $this->client->call(Client::METHOD_DELETE, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Get Team Memberships - * - * Get team members by the team unique ID. All team members have read access - * for this list of resources. - * - * @param string $teamId - * @throws Exception - * @return array - */ - public function getMemberships(string $teamId):array - { - $path = str_replace(['{teamId}'], [$teamId], '/teams/{teamId}/memberships'); - $params = []; - - - return $this->client->call(Client::METHOD_GET, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Create Team Membership - * - * Use this endpoint to invite a new member to join your team. An email with a - * link to join the team will be sent to the new member email address if the - * member doesn't exist in the project it will be created automatically. - * - * Use the 'URL' parameter to redirect the user from the invitation email back - * to your app. When the user is redirected, use the [Update Team Membership - * Status](/docs/teams#updateMembershipStatus) endpoint to allow the user to - * accept the invitation to the team. - * - * Please note that in order to avoid a [Redirect - * Attacks](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) - * the only valid redirect URL's are the once from domains you have set when - * added your platforms in the console interface. - * - * @param string $teamId - * @param string $email - * @param array $roles - * @param string $url - * @param string $name - * @throws Exception - * @return array - */ - public function createMembership(string $teamId, string $email, array $roles, string $url, string $name = ''):array - { - $path = str_replace(['{teamId}'], [$teamId], '/teams/{teamId}/memberships'); - $params = []; - - $params['email'] = $email; - $params['name'] = $name; - $params['roles'] = $roles; - $params['url'] = $url; - - return $this->client->call(Client::METHOD_POST, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * 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 he didn't accept it. - * - * @param string $teamId - * @param string $inviteId - * @throws Exception - * @return array - */ - public function deleteMembership(string $teamId, string $inviteId):array - { - $path = str_replace(['{teamId}', '{inviteId}'], [$teamId, $inviteId], '/teams/{teamId}/memberships/{inviteId}'); - $params = []; - - - return $this->client->call(Client::METHOD_DELETE, $path, [ - 'content-type' => 'application/json', - ], $params); - } - -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-php/src/Appwrite/Services/Users.php b/app/sdks/0.6.2/server-php/src/Appwrite/Services/Users.php deleted file mode 100644 index b2b4f576cc..0000000000 --- a/app/sdks/0.6.2/server-php/src/Appwrite/Services/Users.php +++ /dev/null @@ -1,230 +0,0 @@ -client->call(Client::METHOD_GET, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Create User - * - * Create a new user. - * - * @param string $email - * @param string $password - * @param string $name - * @throws Exception - * @return array - */ - public function create(string $email, string $password, string $name = ''):array - { - $path = str_replace([], [], '/users'); - $params = []; - - $params['email'] = $email; - $params['password'] = $password; - $params['name'] = $name; - - return $this->client->call(Client::METHOD_POST, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Get User - * - * Get user by its unique ID. - * - * @param string $userId - * @throws Exception - * @return array - */ - public function get(string $userId):array - { - $path = str_replace(['{userId}'], [$userId], '/users/{userId}'); - $params = []; - - - return $this->client->call(Client::METHOD_GET, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Get User Logs - * - * Get user activity logs list by its unique ID. - * - * @param string $userId - * @throws Exception - * @return array - */ - public function getLogs(string $userId):array - { - $path = str_replace(['{userId}'], [$userId], '/users/{userId}/logs'); - $params = []; - - - return $this->client->call(Client::METHOD_GET, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Get User Preferences - * - * Get user preferences by its unique ID. - * - * @param string $userId - * @throws Exception - * @return array - */ - public function getPrefs(string $userId):array - { - $path = str_replace(['{userId}'], [$userId], '/users/{userId}/prefs'); - $params = []; - - - return $this->client->call(Client::METHOD_GET, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Update User Preferences - * - * Update user preferences by its unique ID. You can pass only the specific - * settings you wish to update. - * - * @param string $userId - * @param array $prefs - * @throws Exception - * @return array - */ - public function updatePrefs(string $userId, array $prefs):array - { - $path = str_replace(['{userId}'], [$userId], '/users/{userId}/prefs'); - $params = []; - - $params['prefs'] = $prefs; - - return $this->client->call(Client::METHOD_PATCH, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Get User Sessions - * - * Get user sessions list by its unique ID. - * - * @param string $userId - * @throws Exception - * @return array - */ - public function getSessions(string $userId):array - { - $path = str_replace(['{userId}'], [$userId], '/users/{userId}/sessions'); - $params = []; - - - return $this->client->call(Client::METHOD_GET, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Delete User Sessions - * - * Delete all user sessions by its unique ID. - * - * @param string $userId - * @throws Exception - * @return array - */ - public function deleteSessions(string $userId):array - { - $path = str_replace(['{userId}'], [$userId], '/users/{userId}/sessions'); - $params = []; - - - return $this->client->call(Client::METHOD_DELETE, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Delete User Session - * - * Delete user sessions by its unique ID. - * - * @param string $userId - * @param string $sessionId - * @throws Exception - * @return array - */ - public function deleteSession(string $userId, string $sessionId):array - { - $path = str_replace(['{userId}', '{sessionId}'], [$userId, $sessionId], '/users/{userId}/sessions/{sessionId}'); - $params = []; - - - return $this->client->call(Client::METHOD_DELETE, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Update User Status - * - * Update user status by its unique ID. - * - * @param string $userId - * @param string $status - * @throws Exception - * @return array - */ - public function updateStatus(string $userId, string $status):array - { - $path = str_replace(['{userId}'], [$userId], '/users/{userId}/status'); - $params = []; - - $params['status'] = $status; - - return $this->client->call(Client::METHOD_PATCH, $path, [ - 'content-type' => 'application/json', - ], $params); - } - -} \ No newline at end of file diff --git a/app/sdks/0.6.2/server-python/CHANGELOG.md b/app/sdks/0.6.2/server-python/CHANGELOG.md deleted file mode 100644 index fa4d35e687..0000000000 --- a/app/sdks/0.6.2/server-python/CHANGELOG.md +++ /dev/null @@ -1 +0,0 @@ -# Change Log \ No newline at end of file diff --git a/app/sdks/0.6.2/server-python/LICENSE b/app/sdks/0.6.2/server-python/LICENSE deleted file mode 100644 index fc7c051a91..0000000000 --- a/app/sdks/0.6.2/server-python/LICENSE +++ /dev/null @@ -1,12 +0,0 @@ -Copyright (c) 2019 Appwrite (https://appwrite.io) and individual contributors. -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - - 3. Neither the name Appwrite nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/app/sdks/0.6.2/server-python/README.md b/app/sdks/0.6.2/server-python/README.md deleted file mode 100644 index 04421ff241..0000000000 --- a/app/sdks/0.6.2/server-python/README.md +++ /dev/null @@ -1,30 +0,0 @@ -# Appwrite Python SDK - -![License](https://img.shields.io/github/license/appwrite/sdk-for-python.svg?v=1) -![Version](https://img.shields.io/badge/api%20version-0.6.2-blue.svg?v=1) - -**This SDK is compatible with Appwrite server version 0.6.2. For older versions, please check previous releases.** - -Appwrite is an open-source backend as a service server that abstract and simplify complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way. - Use the Python SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools. - For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs) - - - -![Appwrite](https://appwrite.io/images/github.png) - -## Installation - -To install via [PyPI](https://pypi.org/): - -```bash -pip install appwrite -``` - -## Contribution - -This library is auto-generated by Appwrite custom [SDK Generator](https://github.com/appwrite/sdk-generator). To learn more about how you can help us improve this SDK, please check the [contribution guide](https://github.com/appwrite/sdk-generator/blob/master/CONTRIBUTING.md) before sending a pull-request. - -## License - -Please see the [BSD-3-Clause license](https://raw.githubusercontent.com/appwrite/appwrite/master/LICENSE) file for more information. diff --git a/app/sdks/0.6.2/server-python/appwrite/__init__.py b/app/sdks/0.6.2/server-python/appwrite/__init__.py deleted file mode 100644 index 0519ecba6e..0000000000 --- a/app/sdks/0.6.2/server-python/appwrite/__init__.py +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/app/sdks/0.6.2/server-python/appwrite/client.py b/app/sdks/0.6.2/server-python/appwrite/client.py deleted file mode 100644 index 8989fccb9c..0000000000 --- a/app/sdks/0.6.2/server-python/appwrite/client.py +++ /dev/null @@ -1,106 +0,0 @@ -import io -import requests - -class Client: - def __init__(self): - self._self_signed = False - self._endpoint = 'https://appwrite.io/v1' - self._global_headers = { - 'content-type': '', - 'x-sdk-version': 'appwrite:python:0.0.6', - } - - def set_self_signed(self, status=True): - self._self_signed = status - return self - - def set_endpoint(self, endpoint): - self._endpoint = endpoint - return self - - def add_header(self, key, value): - self._global_headers[key.lower()] = value.lower() - return self - - def set_project(self, value): - """Your project ID""" - - self._global_headers['x-appwrite-project'] = value.lower() - return self - - def set_key(self, value): - """Your secret API key""" - - self._global_headers['x-appwrite-key'] = value.lower() - return self - - def set_locale(self, value): - self._global_headers['x-appwrite-locale'] = value.lower() - return self - - def call(self, method, path='', headers=None, params=None): - if headers is None: - headers = {} - - if params is None: - params = {} - - data = {} - json = {} - files = {} - - headers = {**self._global_headers, **headers} - - if method != 'get': - data = params - params = {} - - if headers['content-type'].startswith('application/json'): - json = data - data = {} - - if headers['content-type'].startswith('multipart/form-data'): - del headers['content-type'] - - for key in data.copy(): - if isinstance(data[key], io.BufferedIOBase): - files[key] = data[key] - del data[key] - - response = requests.request( # call method dynamically https://stackoverflow.com/a/4246075/2299554 - method=method, - url=self._endpoint + path, - params=self.flatten(params), - data=self.flatten(data), - json=json, - files=files, - headers=headers, - verify=self._self_signed, - ) - - response.raise_for_status() - - content_type = response.headers['Content-Type'] - - if content_type.startswith('application/json'): - return response.json() - - return response._content - - def flatten(self, data, prefix=''): - output = {} - i = 0 - - for key in data: - value = data[key] if isinstance(data, dict) else key - finalKey = prefix + '[' + key +']' if prefix else key - finalKey = prefix + '[' + str(i) +']' if isinstance(data, list) else finalKey - i += 1 - - if isinstance(value, list) or isinstance(value, dict): - output = {**output, **self.flatten(value, finalKey)} - else: - output[finalKey] = value - - return output - diff --git a/app/sdks/0.6.2/server-python/appwrite/service.py b/app/sdks/0.6.2/server-python/appwrite/service.py deleted file mode 100644 index b5b60e6c22..0000000000 --- a/app/sdks/0.6.2/server-python/appwrite/service.py +++ /dev/null @@ -1,6 +0,0 @@ -from .client import Client - - -class Service: - def __init__(self, client: Client): - self.client = client diff --git a/app/sdks/0.6.2/server-python/appwrite/services/__init__.py b/app/sdks/0.6.2/server-python/appwrite/services/__init__.py deleted file mode 100644 index 0519ecba6e..0000000000 --- a/app/sdks/0.6.2/server-python/appwrite/services/__init__.py +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/app/sdks/0.6.2/server-python/appwrite/services/avatars.py b/app/sdks/0.6.2/server-python/appwrite/services/avatars.py deleted file mode 100644 index 4a2a4024a6..0000000000 --- a/app/sdks/0.6.2/server-python/appwrite/services/avatars.py +++ /dev/null @@ -1,87 +0,0 @@ -from ..service import Service - - -class Avatars(Service): - - def __init__(self, client): - super(Avatars, self).__init__(client) - - def get_browser(self, code, width=100, height=100, quality=100): - """Get Browser Icon""" - - params = {} - path = '/avatars/browsers/{code}' - path = path.replace('{code}', code) - params['width'] = width - params['height'] = height - params['quality'] = quality - - return self.client.call('get', path, { - 'content-type': 'application/json', - }, params) - - def get_credit_card(self, code, width=100, height=100, quality=100): - """Get Credit Card Icon""" - - params = {} - path = '/avatars/credit-cards/{code}' - path = path.replace('{code}', code) - params['width'] = width - params['height'] = height - params['quality'] = quality - - return self.client.call('get', path, { - 'content-type': 'application/json', - }, params) - - def get_favicon(self, url): - """Get Favicon""" - - params = {} - path = '/avatars/favicon' - params['url'] = url - - return self.client.call('get', path, { - 'content-type': 'application/json', - }, params) - - def get_flag(self, code, width=100, height=100, quality=100): - """Get Country Flag""" - - params = {} - path = '/avatars/flags/{code}' - path = path.replace('{code}', code) - params['width'] = width - params['height'] = height - params['quality'] = quality - - return self.client.call('get', path, { - 'content-type': 'application/json', - }, params) - - def get_image(self, url, width=400, height=400): - """Get Image from URL""" - - params = {} - path = '/avatars/image' - params['url'] = url - params['width'] = width - params['height'] = height - - return self.client.call('get', path, { - 'content-type': 'application/json', - }, params) - - def get_q_r(self, text, size=400, margin=1, download=0): - """Get QR Code""" - - params = {} - path = '/avatars/qr' - params['text'] = text - params['size'] = size - params['margin'] = margin - params['download'] = download - - return self.client.call('get', path, { - 'content-type': 'application/json', - }, params) diff --git a/app/sdks/0.6.2/server-python/appwrite/services/database.py b/app/sdks/0.6.2/server-python/appwrite/services/database.py deleted file mode 100644 index 2549e689d5..0000000000 --- a/app/sdks/0.6.2/server-python/appwrite/services/database.py +++ /dev/null @@ -1,159 +0,0 @@ -from ..service import Service - - -class Database(Service): - - def __init__(self, client): - super(Database, self).__init__(client) - - def list_collections(self, search='', limit=25, offset=0, order_type='ASC'): - """List Collections""" - - params = {} - path = '/database/collections' - params['search'] = search - params['limit'] = limit - params['offset'] = offset - params['orderType'] = order_type - - return self.client.call('get', path, { - 'content-type': 'application/json', - }, params) - - def create_collection(self, name, read, write, rules): - """Create Collection""" - - params = {} - path = '/database/collections' - params['name'] = name - params['read'] = read - params['write'] = write - params['rules'] = rules - - return self.client.call('post', path, { - 'content-type': 'application/json', - }, params) - - def get_collection(self, collection_id): - """Get Collection""" - - params = {} - path = '/database/collections/{collectionId}' - path = path.replace('{collectionId}', collection_id) - - return self.client.call('get', path, { - 'content-type': 'application/json', - }, params) - - def update_collection(self, collection_id, name, read, write, rules=[]): - """Update Collection""" - - params = {} - path = '/database/collections/{collectionId}' - path = path.replace('{collectionId}', collection_id) - params['name'] = name - params['read'] = read - params['write'] = write - params['rules'] = rules - - return self.client.call('put', path, { - 'content-type': 'application/json', - }, params) - - def delete_collection(self, collection_id): - """Delete Collection""" - - params = {} - path = '/database/collections/{collectionId}' - path = path.replace('{collectionId}', collection_id) - - return self.client.call('delete', path, { - 'content-type': 'application/json', - }, params) - - def list_documents(self, collection_id, filters=[], offset=0, limit=50, order_field='$id', order_type='ASC', order_cast='string', search='', first=0, last=0): - """List Documents""" - - params = {} - path = '/database/collections/{collectionId}/documents' - path = path.replace('{collectionId}', collection_id) - params['filters'] = filters - params['offset'] = offset - params['limit'] = limit - params['orderField'] = order_field - params['orderType'] = order_type - params['orderCast'] = order_cast - params['search'] = search - params['first'] = first - params['last'] = last - - return self.client.call('get', path, { - 'content-type': 'application/json', - }, params) - - def create_document(self, collection_id, data, read, write, parent_document='', parent_property='', parent_property_type='assign'): - """Create Document""" - - params = {} - path = '/database/collections/{collectionId}/documents' - path = path.replace('{collectionId}', collection_id) - params['data'] = data - params['read'] = read - params['write'] = write - params['parentDocument'] = parent_document - params['parentProperty'] = parent_property - params['parentPropertyType'] = parent_property_type - - return self.client.call('post', path, { - 'content-type': 'application/json', - }, params) - - def get_document(self, collection_id, document_id): - """Get Document""" - - params = {} - path = '/database/collections/{collectionId}/documents/{documentId}' - path = path.replace('{collectionId}', collection_id) - path = path.replace('{documentId}', document_id) - - return self.client.call('get', path, { - 'content-type': 'application/json', - }, params) - - def update_document(self, collection_id, document_id, data, read, write): - """Update Document""" - - params = {} - path = '/database/collections/{collectionId}/documents/{documentId}' - path = path.replace('{collectionId}', collection_id) - path = path.replace('{documentId}', document_id) - params['data'] = data - params['read'] = read - params['write'] = write - - return self.client.call('patch', path, { - 'content-type': 'application/json', - }, params) - - def delete_document(self, collection_id, document_id): - """Delete Document""" - - params = {} - path = '/database/collections/{collectionId}/documents/{documentId}' - path = path.replace('{collectionId}', collection_id) - path = path.replace('{documentId}', document_id) - - return self.client.call('delete', path, { - 'content-type': 'application/json', - }, params) - - def get_collection_logs(self, collection_id): - """Get Collection Logs""" - - params = {} - path = '/database/collections/{collectionId}/logs' - path = path.replace('{collectionId}', collection_id) - - return self.client.call('get', path, { - 'content-type': 'application/json', - }, params) diff --git a/app/sdks/0.6.2/server-python/appwrite/services/functions.py b/app/sdks/0.6.2/server-python/appwrite/services/functions.py deleted file mode 100644 index 1688f21f47..0000000000 --- a/app/sdks/0.6.2/server-python/appwrite/services/functions.py +++ /dev/null @@ -1,178 +0,0 @@ -from ..service import Service - - -class Functions(Service): - - def __init__(self, client): - super(Functions, self).__init__(client) - - def list(self, search='', limit=25, offset=0, order_type='ASC'): - """List Functions""" - - params = {} - path = '/functions' - params['search'] = search - params['limit'] = limit - params['offset'] = offset - params['orderType'] = order_type - - return self.client.call('get', path, { - 'content-type': 'application/json', - }, params) - - def create(self, name, vars=[], events=[], schedule='', timeout=15): - """Create Function""" - - params = {} - path = '/functions' - params['name'] = name - params['vars'] = vars - params['events'] = events - params['schedule'] = schedule - params['timeout'] = timeout - - return self.client.call('post', path, { - 'content-type': 'application/json', - }, params) - - def get(self, function_id): - """Get Function""" - - params = {} - path = '/functions/{functionId}' - path = path.replace('{functionId}', function_id) - - return self.client.call('get', path, { - 'content-type': 'application/json', - }, params) - - def update(self, function_id, name, vars=[], events=[], schedule='', timeout=15): - """Update Function""" - - params = {} - path = '/functions/{functionId}' - path = path.replace('{functionId}', function_id) - params['name'] = name - params['vars'] = vars - params['events'] = events - params['schedule'] = schedule - params['timeout'] = timeout - - return self.client.call('put', path, { - 'content-type': 'application/json', - }, params) - - def delete(self, function_id): - """Delete Function""" - - params = {} - path = '/functions/{functionId}' - path = path.replace('{functionId}', function_id) - - return self.client.call('delete', path, { - 'content-type': 'application/json', - }, params) - - def list_executions(self, function_id, search='', limit=25, offset=0, order_type='ASC'): - """List Executions""" - - params = {} - path = '/functions/{functionId}/executions' - path = path.replace('{functionId}', function_id) - params['search'] = search - params['limit'] = limit - params['offset'] = offset - params['orderType'] = order_type - - return self.client.call('get', path, { - 'content-type': 'application/json', - }, params) - - def create_execution(self, function_id, async=1): - """Create Execution""" - - params = {} - path = '/functions/{functionId}/executions' - path = path.replace('{functionId}', function_id) - params['async'] = async - - return self.client.call('post', path, { - 'content-type': 'application/json', - }, params) - - def get_execution(self, function_id, execution_id): - """Get Execution""" - - params = {} - path = '/functions/{functionId}/executions/{executionId}' - path = path.replace('{functionId}', function_id) - path = path.replace('{executionId}', execution_id) - - return self.client.call('get', path, { - 'content-type': 'application/json', - }, params) - - def update_tag(self, function_id, tag): - """Update Function Tag""" - - params = {} - path = '/functions/{functionId}/tag' - path = path.replace('{functionId}', function_id) - params['tag'] = tag - - return self.client.call('patch', path, { - 'content-type': 'application/json', - }, params) - - def list_tags(self, function_id, search='', limit=25, offset=0, order_type='ASC'): - """List Tags""" - - params = {} - path = '/functions/{functionId}/tags' - path = path.replace('{functionId}', function_id) - params['search'] = search - params['limit'] = limit - params['offset'] = offset - params['orderType'] = order_type - - return self.client.call('get', path, { - 'content-type': 'application/json', - }, params) - - def create_tag(self, function_id, env, command, code): - """Create Tag""" - - params = {} - path = '/functions/{functionId}/tags' - path = path.replace('{functionId}', function_id) - params['env'] = env - params['command'] = command - params['code'] = code - - return self.client.call('post', path, { - 'content-type': 'application/json', - }, params) - - def get_tag(self, function_id, tag_id): - """Get Tag""" - - params = {} - path = '/functions/{functionId}/tags/{tagId}' - path = path.replace('{functionId}', function_id) - path = path.replace('{tagId}', tag_id) - - return self.client.call('get', path, { - 'content-type': 'application/json', - }, params) - - def delete_tag(self, function_id, tag_id): - """Delete Tag""" - - params = {} - path = '/functions/{functionId}/tags/{tagId}' - path = path.replace('{functionId}', function_id) - path = path.replace('{tagId}', tag_id) - - return self.client.call('delete', path, { - 'content-type': 'application/json', - }, params) diff --git a/app/sdks/0.6.2/server-python/appwrite/services/health.py b/app/sdks/0.6.2/server-python/appwrite/services/health.py deleted file mode 100644 index 5e08ebe6e8..0000000000 --- a/app/sdks/0.6.2/server-python/appwrite/services/health.py +++ /dev/null @@ -1,127 +0,0 @@ -from ..service import Service - - -class Health(Service): - - def __init__(self, client): - super(Health, self).__init__(client) - - def get(self): - """Get HTTP""" - - params = {} - path = '/health' - - return self.client.call('get', path, { - 'content-type': 'application/json', - }, params) - - def get_anti_virus(self): - """Get Anti virus""" - - params = {} - path = '/health/anti-virus' - - return self.client.call('get', path, { - 'content-type': 'application/json', - }, params) - - def get_cache(self): - """Get Cache""" - - params = {} - path = '/health/cache' - - return self.client.call('get', path, { - 'content-type': 'application/json', - }, params) - - def get_d_b(self): - """Get DB""" - - params = {} - path = '/health/db' - - return self.client.call('get', path, { - 'content-type': 'application/json', - }, params) - - def get_queue_certificates(self): - """Get Certificate Queue""" - - params = {} - path = '/health/queue/certificates' - - return self.client.call('get', path, { - 'content-type': 'application/json', - }, params) - - def get_queue_functions(self): - """Get Functions Queue""" - - params = {} - path = '/health/queue/functions' - - return self.client.call('get', path, { - 'content-type': 'application/json', - }, params) - - def get_queue_logs(self): - """Get Logs Queue""" - - params = {} - path = '/health/queue/logs' - - return self.client.call('get', path, { - 'content-type': 'application/json', - }, params) - - def get_queue_tasks(self): - """Get Tasks Queue""" - - params = {} - path = '/health/queue/tasks' - - return self.client.call('get', path, { - 'content-type': 'application/json', - }, params) - - def get_queue_usage(self): - """Get Usage Queue""" - - params = {} - path = '/health/queue/usage' - - return self.client.call('get', path, { - 'content-type': 'application/json', - }, params) - - def get_queue_webhooks(self): - """Get Webhooks Queue""" - - params = {} - path = '/health/queue/webhooks' - - return self.client.call('get', path, { - 'content-type': 'application/json', - }, params) - - def get_storage_local(self): - """Get Local Storage""" - - params = {} - path = '/health/storage/local' - - return self.client.call('get', path, { - 'content-type': 'application/json', - }, params) - - def get_time(self): - """Get Time""" - - params = {} - path = '/health/time' - - return self.client.call('get', path, { - 'content-type': 'application/json', - }, params) diff --git a/app/sdks/0.6.2/server-python/appwrite/services/locale.py b/app/sdks/0.6.2/server-python/appwrite/services/locale.py deleted file mode 100644 index 70c955eb85..0000000000 --- a/app/sdks/0.6.2/server-python/appwrite/services/locale.py +++ /dev/null @@ -1,67 +0,0 @@ -from ..service import Service - - -class Locale(Service): - - def __init__(self, client): - super(Locale, self).__init__(client) - - def get(self): - """Get User Locale""" - - params = {} - path = '/locale' - - return self.client.call('get', path, { - 'content-type': 'application/json', - }, params) - - def get_continents(self): - """List Continents""" - - params = {} - path = '/locale/continents' - - return self.client.call('get', path, { - 'content-type': 'application/json', - }, params) - - def get_countries(self): - """List Countries""" - - params = {} - path = '/locale/countries' - - return self.client.call('get', path, { - 'content-type': 'application/json', - }, params) - - def get_countries_e_u(self): - """List EU Countries""" - - params = {} - path = '/locale/countries/eu' - - return self.client.call('get', path, { - 'content-type': 'application/json', - }, params) - - def get_countries_phones(self): - """List Countries Phone Codes""" - - params = {} - path = '/locale/countries/phones' - - return self.client.call('get', path, { - 'content-type': 'application/json', - }, params) - - def get_currencies(self): - """List Currencies""" - - params = {} - path = '/locale/currencies' - - return self.client.call('get', path, { - 'content-type': 'application/json', - }, params) diff --git a/app/sdks/0.6.2/server-python/appwrite/services/storage.py b/app/sdks/0.6.2/server-python/appwrite/services/storage.py deleted file mode 100644 index 7e2a986f6e..0000000000 --- a/app/sdks/0.6.2/server-python/appwrite/services/storage.py +++ /dev/null @@ -1,108 +0,0 @@ -from ..service import Service - - -class Storage(Service): - - def __init__(self, client): - super(Storage, self).__init__(client) - - def list_files(self, search='', limit=25, offset=0, order_type='ASC'): - """List Files""" - - params = {} - path = '/storage/files' - params['search'] = search - params['limit'] = limit - params['offset'] = offset - params['orderType'] = order_type - - return self.client.call('get', path, { - 'content-type': 'application/json', - }, params) - - def create_file(self, file, read, write): - """Create File""" - - params = {} - path = '/storage/files' - params['file'] = file - params['read'] = read - params['write'] = write - - return self.client.call('post', path, { - 'content-type': 'multipart/form-data', - }, params) - - def get_file(self, file_id): - """Get File""" - - params = {} - path = '/storage/files/{fileId}' - path = path.replace('{fileId}', file_id) - - return self.client.call('get', path, { - 'content-type': 'application/json', - }, params) - - def update_file(self, file_id, read, write): - """Update File""" - - params = {} - path = '/storage/files/{fileId}' - path = path.replace('{fileId}', file_id) - params['read'] = read - params['write'] = write - - return self.client.call('put', path, { - 'content-type': 'application/json', - }, params) - - def delete_file(self, file_id): - """Delete File""" - - params = {} - path = '/storage/files/{fileId}' - path = path.replace('{fileId}', file_id) - - return self.client.call('delete', path, { - 'content-type': 'application/json', - }, params) - - def get_file_download(self, file_id): - """Get File for Download""" - - params = {} - path = '/storage/files/{fileId}/download' - path = path.replace('{fileId}', file_id) - - return self.client.call('get', path, { - 'content-type': 'application/json', - }, params) - - def get_file_preview(self, file_id, width=0, height=0, quality=100, background='', output=''): - """Get File Preview""" - - params = {} - path = '/storage/files/{fileId}/preview' - path = path.replace('{fileId}', file_id) - params['width'] = width - params['height'] = height - params['quality'] = quality - params['background'] = background - params['output'] = output - - return self.client.call('get', path, { - 'content-type': 'application/json', - }, params) - - def get_file_view(self, file_id, xas=''): - """Get File for View""" - - params = {} - path = '/storage/files/{fileId}/view' - path = path.replace('{fileId}', file_id) - params['as'] = xas - - return self.client.call('get', path, { - 'content-type': 'application/json', - }, params) diff --git a/app/sdks/0.6.2/server-python/appwrite/services/teams.py b/app/sdks/0.6.2/server-python/appwrite/services/teams.py deleted file mode 100644 index cdc3780ad9..0000000000 --- a/app/sdks/0.6.2/server-python/appwrite/services/teams.py +++ /dev/null @@ -1,105 +0,0 @@ -from ..service import Service - - -class Teams(Service): - - def __init__(self, client): - super(Teams, self).__init__(client) - - def list(self, search='', limit=25, offset=0, order_type='ASC'): - """List Teams""" - - params = {} - path = '/teams' - params['search'] = search - params['limit'] = limit - params['offset'] = offset - params['orderType'] = order_type - - return self.client.call('get', path, { - 'content-type': 'application/json', - }, params) - - def create(self, name, roles=[]): - """Create Team""" - - params = {} - path = '/teams' - params['name'] = name - params['roles'] = roles - - return self.client.call('post', path, { - 'content-type': 'application/json', - }, params) - - def get(self, team_id): - """Get Team""" - - params = {} - path = '/teams/{teamId}' - path = path.replace('{teamId}', team_id) - - return self.client.call('get', path, { - 'content-type': 'application/json', - }, params) - - def update(self, team_id, name): - """Update Team""" - - params = {} - path = '/teams/{teamId}' - path = path.replace('{teamId}', team_id) - params['name'] = name - - return self.client.call('put', path, { - 'content-type': 'application/json', - }, params) - - def delete(self, team_id): - """Delete Team""" - - params = {} - path = '/teams/{teamId}' - path = path.replace('{teamId}', team_id) - - return self.client.call('delete', path, { - 'content-type': 'application/json', - }, params) - - def get_memberships(self, team_id): - """Get Team Memberships""" - - params = {} - path = '/teams/{teamId}/memberships' - path = path.replace('{teamId}', team_id) - - return self.client.call('get', path, { - 'content-type': 'application/json', - }, params) - - def create_membership(self, team_id, email, roles, url, name=''): - """Create Team Membership""" - - params = {} - path = '/teams/{teamId}/memberships' - path = path.replace('{teamId}', team_id) - params['email'] = email - params['name'] = name - params['roles'] = roles - params['url'] = url - - return self.client.call('post', path, { - 'content-type': 'application/json', - }, params) - - def delete_membership(self, team_id, invite_id): - """Delete Team Membership""" - - params = {} - path = '/teams/{teamId}/memberships/{inviteId}' - path = path.replace('{teamId}', team_id) - path = path.replace('{inviteId}', invite_id) - - return self.client.call('delete', path, { - 'content-type': 'application/json', - }, params) diff --git a/app/sdks/0.6.2/server-python/appwrite/services/users.py b/app/sdks/0.6.2/server-python/appwrite/services/users.py deleted file mode 100644 index 2608f07a50..0000000000 --- a/app/sdks/0.6.2/server-python/appwrite/services/users.py +++ /dev/null @@ -1,125 +0,0 @@ -from ..service import Service - - -class Users(Service): - - def __init__(self, client): - super(Users, self).__init__(client) - - def list(self, search='', limit=25, offset=0, order_type='ASC'): - """List Users""" - - params = {} - path = '/users' - params['search'] = search - params['limit'] = limit - params['offset'] = offset - params['orderType'] = order_type - - return self.client.call('get', path, { - 'content-type': 'application/json', - }, params) - - def create(self, email, password, name=''): - """Create User""" - - params = {} - path = '/users' - params['email'] = email - params['password'] = password - params['name'] = name - - return self.client.call('post', path, { - 'content-type': 'application/json', - }, params) - - def get(self, user_id): - """Get User""" - - params = {} - path = '/users/{userId}' - path = path.replace('{userId}', user_id) - - return self.client.call('get', path, { - 'content-type': 'application/json', - }, params) - - def get_logs(self, user_id): - """Get User Logs""" - - params = {} - path = '/users/{userId}/logs' - path = path.replace('{userId}', user_id) - - return self.client.call('get', path, { - 'content-type': 'application/json', - }, params) - - def get_prefs(self, user_id): - """Get User Preferences""" - - params = {} - path = '/users/{userId}/prefs' - path = path.replace('{userId}', user_id) - - return self.client.call('get', path, { - 'content-type': 'application/json', - }, params) - - def update_prefs(self, user_id, prefs): - """Update User Preferences""" - - params = {} - path = '/users/{userId}/prefs' - path = path.replace('{userId}', user_id) - params['prefs'] = prefs - - return self.client.call('patch', path, { - 'content-type': 'application/json', - }, params) - - def get_sessions(self, user_id): - """Get User Sessions""" - - params = {} - path = '/users/{userId}/sessions' - path = path.replace('{userId}', user_id) - - return self.client.call('get', path, { - 'content-type': 'application/json', - }, params) - - def delete_sessions(self, user_id): - """Delete User Sessions""" - - params = {} - path = '/users/{userId}/sessions' - path = path.replace('{userId}', user_id) - - return self.client.call('delete', path, { - 'content-type': 'application/json', - }, params) - - def delete_session(self, user_id, session_id): - """Delete User Session""" - - params = {} - path = '/users/{userId}/sessions/{sessionId}' - path = path.replace('{userId}', user_id) - path = path.replace('{sessionId}', session_id) - - return self.client.call('delete', path, { - 'content-type': 'application/json', - }, params) - - def update_status(self, user_id, status): - """Update User Status""" - - params = {} - path = '/users/{userId}/status' - path = path.replace('{userId}', user_id) - params['status'] = status - - return self.client.call('patch', path, { - 'content-type': 'application/json', - }, params) diff --git a/app/sdks/0.6.2/server-python/docs/examples/avatars/get-browser.md b/app/sdks/0.6.2/server-python/docs/examples/avatars/get-browser.md deleted file mode 100644 index ec783ca34d..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/avatars/get-browser.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.avatars import Avatars - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -avatars = Avatars(client) - -result = avatars.get_browser('aa') diff --git a/app/sdks/0.6.2/server-python/docs/examples/avatars/get-credit-card.md b/app/sdks/0.6.2/server-python/docs/examples/avatars/get-credit-card.md deleted file mode 100644 index ce2d3f8135..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/avatars/get-credit-card.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.avatars import Avatars - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -avatars = Avatars(client) - -result = avatars.get_credit_card('amex') diff --git a/app/sdks/0.6.2/server-python/docs/examples/avatars/get-favicon.md b/app/sdks/0.6.2/server-python/docs/examples/avatars/get-favicon.md deleted file mode 100644 index 8de722c202..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/avatars/get-favicon.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.avatars import Avatars - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -avatars = Avatars(client) - -result = avatars.get_favicon('https://example.com') diff --git a/app/sdks/0.6.2/server-python/docs/examples/avatars/get-flag.md b/app/sdks/0.6.2/server-python/docs/examples/avatars/get-flag.md deleted file mode 100644 index 0bf5657d2e..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/avatars/get-flag.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.avatars import Avatars - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -avatars = Avatars(client) - -result = avatars.get_flag('af') diff --git a/app/sdks/0.6.2/server-python/docs/examples/avatars/get-image.md b/app/sdks/0.6.2/server-python/docs/examples/avatars/get-image.md deleted file mode 100644 index 3164a956c1..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/avatars/get-image.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.avatars import Avatars - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -avatars = Avatars(client) - -result = avatars.get_image('https://example.com') diff --git a/app/sdks/0.6.2/server-python/docs/examples/avatars/get-q-r.md b/app/sdks/0.6.2/server-python/docs/examples/avatars/get-q-r.md deleted file mode 100644 index b0c6508a8a..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/avatars/get-q-r.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.avatars import Avatars - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -avatars = Avatars(client) - -result = avatars.get_q_r('[TEXT]') diff --git a/app/sdks/0.6.2/server-python/docs/examples/database/create-collection.md b/app/sdks/0.6.2/server-python/docs/examples/database/create-collection.md deleted file mode 100644 index 8741c13744..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/database/create-collection.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.database import Database - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -database = Database(client) - -result = database.create_collection('[NAME]', [], [], []) diff --git a/app/sdks/0.6.2/server-python/docs/examples/database/create-document.md b/app/sdks/0.6.2/server-python/docs/examples/database/create-document.md deleted file mode 100644 index fff7a96bc0..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/database/create-document.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.database import Database - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -database = Database(client) - -result = database.create_document('[COLLECTION_ID]', {}, [], []) diff --git a/app/sdks/0.6.2/server-python/docs/examples/database/delete-collection.md b/app/sdks/0.6.2/server-python/docs/examples/database/delete-collection.md deleted file mode 100644 index c3a7af45f5..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/database/delete-collection.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.database import Database - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -database = Database(client) - -result = database.delete_collection('[COLLECTION_ID]') diff --git a/app/sdks/0.6.2/server-python/docs/examples/database/delete-document.md b/app/sdks/0.6.2/server-python/docs/examples/database/delete-document.md deleted file mode 100644 index 1adacaff4e..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/database/delete-document.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.database import Database - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -database = Database(client) - -result = database.delete_document('[COLLECTION_ID]', '[DOCUMENT_ID]') diff --git a/app/sdks/0.6.2/server-python/docs/examples/database/get-collection-logs.md b/app/sdks/0.6.2/server-python/docs/examples/database/get-collection-logs.md deleted file mode 100644 index 4abaa17f24..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/database/get-collection-logs.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.database import Database - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -database = Database(client) - -result = database.get_collection_logs('[COLLECTION_ID]') diff --git a/app/sdks/0.6.2/server-python/docs/examples/database/get-collection.md b/app/sdks/0.6.2/server-python/docs/examples/database/get-collection.md deleted file mode 100644 index 34269a7d4a..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/database/get-collection.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.database import Database - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -database = Database(client) - -result = database.get_collection('[COLLECTION_ID]') diff --git a/app/sdks/0.6.2/server-python/docs/examples/database/get-document.md b/app/sdks/0.6.2/server-python/docs/examples/database/get-document.md deleted file mode 100644 index 13d313c15f..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/database/get-document.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.database import Database - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -database = Database(client) - -result = database.get_document('[COLLECTION_ID]', '[DOCUMENT_ID]') diff --git a/app/sdks/0.6.2/server-python/docs/examples/database/list-collections.md b/app/sdks/0.6.2/server-python/docs/examples/database/list-collections.md deleted file mode 100644 index 840ae586fe..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/database/list-collections.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.database import Database - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -database = Database(client) - -result = database.list_collections() diff --git a/app/sdks/0.6.2/server-python/docs/examples/database/list-documents.md b/app/sdks/0.6.2/server-python/docs/examples/database/list-documents.md deleted file mode 100644 index 6969eef581..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/database/list-documents.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.database import Database - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -database = Database(client) - -result = database.list_documents('[COLLECTION_ID]') diff --git a/app/sdks/0.6.2/server-python/docs/examples/database/update-collection.md b/app/sdks/0.6.2/server-python/docs/examples/database/update-collection.md deleted file mode 100644 index 0bf8f29fb8..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/database/update-collection.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.database import Database - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -database = Database(client) - -result = database.update_collection('[COLLECTION_ID]', '[NAME]', [], []) diff --git a/app/sdks/0.6.2/server-python/docs/examples/database/update-document.md b/app/sdks/0.6.2/server-python/docs/examples/database/update-document.md deleted file mode 100644 index 40e11c0665..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/database/update-document.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.database import Database - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -database = Database(client) - -result = database.update_document('[COLLECTION_ID]', '[DOCUMENT_ID]', {}, [], []) diff --git a/app/sdks/0.6.2/server-python/docs/examples/functions/create-execution.md b/app/sdks/0.6.2/server-python/docs/examples/functions/create-execution.md deleted file mode 100644 index aa8e955751..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/functions/create-execution.md +++ /dev/null @@ -1,13 +0,0 @@ -from appwrite.client import Client -from appwrite.services.functions import Functions - -client = Client() - -(client - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -functions = Functions(client) - -result = functions.create_execution('[FUNCTION_ID]') diff --git a/app/sdks/0.6.2/server-python/docs/examples/functions/create-tag.md b/app/sdks/0.6.2/server-python/docs/examples/functions/create-tag.md deleted file mode 100644 index 533f3095c3..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/functions/create-tag.md +++ /dev/null @@ -1,13 +0,0 @@ -from appwrite.client import Client -from appwrite.services.functions import Functions - -client = Client() - -(client - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -functions = Functions(client) - -result = functions.create_tag('[FUNCTION_ID]', 'node-14', '[COMMAND]', '[CODE]') diff --git a/app/sdks/0.6.2/server-python/docs/examples/functions/create.md b/app/sdks/0.6.2/server-python/docs/examples/functions/create.md deleted file mode 100644 index 2b63ea7191..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/functions/create.md +++ /dev/null @@ -1,13 +0,0 @@ -from appwrite.client import Client -from appwrite.services.functions import Functions - -client = Client() - -(client - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -functions = Functions(client) - -result = functions.create('[NAME]') diff --git a/app/sdks/0.6.2/server-python/docs/examples/functions/delete-tag.md b/app/sdks/0.6.2/server-python/docs/examples/functions/delete-tag.md deleted file mode 100644 index 554817cf5e..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/functions/delete-tag.md +++ /dev/null @@ -1,13 +0,0 @@ -from appwrite.client import Client -from appwrite.services.functions import Functions - -client = Client() - -(client - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -functions = Functions(client) - -result = functions.delete_tag('[FUNCTION_ID]', '[TAG_ID]') diff --git a/app/sdks/0.6.2/server-python/docs/examples/functions/delete.md b/app/sdks/0.6.2/server-python/docs/examples/functions/delete.md deleted file mode 100644 index 9c1575c1e8..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/functions/delete.md +++ /dev/null @@ -1,13 +0,0 @@ -from appwrite.client import Client -from appwrite.services.functions import Functions - -client = Client() - -(client - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -functions = Functions(client) - -result = functions.delete('[FUNCTION_ID]') diff --git a/app/sdks/0.6.2/server-python/docs/examples/functions/get-execution.md b/app/sdks/0.6.2/server-python/docs/examples/functions/get-execution.md deleted file mode 100644 index b979241983..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/functions/get-execution.md +++ /dev/null @@ -1,13 +0,0 @@ -from appwrite.client import Client -from appwrite.services.functions import Functions - -client = Client() - -(client - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -functions = Functions(client) - -result = functions.get_execution('[FUNCTION_ID]', '[EXECUTION_ID]') diff --git a/app/sdks/0.6.2/server-python/docs/examples/functions/get-tag.md b/app/sdks/0.6.2/server-python/docs/examples/functions/get-tag.md deleted file mode 100644 index b5c3f23059..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/functions/get-tag.md +++ /dev/null @@ -1,13 +0,0 @@ -from appwrite.client import Client -from appwrite.services.functions import Functions - -client = Client() - -(client - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -functions = Functions(client) - -result = functions.get_tag('[FUNCTION_ID]', '[TAG_ID]') diff --git a/app/sdks/0.6.2/server-python/docs/examples/functions/get.md b/app/sdks/0.6.2/server-python/docs/examples/functions/get.md deleted file mode 100644 index 0e4036db4d..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/functions/get.md +++ /dev/null @@ -1,13 +0,0 @@ -from appwrite.client import Client -from appwrite.services.functions import Functions - -client = Client() - -(client - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -functions = Functions(client) - -result = functions.get('[FUNCTION_ID]') diff --git a/app/sdks/0.6.2/server-python/docs/examples/functions/list-executions.md b/app/sdks/0.6.2/server-python/docs/examples/functions/list-executions.md deleted file mode 100644 index 75f5260b46..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/functions/list-executions.md +++ /dev/null @@ -1,13 +0,0 @@ -from appwrite.client import Client -from appwrite.services.functions import Functions - -client = Client() - -(client - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -functions = Functions(client) - -result = functions.list_executions('[FUNCTION_ID]') diff --git a/app/sdks/0.6.2/server-python/docs/examples/functions/list-tags.md b/app/sdks/0.6.2/server-python/docs/examples/functions/list-tags.md deleted file mode 100644 index a992416640..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/functions/list-tags.md +++ /dev/null @@ -1,13 +0,0 @@ -from appwrite.client import Client -from appwrite.services.functions import Functions - -client = Client() - -(client - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -functions = Functions(client) - -result = functions.list_tags('[FUNCTION_ID]') diff --git a/app/sdks/0.6.2/server-python/docs/examples/functions/list.md b/app/sdks/0.6.2/server-python/docs/examples/functions/list.md deleted file mode 100644 index a2b1e7d3db..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/functions/list.md +++ /dev/null @@ -1,13 +0,0 @@ -from appwrite.client import Client -from appwrite.services.functions import Functions - -client = Client() - -(client - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -functions = Functions(client) - -result = functions.list() diff --git a/app/sdks/0.6.2/server-python/docs/examples/functions/update-active.md b/app/sdks/0.6.2/server-python/docs/examples/functions/update-active.md deleted file mode 100644 index 72f8314055..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/functions/update-active.md +++ /dev/null @@ -1,13 +0,0 @@ -from appwrite.client import Client -from appwrite.services.functions import Functions - -client = Client() - -(client - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -functions = Functions(client) - -result = functions.update_active('[FUNCTION_ID]', '[ACTIVE]') diff --git a/app/sdks/0.6.2/server-python/docs/examples/functions/update-tag.md b/app/sdks/0.6.2/server-python/docs/examples/functions/update-tag.md deleted file mode 100644 index 4ab93d1b6a..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/functions/update-tag.md +++ /dev/null @@ -1,13 +0,0 @@ -from appwrite.client import Client -from appwrite.services.functions import Functions - -client = Client() - -(client - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -functions = Functions(client) - -result = functions.update_tag('[FUNCTION_ID]', '[TAG]') diff --git a/app/sdks/0.6.2/server-python/docs/examples/functions/update.md b/app/sdks/0.6.2/server-python/docs/examples/functions/update.md deleted file mode 100644 index 751a5d2538..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/functions/update.md +++ /dev/null @@ -1,13 +0,0 @@ -from appwrite.client import Client -from appwrite.services.functions import Functions - -client = Client() - -(client - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -functions = Functions(client) - -result = functions.update('[FUNCTION_ID]', '[NAME]') diff --git a/app/sdks/0.6.2/server-python/docs/examples/health/get-anti-virus.md b/app/sdks/0.6.2/server-python/docs/examples/health/get-anti-virus.md deleted file mode 100644 index 0c90f20750..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/health/get-anti-virus.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.health import Health - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -health = Health(client) - -result = health.get_anti_virus() diff --git a/app/sdks/0.6.2/server-python/docs/examples/health/get-cache.md b/app/sdks/0.6.2/server-python/docs/examples/health/get-cache.md deleted file mode 100644 index e06416fdf0..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/health/get-cache.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.health import Health - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -health = Health(client) - -result = health.get_cache() diff --git a/app/sdks/0.6.2/server-python/docs/examples/health/get-d-b.md b/app/sdks/0.6.2/server-python/docs/examples/health/get-d-b.md deleted file mode 100644 index 34d9446080..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/health/get-d-b.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.health import Health - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -health = Health(client) - -result = health.get_d_b() diff --git a/app/sdks/0.6.2/server-python/docs/examples/health/get-queue-certificates.md b/app/sdks/0.6.2/server-python/docs/examples/health/get-queue-certificates.md deleted file mode 100644 index 74f61975fc..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/health/get-queue-certificates.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.health import Health - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -health = Health(client) - -result = health.get_queue_certificates() diff --git a/app/sdks/0.6.2/server-python/docs/examples/health/get-queue-functions.md b/app/sdks/0.6.2/server-python/docs/examples/health/get-queue-functions.md deleted file mode 100644 index 6704514eb7..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/health/get-queue-functions.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.health import Health - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -health = Health(client) - -result = health.get_queue_functions() diff --git a/app/sdks/0.6.2/server-python/docs/examples/health/get-queue-logs.md b/app/sdks/0.6.2/server-python/docs/examples/health/get-queue-logs.md deleted file mode 100644 index 79d169f51f..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/health/get-queue-logs.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.health import Health - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -health = Health(client) - -result = health.get_queue_logs() diff --git a/app/sdks/0.6.2/server-python/docs/examples/health/get-queue-tasks.md b/app/sdks/0.6.2/server-python/docs/examples/health/get-queue-tasks.md deleted file mode 100644 index aba8cca053..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/health/get-queue-tasks.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.health import Health - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -health = Health(client) - -result = health.get_queue_tasks() diff --git a/app/sdks/0.6.2/server-python/docs/examples/health/get-queue-usage.md b/app/sdks/0.6.2/server-python/docs/examples/health/get-queue-usage.md deleted file mode 100644 index cb3cc5ae6f..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/health/get-queue-usage.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.health import Health - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -health = Health(client) - -result = health.get_queue_usage() diff --git a/app/sdks/0.6.2/server-python/docs/examples/health/get-queue-webhooks.md b/app/sdks/0.6.2/server-python/docs/examples/health/get-queue-webhooks.md deleted file mode 100644 index a4c9d96d66..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/health/get-queue-webhooks.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.health import Health - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -health = Health(client) - -result = health.get_queue_webhooks() diff --git a/app/sdks/0.6.2/server-python/docs/examples/health/get-storage-anti-virus.md b/app/sdks/0.6.2/server-python/docs/examples/health/get-storage-anti-virus.md deleted file mode 100644 index 5ce63ac816..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/health/get-storage-anti-virus.md +++ /dev/null @@ -1,13 +0,0 @@ -from appwrite.client import Client -from appwrite.services.health import Health - -client = Client() - -(client - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -health = Health(client) - -result = health.get_storage_anti_virus() diff --git a/app/sdks/0.6.2/server-python/docs/examples/health/get-storage-local.md b/app/sdks/0.6.2/server-python/docs/examples/health/get-storage-local.md deleted file mode 100644 index a97ed125ad..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/health/get-storage-local.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.health import Health - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -health = Health(client) - -result = health.get_storage_local() diff --git a/app/sdks/0.6.2/server-python/docs/examples/health/get-time.md b/app/sdks/0.6.2/server-python/docs/examples/health/get-time.md deleted file mode 100644 index ecc66250cc..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/health/get-time.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.health import Health - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -health = Health(client) - -result = health.get_time() diff --git a/app/sdks/0.6.2/server-python/docs/examples/health/get.md b/app/sdks/0.6.2/server-python/docs/examples/health/get.md deleted file mode 100644 index 77352aafab..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/health/get.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.health import Health - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -health = Health(client) - -result = health.get() diff --git a/app/sdks/0.6.2/server-python/docs/examples/locale/get-continents.md b/app/sdks/0.6.2/server-python/docs/examples/locale/get-continents.md deleted file mode 100644 index bf4c255434..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/locale/get-continents.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.locale import Locale - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -locale = Locale(client) - -result = locale.get_continents() diff --git a/app/sdks/0.6.2/server-python/docs/examples/locale/get-countries-e-u.md b/app/sdks/0.6.2/server-python/docs/examples/locale/get-countries-e-u.md deleted file mode 100644 index 78d69ff2dc..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/locale/get-countries-e-u.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.locale import Locale - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -locale = Locale(client) - -result = locale.get_countries_e_u() diff --git a/app/sdks/0.6.2/server-python/docs/examples/locale/get-countries-phones.md b/app/sdks/0.6.2/server-python/docs/examples/locale/get-countries-phones.md deleted file mode 100644 index fb349b1442..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/locale/get-countries-phones.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.locale import Locale - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -locale = Locale(client) - -result = locale.get_countries_phones() diff --git a/app/sdks/0.6.2/server-python/docs/examples/locale/get-countries.md b/app/sdks/0.6.2/server-python/docs/examples/locale/get-countries.md deleted file mode 100644 index ceb731073d..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/locale/get-countries.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.locale import Locale - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -locale = Locale(client) - -result = locale.get_countries() diff --git a/app/sdks/0.6.2/server-python/docs/examples/locale/get-currencies.md b/app/sdks/0.6.2/server-python/docs/examples/locale/get-currencies.md deleted file mode 100644 index dacb886e20..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/locale/get-currencies.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.locale import Locale - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -locale = Locale(client) - -result = locale.get_currencies() diff --git a/app/sdks/0.6.2/server-python/docs/examples/locale/get.md b/app/sdks/0.6.2/server-python/docs/examples/locale/get.md deleted file mode 100644 index 43cd2107de..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/locale/get.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.locale import Locale - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -locale = Locale(client) - -result = locale.get() diff --git a/app/sdks/0.6.2/server-python/docs/examples/storage/create-file.md b/app/sdks/0.6.2/server-python/docs/examples/storage/create-file.md deleted file mode 100644 index fd76dd068b..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/storage/create-file.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.storage import Storage - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -storage = Storage(client) - -result = storage.create_file(open('/path/to/file.png', 'rb'), [], []) diff --git a/app/sdks/0.6.2/server-python/docs/examples/storage/delete-file.md b/app/sdks/0.6.2/server-python/docs/examples/storage/delete-file.md deleted file mode 100644 index 155e5a41d4..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/storage/delete-file.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.storage import Storage - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -storage = Storage(client) - -result = storage.delete_file('[FILE_ID]') diff --git a/app/sdks/0.6.2/server-python/docs/examples/storage/get-file-download.md b/app/sdks/0.6.2/server-python/docs/examples/storage/get-file-download.md deleted file mode 100644 index 975a0f302d..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/storage/get-file-download.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.storage import Storage - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -storage = Storage(client) - -result = storage.get_file_download('[FILE_ID]') diff --git a/app/sdks/0.6.2/server-python/docs/examples/storage/get-file-preview.md b/app/sdks/0.6.2/server-python/docs/examples/storage/get-file-preview.md deleted file mode 100644 index ad9abe444f..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/storage/get-file-preview.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.storage import Storage - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -storage = Storage(client) - -result = storage.get_file_preview('[FILE_ID]') diff --git a/app/sdks/0.6.2/server-python/docs/examples/storage/get-file-view.md b/app/sdks/0.6.2/server-python/docs/examples/storage/get-file-view.md deleted file mode 100644 index 892b93ca97..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/storage/get-file-view.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.storage import Storage - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -storage = Storage(client) - -result = storage.get_file_view('[FILE_ID]') diff --git a/app/sdks/0.6.2/server-python/docs/examples/storage/get-file.md b/app/sdks/0.6.2/server-python/docs/examples/storage/get-file.md deleted file mode 100644 index cded2ba12f..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/storage/get-file.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.storage import Storage - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -storage = Storage(client) - -result = storage.get_file('[FILE_ID]') diff --git a/app/sdks/0.6.2/server-python/docs/examples/storage/list-files.md b/app/sdks/0.6.2/server-python/docs/examples/storage/list-files.md deleted file mode 100644 index d54bb75d79..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/storage/list-files.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.storage import Storage - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -storage = Storage(client) - -result = storage.list_files() diff --git a/app/sdks/0.6.2/server-python/docs/examples/storage/update-file.md b/app/sdks/0.6.2/server-python/docs/examples/storage/update-file.md deleted file mode 100644 index 5001cbae74..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/storage/update-file.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.storage import Storage - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -storage = Storage(client) - -result = storage.update_file('[FILE_ID]', [], []) diff --git a/app/sdks/0.6.2/server-python/docs/examples/teams/create-membership.md b/app/sdks/0.6.2/server-python/docs/examples/teams/create-membership.md deleted file mode 100644 index e72ddc6fe3..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/teams/create-membership.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.teams import Teams - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -teams = Teams(client) - -result = teams.create_membership('[TEAM_ID]', 'email@example.com', [], 'https://example.com') diff --git a/app/sdks/0.6.2/server-python/docs/examples/teams/create.md b/app/sdks/0.6.2/server-python/docs/examples/teams/create.md deleted file mode 100644 index d4d1ba63c8..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/teams/create.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.teams import Teams - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -teams = Teams(client) - -result = teams.create('[NAME]') diff --git a/app/sdks/0.6.2/server-python/docs/examples/teams/delete-membership.md b/app/sdks/0.6.2/server-python/docs/examples/teams/delete-membership.md deleted file mode 100644 index e08e44fdcc..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/teams/delete-membership.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.teams import Teams - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -teams = Teams(client) - -result = teams.delete_membership('[TEAM_ID]', '[INVITE_ID]') diff --git a/app/sdks/0.6.2/server-python/docs/examples/teams/delete.md b/app/sdks/0.6.2/server-python/docs/examples/teams/delete.md deleted file mode 100644 index 87d953ff5f..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/teams/delete.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.teams import Teams - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -teams = Teams(client) - -result = teams.delete('[TEAM_ID]') diff --git a/app/sdks/0.6.2/server-python/docs/examples/teams/get-memberships.md b/app/sdks/0.6.2/server-python/docs/examples/teams/get-memberships.md deleted file mode 100644 index 01879bb280..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/teams/get-memberships.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.teams import Teams - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -teams = Teams(client) - -result = teams.get_memberships('[TEAM_ID]') diff --git a/app/sdks/0.6.2/server-python/docs/examples/teams/get.md b/app/sdks/0.6.2/server-python/docs/examples/teams/get.md deleted file mode 100644 index c1f90c8fe1..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/teams/get.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.teams import Teams - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -teams = Teams(client) - -result = teams.get('[TEAM_ID]') diff --git a/app/sdks/0.6.2/server-python/docs/examples/teams/list.md b/app/sdks/0.6.2/server-python/docs/examples/teams/list.md deleted file mode 100644 index a3d831ff4f..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/teams/list.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.teams import Teams - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -teams = Teams(client) - -result = teams.list() diff --git a/app/sdks/0.6.2/server-python/docs/examples/teams/update.md b/app/sdks/0.6.2/server-python/docs/examples/teams/update.md deleted file mode 100644 index 63f6acdc9b..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/teams/update.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.teams import Teams - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -teams = Teams(client) - -result = teams.update('[TEAM_ID]', '[NAME]') diff --git a/app/sdks/0.6.2/server-python/docs/examples/users/create.md b/app/sdks/0.6.2/server-python/docs/examples/users/create.md deleted file mode 100644 index 4c63f3771d..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/users/create.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.users import Users - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -users = Users(client) - -result = users.create('email@example.com', 'password') diff --git a/app/sdks/0.6.2/server-python/docs/examples/users/delete-session.md b/app/sdks/0.6.2/server-python/docs/examples/users/delete-session.md deleted file mode 100644 index ca2fa99b56..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/users/delete-session.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.users import Users - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -users = Users(client) - -result = users.delete_session('[USER_ID]', '[SESSION_ID]') diff --git a/app/sdks/0.6.2/server-python/docs/examples/users/delete-sessions.md b/app/sdks/0.6.2/server-python/docs/examples/users/delete-sessions.md deleted file mode 100644 index fe4b2be3a8..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/users/delete-sessions.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.users import Users - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -users = Users(client) - -result = users.delete_sessions('[USER_ID]') diff --git a/app/sdks/0.6.2/server-python/docs/examples/users/get-logs.md b/app/sdks/0.6.2/server-python/docs/examples/users/get-logs.md deleted file mode 100644 index 22816871d2..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/users/get-logs.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.users import Users - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -users = Users(client) - -result = users.get_logs('[USER_ID]') diff --git a/app/sdks/0.6.2/server-python/docs/examples/users/get-prefs.md b/app/sdks/0.6.2/server-python/docs/examples/users/get-prefs.md deleted file mode 100644 index 846c7c13f5..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/users/get-prefs.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.users import Users - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -users = Users(client) - -result = users.get_prefs('[USER_ID]') diff --git a/app/sdks/0.6.2/server-python/docs/examples/users/get-sessions.md b/app/sdks/0.6.2/server-python/docs/examples/users/get-sessions.md deleted file mode 100644 index 0e29608697..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/users/get-sessions.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.users import Users - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -users = Users(client) - -result = users.get_sessions('[USER_ID]') diff --git a/app/sdks/0.6.2/server-python/docs/examples/users/get.md b/app/sdks/0.6.2/server-python/docs/examples/users/get.md deleted file mode 100644 index bc23f2238c..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/users/get.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.users import Users - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -users = Users(client) - -result = users.get('[USER_ID]') diff --git a/app/sdks/0.6.2/server-python/docs/examples/users/list.md b/app/sdks/0.6.2/server-python/docs/examples/users/list.md deleted file mode 100644 index b7492fa9bf..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/users/list.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.users import Users - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -users = Users(client) - -result = users.list() diff --git a/app/sdks/0.6.2/server-python/docs/examples/users/update-prefs.md b/app/sdks/0.6.2/server-python/docs/examples/users/update-prefs.md deleted file mode 100644 index c78546f484..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/users/update-prefs.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.users import Users - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -users = Users(client) - -result = users.update_prefs('[USER_ID]', {}) diff --git a/app/sdks/0.6.2/server-python/docs/examples/users/update-status.md b/app/sdks/0.6.2/server-python/docs/examples/users/update-status.md deleted file mode 100644 index f40c83b61e..0000000000 --- a/app/sdks/0.6.2/server-python/docs/examples/users/update-status.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.users import Users - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -users = Users(client) - -result = users.update_status('[USER_ID]', '1') diff --git a/app/sdks/0.6.2/server-python/requirements.txt b/app/sdks/0.6.2/server-python/requirements.txt deleted file mode 100644 index e20605c43d..0000000000 --- a/app/sdks/0.6.2/server-python/requirements.txt +++ /dev/null @@ -1 +0,0 @@ -requests==2.22.0 \ No newline at end of file diff --git a/app/sdks/0.6.2/server-python/setup.cfg b/app/sdks/0.6.2/server-python/setup.cfg deleted file mode 100644 index 224a77957f..0000000000 --- a/app/sdks/0.6.2/server-python/setup.cfg +++ /dev/null @@ -1,2 +0,0 @@ -[metadata] -description-file = README.md \ No newline at end of file diff --git a/app/sdks/0.6.2/server-python/setup.py b/app/sdks/0.6.2/server-python/setup.py deleted file mode 100644 index 8e2fd0c3cb..0000000000 --- a/app/sdks/0.6.2/server-python/setup.py +++ /dev/null @@ -1,30 +0,0 @@ -import setuptools - -setuptools.setup( - name = 'appwrite', - packages = ['appwrite', 'appwrite/services'], - version = '0.0.6', - license='BSD-3-Clause', - description = 'Appwrite is an open-source self-hosted backend server that abstract and simplify complex and repetitive development tasks behind a very simple REST API', - author = 'Appwrite Team', - author_email = 'team@localhost.test', - maintainer = 'Appwrite Team', - maintainer_email = 'team@localhost.test', - url = 'https://appwrite.io/support', - download_url='https://github.com/appwrite/sdk-for-python/archive/0.0.6.tar.gz', - # keywords = ['SOME', 'MEANINGFULL', 'KEYWORDS'], - install_requires=[ - 'requests', - ], - classifiers=[ - 'Development Status :: 5 - Production/Stable', - 'Intended Audience :: Developers', - 'Environment :: Web Environment', - 'Topic :: Software Development', - 'License :: OSI Approved :: BSD License', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.5', - 'Programming Language :: Python :: 3.6', - 'Programming Language :: Python :: 3.7', - ], -) diff --git a/app/sdks/0.6.2/server-ruby/CHANGELOG.md b/app/sdks/0.6.2/server-ruby/CHANGELOG.md deleted file mode 100644 index fa4d35e687..0000000000 --- a/app/sdks/0.6.2/server-ruby/CHANGELOG.md +++ /dev/null @@ -1 +0,0 @@ -# Change Log \ No newline at end of file diff --git a/app/sdks/0.6.2/server-ruby/Gemfile b/app/sdks/0.6.2/server-ruby/Gemfile deleted file mode 100644 index cd8aa9e04c..0000000000 --- a/app/sdks/0.6.2/server-ruby/Gemfile +++ /dev/null @@ -1,3 +0,0 @@ -source 'https://rubygems.org' - -gemspec \ No newline at end of file diff --git a/app/sdks/0.6.2/server-ruby/LICENSE b/app/sdks/0.6.2/server-ruby/LICENSE deleted file mode 100644 index fc7c051a91..0000000000 --- a/app/sdks/0.6.2/server-ruby/LICENSE +++ /dev/null @@ -1,12 +0,0 @@ -Copyright (c) 2019 Appwrite (https://appwrite.io) and individual contributors. -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - - 3. Neither the name Appwrite nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/app/sdks/0.6.2/server-ruby/README.md b/app/sdks/0.6.2/server-ruby/README.md deleted file mode 100644 index cbc2cf781c..0000000000 --- a/app/sdks/0.6.2/server-ruby/README.md +++ /dev/null @@ -1,30 +0,0 @@ -# Appwrite Ruby SDK - -![License](https://img.shields.io/github/license/appwrite/sdk-for-ruby.svg?v=1) -![Version](https://img.shields.io/badge/api%20version-0.6.1-blue.svg?v=1) - -**This SDK is compatible with Appwrite server version 0.6.1. For older versions, please check previous releases.** - -Appwrite is an open-source backend as a service server that abstract and simplify complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way. - Use the Ruby SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools. - For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs) - - - -![Appwrite](https://appwrite.io/images/github.png) - -## Installation - -To install via [Gem](https://rubygems.org/): - -```bash -gem install appwrite --save -``` - -## Contribution - -This library is auto-generated by Appwrite custom [SDK Generator](https://github.com/appwrite/sdk-generator). To learn more about how you can help us improve this SDK, please check the [contribution guide](https://github.com/appwrite/sdk-generator/blob/master/CONTRIBUTING.md) before sending a pull-request. - -## License - -Please see the [BSD-3-Clause license](https://raw.githubusercontent.com/appwrite/appwrite/master/LICENSE) file for more information. \ No newline at end of file diff --git a/app/sdks/0.6.2/server-ruby/appwrite.gemspec b/app/sdks/0.6.2/server-ruby/appwrite.gemspec deleted file mode 100644 index f550cecf9f..0000000000 --- a/app/sdks/0.6.2/server-ruby/appwrite.gemspec +++ /dev/null @@ -1,13 +0,0 @@ -Gem::Specification.new do |s| - - s.name = 'appwrite' - s.version = '1.0.11' - s.summary = "Appwrite is an open-source backend as a service server that abstract and simplify complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way. - Use the Ruby SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools. - For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs)" - s.author = 'Appwrite Team' - s.homepage = 'https://appwrite.io/support' - s.email = 'team@localhost.test' - s.files = `git ls-files`.split($INPUT_RECORD_SEPARATOR) - -end \ No newline at end of file diff --git a/app/sdks/0.6.2/server-ruby/docs/examples/avatars/get-browser.md b/app/sdks/0.6.2/server-ruby/docs/examples/avatars/get-browser.md deleted file mode 100644 index fc0cfc913f..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/avatars/get-browser.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -avatars = Appwrite::Avatars.new(client); - -response = avatars.get_browser(code: 'aa'); - -puts response \ No newline at end of file diff --git a/app/sdks/0.6.2/server-ruby/docs/examples/avatars/get-credit-card.md b/app/sdks/0.6.2/server-ruby/docs/examples/avatars/get-credit-card.md deleted file mode 100644 index b3763f0846..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/avatars/get-credit-card.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -avatars = Appwrite::Avatars.new(client); - -response = avatars.get_credit_card(code: 'amex'); - -puts response \ No newline at end of file diff --git a/app/sdks/0.6.2/server-ruby/docs/examples/avatars/get-favicon.md b/app/sdks/0.6.2/server-ruby/docs/examples/avatars/get-favicon.md deleted file mode 100644 index 2ee4e75789..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/avatars/get-favicon.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -avatars = Appwrite::Avatars.new(client); - -response = avatars.get_favicon(url: 'https://example.com'); - -puts response \ No newline at end of file diff --git a/app/sdks/0.6.2/server-ruby/docs/examples/avatars/get-flag.md b/app/sdks/0.6.2/server-ruby/docs/examples/avatars/get-flag.md deleted file mode 100644 index 2e2f01f0f9..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/avatars/get-flag.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -avatars = Appwrite::Avatars.new(client); - -response = avatars.get_flag(code: 'af'); - -puts response \ No newline at end of file diff --git a/app/sdks/0.6.2/server-ruby/docs/examples/avatars/get-image.md b/app/sdks/0.6.2/server-ruby/docs/examples/avatars/get-image.md deleted file mode 100644 index 682d6bf9df..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/avatars/get-image.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -avatars = Appwrite::Avatars.new(client); - -response = avatars.get_image(url: 'https://example.com'); - -puts response \ No newline at end of file diff --git a/app/sdks/0.6.2/server-ruby/docs/examples/avatars/get-q-r.md b/app/sdks/0.6.2/server-ruby/docs/examples/avatars/get-q-r.md deleted file mode 100644 index f145425ca2..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/avatars/get-q-r.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -avatars = Appwrite::Avatars.new(client); - -response = avatars.get_q_r(text: '[TEXT]'); - -puts response \ No newline at end of file diff --git a/app/sdks/0.6.2/server-ruby/docs/examples/database/create-collection.md b/app/sdks/0.6.2/server-ruby/docs/examples/database/create-collection.md deleted file mode 100644 index 0317ed9f05..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/database/create-collection.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -database = Appwrite::Database.new(client); - -response = database.create_collection(name: '[NAME]', read: [], write: [], rules: []); - -puts response \ No newline at end of file diff --git a/app/sdks/0.6.2/server-ruby/docs/examples/database/create-document.md b/app/sdks/0.6.2/server-ruby/docs/examples/database/create-document.md deleted file mode 100644 index 0101c746b4..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/database/create-document.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -database = Appwrite::Database.new(client); - -response = database.create_document(collection_id: '[COLLECTION_ID]', data: {}, read: [], write: []); - -puts response \ No newline at end of file diff --git a/app/sdks/0.6.2/server-ruby/docs/examples/database/delete-collection.md b/app/sdks/0.6.2/server-ruby/docs/examples/database/delete-collection.md deleted file mode 100644 index b91c369da7..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/database/delete-collection.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -database = Appwrite::Database.new(client); - -response = database.delete_collection(collection_id: '[COLLECTION_ID]'); - -puts response \ No newline at end of file diff --git a/app/sdks/0.6.2/server-ruby/docs/examples/database/delete-document.md b/app/sdks/0.6.2/server-ruby/docs/examples/database/delete-document.md deleted file mode 100644 index 6548ec2946..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/database/delete-document.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -database = Appwrite::Database.new(client); - -response = database.delete_document(collection_id: '[COLLECTION_ID]', document_id: '[DOCUMENT_ID]'); - -puts response \ No newline at end of file diff --git a/app/sdks/0.6.2/server-ruby/docs/examples/database/get-collection-logs.md b/app/sdks/0.6.2/server-ruby/docs/examples/database/get-collection-logs.md deleted file mode 100644 index 65938d1af9..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/database/get-collection-logs.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -database = Appwrite::Database.new(client); - -response = database.get_collection_logs(collection_id: '[COLLECTION_ID]'); - -puts response \ No newline at end of file diff --git a/app/sdks/0.6.2/server-ruby/docs/examples/database/get-collection.md b/app/sdks/0.6.2/server-ruby/docs/examples/database/get-collection.md deleted file mode 100644 index 1e54e94c10..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/database/get-collection.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -database = Appwrite::Database.new(client); - -response = database.get_collection(collection_id: '[COLLECTION_ID]'); - -puts response \ No newline at end of file diff --git a/app/sdks/0.6.2/server-ruby/docs/examples/database/get-document.md b/app/sdks/0.6.2/server-ruby/docs/examples/database/get-document.md deleted file mode 100644 index 3040b82c03..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/database/get-document.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -database = Appwrite::Database.new(client); - -response = database.get_document(collection_id: '[COLLECTION_ID]', document_id: '[DOCUMENT_ID]'); - -puts response \ No newline at end of file diff --git a/app/sdks/0.6.2/server-ruby/docs/examples/database/list-collections.md b/app/sdks/0.6.2/server-ruby/docs/examples/database/list-collections.md deleted file mode 100644 index ec15fe3b08..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/database/list-collections.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -database = Appwrite::Database.new(client); - -response = database.list_collections(); - -puts response \ No newline at end of file diff --git a/app/sdks/0.6.2/server-ruby/docs/examples/database/list-documents.md b/app/sdks/0.6.2/server-ruby/docs/examples/database/list-documents.md deleted file mode 100644 index fa33f10ccf..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/database/list-documents.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -database = Appwrite::Database.new(client); - -response = database.list_documents(collection_id: '[COLLECTION_ID]'); - -puts response \ No newline at end of file diff --git a/app/sdks/0.6.2/server-ruby/docs/examples/database/update-collection.md b/app/sdks/0.6.2/server-ruby/docs/examples/database/update-collection.md deleted file mode 100644 index 3ecfbdb4ab..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/database/update-collection.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -database = Appwrite::Database.new(client); - -response = database.update_collection(collection_id: '[COLLECTION_ID]', name: '[NAME]', read: [], write: []); - -puts response \ No newline at end of file diff --git a/app/sdks/0.6.2/server-ruby/docs/examples/database/update-document.md b/app/sdks/0.6.2/server-ruby/docs/examples/database/update-document.md deleted file mode 100644 index 492d4f3edc..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/database/update-document.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -database = Appwrite::Database.new(client); - -response = database.update_document(collection_id: '[COLLECTION_ID]', document_id: '[DOCUMENT_ID]', data: {}, read: [], write: []); - -puts response \ No newline at end of file diff --git a/app/sdks/0.6.2/server-ruby/docs/examples/health/get-anti-virus.md b/app/sdks/0.6.2/server-ruby/docs/examples/health/get-anti-virus.md deleted file mode 100644 index 0c83a06cf8..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/health/get-anti-virus.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -health = Appwrite::Health.new(client); - -response = health.get_anti_virus(); - -puts response \ No newline at end of file diff --git a/app/sdks/0.6.2/server-ruby/docs/examples/health/get-cache.md b/app/sdks/0.6.2/server-ruby/docs/examples/health/get-cache.md deleted file mode 100644 index 6f51fb6e00..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/health/get-cache.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -health = Appwrite::Health.new(client); - -response = health.get_cache(); - -puts response \ No newline at end of file diff --git a/app/sdks/0.6.2/server-ruby/docs/examples/health/get-d-b.md b/app/sdks/0.6.2/server-ruby/docs/examples/health/get-d-b.md deleted file mode 100644 index 4bb00577a7..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/health/get-d-b.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -health = Appwrite::Health.new(client); - -response = health.get_d_b(); - -puts response \ No newline at end of file diff --git a/app/sdks/0.6.2/server-ruby/docs/examples/health/get-queue-certificates.md b/app/sdks/0.6.2/server-ruby/docs/examples/health/get-queue-certificates.md deleted file mode 100644 index f758b7c3a4..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/health/get-queue-certificates.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -health = Appwrite::Health.new(client); - -response = health.get_queue_certificates(); - -puts response \ No newline at end of file diff --git a/app/sdks/0.6.2/server-ruby/docs/examples/health/get-queue-functions.md b/app/sdks/0.6.2/server-ruby/docs/examples/health/get-queue-functions.md deleted file mode 100644 index 653607f79d..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/health/get-queue-functions.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -health = Appwrite::Health.new(client); - -response = health.get_queue_functions(); - -puts response \ No newline at end of file diff --git a/app/sdks/0.6.2/server-ruby/docs/examples/health/get-queue-logs.md b/app/sdks/0.6.2/server-ruby/docs/examples/health/get-queue-logs.md deleted file mode 100644 index c6751f7f91..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/health/get-queue-logs.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -health = Appwrite::Health.new(client); - -response = health.get_queue_logs(); - -puts response \ No newline at end of file diff --git a/app/sdks/0.6.2/server-ruby/docs/examples/health/get-queue-tasks.md b/app/sdks/0.6.2/server-ruby/docs/examples/health/get-queue-tasks.md deleted file mode 100644 index c6da38832e..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/health/get-queue-tasks.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -health = Appwrite::Health.new(client); - -response = health.get_queue_tasks(); - -puts response \ No newline at end of file diff --git a/app/sdks/0.6.2/server-ruby/docs/examples/health/get-queue-usage.md b/app/sdks/0.6.2/server-ruby/docs/examples/health/get-queue-usage.md deleted file mode 100644 index ed81452d86..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/health/get-queue-usage.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -health = Appwrite::Health.new(client); - -response = health.get_queue_usage(); - -puts response \ No newline at end of file diff --git a/app/sdks/0.6.2/server-ruby/docs/examples/health/get-queue-webhooks.md b/app/sdks/0.6.2/server-ruby/docs/examples/health/get-queue-webhooks.md deleted file mode 100644 index 9e55ab1d87..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/health/get-queue-webhooks.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -health = Appwrite::Health.new(client); - -response = health.get_queue_webhooks(); - -puts response \ No newline at end of file diff --git a/app/sdks/0.6.2/server-ruby/docs/examples/health/get-storage-local.md b/app/sdks/0.6.2/server-ruby/docs/examples/health/get-storage-local.md deleted file mode 100644 index 09c47ae437..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/health/get-storage-local.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -health = Appwrite::Health.new(client); - -response = health.get_storage_local(); - -puts response \ No newline at end of file diff --git a/app/sdks/0.6.2/server-ruby/docs/examples/health/get-time.md b/app/sdks/0.6.2/server-ruby/docs/examples/health/get-time.md deleted file mode 100644 index 3d72794e93..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/health/get-time.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -health = Appwrite::Health.new(client); - -response = health.get_time(); - -puts response \ No newline at end of file diff --git a/app/sdks/0.6.2/server-ruby/docs/examples/health/get.md b/app/sdks/0.6.2/server-ruby/docs/examples/health/get.md deleted file mode 100644 index 9496c31b36..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/health/get.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -health = Appwrite::Health.new(client); - -response = health.get(); - -puts response \ No newline at end of file diff --git a/app/sdks/0.6.2/server-ruby/docs/examples/locale/get-continents.md b/app/sdks/0.6.2/server-ruby/docs/examples/locale/get-continents.md deleted file mode 100644 index 92f38922e1..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/locale/get-continents.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -locale = Appwrite::Locale.new(client); - -response = locale.get_continents(); - -puts response \ No newline at end of file diff --git a/app/sdks/0.6.2/server-ruby/docs/examples/locale/get-countries-e-u.md b/app/sdks/0.6.2/server-ruby/docs/examples/locale/get-countries-e-u.md deleted file mode 100644 index b83125d4a6..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/locale/get-countries-e-u.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -locale = Appwrite::Locale.new(client); - -response = locale.get_countries_e_u(); - -puts response \ No newline at end of file diff --git a/app/sdks/0.6.2/server-ruby/docs/examples/locale/get-countries-phones.md b/app/sdks/0.6.2/server-ruby/docs/examples/locale/get-countries-phones.md deleted file mode 100644 index 728a1b3cdc..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/locale/get-countries-phones.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -locale = Appwrite::Locale.new(client); - -response = locale.get_countries_phones(); - -puts response \ No newline at end of file diff --git a/app/sdks/0.6.2/server-ruby/docs/examples/locale/get-countries.md b/app/sdks/0.6.2/server-ruby/docs/examples/locale/get-countries.md deleted file mode 100644 index 54975db928..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/locale/get-countries.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -locale = Appwrite::Locale.new(client); - -response = locale.get_countries(); - -puts response \ No newline at end of file diff --git a/app/sdks/0.6.2/server-ruby/docs/examples/locale/get-currencies.md b/app/sdks/0.6.2/server-ruby/docs/examples/locale/get-currencies.md deleted file mode 100644 index 4e39b435e1..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/locale/get-currencies.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -locale = Appwrite::Locale.new(client); - -response = locale.get_currencies(); - -puts response \ No newline at end of file diff --git a/app/sdks/0.6.2/server-ruby/docs/examples/locale/get.md b/app/sdks/0.6.2/server-ruby/docs/examples/locale/get.md deleted file mode 100644 index b390d505c4..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/locale/get.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -locale = Appwrite::Locale.new(client); - -response = locale.get(); - -puts response \ No newline at end of file diff --git a/app/sdks/0.6.2/server-ruby/docs/examples/storage/create-file.md b/app/sdks/0.6.2/server-ruby/docs/examples/storage/create-file.md deleted file mode 100644 index b044e35b86..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/storage/create-file.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -storage = Appwrite::Storage.new(client); - -response = storage.create_file(file: File.new(), read: [], write: []); - -puts response \ No newline at end of file diff --git a/app/sdks/0.6.2/server-ruby/docs/examples/storage/delete-file.md b/app/sdks/0.6.2/server-ruby/docs/examples/storage/delete-file.md deleted file mode 100644 index 1aa67b3537..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/storage/delete-file.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -storage = Appwrite::Storage.new(client); - -response = storage.delete_file(file_id: '[FILE_ID]'); - -puts response \ No newline at end of file diff --git a/app/sdks/0.6.2/server-ruby/docs/examples/storage/get-file-download.md b/app/sdks/0.6.2/server-ruby/docs/examples/storage/get-file-download.md deleted file mode 100644 index 777c565d06..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/storage/get-file-download.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -storage = Appwrite::Storage.new(client); - -response = storage.get_file_download(file_id: '[FILE_ID]'); - -puts response \ No newline at end of file diff --git a/app/sdks/0.6.2/server-ruby/docs/examples/storage/get-file-preview.md b/app/sdks/0.6.2/server-ruby/docs/examples/storage/get-file-preview.md deleted file mode 100644 index 48be3a044e..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/storage/get-file-preview.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -storage = Appwrite::Storage.new(client); - -response = storage.get_file_preview(file_id: '[FILE_ID]'); - -puts response \ No newline at end of file diff --git a/app/sdks/0.6.2/server-ruby/docs/examples/storage/get-file-view.md b/app/sdks/0.6.2/server-ruby/docs/examples/storage/get-file-view.md deleted file mode 100644 index a3dc012098..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/storage/get-file-view.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -storage = Appwrite::Storage.new(client); - -response = storage.get_file_view(file_id: '[FILE_ID]'); - -puts response \ No newline at end of file diff --git a/app/sdks/0.6.2/server-ruby/docs/examples/storage/get-file.md b/app/sdks/0.6.2/server-ruby/docs/examples/storage/get-file.md deleted file mode 100644 index 203a4dff7c..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/storage/get-file.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -storage = Appwrite::Storage.new(client); - -response = storage.get_file(file_id: '[FILE_ID]'); - -puts response \ No newline at end of file diff --git a/app/sdks/0.6.2/server-ruby/docs/examples/storage/list-files.md b/app/sdks/0.6.2/server-ruby/docs/examples/storage/list-files.md deleted file mode 100644 index a148da78f9..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/storage/list-files.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -storage = Appwrite::Storage.new(client); - -response = storage.list_files(); - -puts response \ No newline at end of file diff --git a/app/sdks/0.6.2/server-ruby/docs/examples/storage/update-file.md b/app/sdks/0.6.2/server-ruby/docs/examples/storage/update-file.md deleted file mode 100644 index 36d5049816..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/storage/update-file.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -storage = Appwrite::Storage.new(client); - -response = storage.update_file(file_id: '[FILE_ID]', read: [], write: []); - -puts response \ No newline at end of file diff --git a/app/sdks/0.6.2/server-ruby/docs/examples/teams/create-membership.md b/app/sdks/0.6.2/server-ruby/docs/examples/teams/create-membership.md deleted file mode 100644 index fc0a249361..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/teams/create-membership.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -teams = Appwrite::Teams.new(client); - -response = teams.create_membership(team_id: '[TEAM_ID]', email: 'email@example.com', roles: [], url: 'https://example.com'); - -puts response \ No newline at end of file diff --git a/app/sdks/0.6.2/server-ruby/docs/examples/teams/create.md b/app/sdks/0.6.2/server-ruby/docs/examples/teams/create.md deleted file mode 100644 index d7f9c2f8c0..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/teams/create.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -teams = Appwrite::Teams.new(client); - -response = teams.create(name: '[NAME]'); - -puts response \ No newline at end of file diff --git a/app/sdks/0.6.2/server-ruby/docs/examples/teams/delete-membership.md b/app/sdks/0.6.2/server-ruby/docs/examples/teams/delete-membership.md deleted file mode 100644 index 545cacc51f..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/teams/delete-membership.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -teams = Appwrite::Teams.new(client); - -response = teams.delete_membership(team_id: '[TEAM_ID]', invite_id: '[INVITE_ID]'); - -puts response \ No newline at end of file diff --git a/app/sdks/0.6.2/server-ruby/docs/examples/teams/delete.md b/app/sdks/0.6.2/server-ruby/docs/examples/teams/delete.md deleted file mode 100644 index d28907f741..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/teams/delete.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -teams = Appwrite::Teams.new(client); - -response = teams.delete(team_id: '[TEAM_ID]'); - -puts response \ No newline at end of file diff --git a/app/sdks/0.6.2/server-ruby/docs/examples/teams/get-memberships.md b/app/sdks/0.6.2/server-ruby/docs/examples/teams/get-memberships.md deleted file mode 100644 index 013d952afc..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/teams/get-memberships.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -teams = Appwrite::Teams.new(client); - -response = teams.get_memberships(team_id: '[TEAM_ID]'); - -puts response \ No newline at end of file diff --git a/app/sdks/0.6.2/server-ruby/docs/examples/teams/get.md b/app/sdks/0.6.2/server-ruby/docs/examples/teams/get.md deleted file mode 100644 index 1dd4918a12..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/teams/get.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -teams = Appwrite::Teams.new(client); - -response = teams.get(team_id: '[TEAM_ID]'); - -puts response \ No newline at end of file diff --git a/app/sdks/0.6.2/server-ruby/docs/examples/teams/list.md b/app/sdks/0.6.2/server-ruby/docs/examples/teams/list.md deleted file mode 100644 index c0cd72a362..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/teams/list.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -teams = Appwrite::Teams.new(client); - -response = teams.list(); - -puts response \ No newline at end of file diff --git a/app/sdks/0.6.2/server-ruby/docs/examples/teams/update.md b/app/sdks/0.6.2/server-ruby/docs/examples/teams/update.md deleted file mode 100644 index b7e87a8e09..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/teams/update.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -teams = Appwrite::Teams.new(client); - -response = teams.update(team_id: '[TEAM_ID]', name: '[NAME]'); - -puts response \ No newline at end of file diff --git a/app/sdks/0.6.2/server-ruby/docs/examples/users/create.md b/app/sdks/0.6.2/server-ruby/docs/examples/users/create.md deleted file mode 100644 index 0a152ac366..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/users/create.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -users = Appwrite::Users.new(client); - -response = users.create(email: 'email@example.com', password: 'password'); - -puts response \ No newline at end of file diff --git a/app/sdks/0.6.2/server-ruby/docs/examples/users/delete-session.md b/app/sdks/0.6.2/server-ruby/docs/examples/users/delete-session.md deleted file mode 100644 index 149c7d9293..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/users/delete-session.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -users = Appwrite::Users.new(client); - -response = users.delete_session(user_id: '[USER_ID]', session_id: '[SESSION_ID]'); - -puts response \ No newline at end of file diff --git a/app/sdks/0.6.2/server-ruby/docs/examples/users/delete-sessions.md b/app/sdks/0.6.2/server-ruby/docs/examples/users/delete-sessions.md deleted file mode 100644 index 3f02e08dd1..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/users/delete-sessions.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -users = Appwrite::Users.new(client); - -response = users.delete_sessions(user_id: '[USER_ID]'); - -puts response \ No newline at end of file diff --git a/app/sdks/0.6.2/server-ruby/docs/examples/users/get-logs.md b/app/sdks/0.6.2/server-ruby/docs/examples/users/get-logs.md deleted file mode 100644 index 695a77ad27..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/users/get-logs.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -users = Appwrite::Users.new(client); - -response = users.get_logs(user_id: '[USER_ID]'); - -puts response \ No newline at end of file diff --git a/app/sdks/0.6.2/server-ruby/docs/examples/users/get-prefs.md b/app/sdks/0.6.2/server-ruby/docs/examples/users/get-prefs.md deleted file mode 100644 index 4a0761e283..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/users/get-prefs.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -users = Appwrite::Users.new(client); - -response = users.get_prefs(user_id: '[USER_ID]'); - -puts response \ No newline at end of file diff --git a/app/sdks/0.6.2/server-ruby/docs/examples/users/get-sessions.md b/app/sdks/0.6.2/server-ruby/docs/examples/users/get-sessions.md deleted file mode 100644 index 52f37a4609..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/users/get-sessions.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -users = Appwrite::Users.new(client); - -response = users.get_sessions(user_id: '[USER_ID]'); - -puts response \ No newline at end of file diff --git a/app/sdks/0.6.2/server-ruby/docs/examples/users/get.md b/app/sdks/0.6.2/server-ruby/docs/examples/users/get.md deleted file mode 100644 index 562ac958c3..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/users/get.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -users = Appwrite::Users.new(client); - -response = users.get(user_id: '[USER_ID]'); - -puts response \ No newline at end of file diff --git a/app/sdks/0.6.2/server-ruby/docs/examples/users/list.md b/app/sdks/0.6.2/server-ruby/docs/examples/users/list.md deleted file mode 100644 index 096ce859e3..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/users/list.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -users = Appwrite::Users.new(client); - -response = users.list(); - -puts response \ No newline at end of file diff --git a/app/sdks/0.6.2/server-ruby/docs/examples/users/update-prefs.md b/app/sdks/0.6.2/server-ruby/docs/examples/users/update-prefs.md deleted file mode 100644 index 2bb2d42e16..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/users/update-prefs.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -users = Appwrite::Users.new(client); - -response = users.update_prefs(user_id: '[USER_ID]', prefs: {}); - -puts response \ No newline at end of file diff --git a/app/sdks/0.6.2/server-ruby/docs/examples/users/update-status.md b/app/sdks/0.6.2/server-ruby/docs/examples/users/update-status.md deleted file mode 100644 index 088ee380d8..0000000000 --- a/app/sdks/0.6.2/server-ruby/docs/examples/users/update-status.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -users = Appwrite::Users.new(client); - -response = users.update_status(user_id: '[USER_ID]', status: '1'); - -puts response \ No newline at end of file diff --git a/app/sdks/0.6.2/server-ruby/lib/appwrite.rb b/app/sdks/0.6.2/server-ruby/lib/appwrite.rb deleted file mode 100644 index 1b4f38bea2..0000000000 --- a/app/sdks/0.6.2/server-ruby/lib/appwrite.rb +++ /dev/null @@ -1,13 +0,0 @@ -require 'net/http' -require 'uri' -require 'json' -require_relative 'appwrite/client' -require_relative 'appwrite/service' -require_relative 'appwrite/services/avatars' -require_relative 'appwrite/services/database' -require_relative 'appwrite/services/functions' -require_relative 'appwrite/services/health' -require_relative 'appwrite/services/locale' -require_relative 'appwrite/services/storage' -require_relative 'appwrite/services/teams' -require_relative 'appwrite/services/users' diff --git a/app/sdks/0.6.2/server-ruby/lib/appwrite/client.rb b/app/sdks/0.6.2/server-ruby/lib/appwrite/client.rb deleted file mode 100644 index 2cd09d52fe..0000000000 --- a/app/sdks/0.6.2/server-ruby/lib/appwrite/client.rb +++ /dev/null @@ -1,116 +0,0 @@ -require 'net/http' -require 'uri' -require 'json' -require 'cgi' - -module Appwrite - class Client - - METHOD_GET = 'get' - METHOD_POST = 'post' - METHOD_PUT = 'put' - METHOD_PATCH = 'patch' - METHOD_DELETE = 'delete' - METHOD_HEAD = 'head' - METHOD_OPTIONS = 'options' - METHOD_CONNECT = 'connect' - METHOD_TRACE = 'trace' - - def initialize() - @headers = { - 'content-type' => '', - 'user-agent' => RUBY_PLATFORM + ':ruby-' + RUBY_VERSION, - 'x-sdk-version' => 'appwrite:ruby:1.0.11' - } - @endpoint = 'https://appwrite.io/v1'; - end - - def set_project(value) - add_header('x-appwrite-project', value) - - return self - end - - def set_key(value) - add_header('x-appwrite-key', value) - - return self - end - - def set_locale(value) - add_header('x-appwrite-locale', value) - - return self - end - - def set_endpoint(endpoint) - @endpoint = endpoint - - return self - end - - def add_header(key, value) - @headers[key.downcase] = value.downcase - - return self - end - - def call(method, path = '', headers = {}, params = {}) - uri = URI.parse(@endpoint + path + ((method == METHOD_GET && params.length) ? '?' + encode(params) : '')) - return fetch(method, uri, headers, params) - end - - protected - - private - - def fetch(method, uri, headers, params, limit = 5) - raise ArgumentError, 'Too Many HTTP Redirects' if limit == 0 - - http = Net::HTTP.new(uri.host, uri.port) - http.use_ssl = (uri.scheme == 'https') - payload = '' - - headers = @headers.merge(headers) - - if (method != METHOD_GET) - case headers['content-type'][0, headers['content-type'].index(';') || headers['content-type'].length] - when 'application/json' - payload = params.to_json - else - payload = encode(params) - end - end - - begin - response = http.send_request(method.upcase, uri.request_uri, payload, headers) - rescue => error - raise 'Request Failed: ' + error.message - end - - # Handle Redirects - if (response.class == Net::HTTPRedirection || response.class == Net::HTTPMovedPermanently) - location = response['location'] - uri = URI.parse(uri.scheme + "://" + uri.host + "" + location) - - return fetch(method, uri, headers, {}, limit - 1) - end - - return JSON.parse(response.body); - end - - def encode(value, key = nil) - case value - when Hash then value.map { |k,v| encode(v, append_key(key,k)) }.join('&') - when Array then value.map { |v| encode(v, "#{key}[]") }.join('&') - when nil then '' - else - "#{key}=#{CGI.escape(value.to_s)}" - end - end - - def append_key(root_key, key) - root_key.nil? ? key : "#{root_key}[#{key.to_s}]" - end - end -end \ No newline at end of file diff --git a/app/sdks/0.6.2/server-ruby/lib/appwrite/service.rb b/app/sdks/0.6.2/server-ruby/lib/appwrite/service.rb deleted file mode 100644 index 0d954c6d17..0000000000 --- a/app/sdks/0.6.2/server-ruby/lib/appwrite/service.rb +++ /dev/null @@ -1,12 +0,0 @@ -module Appwrite - class Service - - def initialize(client) - @client = client - end - - protected - - private - end -end \ No newline at end of file diff --git a/app/sdks/0.6.2/server-ruby/lib/appwrite/services/avatars.rb b/app/sdks/0.6.2/server-ruby/lib/appwrite/services/avatars.rb deleted file mode 100644 index 2c8e8ee723..0000000000 --- a/app/sdks/0.6.2/server-ruby/lib/appwrite/services/avatars.rb +++ /dev/null @@ -1,95 +0,0 @@ -module Appwrite - class Avatars < Service - - def get_browser(code:, width: 100, height: 100, quality: 100) - path = '/avatars/browsers/{code}' - .gsub('{code}', code) - - params = { - 'width': width, - 'height': height, - 'quality': quality - } - - return @client.call('get', path, { - 'content-type' => 'application/json', - }, params); - end - - def get_credit_card(code:, width: 100, height: 100, quality: 100) - path = '/avatars/credit-cards/{code}' - .gsub('{code}', code) - - params = { - 'width': width, - 'height': height, - 'quality': quality - } - - return @client.call('get', path, { - 'content-type' => 'application/json', - }, params); - end - - def get_favicon(url:) - path = '/avatars/favicon' - - params = { - 'url': url - } - - return @client.call('get', path, { - 'content-type' => 'application/json', - }, params); - end - - def get_flag(code:, width: 100, height: 100, quality: 100) - path = '/avatars/flags/{code}' - .gsub('{code}', code) - - params = { - 'width': width, - 'height': height, - 'quality': quality - } - - return @client.call('get', path, { - 'content-type' => 'application/json', - }, params); - end - - def get_image(url:, width: 400, height: 400) - path = '/avatars/image' - - params = { - 'url': url, - 'width': width, - 'height': height - } - - return @client.call('get', path, { - 'content-type' => 'application/json', - }, params); - end - - def get_q_r(text:, size: 400, margin: 1, download: 0) - path = '/avatars/qr' - - params = { - 'text': text, - 'size': size, - 'margin': margin, - 'download': download - } - - return @client.call('get', path, { - 'content-type' => 'application/json', - }, params); - end - - - protected - - private - end -end \ No newline at end of file diff --git a/app/sdks/0.6.2/server-ruby/lib/appwrite/services/database.rb b/app/sdks/0.6.2/server-ruby/lib/appwrite/services/database.rb deleted file mode 100644 index d8efcc34e1..0000000000 --- a/app/sdks/0.6.2/server-ruby/lib/appwrite/services/database.rb +++ /dev/null @@ -1,172 +0,0 @@ -module Appwrite - class Database < Service - - def list_collections(search: '', limit: 25, offset: 0, order_type: 'ASC') - path = '/database/collections' - - params = { - 'search': search, - 'limit': limit, - 'offset': offset, - 'orderType': order_type - } - - return @client.call('get', path, { - 'content-type' => 'application/json', - }, params); - end - - def create_collection(name:, read:, write:, rules:) - path = '/database/collections' - - params = { - 'name': name, - 'read': read, - 'write': write, - 'rules': rules - } - - return @client.call('post', path, { - 'content-type' => 'application/json', - }, params); - end - - def get_collection(collection_id:) - path = '/database/collections/{collectionId}' - .gsub('{collectionId}', collection_id) - - params = { - } - - return @client.call('get', path, { - 'content-type' => 'application/json', - }, params); - end - - def update_collection(collection_id:, name:, read:, write:, rules: []) - path = '/database/collections/{collectionId}' - .gsub('{collectionId}', collection_id) - - params = { - 'name': name, - 'read': read, - 'write': write, - 'rules': rules - } - - return @client.call('put', path, { - 'content-type' => 'application/json', - }, params); - end - - def delete_collection(collection_id:) - path = '/database/collections/{collectionId}' - .gsub('{collectionId}', collection_id) - - params = { - } - - return @client.call('delete', path, { - 'content-type' => 'application/json', - }, params); - end - - def list_documents(collection_id:, filters: [], offset: 0, limit: 50, order_field: '$id', order_type: 'ASC', order_cast: 'string', search: '', first: 0, last: 0) - path = '/database/collections/{collectionId}/documents' - .gsub('{collectionId}', collection_id) - - params = { - 'filters': filters, - 'offset': offset, - 'limit': limit, - 'orderField': order_field, - 'orderType': order_type, - 'orderCast': order_cast, - 'search': search, - 'first': first, - 'last': last - } - - return @client.call('get', path, { - 'content-type' => 'application/json', - }, params); - end - - def create_document(collection_id:, data:, read:, write:, parent_document: '', parent_property: '', parent_property_type: 'assign') - path = '/database/collections/{collectionId}/documents' - .gsub('{collectionId}', collection_id) - - params = { - 'data': data, - 'read': read, - 'write': write, - 'parentDocument': parent_document, - 'parentProperty': parent_property, - 'parentPropertyType': parent_property_type - } - - return @client.call('post', path, { - 'content-type' => 'application/json', - }, params); - end - - def get_document(collection_id:, document_id:) - path = '/database/collections/{collectionId}/documents/{documentId}' - .gsub('{collectionId}', collection_id) - .gsub('{documentId}', document_id) - - params = { - } - - return @client.call('get', path, { - 'content-type' => 'application/json', - }, params); - end - - def update_document(collection_id:, document_id:, data:, read:, write:) - path = '/database/collections/{collectionId}/documents/{documentId}' - .gsub('{collectionId}', collection_id) - .gsub('{documentId}', document_id) - - params = { - 'data': data, - 'read': read, - 'write': write - } - - return @client.call('patch', path, { - 'content-type' => 'application/json', - }, params); - end - - def delete_document(collection_id:, document_id:) - path = '/database/collections/{collectionId}/documents/{documentId}' - .gsub('{collectionId}', collection_id) - .gsub('{documentId}', document_id) - - params = { - } - - return @client.call('delete', path, { - 'content-type' => 'application/json', - }, params); - end - - def get_collection_logs(collection_id:) - path = '/database/collections/{collectionId}/logs' - .gsub('{collectionId}', collection_id) - - params = { - } - - return @client.call('get', path, { - 'content-type' => 'application/json', - }, params); - end - - - protected - - private - end -end \ No newline at end of file diff --git a/app/sdks/0.6.2/server-ruby/lib/appwrite/services/functions.rb b/app/sdks/0.6.2/server-ruby/lib/appwrite/services/functions.rb deleted file mode 100644 index e6fb0c5f12..0000000000 --- a/app/sdks/0.6.2/server-ruby/lib/appwrite/services/functions.rb +++ /dev/null @@ -1,193 +0,0 @@ -module Appwrite - class Functions < Service - - def list(search: '', limit: 25, offset: 0, order_type: 'ASC') - path = '/functions' - - params = { - 'search': search, - 'limit': limit, - 'offset': offset, - 'orderType': order_type - } - - return @client.call('get', path, { - 'content-type' => 'application/json', - }, params); - end - - def create(name:, vars: [], events: [], schedule: '', timeout: 15) - path = '/functions' - - params = { - 'name': name, - 'vars': vars, - 'events': events, - 'schedule': schedule, - 'timeout': timeout - } - - return @client.call('post', path, { - 'content-type' => 'application/json', - }, params); - end - - def get(function_id:) - path = '/functions/{functionId}' - .gsub('{function_id}', function_id) - - params = { - } - - return @client.call('get', path, { - 'content-type' => 'application/json', - }, params); - end - - def update(function_id:, name:, vars: [], events: [], schedule: '', timeout: 15) - path = '/functions/{functionId}' - .gsub('{function_id}', function_id) - - params = { - 'name': name, - 'vars': vars, - 'events': events, - 'schedule': schedule, - 'timeout': timeout - } - - return @client.call('put', path, { - 'content-type' => 'application/json', - }, params); - end - - def delete(function_id:) - path = '/functions/{functionId}' - .gsub('{function_id}', function_id) - - params = { - } - - return @client.call('delete', path, { - 'content-type' => 'application/json', - }, params); - end - - def list_executions(function_id:, search: '', limit: 25, offset: 0, order_type: 'ASC') - path = '/functions/{functionId}/executions' - .gsub('{function_id}', function_id) - - params = { - 'search': search, - 'limit': limit, - 'offset': offset, - 'orderType': order_type - } - - return @client.call('get', path, { - 'content-type' => 'application/json', - }, params); - end - - def create_execution(function_id:, async: 1) - path = '/functions/{functionId}/executions' - .gsub('{function_id}', function_id) - - params = { - 'async': async - } - - return @client.call('post', path, { - 'content-type' => 'application/json', - }, params); - end - - def get_execution(function_id:, execution_id:) - path = '/functions/{functionId}/executions/{executionId}' - .gsub('{function_id}', function_id) - .gsub('{execution_id}', execution_id) - - params = { - } - - return @client.call('get', path, { - 'content-type' => 'application/json', - }, params); - end - - def update_tag(function_id:, tag:) - path = '/functions/{functionId}/tag' - .gsub('{function_id}', function_id) - - params = { - 'tag': tag - } - - return @client.call('patch', path, { - 'content-type' => 'application/json', - }, params); - end - - def list_tags(function_id:, search: '', limit: 25, offset: 0, order_type: 'ASC') - path = '/functions/{functionId}/tags' - .gsub('{function_id}', function_id) - - params = { - 'search': search, - 'limit': limit, - 'offset': offset, - 'orderType': order_type - } - - return @client.call('get', path, { - 'content-type' => 'application/json', - }, params); - end - - def create_tag(function_id:, env:, command:, code:) - path = '/functions/{functionId}/tags' - .gsub('{function_id}', function_id) - - params = { - 'env': env, - 'command': command, - 'code': code - } - - return @client.call('post', path, { - 'content-type' => 'application/json', - }, params); - end - - def get_tag(function_id:, tag_id:) - path = '/functions/{functionId}/tags/{tagId}' - .gsub('{function_id}', function_id) - .gsub('{tag_id}', tag_id) - - params = { - } - - return @client.call('get', path, { - 'content-type' => 'application/json', - }, params); - end - - def delete_tag(function_id:, tag_id:) - path = '/functions/{functionId}/tags/{tagId}' - .gsub('{function_id}', function_id) - .gsub('{tag_id}', tag_id) - - params = { - } - - return @client.call('delete', path, { - 'content-type' => 'application/json', - }, params); - end - - - protected - - private - end -end \ No newline at end of file diff --git a/app/sdks/0.6.2/server-ruby/lib/appwrite/services/health.rb b/app/sdks/0.6.2/server-ruby/lib/appwrite/services/health.rb deleted file mode 100644 index d2c6bc7b60..0000000000 --- a/app/sdks/0.6.2/server-ruby/lib/appwrite/services/health.rb +++ /dev/null @@ -1,141 +0,0 @@ -module Appwrite - class Health < Service - - def get() - path = '/health' - - params = { - } - - return @client.call('get', path, { - 'content-type' => 'application/json', - }, params); - end - - def get_anti_virus() - path = '/health/anti-virus' - - params = { - } - - return @client.call('get', path, { - 'content-type' => 'application/json', - }, params); - end - - def get_cache() - path = '/health/cache' - - params = { - } - - return @client.call('get', path, { - 'content-type' => 'application/json', - }, params); - end - - def get_d_b() - path = '/health/db' - - params = { - } - - return @client.call('get', path, { - 'content-type' => 'application/json', - }, params); - end - - def get_queue_certificates() - path = '/health/queue/certificates' - - params = { - } - - return @client.call('get', path, { - 'content-type' => 'application/json', - }, params); - end - - def get_queue_functions() - path = '/health/queue/functions' - - params = { - } - - return @client.call('get', path, { - 'content-type' => 'application/json', - }, params); - end - - def get_queue_logs() - path = '/health/queue/logs' - - params = { - } - - return @client.call('get', path, { - 'content-type' => 'application/json', - }, params); - end - - def get_queue_tasks() - path = '/health/queue/tasks' - - params = { - } - - return @client.call('get', path, { - 'content-type' => 'application/json', - }, params); - end - - def get_queue_usage() - path = '/health/queue/usage' - - params = { - } - - return @client.call('get', path, { - 'content-type' => 'application/json', - }, params); - end - - def get_queue_webhooks() - path = '/health/queue/webhooks' - - params = { - } - - return @client.call('get', path, { - 'content-type' => 'application/json', - }, params); - end - - def get_storage_local() - path = '/health/storage/local' - - params = { - } - - return @client.call('get', path, { - 'content-type' => 'application/json', - }, params); - end - - def get_time() - path = '/health/time' - - params = { - } - - return @client.call('get', path, { - 'content-type' => 'application/json', - }, params); - end - - - protected - - private - end -end \ No newline at end of file diff --git a/app/sdks/0.6.2/server-ruby/lib/appwrite/services/locale.rb b/app/sdks/0.6.2/server-ruby/lib/appwrite/services/locale.rb deleted file mode 100644 index 707c8b2f4a..0000000000 --- a/app/sdks/0.6.2/server-ruby/lib/appwrite/services/locale.rb +++ /dev/null @@ -1,75 +0,0 @@ -module Appwrite - class Locale < Service - - def get() - path = '/locale' - - params = { - } - - return @client.call('get', path, { - 'content-type' => 'application/json', - }, params); - end - - def get_continents() - path = '/locale/continents' - - params = { - } - - return @client.call('get', path, { - 'content-type' => 'application/json', - }, params); - end - - def get_countries() - path = '/locale/countries' - - params = { - } - - return @client.call('get', path, { - 'content-type' => 'application/json', - }, params); - end - - def get_countries_e_u() - path = '/locale/countries/eu' - - params = { - } - - return @client.call('get', path, { - 'content-type' => 'application/json', - }, params); - end - - def get_countries_phones() - path = '/locale/countries/phones' - - params = { - } - - return @client.call('get', path, { - 'content-type' => 'application/json', - }, params); - end - - def get_currencies() - path = '/locale/currencies' - - params = { - } - - return @client.call('get', path, { - 'content-type' => 'application/json', - }, params); - end - - - protected - - private - end -end \ No newline at end of file diff --git a/app/sdks/0.6.2/server-ruby/lib/appwrite/services/storage.rb b/app/sdks/0.6.2/server-ruby/lib/appwrite/services/storage.rb deleted file mode 100644 index 0e99a2b0d5..0000000000 --- a/app/sdks/0.6.2/server-ruby/lib/appwrite/services/storage.rb +++ /dev/null @@ -1,118 +0,0 @@ -module Appwrite - class Storage < Service - - def list_files(search: '', limit: 25, offset: 0, order_type: 'ASC') - path = '/storage/files' - - params = { - 'search': search, - 'limit': limit, - 'offset': offset, - 'orderType': order_type - } - - return @client.call('get', path, { - 'content-type' => 'application/json', - }, params); - end - - def create_file(file:, read:, write:) - path = '/storage/files' - - params = { - 'file': file, - 'read': read, - 'write': write - } - - return @client.call('post', path, { - 'content-type' => 'multipart/form-data', - }, params); - end - - def get_file(file_id:) - path = '/storage/files/{fileId}' - .gsub('{fileId}', file_id) - - params = { - } - - return @client.call('get', path, { - 'content-type' => 'application/json', - }, params); - end - - def update_file(file_id:, read:, write:) - path = '/storage/files/{fileId}' - .gsub('{fileId}', file_id) - - params = { - 'read': read, - 'write': write - } - - return @client.call('put', path, { - 'content-type' => 'application/json', - }, params); - end - - def delete_file(file_id:) - path = '/storage/files/{fileId}' - .gsub('{fileId}', file_id) - - params = { - } - - return @client.call('delete', path, { - 'content-type' => 'application/json', - }, params); - end - - def get_file_download(file_id:) - path = '/storage/files/{fileId}/download' - .gsub('{fileId}', file_id) - - params = { - } - - return @client.call('get', path, { - 'content-type' => 'application/json', - }, params); - end - - def get_file_preview(file_id:, width: 0, height: 0, quality: 100, background: '', output: '') - path = '/storage/files/{fileId}/preview' - .gsub('{fileId}', file_id) - - params = { - 'width': width, - 'height': height, - 'quality': quality, - 'background': background, - 'output': output - } - - return @client.call('get', path, { - 'content-type' => 'application/json', - }, params); - end - - def get_file_view(file_id:, as: '') - path = '/storage/files/{fileId}/view' - .gsub('{fileId}', file_id) - - params = { - 'as': as - } - - return @client.call('get', path, { - 'content-type' => 'application/json', - }, params); - end - - - protected - - private - end -end \ No newline at end of file diff --git a/app/sdks/0.6.2/server-ruby/lib/appwrite/services/teams.rb b/app/sdks/0.6.2/server-ruby/lib/appwrite/services/teams.rb deleted file mode 100644 index 0e677476d2..0000000000 --- a/app/sdks/0.6.2/server-ruby/lib/appwrite/services/teams.rb +++ /dev/null @@ -1,115 +0,0 @@ -module Appwrite - class Teams < Service - - def list(search: '', limit: 25, offset: 0, order_type: 'ASC') - path = '/teams' - - params = { - 'search': search, - 'limit': limit, - 'offset': offset, - 'orderType': order_type - } - - return @client.call('get', path, { - 'content-type' => 'application/json', - }, params); - end - - def create(name:, roles: ["owner"]) - path = '/teams' - - params = { - 'name': name, - 'roles': roles - } - - return @client.call('post', path, { - 'content-type' => 'application/json', - }, params); - end - - def get(team_id:) - path = '/teams/{teamId}' - .gsub('{teamId}', team_id) - - params = { - } - - return @client.call('get', path, { - 'content-type' => 'application/json', - }, params); - end - - def update(team_id:, name:) - path = '/teams/{teamId}' - .gsub('{teamId}', team_id) - - params = { - 'name': name - } - - return @client.call('put', path, { - 'content-type' => 'application/json', - }, params); - end - - def delete(team_id:) - path = '/teams/{teamId}' - .gsub('{teamId}', team_id) - - params = { - } - - return @client.call('delete', path, { - 'content-type' => 'application/json', - }, params); - end - - def get_memberships(team_id:) - path = '/teams/{teamId}/memberships' - .gsub('{teamId}', team_id) - - params = { - } - - return @client.call('get', path, { - 'content-type' => 'application/json', - }, params); - end - - def create_membership(team_id:, email:, roles:, url:, name: '') - path = '/teams/{teamId}/memberships' - .gsub('{teamId}', team_id) - - params = { - 'email': email, - 'name': name, - 'roles': roles, - 'url': url - } - - return @client.call('post', path, { - 'content-type' => 'application/json', - }, params); - end - - def delete_membership(team_id:, invite_id:) - path = '/teams/{teamId}/memberships/{inviteId}' - .gsub('{teamId}', team_id) - .gsub('{inviteId}', invite_id) - - params = { - } - - return @client.call('delete', path, { - 'content-type' => 'application/json', - }, params); - end - - - protected - - private - end -end \ No newline at end of file diff --git a/app/sdks/0.6.2/server-ruby/lib/appwrite/services/users.rb b/app/sdks/0.6.2/server-ruby/lib/appwrite/services/users.rb deleted file mode 100644 index f75434bd1a..0000000000 --- a/app/sdks/0.6.2/server-ruby/lib/appwrite/services/users.rb +++ /dev/null @@ -1,137 +0,0 @@ -module Appwrite - class Users < Service - - def list(search: '', limit: 25, offset: 0, order_type: 'ASC') - path = '/users' - - params = { - 'search': search, - 'limit': limit, - 'offset': offset, - 'orderType': order_type - } - - return @client.call('get', path, { - 'content-type' => 'application/json', - }, params); - end - - def create(email:, password:, name: '') - path = '/users' - - params = { - 'email': email, - 'password': password, - 'name': name - } - - return @client.call('post', path, { - 'content-type' => 'application/json', - }, params); - end - - def get(user_id:) - path = '/users/{userId}' - .gsub('{userId}', user_id) - - params = { - } - - return @client.call('get', path, { - 'content-type' => 'application/json', - }, params); - end - - def get_logs(user_id:) - path = '/users/{userId}/logs' - .gsub('{userId}', user_id) - - params = { - } - - return @client.call('get', path, { - 'content-type' => 'application/json', - }, params); - end - - def get_prefs(user_id:) - path = '/users/{userId}/prefs' - .gsub('{userId}', user_id) - - params = { - } - - return @client.call('get', path, { - 'content-type' => 'application/json', - }, params); - end - - def update_prefs(user_id:, prefs:) - path = '/users/{userId}/prefs' - .gsub('{userId}', user_id) - - params = { - 'prefs': prefs - } - - return @client.call('patch', path, { - 'content-type' => 'application/json', - }, params); - end - - def get_sessions(user_id:) - path = '/users/{userId}/sessions' - .gsub('{userId}', user_id) - - params = { - } - - return @client.call('get', path, { - 'content-type' => 'application/json', - }, params); - end - - def delete_sessions(user_id:) - path = '/users/{userId}/sessions' - .gsub('{userId}', user_id) - - params = { - } - - return @client.call('delete', path, { - 'content-type' => 'application/json', - }, params); - end - - def delete_session(user_id:, session_id:) - path = '/users/{userId}/sessions/{sessionId}' - .gsub('{userId}', user_id) - .gsub('{sessionId}', session_id) - - params = { - } - - return @client.call('delete', path, { - 'content-type' => 'application/json', - }, params); - end - - def update_status(user_id:, status:) - path = '/users/{userId}/status' - .gsub('{userId}', user_id) - - params = { - 'status': status - } - - return @client.call('patch', path, { - 'content-type' => 'application/json', - }, params); - end - - - protected - - private - end -end \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/CHANGELOG.md b/app/sdks/0.7.0/client-flutter-dev/CHANGELOG.md deleted file mode 100644 index 2e9b0e0a91..0000000000 --- a/app/sdks/0.7.0/client-flutter-dev/CHANGELOG.md +++ /dev/null @@ -1,64 +0,0 @@ -## 0.3.2 - -- Fixed package namespaces - -## 0.3.1 - -- Downgraded meta package version to 1.1.8 - -## 0.3.0 - -- Updated package dependencies (@lohanidamodar) -- Added Flutter for Web compatibility (@lohanidamodar) - -## 0.2.3 - -- Fixed OAuth2 cookie bug, where a new session cookie couldn't overwrite an old cookie - -## 0.2.2 - -- Fixed an error that happend when the OAuth session creation request was sent before any other API call -- Fixed a bug in the Avatars service where location URL generation had syntax error - -## 0.2.1 - -- Fixed callback scheme - -## 0.2.0 - -- Updated flutter_web_auth plugin to version 0.2.4 -- Added per project unique callback for OAuth2 redirects to aviod conflicts between multiple Appwrite projects - -## 0.1.1 - -- Updated flutter_web_auth version - -## 0.1.0 - -- Added examples file -- Some minor style fixes - -## 0.0.14 - -- Using MultipartFile for file uploads - -## 0.0.13 - -- Fix for file upload method - -## 0.0.12 - -- Added file upload support for storage service - -## 0.0.11 - -- Added integration with web auth plugin to support Appwrite OAuth API - -## 0.0.9 - -- Updated deafult params - -## 0.0.8 - -- Fixed compilation error in Client class -- Shorter description for package \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/LICENSE b/app/sdks/0.7.0/client-flutter-dev/LICENSE deleted file mode 100644 index fc7c051a91..0000000000 --- a/app/sdks/0.7.0/client-flutter-dev/LICENSE +++ /dev/null @@ -1,12 +0,0 @@ -Copyright (c) 2019 Appwrite (https://appwrite.io) and individual contributors. -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - - 3. Neither the name Appwrite nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/README.md b/app/sdks/0.7.0/client-flutter-dev/README.md deleted file mode 100644 index 2c0ba754c3..0000000000 --- a/app/sdks/0.7.0/client-flutter-dev/README.md +++ /dev/null @@ -1,38 +0,0 @@ -# Appwrite Flutter (Dev Channel) SDK - -[![pub package](https://img.shields.io/pub/v/appwrite.svg)](https://pub.dartlang.org/packages/appwrite) -![License](https://img.shields.io/github/license/appwrite/sdk-for-flutter-dev.svg?v=1) -![Version](https://img.shields.io/badge/api%20version-0.6.2-blue.svg?v=1) - -**This SDK is compatible with Appwrite server version 0.6.2. For older versions, please check previous releases.** - -Appwrite is an open-source backend as a service server that abstract and simplify complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way. - Use the Flutter (Dev Channel) SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools. - For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs) - - - -![Appwrite](https://appwrite.io/images/github.png) - -## Installation - -Add this to your package's `pubspec.yaml` file: - -```yml -dependencies: - appwrite_dev: ^0.3.2 -``` - -You can install packages from the command line: - -```bash -pub get appwrite_dev -``` - -## Contribution - -This library is auto-generated by Appwrite custom [SDK Generator](https://github.com/appwrite/sdk-generator). To learn more about how you can help us improve this SDK, please check the [contribution guide](https://github.com/appwrite/sdk-generator/blob/master/CONTRIBUTING.md) before sending a pull-request. - -## License - -Please see the [BSD-3-Clause license](https://raw.githubusercontent.com/appwrite/appwrite/master/LICENSE) file for more information. \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/docs/examples/account/create-o-auth2session.md b/app/sdks/0.7.0/client-flutter-dev/docs/examples/account/create-o-auth2session.md deleted file mode 100644 index aae9d5f9a0..0000000000 --- a/app/sdks/0.7.0/client-flutter-dev/docs/examples/account/create-o-auth2session.md +++ /dev/null @@ -1,22 +0,0 @@ -import 'package:appwrite_dev/appwrite_dev.dart'; - -void main() { // Init SDK - Client client = Client(); - Account account = Account(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = account.createOAuth2Session( - provider: 'bitbucket', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/docs/examples/account/create-recovery.md b/app/sdks/0.7.0/client-flutter-dev/docs/examples/account/create-recovery.md deleted file mode 100644 index 32fe469cff..0000000000 --- a/app/sdks/0.7.0/client-flutter-dev/docs/examples/account/create-recovery.md +++ /dev/null @@ -1,23 +0,0 @@ -import 'package:appwrite_dev/appwrite_dev.dart'; - -void main() { // Init SDK - Client client = Client(); - Account account = Account(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = account.createRecovery( - email: 'email@example.com', - url: 'https://example.com', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/docs/examples/account/create-session.md b/app/sdks/0.7.0/client-flutter-dev/docs/examples/account/create-session.md deleted file mode 100644 index a5930877f4..0000000000 --- a/app/sdks/0.7.0/client-flutter-dev/docs/examples/account/create-session.md +++ /dev/null @@ -1,23 +0,0 @@ -import 'package:appwrite_dev/appwrite_dev.dart'; - -void main() { // Init SDK - Client client = Client(); - Account account = Account(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = account.createSession( - email: 'email@example.com', - password: 'password', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/docs/examples/account/create-verification.md b/app/sdks/0.7.0/client-flutter-dev/docs/examples/account/create-verification.md deleted file mode 100644 index 738f22df42..0000000000 --- a/app/sdks/0.7.0/client-flutter-dev/docs/examples/account/create-verification.md +++ /dev/null @@ -1,22 +0,0 @@ -import 'package:appwrite_dev/appwrite_dev.dart'; - -void main() { // Init SDK - Client client = Client(); - Account account = Account(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = account.createVerification( - url: 'https://example.com', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/docs/examples/account/create.md b/app/sdks/0.7.0/client-flutter-dev/docs/examples/account/create.md deleted file mode 100644 index 1f92976c39..0000000000 --- a/app/sdks/0.7.0/client-flutter-dev/docs/examples/account/create.md +++ /dev/null @@ -1,23 +0,0 @@ -import 'package:appwrite_dev/appwrite_dev.dart'; - -void main() { // Init SDK - Client client = Client(); - Account account = Account(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = account.create( - email: 'email@example.com', - password: 'password', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/docs/examples/account/delete-session.md b/app/sdks/0.7.0/client-flutter-dev/docs/examples/account/delete-session.md deleted file mode 100644 index 95b3641387..0000000000 --- a/app/sdks/0.7.0/client-flutter-dev/docs/examples/account/delete-session.md +++ /dev/null @@ -1,22 +0,0 @@ -import 'package:appwrite_dev/appwrite_dev.dart'; - -void main() { // Init SDK - Client client = Client(); - Account account = Account(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = account.deleteSession( - sessionId: '[SESSION_ID]', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/docs/examples/account/delete-sessions.md b/app/sdks/0.7.0/client-flutter-dev/docs/examples/account/delete-sessions.md deleted file mode 100644 index b9cbb46fd2..0000000000 --- a/app/sdks/0.7.0/client-flutter-dev/docs/examples/account/delete-sessions.md +++ /dev/null @@ -1,20 +0,0 @@ -import 'package:appwrite_dev/appwrite_dev.dart'; - -void main() { // Init SDK - Client client = Client(); - Account account = Account(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = account.deleteSessions( ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/docs/examples/account/delete.md b/app/sdks/0.7.0/client-flutter-dev/docs/examples/account/delete.md deleted file mode 100644 index 8c99b2ac61..0000000000 --- a/app/sdks/0.7.0/client-flutter-dev/docs/examples/account/delete.md +++ /dev/null @@ -1,20 +0,0 @@ -import 'package:appwrite_dev/appwrite_dev.dart'; - -void main() { // Init SDK - Client client = Client(); - Account account = Account(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = account.delete( ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/docs/examples/account/get-logs.md b/app/sdks/0.7.0/client-flutter-dev/docs/examples/account/get-logs.md deleted file mode 100644 index 2ed66d88ce..0000000000 --- a/app/sdks/0.7.0/client-flutter-dev/docs/examples/account/get-logs.md +++ /dev/null @@ -1,20 +0,0 @@ -import 'package:appwrite_dev/appwrite_dev.dart'; - -void main() { // Init SDK - Client client = Client(); - Account account = Account(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = account.getLogs( ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/docs/examples/account/get-prefs.md b/app/sdks/0.7.0/client-flutter-dev/docs/examples/account/get-prefs.md deleted file mode 100644 index 961a24dc19..0000000000 --- a/app/sdks/0.7.0/client-flutter-dev/docs/examples/account/get-prefs.md +++ /dev/null @@ -1,20 +0,0 @@ -import 'package:appwrite_dev/appwrite_dev.dart'; - -void main() { // Init SDK - Client client = Client(); - Account account = Account(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = account.getPrefs( ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/docs/examples/account/get-sessions.md b/app/sdks/0.7.0/client-flutter-dev/docs/examples/account/get-sessions.md deleted file mode 100644 index 76a566b959..0000000000 --- a/app/sdks/0.7.0/client-flutter-dev/docs/examples/account/get-sessions.md +++ /dev/null @@ -1,20 +0,0 @@ -import 'package:appwrite_dev/appwrite_dev.dart'; - -void main() { // Init SDK - Client client = Client(); - Account account = Account(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = account.getSessions( ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/docs/examples/account/get.md b/app/sdks/0.7.0/client-flutter-dev/docs/examples/account/get.md deleted file mode 100644 index cd05062a69..0000000000 --- a/app/sdks/0.7.0/client-flutter-dev/docs/examples/account/get.md +++ /dev/null @@ -1,20 +0,0 @@ -import 'package:appwrite_dev/appwrite_dev.dart'; - -void main() { // Init SDK - Client client = Client(); - Account account = Account(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = account.get( ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/docs/examples/account/update-email.md b/app/sdks/0.7.0/client-flutter-dev/docs/examples/account/update-email.md deleted file mode 100644 index 9fc86a7aae..0000000000 --- a/app/sdks/0.7.0/client-flutter-dev/docs/examples/account/update-email.md +++ /dev/null @@ -1,23 +0,0 @@ -import 'package:appwrite_dev/appwrite_dev.dart'; - -void main() { // Init SDK - Client client = Client(); - Account account = Account(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = account.updateEmail( - email: 'email@example.com', - password: 'password', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/docs/examples/account/update-name.md b/app/sdks/0.7.0/client-flutter-dev/docs/examples/account/update-name.md deleted file mode 100644 index e5e218a515..0000000000 --- a/app/sdks/0.7.0/client-flutter-dev/docs/examples/account/update-name.md +++ /dev/null @@ -1,22 +0,0 @@ -import 'package:appwrite_dev/appwrite_dev.dart'; - -void main() { // Init SDK - Client client = Client(); - Account account = Account(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = account.updateName( - name: '[NAME]', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/docs/examples/account/update-password.md b/app/sdks/0.7.0/client-flutter-dev/docs/examples/account/update-password.md deleted file mode 100644 index 869b4d9a30..0000000000 --- a/app/sdks/0.7.0/client-flutter-dev/docs/examples/account/update-password.md +++ /dev/null @@ -1,23 +0,0 @@ -import 'package:appwrite_dev/appwrite_dev.dart'; - -void main() { // Init SDK - Client client = Client(); - Account account = Account(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = account.updatePassword( - password: 'password', - oldPassword: 'password', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/docs/examples/account/update-prefs.md b/app/sdks/0.7.0/client-flutter-dev/docs/examples/account/update-prefs.md deleted file mode 100644 index 0d50469742..0000000000 --- a/app/sdks/0.7.0/client-flutter-dev/docs/examples/account/update-prefs.md +++ /dev/null @@ -1,22 +0,0 @@ -import 'package:appwrite_dev/appwrite_dev.dart'; - -void main() { // Init SDK - Client client = Client(); - Account account = Account(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = account.updatePrefs( - prefs: {}, - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/docs/examples/account/update-recovery.md b/app/sdks/0.7.0/client-flutter-dev/docs/examples/account/update-recovery.md deleted file mode 100644 index e028e60a7d..0000000000 --- a/app/sdks/0.7.0/client-flutter-dev/docs/examples/account/update-recovery.md +++ /dev/null @@ -1,25 +0,0 @@ -import 'package:appwrite_dev/appwrite_dev.dart'; - -void main() { // Init SDK - Client client = Client(); - Account account = Account(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = account.updateRecovery( - userId: '[USER_ID]', - secret: '[SECRET]', - password: 'password', - passwordAgain: 'password', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/docs/examples/account/update-verification.md b/app/sdks/0.7.0/client-flutter-dev/docs/examples/account/update-verification.md deleted file mode 100644 index 48d669efcc..0000000000 --- a/app/sdks/0.7.0/client-flutter-dev/docs/examples/account/update-verification.md +++ /dev/null @@ -1,23 +0,0 @@ -import 'package:appwrite_dev/appwrite_dev.dart'; - -void main() { // Init SDK - Client client = Client(); - Account account = Account(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = account.updateVerification( - userId: '[USER_ID]', - secret: '[SECRET]', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/docs/examples/avatars/get-browser.md b/app/sdks/0.7.0/client-flutter-dev/docs/examples/avatars/get-browser.md deleted file mode 100644 index dec7863b1f..0000000000 --- a/app/sdks/0.7.0/client-flutter-dev/docs/examples/avatars/get-browser.md +++ /dev/null @@ -1,17 +0,0 @@ -import 'package:appwrite_dev/appwrite_dev.dart'; - -void main() { // Init SDK - Client client = Client(); - Avatars avatars = Avatars(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - String result = avatars.getBrowser( - code: 'aa', - ); - - print(result); // Resource URL string -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/docs/examples/avatars/get-credit-card.md b/app/sdks/0.7.0/client-flutter-dev/docs/examples/avatars/get-credit-card.md deleted file mode 100644 index e2746c4999..0000000000 --- a/app/sdks/0.7.0/client-flutter-dev/docs/examples/avatars/get-credit-card.md +++ /dev/null @@ -1,17 +0,0 @@ -import 'package:appwrite_dev/appwrite_dev.dart'; - -void main() { // Init SDK - Client client = Client(); - Avatars avatars = Avatars(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - String result = avatars.getCreditCard( - code: 'amex', - ); - - print(result); // Resource URL string -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/docs/examples/avatars/get-favicon.md b/app/sdks/0.7.0/client-flutter-dev/docs/examples/avatars/get-favicon.md deleted file mode 100644 index 1c56335b9f..0000000000 --- a/app/sdks/0.7.0/client-flutter-dev/docs/examples/avatars/get-favicon.md +++ /dev/null @@ -1,17 +0,0 @@ -import 'package:appwrite_dev/appwrite_dev.dart'; - -void main() { // Init SDK - Client client = Client(); - Avatars avatars = Avatars(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - String result = avatars.getFavicon( - url: 'https://example.com', - ); - - print(result); // Resource URL string -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/docs/examples/avatars/get-flag.md b/app/sdks/0.7.0/client-flutter-dev/docs/examples/avatars/get-flag.md deleted file mode 100644 index 8a91f608ce..0000000000 --- a/app/sdks/0.7.0/client-flutter-dev/docs/examples/avatars/get-flag.md +++ /dev/null @@ -1,17 +0,0 @@ -import 'package:appwrite_dev/appwrite_dev.dart'; - -void main() { // Init SDK - Client client = Client(); - Avatars avatars = Avatars(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - String result = avatars.getFlag( - code: 'af', - ); - - print(result); // Resource URL string -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/docs/examples/avatars/get-image.md b/app/sdks/0.7.0/client-flutter-dev/docs/examples/avatars/get-image.md deleted file mode 100644 index a2cbea98e3..0000000000 --- a/app/sdks/0.7.0/client-flutter-dev/docs/examples/avatars/get-image.md +++ /dev/null @@ -1,17 +0,0 @@ -import 'package:appwrite_dev/appwrite_dev.dart'; - -void main() { // Init SDK - Client client = Client(); - Avatars avatars = Avatars(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - String result = avatars.getImage( - url: 'https://example.com', - ); - - print(result); // Resource URL string -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/docs/examples/avatars/get-q-r.md b/app/sdks/0.7.0/client-flutter-dev/docs/examples/avatars/get-q-r.md deleted file mode 100644 index 2737297082..0000000000 --- a/app/sdks/0.7.0/client-flutter-dev/docs/examples/avatars/get-q-r.md +++ /dev/null @@ -1,17 +0,0 @@ -import 'package:appwrite_dev/appwrite_dev.dart'; - -void main() { // Init SDK - Client client = Client(); - Avatars avatars = Avatars(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - String result = avatars.getQR( - text: '[TEXT]', - ); - - print(result); // Resource URL string -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/docs/examples/database/create-document.md b/app/sdks/0.7.0/client-flutter-dev/docs/examples/database/create-document.md deleted file mode 100644 index 6fc27bdfbb..0000000000 --- a/app/sdks/0.7.0/client-flutter-dev/docs/examples/database/create-document.md +++ /dev/null @@ -1,25 +0,0 @@ -import 'package:appwrite_dev/appwrite_dev.dart'; - -void main() { // Init SDK - Client client = Client(); - Database database = Database(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = database.createDocument( - collectionId: '[COLLECTION_ID]', - data: {}, - read: [], - write: [], - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/docs/examples/database/delete-document.md b/app/sdks/0.7.0/client-flutter-dev/docs/examples/database/delete-document.md deleted file mode 100644 index 74bcd69d9a..0000000000 --- a/app/sdks/0.7.0/client-flutter-dev/docs/examples/database/delete-document.md +++ /dev/null @@ -1,23 +0,0 @@ -import 'package:appwrite_dev/appwrite_dev.dart'; - -void main() { // Init SDK - Client client = Client(); - Database database = Database(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = database.deleteDocument( - collectionId: '[COLLECTION_ID]', - documentId: '[DOCUMENT_ID]', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/docs/examples/database/get-document.md b/app/sdks/0.7.0/client-flutter-dev/docs/examples/database/get-document.md deleted file mode 100644 index 639209ed3c..0000000000 --- a/app/sdks/0.7.0/client-flutter-dev/docs/examples/database/get-document.md +++ /dev/null @@ -1,23 +0,0 @@ -import 'package:appwrite_dev/appwrite_dev.dart'; - -void main() { // Init SDK - Client client = Client(); - Database database = Database(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = database.getDocument( - collectionId: '[COLLECTION_ID]', - documentId: '[DOCUMENT_ID]', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/docs/examples/database/list-documents.md b/app/sdks/0.7.0/client-flutter-dev/docs/examples/database/list-documents.md deleted file mode 100644 index 41eac5dd9a..0000000000 --- a/app/sdks/0.7.0/client-flutter-dev/docs/examples/database/list-documents.md +++ /dev/null @@ -1,22 +0,0 @@ -import 'package:appwrite_dev/appwrite_dev.dart'; - -void main() { // Init SDK - Client client = Client(); - Database database = Database(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = database.listDocuments( - collectionId: '[COLLECTION_ID]', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/docs/examples/database/update-document.md b/app/sdks/0.7.0/client-flutter-dev/docs/examples/database/update-document.md deleted file mode 100644 index 0b153b1595..0000000000 --- a/app/sdks/0.7.0/client-flutter-dev/docs/examples/database/update-document.md +++ /dev/null @@ -1,26 +0,0 @@ -import 'package:appwrite_dev/appwrite_dev.dart'; - -void main() { // Init SDK - Client client = Client(); - Database database = Database(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = database.updateDocument( - collectionId: '[COLLECTION_ID]', - documentId: '[DOCUMENT_ID]', - data: {}, - read: [], - write: [], - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/docs/examples/locale/get-continents.md b/app/sdks/0.7.0/client-flutter-dev/docs/examples/locale/get-continents.md deleted file mode 100644 index 2c6bd7389f..0000000000 --- a/app/sdks/0.7.0/client-flutter-dev/docs/examples/locale/get-continents.md +++ /dev/null @@ -1,20 +0,0 @@ -import 'package:appwrite_dev/appwrite_dev.dart'; - -void main() { // Init SDK - Client client = Client(); - Locale locale = Locale(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = locale.getContinents( ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/docs/examples/locale/get-countries-e-u.md b/app/sdks/0.7.0/client-flutter-dev/docs/examples/locale/get-countries-e-u.md deleted file mode 100644 index 443fb2d115..0000000000 --- a/app/sdks/0.7.0/client-flutter-dev/docs/examples/locale/get-countries-e-u.md +++ /dev/null @@ -1,20 +0,0 @@ -import 'package:appwrite_dev/appwrite_dev.dart'; - -void main() { // Init SDK - Client client = Client(); - Locale locale = Locale(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = locale.getCountriesEU( ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/docs/examples/locale/get-countries-phones.md b/app/sdks/0.7.0/client-flutter-dev/docs/examples/locale/get-countries-phones.md deleted file mode 100644 index e08e2bca47..0000000000 --- a/app/sdks/0.7.0/client-flutter-dev/docs/examples/locale/get-countries-phones.md +++ /dev/null @@ -1,20 +0,0 @@ -import 'package:appwrite_dev/appwrite_dev.dart'; - -void main() { // Init SDK - Client client = Client(); - Locale locale = Locale(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = locale.getCountriesPhones( ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/docs/examples/locale/get-countries.md b/app/sdks/0.7.0/client-flutter-dev/docs/examples/locale/get-countries.md deleted file mode 100644 index a64a23c666..0000000000 --- a/app/sdks/0.7.0/client-flutter-dev/docs/examples/locale/get-countries.md +++ /dev/null @@ -1,20 +0,0 @@ -import 'package:appwrite_dev/appwrite_dev.dart'; - -void main() { // Init SDK - Client client = Client(); - Locale locale = Locale(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = locale.getCountries( ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/docs/examples/locale/get-currencies.md b/app/sdks/0.7.0/client-flutter-dev/docs/examples/locale/get-currencies.md deleted file mode 100644 index e086245ffd..0000000000 --- a/app/sdks/0.7.0/client-flutter-dev/docs/examples/locale/get-currencies.md +++ /dev/null @@ -1,20 +0,0 @@ -import 'package:appwrite_dev/appwrite_dev.dart'; - -void main() { // Init SDK - Client client = Client(); - Locale locale = Locale(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = locale.getCurrencies( ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/docs/examples/locale/get.md b/app/sdks/0.7.0/client-flutter-dev/docs/examples/locale/get.md deleted file mode 100644 index 5cb8ae176e..0000000000 --- a/app/sdks/0.7.0/client-flutter-dev/docs/examples/locale/get.md +++ /dev/null @@ -1,20 +0,0 @@ -import 'package:appwrite_dev/appwrite_dev.dart'; - -void main() { // Init SDK - Client client = Client(); - Locale locale = Locale(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = locale.get( ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/docs/examples/storage/create-file.md b/app/sdks/0.7.0/client-flutter-dev/docs/examples/storage/create-file.md deleted file mode 100644 index d824bd5831..0000000000 --- a/app/sdks/0.7.0/client-flutter-dev/docs/examples/storage/create-file.md +++ /dev/null @@ -1,25 +0,0 @@ -import 'dart:io'; -import 'package:appwrite_dev/appwrite_dev.dart'; - -void main() { // Init SDK - Client client = Client(); - Storage storage = Storage(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = storage.createFile( - file: await MultipartFile.fromFile('./path-to-files/image.jpg', 'image.jpg'), - read: [], - write: [], - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/docs/examples/storage/delete-file.md b/app/sdks/0.7.0/client-flutter-dev/docs/examples/storage/delete-file.md deleted file mode 100644 index 88e7b8815c..0000000000 --- a/app/sdks/0.7.0/client-flutter-dev/docs/examples/storage/delete-file.md +++ /dev/null @@ -1,22 +0,0 @@ -import 'package:appwrite_dev/appwrite_dev.dart'; - -void main() { // Init SDK - Client client = Client(); - Storage storage = Storage(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = storage.deleteFile( - fileId: '[FILE_ID]', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/docs/examples/storage/get-file-download.md b/app/sdks/0.7.0/client-flutter-dev/docs/examples/storage/get-file-download.md deleted file mode 100644 index 483340e24a..0000000000 --- a/app/sdks/0.7.0/client-flutter-dev/docs/examples/storage/get-file-download.md +++ /dev/null @@ -1,17 +0,0 @@ -import 'package:appwrite_dev/appwrite_dev.dart'; - -void main() { // Init SDK - Client client = Client(); - Storage storage = Storage(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - String result = storage.getFileDownload( - fileId: '[FILE_ID]', - ); - - print(result); // Resource URL string -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/docs/examples/storage/get-file-preview.md b/app/sdks/0.7.0/client-flutter-dev/docs/examples/storage/get-file-preview.md deleted file mode 100644 index dd8d924fe7..0000000000 --- a/app/sdks/0.7.0/client-flutter-dev/docs/examples/storage/get-file-preview.md +++ /dev/null @@ -1,17 +0,0 @@ -import 'package:appwrite_dev/appwrite_dev.dart'; - -void main() { // Init SDK - Client client = Client(); - Storage storage = Storage(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - String result = storage.getFilePreview( - fileId: '[FILE_ID]', - ); - - print(result); // Resource URL string -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/docs/examples/storage/get-file-view.md b/app/sdks/0.7.0/client-flutter-dev/docs/examples/storage/get-file-view.md deleted file mode 100644 index 8ed6a946e0..0000000000 --- a/app/sdks/0.7.0/client-flutter-dev/docs/examples/storage/get-file-view.md +++ /dev/null @@ -1,17 +0,0 @@ -import 'package:appwrite_dev/appwrite_dev.dart'; - -void main() { // Init SDK - Client client = Client(); - Storage storage = Storage(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - String result = storage.getFileView( - fileId: '[FILE_ID]', - ); - - print(result); // Resource URL string -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/docs/examples/storage/get-file.md b/app/sdks/0.7.0/client-flutter-dev/docs/examples/storage/get-file.md deleted file mode 100644 index 4e398f88fd..0000000000 --- a/app/sdks/0.7.0/client-flutter-dev/docs/examples/storage/get-file.md +++ /dev/null @@ -1,22 +0,0 @@ -import 'package:appwrite_dev/appwrite_dev.dart'; - -void main() { // Init SDK - Client client = Client(); - Storage storage = Storage(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = storage.getFile( - fileId: '[FILE_ID]', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/docs/examples/storage/list-files.md b/app/sdks/0.7.0/client-flutter-dev/docs/examples/storage/list-files.md deleted file mode 100644 index d72ba29e03..0000000000 --- a/app/sdks/0.7.0/client-flutter-dev/docs/examples/storage/list-files.md +++ /dev/null @@ -1,21 +0,0 @@ -import 'package:appwrite_dev/appwrite_dev.dart'; - -void main() { // Init SDK - Client client = Client(); - Storage storage = Storage(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = storage.listFiles( - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/docs/examples/storage/update-file.md b/app/sdks/0.7.0/client-flutter-dev/docs/examples/storage/update-file.md deleted file mode 100644 index 95e213ddc2..0000000000 --- a/app/sdks/0.7.0/client-flutter-dev/docs/examples/storage/update-file.md +++ /dev/null @@ -1,24 +0,0 @@ -import 'package:appwrite_dev/appwrite_dev.dart'; - -void main() { // Init SDK - Client client = Client(); - Storage storage = Storage(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = storage.updateFile( - fileId: '[FILE_ID]', - read: [], - write: [], - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/docs/examples/teams/create-membership.md b/app/sdks/0.7.0/client-flutter-dev/docs/examples/teams/create-membership.md deleted file mode 100644 index 31bf7ec1af..0000000000 --- a/app/sdks/0.7.0/client-flutter-dev/docs/examples/teams/create-membership.md +++ /dev/null @@ -1,25 +0,0 @@ -import 'package:appwrite_dev/appwrite_dev.dart'; - -void main() { // Init SDK - Client client = Client(); - Teams teams = Teams(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = teams.createMembership( - teamId: '[TEAM_ID]', - email: 'email@example.com', - roles: [], - url: 'https://example.com', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/docs/examples/teams/create.md b/app/sdks/0.7.0/client-flutter-dev/docs/examples/teams/create.md deleted file mode 100644 index e50279de01..0000000000 --- a/app/sdks/0.7.0/client-flutter-dev/docs/examples/teams/create.md +++ /dev/null @@ -1,22 +0,0 @@ -import 'package:appwrite_dev/appwrite_dev.dart'; - -void main() { // Init SDK - Client client = Client(); - Teams teams = Teams(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = teams.create( - name: '[NAME]', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/docs/examples/teams/delete-membership.md b/app/sdks/0.7.0/client-flutter-dev/docs/examples/teams/delete-membership.md deleted file mode 100644 index 015507d3a2..0000000000 --- a/app/sdks/0.7.0/client-flutter-dev/docs/examples/teams/delete-membership.md +++ /dev/null @@ -1,23 +0,0 @@ -import 'package:appwrite_dev/appwrite_dev.dart'; - -void main() { // Init SDK - Client client = Client(); - Teams teams = Teams(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = teams.deleteMembership( - teamId: '[TEAM_ID]', - inviteId: '[INVITE_ID]', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/docs/examples/teams/delete.md b/app/sdks/0.7.0/client-flutter-dev/docs/examples/teams/delete.md deleted file mode 100644 index 6cc1367f9b..0000000000 --- a/app/sdks/0.7.0/client-flutter-dev/docs/examples/teams/delete.md +++ /dev/null @@ -1,22 +0,0 @@ -import 'package:appwrite_dev/appwrite_dev.dart'; - -void main() { // Init SDK - Client client = Client(); - Teams teams = Teams(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = teams.delete( - teamId: '[TEAM_ID]', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/docs/examples/teams/get-memberships.md b/app/sdks/0.7.0/client-flutter-dev/docs/examples/teams/get-memberships.md deleted file mode 100644 index d427c9ac47..0000000000 --- a/app/sdks/0.7.0/client-flutter-dev/docs/examples/teams/get-memberships.md +++ /dev/null @@ -1,22 +0,0 @@ -import 'package:appwrite_dev/appwrite_dev.dart'; - -void main() { // Init SDK - Client client = Client(); - Teams teams = Teams(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = teams.getMemberships( - teamId: '[TEAM_ID]', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/docs/examples/teams/get.md b/app/sdks/0.7.0/client-flutter-dev/docs/examples/teams/get.md deleted file mode 100644 index 1bca70a23f..0000000000 --- a/app/sdks/0.7.0/client-flutter-dev/docs/examples/teams/get.md +++ /dev/null @@ -1,22 +0,0 @@ -import 'package:appwrite_dev/appwrite_dev.dart'; - -void main() { // Init SDK - Client client = Client(); - Teams teams = Teams(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = teams.get( - teamId: '[TEAM_ID]', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/docs/examples/teams/list.md b/app/sdks/0.7.0/client-flutter-dev/docs/examples/teams/list.md deleted file mode 100644 index c56e7a5dd5..0000000000 --- a/app/sdks/0.7.0/client-flutter-dev/docs/examples/teams/list.md +++ /dev/null @@ -1,21 +0,0 @@ -import 'package:appwrite_dev/appwrite_dev.dart'; - -void main() { // Init SDK - Client client = Client(); - Teams teams = Teams(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = teams.list( - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/docs/examples/teams/update-membership-status.md b/app/sdks/0.7.0/client-flutter-dev/docs/examples/teams/update-membership-status.md deleted file mode 100644 index 6098b38ed9..0000000000 --- a/app/sdks/0.7.0/client-flutter-dev/docs/examples/teams/update-membership-status.md +++ /dev/null @@ -1,25 +0,0 @@ -import 'package:appwrite_dev/appwrite_dev.dart'; - -void main() { // Init SDK - Client client = Client(); - Teams teams = Teams(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = teams.updateMembershipStatus( - teamId: '[TEAM_ID]', - inviteId: '[INVITE_ID]', - userId: '[USER_ID]', - secret: '[SECRET]', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/docs/examples/teams/update.md b/app/sdks/0.7.0/client-flutter-dev/docs/examples/teams/update.md deleted file mode 100644 index 2494f408d9..0000000000 --- a/app/sdks/0.7.0/client-flutter-dev/docs/examples/teams/update.md +++ /dev/null @@ -1,23 +0,0 @@ -import 'package:appwrite_dev/appwrite_dev.dart'; - -void main() { // Init SDK - Client client = Client(); - Teams teams = Teams(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = teams.update( - teamId: '[TEAM_ID]', - name: '[NAME]', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/example/README.md b/app/sdks/0.7.0/client-flutter-dev/example/README.md deleted file mode 100644 index f6768a5f85..0000000000 --- a/app/sdks/0.7.0/client-flutter-dev/example/README.md +++ /dev/null @@ -1,55 +0,0 @@ -# Examples - -Init your Appwrite client: - -```dart - Client client = Client(); - - client - .setEndpoint('https://localhost/v1') // Your Appwrite Endpoint - .setProject('5e8cf4f46b5e8') // Your project ID - .setSelfSigned() // Remove in production - ; - -``` - -Create a new user and session: - -```dart -Account account = Account(client); - -Response user = await account.create(email: 'me@appwrite.io', password: 'password', name: 'My Name'); - -Response session = await account.createSession(email: 'me@appwrite.io', password: 'password'); - -``` - -Fetch user profile: - -```dart -Account account = Account(client); - -Response profile = await account.get(); -``` - -Upload File: - -```dart -Storage storage = Storage(client); - -MultipartFile file = MultipartFile.fromFile('./path-to-file/image.jpg', filename: 'image.jpg'); - -storage.createFile( - file: file, - read: ['*'], - write: [] -) -.then((response) { - print(response); // File uploaded! -}) -.catchError((error) { - print(error.response); -}); -``` - -All examples and API features are available at the [official Appwrite docs](https://appwrite.io/docs) \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/lib/appwrite.dart b/app/sdks/0.7.0/client-flutter-dev/lib/appwrite.dart deleted file mode 100644 index 95d0b72cfe..0000000000 --- a/app/sdks/0.7.0/client-flutter-dev/lib/appwrite.dart +++ /dev/null @@ -1,10 +0,0 @@ -export 'package:dio/dio.dart' show Response; - -export 'client.dart'; -export 'enums.dart'; -export 'services/account.dart'; -export 'services/avatars.dart'; -export 'services/database.dart'; -export 'services/locale.dart'; -export 'services/storage.dart'; -export 'services/teams.dart'; diff --git a/app/sdks/0.7.0/client-flutter-dev/lib/appwrite_dev.dart b/app/sdks/0.7.0/client-flutter-dev/lib/appwrite_dev.dart deleted file mode 100644 index 95d0b72cfe..0000000000 --- a/app/sdks/0.7.0/client-flutter-dev/lib/appwrite_dev.dart +++ /dev/null @@ -1,10 +0,0 @@ -export 'package:dio/dio.dart' show Response; - -export 'client.dart'; -export 'enums.dart'; -export 'services/account.dart'; -export 'services/avatars.dart'; -export 'services/database.dart'; -export 'services/locale.dart'; -export 'services/storage.dart'; -export 'services/teams.dart'; diff --git a/app/sdks/0.7.0/client-flutter-dev/lib/client.dart b/app/sdks/0.7.0/client-flutter-dev/lib/client.dart deleted file mode 100644 index a5583fcd00..0000000000 --- a/app/sdks/0.7.0/client-flutter-dev/lib/client.dart +++ /dev/null @@ -1,134 +0,0 @@ -import 'dart:io'; - -import 'package:dio/dio.dart'; -import 'package:flutter/foundation.dart'; -import 'package:dio/adapter.dart'; -import 'package:dio_cookie_manager/dio_cookie_manager.dart'; -import 'package:cookie_jar/cookie_jar.dart'; -import 'package:path_provider/path_provider.dart'; -import 'package:package_info/package_info.dart'; - -import 'enums.dart'; - -class Client { - String endPoint; - String type = 'unknown'; - Map headers; - Map config; - bool selfSigned; - bool initialized = false; - Dio http; - PersistCookieJar cookieJar; - - Client({this.endPoint = 'https://appwrite.io/v1', this.selfSigned = false, Dio http}) : this.http = http ?? Dio() { - // Platform is not supported in web so if web, set type to web automatically and skip Platform check - if(kIsWeb) { - type = 'web'; - }else{ - type = (Platform.isIOS) ? 'ios' : type; - type = (Platform.isMacOS) ? 'macos' : type; - type = (Platform.isAndroid) ? 'android' : type; - type = (Platform.isLinux) ? 'linux' : type; - type = (Platform.isWindows) ? 'windows' : type; - type = (Platform.isFuchsia) ? 'fuchsia' : type; - } - - this.headers = { - 'content-type': 'application/json', - 'x-sdk-version': 'appwrite:flutter:0.3.2', - }; - - this.config = {}; - - assert(endPoint.startsWith(RegExp("http://|https://")), "endPoint $endPoint must start with 'http'"); - } - - Future _getCookiePath() async { - final directory = await getApplicationDocumentsDirectory(); - final path = directory.path; - final Directory dir = new Directory('$path/cookies'); - await dir.create(); - return dir; - } - - /// Your project ID - Client setProject(value) { - config['project'] = value; - addHeader('X-Appwrite-Project', value); - return this; - } - - Client setLocale(value) { - config['locale'] = value; - addHeader('X-Appwrite-Locale', value); - return this; - } - - Client setSelfSigned({bool status = true}) { - selfSigned = status; - return this; - } - - Client setEndpoint(String endPoint) { - this.endPoint = endPoint; - this.http.options.baseUrl = this.endPoint; - return this; - } - - Client addHeader(String key, String value) { - headers[key] = value; - - return this; - } - - Future init() async { - if(!initialized) { - // if web skip cookie implementation and origin header as those are automatically handled by browsers - if(!kIsWeb) { - final Directory cookieDir = await _getCookiePath(); - cookieJar = new PersistCookieJar(dir:cookieDir.path); - this.http.interceptors.add(CookieManager(cookieJar)); - PackageInfo packageInfo = await PackageInfo.fromPlatform(); - addHeader('Origin', 'appwrite-' + type + '://' + packageInfo.packageName); - }else{ - // if web set httpClientAdapter as BrowserHttpClientAdapter with withCredentials true to make cookies work - this.http.options.extra['withCredentials'] = true; - } - - this.http.options.baseUrl = this.endPoint; - this.http.options.validateStatus = (status) => status < 400; - } - } - - Future call(HttpMethod method, {String path = '', Map headers = const {}, Map params = const {}}) async { - if(selfSigned) { - // Allow self signed requests - (http.httpClientAdapter as DefaultHttpClientAdapter).onHttpClientCreate = (HttpClient client) { - client.badCertificateCallback = (X509Certificate cert, String host, int port) => true; - return client; - }; - } - - await this.init(); - - // Origin is hardcoded for testing - Options options = Options( - headers: {...this.headers, ...headers}, - method: method.name(), - ); - - if(headers['content-type'] == 'multipart/form-data') { - return http.request(path, data: FormData.fromMap(params), options: options); - } - - if (method == HttpMethod.get) { - params.keys.forEach((key) {if (params[key] is int || params[key] is double) { - params[key] = params[key].toString(); - }}); - - return http.get(path, queryParameters: params, options: options); - } else { - return http.request(path, data: params, options: options); - } - } -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/lib/enums.dart b/app/sdks/0.7.0/client-flutter-dev/lib/enums.dart deleted file mode 100644 index 2757f6073e..0000000000 --- a/app/sdks/0.7.0/client-flutter-dev/lib/enums.dart +++ /dev/null @@ -1,15 +0,0 @@ -enum HttpMethod { get, post, put, delete, patch } - -extension HttpMethodString on HttpMethod { - String name() { - return this.toString().split('.').last.toUpperCase(); - } -} - -enum OrderType { asc, desc } - -extension OrderTypeString on OrderType { - String name() { - return this.toString().split('.').last.toUpperCase(); - } -} diff --git a/app/sdks/0.7.0/client-flutter-dev/lib/service.dart b/app/sdks/0.7.0/client-flutter-dev/lib/service.dart deleted file mode 100644 index 1ae319b705..0000000000 --- a/app/sdks/0.7.0/client-flutter-dev/lib/service.dart +++ /dev/null @@ -1,7 +0,0 @@ -import 'client.dart'; - -class Service { - final Client client; - - const Service(this.client); -} diff --git a/app/sdks/0.7.0/client-flutter-dev/lib/services/account.dart b/app/sdks/0.7.0/client-flutter-dev/lib/services/account.dart deleted file mode 100644 index 02fc33400e..0000000000 --- a/app/sdks/0.7.0/client-flutter-dev/lib/services/account.dart +++ /dev/null @@ -1,424 +0,0 @@ - -import 'dart:io'; - -import 'package:dio/dio.dart'; -import 'package:meta/meta.dart'; -import 'package:flutter_web_auth/flutter_web_auth.dart'; - -import "../client.dart"; -import '../enums.dart'; -import "../service.dart"; - -class Account extends Service { - Account(Client client): super(client); - - /// Get Account - /// - /// Get currently logged in user data as JSON object. - /// - Future get() { - final String path = '/account'; - - final Map params = { - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.get, path: path, params: params, headers: headers); - } - - /// Create Account - /// - /// Use this endpoint to allow a new user to register a new account in your - /// project. After the user registration completes successfully, you can use - /// the [/account/verfication](/docs/client/account#createVerification) route - /// to start verifying the user email address. To allow your new user to login - /// to his new account, you need to create a new [account - /// session](/docs/client/account#createSession). - /// - Future create({@required String email, @required String password, String name = ''}) { - final String path = '/account'; - - final Map params = { - 'email': email, - 'password': password, - 'name': name, - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.post, path: path, params: params, headers: headers); - } - - /// Delete Account - /// - /// Delete a currently logged in user account. Behind the scene, the user - /// record is not deleted but permanently blocked from any access. This is done - /// to avoid deleted accounts being overtaken by new users with the same email - /// address. Any user-related resources like documents or storage files should - /// be deleted separately. - /// - Future delete() { - final String path = '/account'; - - final Map params = { - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.delete, path: path, params: params, headers: headers); - } - - /// Update Account Email - /// - /// Update currently logged in user account email address. After changing user - /// address, user confirmation status is being reset and a new confirmation - /// mail is sent. For security measures, user password is required to complete - /// this request. - /// - Future updateEmail({@required String email, @required String password}) { - final String path = '/account/email'; - - final Map params = { - 'email': email, - 'password': password, - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.patch, path: path, params: params, headers: headers); - } - - /// Get Account 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 getLogs() { - final String path = '/account/logs'; - - final Map params = { - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.get, path: path, params: params, headers: headers); - } - - /// Update Account Name - /// - /// Update currently logged in user account name. - /// - Future updateName({@required String name}) { - final String path = '/account/name'; - - final Map params = { - 'name': name, - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.patch, path: path, params: params, headers: headers); - } - - /// Update Account Password - /// - /// Update currently logged in user password. For validation, user is required - /// to pass the password twice. - /// - Future updatePassword({@required String password, @required String oldPassword}) { - final String path = '/account/password'; - - final Map params = { - 'password': password, - 'oldPassword': oldPassword, - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.patch, path: path, params: params, headers: headers); - } - - /// Get Account Preferences - /// - /// Get currently logged in user preferences as a key-value object. - /// - Future getPrefs() { - final String path = '/account/prefs'; - - final Map params = { - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.get, path: path, params: params, headers: headers); - } - - /// Update Account Preferences - /// - /// Update currently logged in user account preferences. You can pass only the - /// specific settings you wish to update. - /// - Future updatePrefs({@required dynamic prefs}) { - final String path = '/account/prefs'; - - final Map params = { - 'prefs': prefs, - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.patch, path: path, params: params, headers: headers); - } - - /// Create Password Recovery - /// - /// Sends the user an email with a temporary secret key for password reset. - /// When the user clicks the confirmation link he is redirected back to your - /// app password reset URL with the secret key and email address values - /// attached to the URL query string. Use the query string params to submit a - /// request to the [PUT /account/recovery](/docs/client/account#updateRecovery) - /// endpoint to complete the process. - /// - Future createRecovery({@required String email, @required String url}) { - final String path = '/account/recovery'; - - final Map params = { - 'email': email, - 'url': url, - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.post, path: path, params: params, headers: headers); - } - - /// Complete Password Recovery - /// - /// Use this endpoint to complete the user account password reset. Both the - /// **userId** and **secret** arguments will be passed as query parameters to - /// the redirect URL you have provided when sending your request to the [POST - /// /account/recovery](/docs/client/account#createRecovery) endpoint. - /// - /// Please note that in order to avoid a [Redirect - /// 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}) { - final String path = '/account/recovery'; - - final Map params = { - 'userId': userId, - 'secret': secret, - 'password': password, - 'passwordAgain': passwordAgain, - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.put, path: path, params: params, headers: headers); - } - - /// Get Account Sessions - /// - /// Get currently logged in user list of active sessions across different - /// devices. - /// - Future getSessions() { - final String path = '/account/sessions'; - - final Map params = { - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.get, path: path, params: params, headers: headers); - } - - /// Create Account Session - /// - /// Allow the user to login into his account by providing a valid email and - /// password combination. This route will create a new session for the user. - /// - Future createSession({@required String email, @required String password}) { - final String path = '/account/sessions'; - - final Map params = { - 'email': email, - 'password': password, - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.post, path: path, params: params, headers: headers); - } - - /// Delete All Account Sessions - /// - /// Delete all sessions from the user account and remove any sessions cookies - /// from the end client. - /// - Future deleteSessions() { - final String path = '/account/sessions'; - - final Map params = { - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.delete, path: path, params: params, headers: headers); - } - - /// Create Account Session with OAuth2 - /// - /// Allow the user to login to his account using the OAuth2 provider of his - /// choice. Each OAuth2 provider should be enabled from the Appwrite console - /// first. Use the success and failure arguments to provide a redirect URL's - /// back to your app when login is completed. - /// - Future createOAuth2Session({@required String provider, String success = 'https://appwrite.io/auth/oauth2/success', String failure = 'https://appwrite.io/auth/oauth2/failure'}) { - final String path = '/account/sessions/oauth2/{provider}'.replaceAll(RegExp('{provider}'), provider); - - final Map params = { - 'success': success, - 'failure': failure, - 'project': client.config['project'], - }; - - - final List query = []; - - params.forEach((key, value) { - if (value is List) { - for (var item in value) { - query.add(Uri.encodeComponent(key + '[]') + '=' + Uri.encodeComponent(item)); - } - } - else { - query.add(Uri.encodeComponent(key) + '=' + Uri.encodeComponent(value)); - } - }); - - Uri endpoint = Uri.parse(client.endPoint); - Uri url = new Uri(scheme: endpoint.scheme, - host: endpoint.host, - port: endpoint.port, - path: endpoint.path + path, - query: query.join('&') - ); - - return FlutterWebAuth.authenticate( - url: url.toString(), - callbackUrlScheme: "appwrite-callback-" + client.config['project'] - ).then((value) async { - Uri url = Uri.parse(value); - Cookie cookie = new Cookie(url.queryParameters['key'], url.queryParameters['secret']); - cookie.domain = Uri.parse(client.endPoint).host; - cookie.httpOnly = true; - cookie.path = '/'; - List cookies = [cookie]; - await client.init(); - client.cookieJar.saveFromResponse(Uri.parse(client.endPoint), cookies); - }); - } - - /// Delete Account Session - /// - /// Use this endpoint to log out the currently logged in user from all his - /// account sessions across all his different devices. When using the option id - /// argument, only the session unique ID provider will be deleted. - /// - Future deleteSession({@required String sessionId}) { - final String path = '/account/sessions/{sessionId}'.replaceAll(RegExp('{sessionId}'), sessionId); - - final Map params = { - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.delete, path: path, params: params, headers: headers); - } - - /// Create Email Verification - /// - /// Use this endpoint to send a verification message to your user email address - /// to confirm they are the valid owners of that address. Both the **userId** - /// and **secret** arguments will be passed as query parameters to the URL you - /// have provider to be attached to the verification email. The provided URL - /// should redirect the user back for your app and allow you to complete the - /// verification process by verifying both the **userId** and **secret** - /// parameters. Learn more about how to [complete the verification - /// process](/docs/client/account#updateAccountVerification). - /// - /// Please note that in order to avoid a [Redirect - /// 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 createVerification({@required String url}) { - final String path = '/account/verification'; - - final Map params = { - 'url': url, - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.post, path: path, params: params, headers: headers); - } - - /// Complete Email Verification - /// - /// 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}) { - final String path = '/account/verification'; - - final Map params = { - 'userId': userId, - 'secret': secret, - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.put, path: path, params: params, headers: headers); - } -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/lib/services/avatars.dart b/app/sdks/0.7.0/client-flutter-dev/lib/services/avatars.dart deleted file mode 100644 index 828ea7dfb0..0000000000 --- a/app/sdks/0.7.0/client-flutter-dev/lib/services/avatars.dart +++ /dev/null @@ -1,198 +0,0 @@ - - -import 'package:dio/dio.dart'; -import 'package:meta/meta.dart'; - -import "../client.dart"; -import '../enums.dart'; -import "../service.dart"; - -class Avatars extends Service { - Avatars(Client client): super(client); - - /// Get Browser Icon - /// - /// You can use this endpoint to show different browser icons to your users. - /// The code argument receives the browser code as it appears in your user - /// /account/sessions endpoint. Use width, height and quality arguments to - /// change the output settings. - /// - String getBrowser({@required String code, int width = 100, int height = 100, int quality = 100}) { - final String path = '/avatars/browsers/{code}'.replaceAll(RegExp('{code}'), code); - - final Map params = { - 'width': width, - 'height': height, - 'quality': quality, - 'project': client.config['project'], - }; - - params.keys.forEach((key) {if (params[key] is int || params[key] is double) { - params[key] = params[key].toString(); - }}); - - Uri endpoint = Uri.parse(client.endPoint); - Uri location = new Uri(scheme: endpoint.scheme, - host: endpoint.host, - port: endpoint.port, - path: endpoint.path + path, - queryParameters:params, - ); - - return location.toString(); - } - - /// Get Credit Card Icon - /// - /// Need to display your users with your billing method or their payment - /// methods? The credit card endpoint will return you the icon of the credit - /// card provider you need. Use width, height and quality arguments to change - /// the output settings. - /// - String getCreditCard({@required String code, int width = 100, int height = 100, int quality = 100}) { - final String path = '/avatars/credit-cards/{code}'.replaceAll(RegExp('{code}'), code); - - final Map params = { - 'width': width, - 'height': height, - 'quality': quality, - 'project': client.config['project'], - }; - - params.keys.forEach((key) {if (params[key] is int || params[key] is double) { - params[key] = params[key].toString(); - }}); - - Uri endpoint = Uri.parse(client.endPoint); - Uri location = new Uri(scheme: endpoint.scheme, - host: endpoint.host, - port: endpoint.port, - path: endpoint.path + path, - queryParameters:params, - ); - - return location.toString(); - } - - /// Get Favicon - /// - /// Use this endpoint to fetch the favorite icon (AKA favicon) of a any remote - /// website URL. - /// - String getFavicon({@required String url}) { - final String path = '/avatars/favicon'; - - final Map params = { - 'url': url, - 'project': client.config['project'], - }; - - params.keys.forEach((key) {if (params[key] is int || params[key] is double) { - params[key] = params[key].toString(); - }}); - - Uri endpoint = Uri.parse(client.endPoint); - Uri location = new Uri(scheme: endpoint.scheme, - host: endpoint.host, - port: endpoint.port, - path: endpoint.path + path, - queryParameters:params, - ); - - return location.toString(); - } - - /// Get Country Flag - /// - /// You can use this endpoint to show different country flags icons to your - /// users. The code argument receives the 2 letter country code. Use width, - /// height and quality arguments to change the output settings. - /// - String getFlag({@required String code, int width = 100, int height = 100, int quality = 100}) { - final String path = '/avatars/flags/{code}'.replaceAll(RegExp('{code}'), code); - - final Map params = { - 'width': width, - 'height': height, - 'quality': quality, - 'project': client.config['project'], - }; - - params.keys.forEach((key) {if (params[key] is int || params[key] is double) { - params[key] = params[key].toString(); - }}); - - Uri endpoint = Uri.parse(client.endPoint); - Uri location = new Uri(scheme: endpoint.scheme, - host: endpoint.host, - port: endpoint.port, - path: endpoint.path + path, - queryParameters:params, - ); - - return location.toString(); - } - - /// Get Image from URL - /// - /// Use this endpoint to fetch a remote image URL and crop it to any image size - /// you want. This endpoint is very useful if you need to crop and display - /// remote images in your app or in case you want to make sure a 3rd party - /// image is properly served using a TLS protocol. - /// - String getImage({@required String url, int width = 400, int height = 400}) { - final String path = '/avatars/image'; - - final Map params = { - 'url': url, - 'width': width, - 'height': height, - 'project': client.config['project'], - }; - - params.keys.forEach((key) {if (params[key] is int || params[key] is double) { - params[key] = params[key].toString(); - }}); - - Uri endpoint = Uri.parse(client.endPoint); - Uri location = new Uri(scheme: endpoint.scheme, - host: endpoint.host, - port: endpoint.port, - path: endpoint.path + path, - queryParameters:params, - ); - - return location.toString(); - } - - /// 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. - /// - String getQR({@required String text, int size = 400, int margin = 1, int download = 0}) { - final String path = '/avatars/qr'; - - final Map params = { - 'text': text, - 'size': size, - 'margin': margin, - 'download': download, - 'project': client.config['project'], - }; - - params.keys.forEach((key) {if (params[key] is int || params[key] is double) { - params[key] = params[key].toString(); - }}); - - Uri endpoint = Uri.parse(client.endPoint); - Uri location = new Uri(scheme: endpoint.scheme, - host: endpoint.host, - port: endpoint.port, - path: endpoint.path + path, - queryParameters:params, - ); - - return location.toString(); - } -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/lib/services/database.dart b/app/sdks/0.7.0/client-flutter-dev/lib/services/database.dart deleted file mode 100644 index 88082feef7..0000000000 --- a/app/sdks/0.7.0/client-flutter-dev/lib/services/database.dart +++ /dev/null @@ -1,121 +0,0 @@ - - -import 'package:dio/dio.dart'; -import 'package:meta/meta.dart'; - -import "../client.dart"; -import '../enums.dart'; -import "../service.dart"; - -class Database extends Service { - Database(Client client): super(client); - - /// List Documents - /// - /// Get a list of all the user documents. You can use the query params to - /// filter your results. On admin mode, this endpoint will return a list of all - /// of the project documents. [Learn more about different API - /// modes](/docs/admin). - /// - Future listDocuments({@required String collectionId, List filters = const [], int offset = 0, int limit = 50, String orderField = '\$id', OrderType orderType = OrderType.asc, String orderCast = 'string', String search = '', int first = 0, int last = 0}) { - final String path = '/database/collections/{collectionId}/documents'.replaceAll(RegExp('{collectionId}'), collectionId); - - final Map params = { - 'filters': filters, - 'offset': offset, - 'limit': limit, - 'orderField': orderField, - 'orderType': orderType.name(), - 'orderCast': orderCast, - 'search': search, - 'first': first, - 'last': last, - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.get, path: path, params: params, headers: headers); - } - - /// Create Document - /// - /// Create a new Document. Before using this route, you should create a new - /// collection resource using either a [server - /// integration](/docs/server/database?sdk=nodejs#createCollection) API or - /// directly from your database console. - /// - Future createDocument({@required String collectionId, @required dynamic data, @required List read, @required List write, String parentDocument = '', String parentProperty = '', String parentPropertyType = 'assign'}) { - final String path = '/database/collections/{collectionId}/documents'.replaceAll(RegExp('{collectionId}'), collectionId); - - final Map params = { - 'data': data, - 'read': read, - 'write': write, - 'parentDocument': parentDocument, - 'parentProperty': parentProperty, - 'parentPropertyType': parentPropertyType, - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.post, path: path, params: params, headers: headers); - } - - /// Get Document - /// - /// Get document by its unique ID. This endpoint response returns a JSON object - /// with the document data. - /// - Future getDocument({@required String collectionId, @required String documentId}) { - final String path = '/database/collections/{collectionId}/documents/{documentId}'.replaceAll(RegExp('{collectionId}'), collectionId).replaceAll(RegExp('{documentId}'), documentId); - - final Map params = { - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.get, path: path, params: params, headers: headers); - } - - /// Update Document - Future updateDocument({@required String collectionId, @required String documentId, @required dynamic data, @required List read, @required List write}) { - final String path = '/database/collections/{collectionId}/documents/{documentId}'.replaceAll(RegExp('{collectionId}'), collectionId).replaceAll(RegExp('{documentId}'), documentId); - - final Map params = { - 'data': data, - 'read': read, - 'write': write, - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.patch, path: path, params: params, headers: headers); - } - - /// Delete Document - /// - /// Delete document by its unique ID. This endpoint deletes only the parent - /// documents, his attributes and relations to other documents. Child documents - /// **will not** be deleted. - /// - Future deleteDocument({@required String collectionId, @required String documentId}) { - final String path = '/database/collections/{collectionId}/documents/{documentId}'.replaceAll(RegExp('{collectionId}'), collectionId).replaceAll(RegExp('{documentId}'), documentId); - - final Map params = { - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.delete, path: path, params: params, headers: headers); - } -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/lib/services/locale.dart b/app/sdks/0.7.0/client-flutter-dev/lib/services/locale.dart deleted file mode 100644 index 91ea1567ef..0000000000 --- a/app/sdks/0.7.0/client-flutter-dev/lib/services/locale.dart +++ /dev/null @@ -1,125 +0,0 @@ - - -import 'package:dio/dio.dart'; -import 'package:meta/meta.dart'; - -import "../client.dart"; -import '../enums.dart'; -import "../service.dart"; - -class Locale extends Service { - Locale(Client client): super(client); - - /// Get User Locale - /// - /// Get the current user location based on IP. Returns an object with user - /// country code, country name, continent name, continent code, ip address and - /// suggested currency. You can use the locale header to get the data in a - /// supported language. - /// - /// ([IP Geolocation by DB-IP](https://db-ip.com)) - /// - Future get() { - final String path = '/locale'; - - final Map params = { - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.get, path: path, params: params, headers: headers); - } - - /// List Continents - /// - /// List of all continents. You can use the locale header to get the data in a - /// supported language. - /// - Future getContinents() { - final String path = '/locale/continents'; - - final Map params = { - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.get, path: path, params: params, headers: headers); - } - - /// List Countries - /// - /// List of all countries. You can use the locale header to get the data in a - /// supported language. - /// - Future getCountries() { - final String path = '/locale/countries'; - - final Map params = { - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.get, path: path, params: params, headers: headers); - } - - /// 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 getCountriesEU() { - final String path = '/locale/countries/eu'; - - final Map params = { - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.get, path: path, params: params, headers: headers); - } - - /// 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 getCountriesPhones() { - final String path = '/locale/countries/phones'; - - final Map params = { - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.get, path: path, params: params, headers: headers); - } - - /// List Currencies - /// - /// List of all currencies, including currency symol, 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 getCurrencies() { - final String path = '/locale/currencies'; - - final Map params = { - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.get, path: path, params: params, headers: headers); - } -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/lib/services/storage.dart b/app/sdks/0.7.0/client-flutter-dev/lib/services/storage.dart deleted file mode 100644 index 51f9345050..0000000000 --- a/app/sdks/0.7.0/client-flutter-dev/lib/services/storage.dart +++ /dev/null @@ -1,203 +0,0 @@ - - -import 'package:dio/dio.dart'; -import 'package:meta/meta.dart'; - -import "../client.dart"; -import '../enums.dart'; -import "../service.dart"; - -class Storage extends Service { - Storage(Client client): super(client); - - /// List Files - /// - /// Get a list of all the user files. You can use the query params to filter - /// your results. On admin mode, this endpoint will return a list of all of the - /// project files. [Learn more about different API modes](/docs/admin). - /// - Future listFiles({String search = '', int limit = 25, int offset = 0, OrderType orderType = OrderType.asc}) { - final String path = '/storage/files'; - - final Map params = { - 'search': search, - 'limit': limit, - 'offset': offset, - 'orderType': orderType.name(), - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.get, path: path, params: params, headers: headers); - } - - /// Create File - /// - /// Create a new file. The user who creates the file will automatically be - /// assigned to read and write access unless he has passed custom values for - /// read and write arguments. - /// - Future createFile({@required MultipartFile file, @required List read, @required List write}) { - final String path = '/storage/files'; - - final Map params = { - 'file': file, - 'read': read, - 'write': write, - }; - - final Map headers = { - 'content-type': 'multipart/form-data', - }; - - return client.call(HttpMethod.post, path: path, params: params, headers: headers); - } - - /// Get File - /// - /// Get file by its unique ID. This endpoint response returns a JSON object - /// with the file metadata. - /// - Future getFile({@required String fileId}) { - final String path = '/storage/files/{fileId}'.replaceAll(RegExp('{fileId}'), fileId); - - final Map params = { - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.get, path: path, params: params, headers: headers); - } - - /// Update File - /// - /// Update file by its unique ID. Only users with write permissions have access - /// to update this resource. - /// - Future updateFile({@required String fileId, @required List read, @required List write}) { - final String path = '/storage/files/{fileId}'.replaceAll(RegExp('{fileId}'), fileId); - - final Map params = { - 'read': read, - 'write': write, - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.put, path: path, params: params, headers: headers); - } - - /// Delete File - /// - /// Delete a file by its unique ID. Only users with write permissions have - /// access to delete this resource. - /// - Future deleteFile({@required String fileId}) { - final String path = '/storage/files/{fileId}'.replaceAll(RegExp('{fileId}'), fileId); - - final Map params = { - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.delete, path: path, params: params, headers: headers); - } - - /// Get File for Download - /// - /// Get 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. - /// - String getFileDownload({@required String fileId}) { - final String path = '/storage/files/{fileId}/download'.replaceAll(RegExp('{fileId}'), fileId); - - final Map params = { - 'project': client.config['project'], - }; - - params.keys.forEach((key) {if (params[key] is int || params[key] is double) { - params[key] = params[key].toString(); - }}); - - Uri endpoint = Uri.parse(client.endPoint); - Uri location = new Uri(scheme: endpoint.scheme, - host: endpoint.host, - port: endpoint.port, - path: endpoint.path + path, - queryParameters:params, - ); - - return location.toString(); - } - - /// Get File Preview - /// - /// Get a file preview image. Currently, this method supports preview for image - /// files (jpg, png, and gif), other supported formats, like pdf, docs, slides, - /// and spreadsheets, will return the file icon image. You can also pass query - /// string arguments for cutting and resizing your preview image. - /// - String getFilePreview({@required String fileId, int width = 0, int height = 0, int quality = 100, String background = '', String output = ''}) { - final String path = '/storage/files/{fileId}/preview'.replaceAll(RegExp('{fileId}'), fileId); - - final Map params = { - 'width': width, - 'height': height, - 'quality': quality, - 'background': background, - 'output': output, - 'project': client.config['project'], - }; - - params.keys.forEach((key) {if (params[key] is int || params[key] is double) { - params[key] = params[key].toString(); - }}); - - Uri endpoint = Uri.parse(client.endPoint); - Uri location = new Uri(scheme: endpoint.scheme, - host: endpoint.host, - port: endpoint.port, - path: endpoint.path + path, - queryParameters:params, - ); - - return location.toString(); - } - - /// Get File for View - /// - /// Get file content by its unique ID. This endpoint is similar to the download - /// method but returns with no 'Content-Disposition: attachment' header. - /// - String getFileView({@required String fileId, String as = ''}) { - final String path = '/storage/files/{fileId}/view'.replaceAll(RegExp('{fileId}'), fileId); - - final Map params = { - 'as': as, - 'project': client.config['project'], - }; - - params.keys.forEach((key) {if (params[key] is int || params[key] is double) { - params[key] = params[key].toString(); - }}); - - Uri endpoint = Uri.parse(client.endPoint); - Uri location = new Uri(scheme: endpoint.scheme, - host: endpoint.host, - port: endpoint.port, - path: endpoint.path + path, - queryParameters:params, - ); - - return location.toString(); - } -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/lib/services/teams.dart b/app/sdks/0.7.0/client-flutter-dev/lib/services/teams.dart deleted file mode 100644 index b98590b33d..0000000000 --- a/app/sdks/0.7.0/client-flutter-dev/lib/services/teams.dart +++ /dev/null @@ -1,203 +0,0 @@ - - -import 'package:dio/dio.dart'; -import 'package:meta/meta.dart'; - -import "../client.dart"; -import '../enums.dart'; -import "../service.dart"; - -class Teams extends Service { - Teams(Client client): super(client); - - /// List Teams - /// - /// Get a list of all the current user teams. You can use the query params to - /// filter your results. On admin mode, this endpoint will return a list of all - /// of the project teams. [Learn more about different API modes](/docs/admin). - /// - Future list({String search = '', int limit = 25, int offset = 0, OrderType orderType = OrderType.asc}) { - final String path = '/teams'; - - final Map params = { - 'search': search, - 'limit': limit, - 'offset': offset, - 'orderType': orderType.name(), - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.get, path: path, params: params, headers: headers); - } - - /// Create Team - /// - /// Create a new team. The user who creates the team will automatically be - /// assigned as the owner of the team. The team owner can invite new members, - /// who will be able add new owners and update or delete the team from your - /// project. - /// - Future create({@required String name, List roles = const ["owner"]}) { - final String path = '/teams'; - - final Map params = { - 'name': name, - 'roles': roles, - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.post, path: path, params: params, headers: headers); - } - - /// Get Team - /// - /// Get team by its unique ID. All team members have read access for this - /// resource. - /// - Future get({@required String teamId}) { - final String path = '/teams/{teamId}'.replaceAll(RegExp('{teamId}'), teamId); - - final Map params = { - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.get, path: path, params: params, headers: headers); - } - - /// Update Team - /// - /// Update team by its unique ID. Only team owners have write access for this - /// resource. - /// - Future update({@required String teamId, @required String name}) { - final String path = '/teams/{teamId}'.replaceAll(RegExp('{teamId}'), teamId); - - final Map params = { - 'name': name, - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.put, path: path, params: params, headers: headers); - } - - /// Delete Team - /// - /// Delete team by its unique ID. Only team owners have write access for this - /// resource. - /// - Future delete({@required String teamId}) { - final String path = '/teams/{teamId}'.replaceAll(RegExp('{teamId}'), teamId); - - final Map params = { - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.delete, path: path, params: params, headers: headers); - } - - /// Get Team Memberships - /// - /// Get team members by the team unique ID. All team members have read access - /// for this list of resources. - /// - Future getMemberships({@required String teamId}) { - final String path = '/teams/{teamId}/memberships'.replaceAll(RegExp('{teamId}'), teamId); - - final Map params = { - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.get, path: path, params: params, headers: headers); - } - - /// Create Team Membership - /// - /// Use this endpoint to invite a new member to join your team. An email with a - /// link to join the team will be sent to the new member email address if the - /// member doesn't exist in the project it will be created automatically. - /// - /// Use the 'URL' parameter to redirect the user from the invitation email back - /// to your app. When the user is redirected, use the [Update Team Membership - /// Status](/docs/client/teams#updateMembershipStatus) endpoint to allow the - /// user to accept the invitation to the team. - /// - /// Please note that in order to avoid a [Redirect - /// Attacks](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) - /// the only valid redirect URL's are the once from domains you have set when - /// added your platforms in the console interface. - /// - Future createMembership({@required String teamId, @required String email, @required List roles, @required String url, String name = ''}) { - final String path = '/teams/{teamId}/memberships'.replaceAll(RegExp('{teamId}'), teamId); - - final Map params = { - 'email': email, - 'name': name, - 'roles': roles, - 'url': url, - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.post, path: path, params: params, headers: headers); - } - - /// 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 he didn't accept it. - /// - Future deleteMembership({@required String teamId, @required String inviteId}) { - final String path = '/teams/{teamId}/memberships/{inviteId}'.replaceAll(RegExp('{teamId}'), teamId).replaceAll(RegExp('{inviteId}'), inviteId); - - final Map params = { - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.delete, path: path, params: params, headers: headers); - } - - /// Update Team Membership Status - /// - /// Use this endpoint to allow a user to accept an invitation to join a team - /// after he is being redirected back to your app from the invitation email he - /// was sent. - /// - Future updateMembershipStatus({@required String teamId, @required String inviteId, @required String userId, @required String secret}) { - final String path = '/teams/{teamId}/memberships/{inviteId}/status'.replaceAll(RegExp('{teamId}'), teamId).replaceAll(RegExp('{inviteId}'), inviteId); - - final Map params = { - 'userId': userId, - 'secret': secret, - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.patch, path: path, params: params, headers: headers); - } -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter-dev/pubspec.yaml b/app/sdks/0.7.0/client-flutter-dev/pubspec.yaml deleted file mode 100644 index 7d3646b8ee..0000000000 --- a/app/sdks/0.7.0/client-flutter-dev/pubspec.yaml +++ /dev/null @@ -1,23 +0,0 @@ -name: appwrite_dev -version: 0.3.2 -description: Appwrite is an open-source self-hosted backend server that abstract and simplify complex and repetitive development tasks behind a very simple REST API -homepage: https://appwrite.io -repository: https://github.com/appwrite/sdk-for-flutter-dev -issue_tracker: https://github.com/appwrite/sdk-generator/issues -documentation: https://appwrite.io/support -environment: - sdk: '>=2.6.0 <3.0.0' -dependencies: - meta: ^1.1.8 - path_provider: ^1.6.14 - package_info: ^0.4.3 - dio: ^3.0.10 - cookie_jar: ^1.0.1 - dio_cookie_manager: ^1.0.0 - flutter_web_auth: ^0.2.4 - flutter: - sdk: flutter - -dev_dependencies: - flutter_test: - sdk: flutter \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/CHANGELOG.md b/app/sdks/0.7.0/client-flutter/CHANGELOG.md deleted file mode 100644 index a584ad8b9a..0000000000 --- a/app/sdks/0.7.0/client-flutter/CHANGELOG.md +++ /dev/null @@ -1,60 +0,0 @@ -## 0.3.0-dev.2 - -- Fix for an error when using a self-signed certificate for Web - -## 0.3.0-dev.1 - -- Updated package dependencies (@lohanidamodar) -- Added Flutter for Web compatibility (@lohanidamodar) - -## 0.2.3 - -- Fixed OAuth2 cookie bug, where a new session cookie couldn't overwrite an old cookie - -## 0.2.2 - -- Fixed an error that happend when the OAuth session creation request was sent before any other API call -- Fixed a bug in the Avatars service where location URL generation had syntax error - -## 0.2.1 - -- Fixed callback scheme - -## 0.2.0 - -- Updated flutter_web_auth plugin to version 0.2.4 -- Added per project unique callback for OAuth2 redirects to aviod conflicts between multiple Appwrite projects - -## 0.1.1 - -- Updated flutter_web_auth version - -## 0.1.0 - -- Added examples file -- Some minor style fixes - -## 0.0.14 - -- Using MultipartFile for file uploads - -## 0.0.13 - -- Fix for file upload method - -## 0.0.12 - -- Added file upload support for storage service - -## 0.0.11 - -- Added integration with web auth plugin to support Appwrite OAuth API - -## 0.0.9 - -- Updated deafult params - -## 0.0.8 - -- Fixed compilation error in Client class -- Shorter description for package \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/LICENSE b/app/sdks/0.7.0/client-flutter/LICENSE deleted file mode 100644 index fc7c051a91..0000000000 --- a/app/sdks/0.7.0/client-flutter/LICENSE +++ /dev/null @@ -1,12 +0,0 @@ -Copyright (c) 2019 Appwrite (https://appwrite.io) and individual contributors. -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - - 3. Neither the name Appwrite nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/README.md b/app/sdks/0.7.0/client-flutter/README.md deleted file mode 100644 index d272426ee3..0000000000 --- a/app/sdks/0.7.0/client-flutter/README.md +++ /dev/null @@ -1,38 +0,0 @@ -# Appwrite Flutter SDK - -[![pub package](https://img.shields.io/pub/v/appwrite.svg)](https://pub.dartlang.org/packages/appwrite) -![License](https://img.shields.io/github/license/appwrite/sdk-for-flutter.svg?v=1) -![Version](https://img.shields.io/badge/api%20version-0.6.2-blue.svg?v=1) - -**This SDK is compatible with Appwrite server version 0.6.2. For older versions, please check previous releases.** - -Appwrite is an open-source backend as a service server that abstract and simplify complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way. - Use the Flutter SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools. - For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs) - - - -![Appwrite](https://appwrite.io/images/github.png) - -## Installation - -Add this to your package's `pubspec.yaml` file: - -```yml -dependencies: - appwrite: ^0.3.0-dev.2 -``` - -You can install packages from the command line: - -```bash -pub get appwrite -``` - -## Contribution - -This library is auto-generated by Appwrite custom [SDK Generator](https://github.com/appwrite/sdk-generator). To learn more about how you can help us improve this SDK, please check the [contribution guide](https://github.com/appwrite/sdk-generator/blob/master/CONTRIBUTING.md) before sending a pull-request. - -## License - -Please see the [BSD-3-Clause license](https://raw.githubusercontent.com/appwrite/appwrite/master/LICENSE) file for more information. \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/docs/examples/account/create-o-auth2session.md b/app/sdks/0.7.0/client-flutter/docs/examples/account/create-o-auth2session.md deleted file mode 100644 index 0e26dd27af..0000000000 --- a/app/sdks/0.7.0/client-flutter/docs/examples/account/create-o-auth2session.md +++ /dev/null @@ -1,22 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Account account = Account(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = account.createOAuth2Session( - provider: 'amazon', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/docs/examples/account/create-recovery.md b/app/sdks/0.7.0/client-flutter/docs/examples/account/create-recovery.md deleted file mode 100644 index 50db45b15d..0000000000 --- a/app/sdks/0.7.0/client-flutter/docs/examples/account/create-recovery.md +++ /dev/null @@ -1,23 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Account account = Account(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = account.createRecovery( - email: 'email@example.com', - url: 'https://example.com', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/docs/examples/account/create-session.md b/app/sdks/0.7.0/client-flutter/docs/examples/account/create-session.md deleted file mode 100644 index ef824b4eca..0000000000 --- a/app/sdks/0.7.0/client-flutter/docs/examples/account/create-session.md +++ /dev/null @@ -1,23 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Account account = Account(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = account.createSession( - email: 'email@example.com', - password: 'password', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/docs/examples/account/create-verification.md b/app/sdks/0.7.0/client-flutter/docs/examples/account/create-verification.md deleted file mode 100644 index 6b9b1ace40..0000000000 --- a/app/sdks/0.7.0/client-flutter/docs/examples/account/create-verification.md +++ /dev/null @@ -1,22 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Account account = Account(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = account.createVerification( - url: 'https://example.com', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/docs/examples/account/create.md b/app/sdks/0.7.0/client-flutter/docs/examples/account/create.md deleted file mode 100644 index 384258ae68..0000000000 --- a/app/sdks/0.7.0/client-flutter/docs/examples/account/create.md +++ /dev/null @@ -1,23 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Account account = Account(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = account.create( - email: 'email@example.com', - password: 'password', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/docs/examples/account/delete-session.md b/app/sdks/0.7.0/client-flutter/docs/examples/account/delete-session.md deleted file mode 100644 index 80a3f505d0..0000000000 --- a/app/sdks/0.7.0/client-flutter/docs/examples/account/delete-session.md +++ /dev/null @@ -1,22 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Account account = Account(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = account.deleteSession( - sessionId: '[SESSION_ID]', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/docs/examples/account/delete-sessions.md b/app/sdks/0.7.0/client-flutter/docs/examples/account/delete-sessions.md deleted file mode 100644 index 5e947fabc2..0000000000 --- a/app/sdks/0.7.0/client-flutter/docs/examples/account/delete-sessions.md +++ /dev/null @@ -1,20 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Account account = Account(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = account.deleteSessions( ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/docs/examples/account/delete.md b/app/sdks/0.7.0/client-flutter/docs/examples/account/delete.md deleted file mode 100644 index 2853a1f437..0000000000 --- a/app/sdks/0.7.0/client-flutter/docs/examples/account/delete.md +++ /dev/null @@ -1,20 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Account account = Account(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = account.delete( ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/docs/examples/account/get-logs.md b/app/sdks/0.7.0/client-flutter/docs/examples/account/get-logs.md deleted file mode 100644 index 8f52f8220b..0000000000 --- a/app/sdks/0.7.0/client-flutter/docs/examples/account/get-logs.md +++ /dev/null @@ -1,20 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Account account = Account(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = account.getLogs( ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/docs/examples/account/get-prefs.md b/app/sdks/0.7.0/client-flutter/docs/examples/account/get-prefs.md deleted file mode 100644 index 01d57a5499..0000000000 --- a/app/sdks/0.7.0/client-flutter/docs/examples/account/get-prefs.md +++ /dev/null @@ -1,20 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Account account = Account(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = account.getPrefs( ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/docs/examples/account/get-sessions.md b/app/sdks/0.7.0/client-flutter/docs/examples/account/get-sessions.md deleted file mode 100644 index e921bda59b..0000000000 --- a/app/sdks/0.7.0/client-flutter/docs/examples/account/get-sessions.md +++ /dev/null @@ -1,20 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Account account = Account(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = account.getSessions( ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/docs/examples/account/get.md b/app/sdks/0.7.0/client-flutter/docs/examples/account/get.md deleted file mode 100644 index 35241b5607..0000000000 --- a/app/sdks/0.7.0/client-flutter/docs/examples/account/get.md +++ /dev/null @@ -1,20 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Account account = Account(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = account.get( ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/docs/examples/account/update-email.md b/app/sdks/0.7.0/client-flutter/docs/examples/account/update-email.md deleted file mode 100644 index 4a1a002db4..0000000000 --- a/app/sdks/0.7.0/client-flutter/docs/examples/account/update-email.md +++ /dev/null @@ -1,23 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Account account = Account(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = account.updateEmail( - email: 'email@example.com', - password: 'password', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/docs/examples/account/update-name.md b/app/sdks/0.7.0/client-flutter/docs/examples/account/update-name.md deleted file mode 100644 index fa432bb34a..0000000000 --- a/app/sdks/0.7.0/client-flutter/docs/examples/account/update-name.md +++ /dev/null @@ -1,22 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Account account = Account(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = account.updateName( - name: '[NAME]', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/docs/examples/account/update-password.md b/app/sdks/0.7.0/client-flutter/docs/examples/account/update-password.md deleted file mode 100644 index 9bd8ad9b77..0000000000 --- a/app/sdks/0.7.0/client-flutter/docs/examples/account/update-password.md +++ /dev/null @@ -1,23 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Account account = Account(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = account.updatePassword( - password: 'password', - oldPassword: 'password', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/docs/examples/account/update-prefs.md b/app/sdks/0.7.0/client-flutter/docs/examples/account/update-prefs.md deleted file mode 100644 index 443252f89a..0000000000 --- a/app/sdks/0.7.0/client-flutter/docs/examples/account/update-prefs.md +++ /dev/null @@ -1,22 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Account account = Account(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = account.updatePrefs( - prefs: {}, - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/docs/examples/account/update-recovery.md b/app/sdks/0.7.0/client-flutter/docs/examples/account/update-recovery.md deleted file mode 100644 index 5140235d49..0000000000 --- a/app/sdks/0.7.0/client-flutter/docs/examples/account/update-recovery.md +++ /dev/null @@ -1,25 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Account account = Account(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = account.updateRecovery( - userId: '[USER_ID]', - secret: '[SECRET]', - password: 'password', - passwordAgain: 'password', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/docs/examples/account/update-verification.md b/app/sdks/0.7.0/client-flutter/docs/examples/account/update-verification.md deleted file mode 100644 index b795cde92d..0000000000 --- a/app/sdks/0.7.0/client-flutter/docs/examples/account/update-verification.md +++ /dev/null @@ -1,23 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Account account = Account(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = account.updateVerification( - userId: '[USER_ID]', - secret: '[SECRET]', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/docs/examples/avatars/get-browser.md b/app/sdks/0.7.0/client-flutter/docs/examples/avatars/get-browser.md deleted file mode 100644 index 464767c4c0..0000000000 --- a/app/sdks/0.7.0/client-flutter/docs/examples/avatars/get-browser.md +++ /dev/null @@ -1,17 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Avatars avatars = Avatars(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - String result = avatars.getBrowser( - code: 'aa', - ); - - print(result); // Resource URL string -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/docs/examples/avatars/get-credit-card.md b/app/sdks/0.7.0/client-flutter/docs/examples/avatars/get-credit-card.md deleted file mode 100644 index 482c642402..0000000000 --- a/app/sdks/0.7.0/client-flutter/docs/examples/avatars/get-credit-card.md +++ /dev/null @@ -1,17 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Avatars avatars = Avatars(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - String result = avatars.getCreditCard( - code: 'amex', - ); - - print(result); // Resource URL string -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/docs/examples/avatars/get-favicon.md b/app/sdks/0.7.0/client-flutter/docs/examples/avatars/get-favicon.md deleted file mode 100644 index 60397b0af2..0000000000 --- a/app/sdks/0.7.0/client-flutter/docs/examples/avatars/get-favicon.md +++ /dev/null @@ -1,17 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Avatars avatars = Avatars(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - String result = avatars.getFavicon( - url: 'https://example.com', - ); - - print(result); // Resource URL string -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/docs/examples/avatars/get-flag.md b/app/sdks/0.7.0/client-flutter/docs/examples/avatars/get-flag.md deleted file mode 100644 index a9f7a711d9..0000000000 --- a/app/sdks/0.7.0/client-flutter/docs/examples/avatars/get-flag.md +++ /dev/null @@ -1,17 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Avatars avatars = Avatars(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - String result = avatars.getFlag( - code: 'af', - ); - - print(result); // Resource URL string -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/docs/examples/avatars/get-image.md b/app/sdks/0.7.0/client-flutter/docs/examples/avatars/get-image.md deleted file mode 100644 index 7cead1cb2f..0000000000 --- a/app/sdks/0.7.0/client-flutter/docs/examples/avatars/get-image.md +++ /dev/null @@ -1,17 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Avatars avatars = Avatars(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - String result = avatars.getImage( - url: 'https://example.com', - ); - - print(result); // Resource URL string -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/docs/examples/avatars/get-initials.md b/app/sdks/0.7.0/client-flutter/docs/examples/avatars/get-initials.md deleted file mode 100644 index b2e70788d6..0000000000 --- a/app/sdks/0.7.0/client-flutter/docs/examples/avatars/get-initials.md +++ /dev/null @@ -1,16 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Avatars avatars = Avatars(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - String result = avatars.getInitials( - ); - - print(result); // Resource URL string -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/docs/examples/avatars/get-q-r.md b/app/sdks/0.7.0/client-flutter/docs/examples/avatars/get-q-r.md deleted file mode 100644 index a5bcfd2c05..0000000000 --- a/app/sdks/0.7.0/client-flutter/docs/examples/avatars/get-q-r.md +++ /dev/null @@ -1,17 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Avatars avatars = Avatars(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - String result = avatars.getQR( - text: '[TEXT]', - ); - - print(result); // Resource URL string -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/docs/examples/database/create-document.md b/app/sdks/0.7.0/client-flutter/docs/examples/database/create-document.md deleted file mode 100644 index b7d540bc2d..0000000000 --- a/app/sdks/0.7.0/client-flutter/docs/examples/database/create-document.md +++ /dev/null @@ -1,25 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Database database = Database(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = database.createDocument( - collectionId: '[COLLECTION_ID]', - data: {}, - read: [], - write: [], - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/docs/examples/database/delete-document.md b/app/sdks/0.7.0/client-flutter/docs/examples/database/delete-document.md deleted file mode 100644 index 40c1cbdfe2..0000000000 --- a/app/sdks/0.7.0/client-flutter/docs/examples/database/delete-document.md +++ /dev/null @@ -1,23 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Database database = Database(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = database.deleteDocument( - collectionId: '[COLLECTION_ID]', - documentId: '[DOCUMENT_ID]', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/docs/examples/database/get-document.md b/app/sdks/0.7.0/client-flutter/docs/examples/database/get-document.md deleted file mode 100644 index 0c98142315..0000000000 --- a/app/sdks/0.7.0/client-flutter/docs/examples/database/get-document.md +++ /dev/null @@ -1,23 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Database database = Database(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = database.getDocument( - collectionId: '[COLLECTION_ID]', - documentId: '[DOCUMENT_ID]', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/docs/examples/database/list-documents.md b/app/sdks/0.7.0/client-flutter/docs/examples/database/list-documents.md deleted file mode 100644 index 0685e7f1aa..0000000000 --- a/app/sdks/0.7.0/client-flutter/docs/examples/database/list-documents.md +++ /dev/null @@ -1,22 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Database database = Database(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = database.listDocuments( - collectionId: '[COLLECTION_ID]', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/docs/examples/database/update-document.md b/app/sdks/0.7.0/client-flutter/docs/examples/database/update-document.md deleted file mode 100644 index 2f37cd767a..0000000000 --- a/app/sdks/0.7.0/client-flutter/docs/examples/database/update-document.md +++ /dev/null @@ -1,26 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Database database = Database(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = database.updateDocument( - collectionId: '[COLLECTION_ID]', - documentId: '[DOCUMENT_ID]', - data: {}, - read: [], - write: [], - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/docs/examples/locale/get-continents.md b/app/sdks/0.7.0/client-flutter/docs/examples/locale/get-continents.md deleted file mode 100644 index 2a6a6413ba..0000000000 --- a/app/sdks/0.7.0/client-flutter/docs/examples/locale/get-continents.md +++ /dev/null @@ -1,20 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Locale locale = Locale(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = locale.getContinents( ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/docs/examples/locale/get-countries-e-u.md b/app/sdks/0.7.0/client-flutter/docs/examples/locale/get-countries-e-u.md deleted file mode 100644 index 1934fc6709..0000000000 --- a/app/sdks/0.7.0/client-flutter/docs/examples/locale/get-countries-e-u.md +++ /dev/null @@ -1,20 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Locale locale = Locale(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = locale.getCountriesEU( ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/docs/examples/locale/get-countries-phones.md b/app/sdks/0.7.0/client-flutter/docs/examples/locale/get-countries-phones.md deleted file mode 100644 index f6b1f58749..0000000000 --- a/app/sdks/0.7.0/client-flutter/docs/examples/locale/get-countries-phones.md +++ /dev/null @@ -1,20 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Locale locale = Locale(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = locale.getCountriesPhones( ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/docs/examples/locale/get-countries.md b/app/sdks/0.7.0/client-flutter/docs/examples/locale/get-countries.md deleted file mode 100644 index 104584968f..0000000000 --- a/app/sdks/0.7.0/client-flutter/docs/examples/locale/get-countries.md +++ /dev/null @@ -1,20 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Locale locale = Locale(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = locale.getCountries( ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/docs/examples/locale/get-currencies.md b/app/sdks/0.7.0/client-flutter/docs/examples/locale/get-currencies.md deleted file mode 100644 index 8dc01fc68e..0000000000 --- a/app/sdks/0.7.0/client-flutter/docs/examples/locale/get-currencies.md +++ /dev/null @@ -1,20 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Locale locale = Locale(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = locale.getCurrencies( ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/docs/examples/locale/get-languages.md b/app/sdks/0.7.0/client-flutter/docs/examples/locale/get-languages.md deleted file mode 100644 index a4124d3cbd..0000000000 --- a/app/sdks/0.7.0/client-flutter/docs/examples/locale/get-languages.md +++ /dev/null @@ -1,20 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Locale locale = Locale(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = locale.getLanguages( ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/docs/examples/locale/get.md b/app/sdks/0.7.0/client-flutter/docs/examples/locale/get.md deleted file mode 100644 index 189fceb7d1..0000000000 --- a/app/sdks/0.7.0/client-flutter/docs/examples/locale/get.md +++ /dev/null @@ -1,20 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Locale locale = Locale(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = locale.get( ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/docs/examples/storage/create-file.md b/app/sdks/0.7.0/client-flutter/docs/examples/storage/create-file.md deleted file mode 100644 index 9f61be12f4..0000000000 --- a/app/sdks/0.7.0/client-flutter/docs/examples/storage/create-file.md +++ /dev/null @@ -1,25 +0,0 @@ -import 'dart:io'; -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Storage storage = Storage(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = storage.createFile( - file: await MultipartFile.fromFile('./path-to-files/image.jpg', 'image.jpg'), - read: [], - write: [], - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/docs/examples/storage/delete-file.md b/app/sdks/0.7.0/client-flutter/docs/examples/storage/delete-file.md deleted file mode 100644 index 271ed7b2dd..0000000000 --- a/app/sdks/0.7.0/client-flutter/docs/examples/storage/delete-file.md +++ /dev/null @@ -1,22 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Storage storage = Storage(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = storage.deleteFile( - fileId: '[FILE_ID]', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/docs/examples/storage/get-file-download.md b/app/sdks/0.7.0/client-flutter/docs/examples/storage/get-file-download.md deleted file mode 100644 index be3385a61b..0000000000 --- a/app/sdks/0.7.0/client-flutter/docs/examples/storage/get-file-download.md +++ /dev/null @@ -1,17 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Storage storage = Storage(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - String result = storage.getFileDownload( - fileId: '[FILE_ID]', - ); - - print(result); // Resource URL string -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/docs/examples/storage/get-file-preview.md b/app/sdks/0.7.0/client-flutter/docs/examples/storage/get-file-preview.md deleted file mode 100644 index 8bd1a47457..0000000000 --- a/app/sdks/0.7.0/client-flutter/docs/examples/storage/get-file-preview.md +++ /dev/null @@ -1,17 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Storage storage = Storage(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - String result = storage.getFilePreview( - fileId: '[FILE_ID]', - ); - - print(result); // Resource URL string -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/docs/examples/storage/get-file-view.md b/app/sdks/0.7.0/client-flutter/docs/examples/storage/get-file-view.md deleted file mode 100644 index 5803fd409f..0000000000 --- a/app/sdks/0.7.0/client-flutter/docs/examples/storage/get-file-view.md +++ /dev/null @@ -1,17 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Storage storage = Storage(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - String result = storage.getFileView( - fileId: '[FILE_ID]', - ); - - print(result); // Resource URL string -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/docs/examples/storage/get-file.md b/app/sdks/0.7.0/client-flutter/docs/examples/storage/get-file.md deleted file mode 100644 index feca667fa9..0000000000 --- a/app/sdks/0.7.0/client-flutter/docs/examples/storage/get-file.md +++ /dev/null @@ -1,22 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Storage storage = Storage(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = storage.getFile( - fileId: '[FILE_ID]', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/docs/examples/storage/list-files.md b/app/sdks/0.7.0/client-flutter/docs/examples/storage/list-files.md deleted file mode 100644 index 1963ec694d..0000000000 --- a/app/sdks/0.7.0/client-flutter/docs/examples/storage/list-files.md +++ /dev/null @@ -1,21 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Storage storage = Storage(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = storage.listFiles( - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/docs/examples/storage/update-file.md b/app/sdks/0.7.0/client-flutter/docs/examples/storage/update-file.md deleted file mode 100644 index a5ecbfe987..0000000000 --- a/app/sdks/0.7.0/client-flutter/docs/examples/storage/update-file.md +++ /dev/null @@ -1,24 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Storage storage = Storage(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = storage.updateFile( - fileId: '[FILE_ID]', - read: [], - write: [], - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/docs/examples/teams/create-membership.md b/app/sdks/0.7.0/client-flutter/docs/examples/teams/create-membership.md deleted file mode 100644 index e5e82de7b4..0000000000 --- a/app/sdks/0.7.0/client-flutter/docs/examples/teams/create-membership.md +++ /dev/null @@ -1,25 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Teams teams = Teams(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = teams.createMembership( - teamId: '[TEAM_ID]', - email: 'email@example.com', - roles: [], - url: 'https://example.com', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/docs/examples/teams/create.md b/app/sdks/0.7.0/client-flutter/docs/examples/teams/create.md deleted file mode 100644 index d11958ae6d..0000000000 --- a/app/sdks/0.7.0/client-flutter/docs/examples/teams/create.md +++ /dev/null @@ -1,22 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Teams teams = Teams(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = teams.create( - name: '[NAME]', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/docs/examples/teams/delete-membership.md b/app/sdks/0.7.0/client-flutter/docs/examples/teams/delete-membership.md deleted file mode 100644 index 3f57b840fe..0000000000 --- a/app/sdks/0.7.0/client-flutter/docs/examples/teams/delete-membership.md +++ /dev/null @@ -1,23 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Teams teams = Teams(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = teams.deleteMembership( - teamId: '[TEAM_ID]', - inviteId: '[INVITE_ID]', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/docs/examples/teams/delete.md b/app/sdks/0.7.0/client-flutter/docs/examples/teams/delete.md deleted file mode 100644 index 9fb488afec..0000000000 --- a/app/sdks/0.7.0/client-flutter/docs/examples/teams/delete.md +++ /dev/null @@ -1,22 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Teams teams = Teams(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = teams.delete( - teamId: '[TEAM_ID]', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/docs/examples/teams/get-memberships.md b/app/sdks/0.7.0/client-flutter/docs/examples/teams/get-memberships.md deleted file mode 100644 index 4edadfa2b4..0000000000 --- a/app/sdks/0.7.0/client-flutter/docs/examples/teams/get-memberships.md +++ /dev/null @@ -1,22 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Teams teams = Teams(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = teams.getMemberships( - teamId: '[TEAM_ID]', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/docs/examples/teams/get.md b/app/sdks/0.7.0/client-flutter/docs/examples/teams/get.md deleted file mode 100644 index 083565f7a6..0000000000 --- a/app/sdks/0.7.0/client-flutter/docs/examples/teams/get.md +++ /dev/null @@ -1,22 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Teams teams = Teams(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = teams.get( - teamId: '[TEAM_ID]', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/docs/examples/teams/list.md b/app/sdks/0.7.0/client-flutter/docs/examples/teams/list.md deleted file mode 100644 index 665020e928..0000000000 --- a/app/sdks/0.7.0/client-flutter/docs/examples/teams/list.md +++ /dev/null @@ -1,21 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Teams teams = Teams(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = teams.list( - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/docs/examples/teams/update-membership-status.md b/app/sdks/0.7.0/client-flutter/docs/examples/teams/update-membership-status.md deleted file mode 100644 index 616f64e148..0000000000 --- a/app/sdks/0.7.0/client-flutter/docs/examples/teams/update-membership-status.md +++ /dev/null @@ -1,25 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Teams teams = Teams(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = teams.updateMembershipStatus( - teamId: '[TEAM_ID]', - inviteId: '[INVITE_ID]', - userId: '[USER_ID]', - secret: '[SECRET]', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/docs/examples/teams/update.md b/app/sdks/0.7.0/client-flutter/docs/examples/teams/update.md deleted file mode 100644 index 915fb57d38..0000000000 --- a/app/sdks/0.7.0/client-flutter/docs/examples/teams/update.md +++ /dev/null @@ -1,23 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -void main() { // Init SDK - Client client = Client(); - Teams teams = Teams(client); - - client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - ; - - Future result = teams.update( - teamId: '[TEAM_ID]', - name: '[NAME]', - ); - - result - .then((response) { - print(response); - }).catchError((error) { - print(error.response); - }); -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/example/README.md b/app/sdks/0.7.0/client-flutter/example/README.md deleted file mode 100644 index f6768a5f85..0000000000 --- a/app/sdks/0.7.0/client-flutter/example/README.md +++ /dev/null @@ -1,55 +0,0 @@ -# Examples - -Init your Appwrite client: - -```dart - Client client = Client(); - - client - .setEndpoint('https://localhost/v1') // Your Appwrite Endpoint - .setProject('5e8cf4f46b5e8') // Your project ID - .setSelfSigned() // Remove in production - ; - -``` - -Create a new user and session: - -```dart -Account account = Account(client); - -Response user = await account.create(email: 'me@appwrite.io', password: 'password', name: 'My Name'); - -Response session = await account.createSession(email: 'me@appwrite.io', password: 'password'); - -``` - -Fetch user profile: - -```dart -Account account = Account(client); - -Response profile = await account.get(); -``` - -Upload File: - -```dart -Storage storage = Storage(client); - -MultipartFile file = MultipartFile.fromFile('./path-to-file/image.jpg', filename: 'image.jpg'); - -storage.createFile( - file: file, - read: ['*'], - write: [] -) -.then((response) { - print(response); // File uploaded! -}) -.catchError((error) { - print(error.response); -}); -``` - -All examples and API features are available at the [official Appwrite docs](https://appwrite.io/docs) \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/lib/appwrite.dart b/app/sdks/0.7.0/client-flutter/lib/appwrite.dart deleted file mode 100644 index 95d0b72cfe..0000000000 --- a/app/sdks/0.7.0/client-flutter/lib/appwrite.dart +++ /dev/null @@ -1,10 +0,0 @@ -export 'package:dio/dio.dart' show Response; - -export 'client.dart'; -export 'enums.dart'; -export 'services/account.dart'; -export 'services/avatars.dart'; -export 'services/database.dart'; -export 'services/locale.dart'; -export 'services/storage.dart'; -export 'services/teams.dart'; diff --git a/app/sdks/0.7.0/client-flutter/lib/client.dart b/app/sdks/0.7.0/client-flutter/lib/client.dart deleted file mode 100644 index ee55d8ba18..0000000000 --- a/app/sdks/0.7.0/client-flutter/lib/client.dart +++ /dev/null @@ -1,134 +0,0 @@ -import 'dart:io'; - -import 'package:dio/dio.dart'; -import 'package:flutter/foundation.dart'; -import 'package:dio/adapter.dart'; -import 'package:dio_cookie_manager/dio_cookie_manager.dart'; -import 'package:cookie_jar/cookie_jar.dart'; -import 'package:path_provider/path_provider.dart'; -import 'package:package_info/package_info.dart'; - -import 'enums.dart'; - -class Client { - String endPoint; - String type = 'unknown'; - Map headers; - Map config; - bool selfSigned; - bool initialized = false; - Dio http; - PersistCookieJar cookieJar; - - Client({this.endPoint = 'https://appwrite.io/v1', this.selfSigned = false, Dio http}) : this.http = http ?? Dio() { - // Platform is not supported in web so if web, set type to web automatically and skip Platform check - if(kIsWeb) { - type = 'web'; - }else{ - type = (Platform.isIOS) ? 'ios' : type; - type = (Platform.isMacOS) ? 'macos' : type; - type = (Platform.isAndroid) ? 'android' : type; - type = (Platform.isLinux) ? 'linux' : type; - type = (Platform.isWindows) ? 'windows' : type; - type = (Platform.isFuchsia) ? 'fuchsia' : type; - } - - this.headers = { - 'content-type': 'application/json', - 'x-sdk-version': 'appwrite:flutter:0.3.0-dev.2', - }; - - this.config = {}; - - assert(endPoint.startsWith(RegExp("http://|https://")), "endPoint $endPoint must start with 'http'"); - } - - Future _getCookiePath() async { - final directory = await getApplicationDocumentsDirectory(); - final path = directory.path; - final Directory dir = new Directory('$path/cookies'); - await dir.create(); - return dir; - } - - /// Your project ID - Client setProject(value) { - config['project'] = value; - addHeader('X-Appwrite-Project', value); - return this; - } - - Client setLocale(value) { - config['locale'] = value; - addHeader('X-Appwrite-Locale', value); - return this; - } - - Client setSelfSigned({bool status = true}) { - selfSigned = status; - return this; - } - - Client setEndpoint(String endPoint) { - this.endPoint = endPoint; - this.http.options.baseUrl = this.endPoint; - return this; - } - - Client addHeader(String key, String value) { - headers[key] = value; - - return this; - } - - Future init() async { - if(!initialized) { - // if web skip cookie implementation and origin header as those are automatically handled by browsers - if(!kIsWeb) { - final Directory cookieDir = await _getCookiePath(); - cookieJar = new PersistCookieJar(dir:cookieDir.path); - this.http.interceptors.add(CookieManager(cookieJar)); - PackageInfo packageInfo = await PackageInfo.fromPlatform(); - addHeader('Origin', 'appwrite-' + type + '://' + packageInfo.packageName); - }else{ - // if web set httpClientAdapter as BrowserHttpClientAdapter with withCredentials true to make cookies work - this.http.options.extra['withCredentials'] = true; - } - - this.http.options.baseUrl = this.endPoint; - this.http.options.validateStatus = (status) => status < 400; - } - } - - Future call(HttpMethod method, {String path = '', Map headers = const {}, Map params = const {}}) async { - if(selfSigned && !kIsWeb) { - // Allow self signed requests - (http.httpClientAdapter as DefaultHttpClientAdapter).onHttpClientCreate = (HttpClient client) { - client.badCertificateCallback = (X509Certificate cert, String host, int port) => true; - return client; - }; - } - - await this.init(); - - // Origin is hardcoded for testing - Options options = Options( - headers: {...this.headers, ...headers}, - method: method.name(), - ); - - if(headers['content-type'] == 'multipart/form-data') { - return http.request(path, data: FormData.fromMap(params), options: options); - } - - if (method == HttpMethod.get) { - params.keys.forEach((key) {if (params[key] is int || params[key] is double) { - params[key] = params[key].toString(); - }}); - - return http.get(path, queryParameters: params, options: options); - } else { - return http.request(path, data: params, options: options); - } - } -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/lib/enums.dart b/app/sdks/0.7.0/client-flutter/lib/enums.dart deleted file mode 100644 index 2757f6073e..0000000000 --- a/app/sdks/0.7.0/client-flutter/lib/enums.dart +++ /dev/null @@ -1,15 +0,0 @@ -enum HttpMethod { get, post, put, delete, patch } - -extension HttpMethodString on HttpMethod { - String name() { - return this.toString().split('.').last.toUpperCase(); - } -} - -enum OrderType { asc, desc } - -extension OrderTypeString on OrderType { - String name() { - return this.toString().split('.').last.toUpperCase(); - } -} diff --git a/app/sdks/0.7.0/client-flutter/lib/service.dart b/app/sdks/0.7.0/client-flutter/lib/service.dart deleted file mode 100644 index 1ae319b705..0000000000 --- a/app/sdks/0.7.0/client-flutter/lib/service.dart +++ /dev/null @@ -1,7 +0,0 @@ -import 'client.dart'; - -class Service { - final Client client; - - const Service(this.client); -} diff --git a/app/sdks/0.7.0/client-flutter/lib/services/account.dart b/app/sdks/0.7.0/client-flutter/lib/services/account.dart deleted file mode 100644 index 890303a9d6..0000000000 --- a/app/sdks/0.7.0/client-flutter/lib/services/account.dart +++ /dev/null @@ -1,435 +0,0 @@ - -import 'dart:io'; -import 'package:universal_html/html.dart' as html; - -import 'package:dio/dio.dart'; -import 'package:meta/meta.dart'; -import 'package:flutter/foundation.dart'; -import 'package:flutter_web_auth/flutter_web_auth.dart'; - -import "../client.dart"; -import '../enums.dart'; -import "../service.dart"; - -class Account extends Service { - Account(Client client): super(client); - - /// Get Account - /// - /// Get currently logged in user data as JSON object. - /// - Future get() { - final String path = '/account'; - - final Map params = { - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.get, path: path, params: params, headers: headers); - } - - /// Create Account - /// - /// Use this endpoint to allow a new user to register a new account in your - /// project. After the user registration completes successfully, you can use - /// the [/account/verfication](/docs/client/account#createVerification) route - /// to start verifying the user email address. To allow your new user to login - /// to his new account, you need to create a new [account - /// session](/docs/client/account#createSession). - /// - Future create({@required String email, @required String password, String name = ''}) { - final String path = '/account'; - - final Map params = { - 'email': email, - 'password': password, - 'name': name, - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.post, path: path, params: params, headers: headers); - } - - /// Delete Account - /// - /// Delete a currently logged in user account. Behind the scene, the user - /// record is not deleted but permanently blocked from any access. This is done - /// to avoid deleted accounts being overtaken by new users with the same email - /// address. Any user-related resources like documents or storage files should - /// be deleted separately. - /// - Future delete() { - final String path = '/account'; - - final Map params = { - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.delete, path: path, params: params, headers: headers); - } - - /// Update Account Email - /// - /// Update currently logged in user account email address. After changing user - /// address, user confirmation status is being reset and a new confirmation - /// mail is sent. For security measures, user password is required to complete - /// this request. - /// - Future updateEmail({@required String email, @required String password}) { - final String path = '/account/email'; - - final Map params = { - 'email': email, - 'password': password, - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.patch, path: path, params: params, headers: headers); - } - - /// Get Account 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 getLogs() { - final String path = '/account/logs'; - - final Map params = { - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.get, path: path, params: params, headers: headers); - } - - /// Update Account Name - /// - /// Update currently logged in user account name. - /// - Future updateName({@required String name}) { - final String path = '/account/name'; - - final Map params = { - 'name': name, - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.patch, path: path, params: params, headers: headers); - } - - /// Update Account Password - /// - /// Update currently logged in user password. For validation, user is required - /// to pass the password twice. - /// - Future updatePassword({@required String password, @required String oldPassword}) { - final String path = '/account/password'; - - final Map params = { - 'password': password, - 'oldPassword': oldPassword, - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.patch, path: path, params: params, headers: headers); - } - - /// Get Account Preferences - /// - /// Get currently logged in user preferences as a key-value object. - /// - Future getPrefs() { - final String path = '/account/prefs'; - - final Map params = { - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.get, path: path, params: params, headers: headers); - } - - /// Update Account Preferences - /// - /// Update currently logged in user account preferences. You can pass only the - /// specific settings you wish to update. - /// - Future updatePrefs({@required dynamic prefs}) { - final String path = '/account/prefs'; - - final Map params = { - 'prefs': prefs, - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.patch, path: path, params: params, headers: headers); - } - - /// Create Password Recovery - /// - /// Sends the user an email with a temporary secret key for password reset. - /// When the user clicks the confirmation link he is redirected back to your - /// app password reset URL with the secret key and email address values - /// attached to the URL query string. Use the query string params to submit a - /// request to the [PUT /account/recovery](/docs/client/account#updateRecovery) - /// endpoint to complete the process. - /// - Future createRecovery({@required String email, @required String url}) { - final String path = '/account/recovery'; - - final Map params = { - 'email': email, - 'url': url, - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.post, path: path, params: params, headers: headers); - } - - /// Complete Password Recovery - /// - /// Use this endpoint to complete the user account password reset. Both the - /// **userId** and **secret** arguments will be passed as query parameters to - /// the redirect URL you have provided when sending your request to the [POST - /// /account/recovery](/docs/client/account#createRecovery) endpoint. - /// - /// Please note that in order to avoid a [Redirect - /// 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}) { - final String path = '/account/recovery'; - - final Map params = { - 'userId': userId, - 'secret': secret, - 'password': password, - 'passwordAgain': passwordAgain, - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.put, path: path, params: params, headers: headers); - } - - /// Get Account Sessions - /// - /// Get currently logged in user list of active sessions across different - /// devices. - /// - Future getSessions() { - final String path = '/account/sessions'; - - final Map params = { - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.get, path: path, params: params, headers: headers); - } - - /// Create Account Session - /// - /// Allow the user to login into his account by providing a valid email and - /// password combination. This route will create a new session for the user. - /// - Future createSession({@required String email, @required String password}) { - final String path = '/account/sessions'; - - final Map params = { - 'email': email, - 'password': password, - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.post, path: path, params: params, headers: headers); - } - - /// Delete All Account Sessions - /// - /// Delete all sessions from the user account and remove any sessions cookies - /// from the end client. - /// - Future deleteSessions() { - final String path = '/account/sessions'; - - final Map params = { - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.delete, path: path, params: params, headers: headers); - } - - /// Create Account Session with OAuth2 - /// - /// Allow the user to login to his account using the OAuth2 provider of his - /// choice. Each OAuth2 provider should be enabled from the Appwrite console - /// first. Use the success and failure arguments to provide a redirect URL's - /// back to your app when login is completed. - /// - Future createOAuth2Session({@required String provider, String success = 'https://appwrite.io/auth/oauth2/success', String failure = 'https://appwrite.io/auth/oauth2/failure', List scopes = const []}) { - final String path = '/account/sessions/oauth2/{provider}'.replaceAll(RegExp('{provider}'), provider); - - final Map params = { - 'success': success, - 'failure': failure, - 'scopes': scopes, - 'project': client.config['project'], - }; - - - final List query = []; - - params.forEach((key, value) { - if (value is List) { - for (var item in value) { - query.add(Uri.encodeComponent(key + '[]') + '=' + Uri.encodeComponent(item)); - } - } - else { - query.add(Uri.encodeComponent(key) + '=' + Uri.encodeComponent(value)); - } - }); - - Uri endpoint = Uri.parse(client.endPoint); - Uri url = new Uri(scheme: endpoint.scheme, - host: endpoint.host, - port: endpoint.port, - path: endpoint.path + path, - query: query.join('&') - ); - - if(kIsWeb) { - html.window.location.href = url.toString(); - return null; - }else{ - - return FlutterWebAuth.authenticate( - url: url.toString(), - callbackUrlScheme: "appwrite-callback-" + client.config['project'] - ).then((value) async { - Uri url = Uri.parse(value); - Cookie cookie = new Cookie(url.queryParameters['key'], url.queryParameters['secret']); - cookie.domain = Uri.parse(client.endPoint).host; - cookie.httpOnly = true; - cookie.path = '/'; - List cookies = [cookie]; - await client.init(); - client.cookieJar.saveFromResponse(Uri.parse(client.endPoint), cookies); - }); - } - - } - - /// Delete Account Session - /// - /// Use this endpoint to log out the currently logged in user from all his - /// account sessions across all his different devices. When using the option id - /// argument, only the session unique ID provider will be deleted. - /// - Future deleteSession({@required String sessionId}) { - final String path = '/account/sessions/{sessionId}'.replaceAll(RegExp('{sessionId}'), sessionId); - - final Map params = { - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.delete, path: path, params: params, headers: headers); - } - - /// Create Email Verification - /// - /// Use this endpoint to send a verification message to your user email address - /// to confirm they are the valid owners of that address. Both the **userId** - /// and **secret** arguments will be passed as query parameters to the URL you - /// have provided to be attached to the verification email. The provided URL - /// should redirect the user back to your app and allow you to complete the - /// verification process by verifying both the **userId** and **secret** - /// parameters. Learn more about how to [complete the verification - /// process](/docs/client/account#updateAccountVerification). - /// - /// Please note that in order to avoid a [Redirect - /// 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 createVerification({@required String url}) { - final String path = '/account/verification'; - - final Map params = { - 'url': url, - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.post, path: path, params: params, headers: headers); - } - - /// Complete Email Verification - /// - /// 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}) { - final String path = '/account/verification'; - - final Map params = { - 'userId': userId, - 'secret': secret, - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.put, path: path, params: params, headers: headers); - } -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/lib/services/avatars.dart b/app/sdks/0.7.0/client-flutter/lib/services/avatars.dart deleted file mode 100644 index b7fa6393ef..0000000000 --- a/app/sdks/0.7.0/client-flutter/lib/services/avatars.dart +++ /dev/null @@ -1,238 +0,0 @@ - - -import 'package:dio/dio.dart'; -import 'package:meta/meta.dart'; - -import "../client.dart"; -import '../enums.dart'; -import "../service.dart"; - -class Avatars extends Service { - Avatars(Client client): super(client); - - /// Get Browser Icon - /// - /// You can use this endpoint to show different browser icons to your users. - /// The code argument receives the browser code as it appears in your user - /// /account/sessions endpoint. Use width, height and quality arguments to - /// change the output settings. - /// - String getBrowser({@required String code, int width = 100, int height = 100, int quality = 100}) { - final String path = '/avatars/browsers/{code}'.replaceAll(RegExp('{code}'), code); - - final Map params = { - 'width': width, - 'height': height, - 'quality': quality, - 'project': client.config['project'], - }; - - params.keys.forEach((key) {if (params[key] is int || params[key] is double) { - params[key] = params[key].toString(); - }}); - - Uri endpoint = Uri.parse(client.endPoint); - Uri location = new Uri(scheme: endpoint.scheme, - host: endpoint.host, - port: endpoint.port, - path: endpoint.path + path, - queryParameters:params, - ); - - return location.toString(); - } - - /// Get Credit Card Icon - /// - /// Need to display your users with your billing method or their payment - /// methods? The credit card endpoint will return you the icon of the credit - /// card provider you need. Use width, height and quality arguments to change - /// the output settings. - /// - String getCreditCard({@required String code, int width = 100, int height = 100, int quality = 100}) { - final String path = '/avatars/credit-cards/{code}'.replaceAll(RegExp('{code}'), code); - - final Map params = { - 'width': width, - 'height': height, - 'quality': quality, - 'project': client.config['project'], - }; - - params.keys.forEach((key) {if (params[key] is int || params[key] is double) { - params[key] = params[key].toString(); - }}); - - Uri endpoint = Uri.parse(client.endPoint); - Uri location = new Uri(scheme: endpoint.scheme, - host: endpoint.host, - port: endpoint.port, - path: endpoint.path + path, - queryParameters:params, - ); - - return location.toString(); - } - - /// Get Favicon - /// - /// Use this endpoint to fetch the favorite icon (AKA favicon) of a any remote - /// website URL. - /// - String getFavicon({@required String url}) { - final String path = '/avatars/favicon'; - - final Map params = { - 'url': url, - 'project': client.config['project'], - }; - - params.keys.forEach((key) {if (params[key] is int || params[key] is double) { - params[key] = params[key].toString(); - }}); - - Uri endpoint = Uri.parse(client.endPoint); - Uri location = new Uri(scheme: endpoint.scheme, - host: endpoint.host, - port: endpoint.port, - path: endpoint.path + path, - queryParameters:params, - ); - - return location.toString(); - } - - /// Get Country Flag - /// - /// You can use this endpoint to show different country flags icons to your - /// users. The code argument receives the 2 letter country code. Use width, - /// height and quality arguments to change the output settings. - /// - String getFlag({@required String code, int width = 100, int height = 100, int quality = 100}) { - final String path = '/avatars/flags/{code}'.replaceAll(RegExp('{code}'), code); - - final Map params = { - 'width': width, - 'height': height, - 'quality': quality, - 'project': client.config['project'], - }; - - params.keys.forEach((key) {if (params[key] is int || params[key] is double) { - params[key] = params[key].toString(); - }}); - - Uri endpoint = Uri.parse(client.endPoint); - Uri location = new Uri(scheme: endpoint.scheme, - host: endpoint.host, - port: endpoint.port, - path: endpoint.path + path, - queryParameters:params, - ); - - return location.toString(); - } - - /// Get Image from URL - /// - /// Use this endpoint to fetch a remote image URL and crop it to any image size - /// you want. This endpoint is very useful if you need to crop and display - /// remote images in your app or in case you want to make sure a 3rd party - /// image is properly served using a TLS protocol. - /// - String getImage({@required String url, int width = 400, int height = 400}) { - final String path = '/avatars/image'; - - final Map params = { - 'url': url, - 'width': width, - 'height': height, - 'project': client.config['project'], - }; - - params.keys.forEach((key) {if (params[key] is int || params[key] is double) { - params[key] = params[key].toString(); - }}); - - Uri endpoint = Uri.parse(client.endPoint); - Uri location = new Uri(scheme: endpoint.scheme, - host: endpoint.host, - port: endpoint.port, - path: endpoint.path + path, - queryParameters:params, - ); - - return location.toString(); - } - - /// Get User Initials - /// - /// Use this endpoint to show your user initials avatar icon on your website or - /// app. By default, this route will try to print your logged-in user name or - /// email initials. You can also overwrite the user name if you pass the 'name' - /// parameter. If no name is given and no user is logged, an empty avatar will - /// be returned. - /// - /// You can use the color and background params to change the avatar colors. By - /// default, a random theme will be selected. The random theme will persist for - /// the user's initials when reloading the same theme will always return for - /// the same initials. - /// - String getInitials({String name = '', int width = 500, int height = 500, String color = '', String background = ''}) { - final String path = '/avatars/initials'; - - final Map params = { - 'name': name, - 'width': width, - 'height': height, - 'color': color, - 'background': background, - 'project': client.config['project'], - }; - - params.keys.forEach((key) {if (params[key] is int || params[key] is double) { - params[key] = params[key].toString(); - }}); - - Uri endpoint = Uri.parse(client.endPoint); - Uri location = new Uri(scheme: endpoint.scheme, - host: endpoint.host, - port: endpoint.port, - path: endpoint.path + path, - queryParameters:params, - ); - - return location.toString(); - } - - /// 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. - /// - String getQR({@required String text, int size = 400, int margin = 1, bool download = false}) { - final String path = '/avatars/qr'; - - final Map params = { - 'text': text, - 'size': size, - 'margin': margin, - 'download': download, - 'project': client.config['project'], - }; - - params.keys.forEach((key) {if (params[key] is int || params[key] is double) { - params[key] = params[key].toString(); - }}); - - Uri endpoint = Uri.parse(client.endPoint); - Uri location = new Uri(scheme: endpoint.scheme, - host: endpoint.host, - port: endpoint.port, - path: endpoint.path + path, - queryParameters:params, - ); - - return location.toString(); - } -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/lib/services/database.dart b/app/sdks/0.7.0/client-flutter/lib/services/database.dart deleted file mode 100644 index 0fec1fb4d6..0000000000 --- a/app/sdks/0.7.0/client-flutter/lib/services/database.dart +++ /dev/null @@ -1,119 +0,0 @@ - - -import 'package:dio/dio.dart'; -import 'package:meta/meta.dart'; - -import "../client.dart"; -import '../enums.dart'; -import "../service.dart"; - -class Database extends Service { - Database(Client client): super(client); - - /// List Documents - /// - /// Get a list of all the user documents. You can use the query params to - /// filter your results. On admin mode, this endpoint will return a list of all - /// of the project documents. [Learn more about different API - /// modes](/docs/admin). - /// - Future listDocuments({@required String collectionId, List filters = const [], int offset = 0, int limit = 50, String orderField = '\$id', OrderType orderType = OrderType.asc, String orderCast = 'string', String search = ''}) { - final String path = '/database/collections/{collectionId}/documents'.replaceAll(RegExp('{collectionId}'), collectionId); - - final Map params = { - 'filters': filters, - 'offset': offset, - 'limit': limit, - 'orderField': orderField, - 'orderType': orderType.name(), - 'orderCast': orderCast, - 'search': search, - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.get, path: path, params: params, headers: headers); - } - - /// Create Document - /// - /// Create a new Document. Before using this route, you should create a new - /// collection resource using either a [server - /// integration](/docs/server/database?sdk=nodejs#createCollection) API or - /// directly from your database console. - /// - Future createDocument({@required String collectionId, @required dynamic data, @required List read, @required List write, String parentDocument = '', String parentProperty = '', String parentPropertyType = 'assign'}) { - final String path = '/database/collections/{collectionId}/documents'.replaceAll(RegExp('{collectionId}'), collectionId); - - final Map params = { - 'data': data, - 'read': read, - 'write': write, - 'parentDocument': parentDocument, - 'parentProperty': parentProperty, - 'parentPropertyType': parentPropertyType, - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.post, path: path, params: params, headers: headers); - } - - /// Get Document - /// - /// Get document by its unique ID. This endpoint response returns a JSON object - /// with the document data. - /// - Future getDocument({@required String collectionId, @required String documentId}) { - final String path = '/database/collections/{collectionId}/documents/{documentId}'.replaceAll(RegExp('{collectionId}'), collectionId).replaceAll(RegExp('{documentId}'), documentId); - - final Map params = { - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.get, path: path, params: params, headers: headers); - } - - /// Update Document - Future updateDocument({@required String collectionId, @required String documentId, @required dynamic data, @required List read, @required List write}) { - final String path = '/database/collections/{collectionId}/documents/{documentId}'.replaceAll(RegExp('{collectionId}'), collectionId).replaceAll(RegExp('{documentId}'), documentId); - - final Map params = { - 'data': data, - 'read': read, - 'write': write, - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.patch, path: path, params: params, headers: headers); - } - - /// Delete Document - /// - /// Delete document by its unique ID. This endpoint deletes only the parent - /// documents, his attributes and relations to other documents. Child documents - /// **will not** be deleted. - /// - Future deleteDocument({@required String collectionId, @required String documentId}) { - final String path = '/database/collections/{collectionId}/documents/{documentId}'.replaceAll(RegExp('{collectionId}'), collectionId).replaceAll(RegExp('{documentId}'), documentId); - - final Map params = { - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.delete, path: path, params: params, headers: headers); - } -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/lib/services/locale.dart b/app/sdks/0.7.0/client-flutter/lib/services/locale.dart deleted file mode 100644 index 095af4792c..0000000000 --- a/app/sdks/0.7.0/client-flutter/lib/services/locale.dart +++ /dev/null @@ -1,143 +0,0 @@ - - -import 'package:dio/dio.dart'; -import 'package:meta/meta.dart'; - -import "../client.dart"; -import '../enums.dart'; -import "../service.dart"; - -class Locale extends Service { - Locale(Client client): super(client); - - /// Get User Locale - /// - /// Get the current user location based on IP. Returns an object with user - /// country code, country name, continent name, continent code, ip address and - /// suggested currency. You can use the locale header to get the data in a - /// supported language. - /// - /// ([IP Geolocation by DB-IP](https://db-ip.com)) - /// - Future get() { - final String path = '/locale'; - - final Map params = { - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.get, path: path, params: params, headers: headers); - } - - /// List Continents - /// - /// List of all continents. You can use the locale header to get the data in a - /// supported language. - /// - Future getContinents() { - final String path = '/locale/continents'; - - final Map params = { - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.get, path: path, params: params, headers: headers); - } - - /// List Countries - /// - /// List of all countries. You can use the locale header to get the data in a - /// supported language. - /// - Future getCountries() { - final String path = '/locale/countries'; - - final Map params = { - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.get, path: path, params: params, headers: headers); - } - - /// 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 getCountriesEU() { - final String path = '/locale/countries/eu'; - - final Map params = { - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.get, path: path, params: params, headers: headers); - } - - /// 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 getCountriesPhones() { - final String path = '/locale/countries/phones'; - - final Map params = { - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.get, path: path, params: params, headers: headers); - } - - /// 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 getCurrencies() { - final String path = '/locale/currencies'; - - final Map params = { - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.get, path: path, params: params, headers: headers); - } - - /// 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 getLanguages() { - final String path = '/locale/languages'; - - final Map params = { - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.get, path: path, params: params, headers: headers); - } -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/lib/services/storage.dart b/app/sdks/0.7.0/client-flutter/lib/services/storage.dart deleted file mode 100644 index 51f9345050..0000000000 --- a/app/sdks/0.7.0/client-flutter/lib/services/storage.dart +++ /dev/null @@ -1,203 +0,0 @@ - - -import 'package:dio/dio.dart'; -import 'package:meta/meta.dart'; - -import "../client.dart"; -import '../enums.dart'; -import "../service.dart"; - -class Storage extends Service { - Storage(Client client): super(client); - - /// List Files - /// - /// Get a list of all the user files. You can use the query params to filter - /// your results. On admin mode, this endpoint will return a list of all of the - /// project files. [Learn more about different API modes](/docs/admin). - /// - Future listFiles({String search = '', int limit = 25, int offset = 0, OrderType orderType = OrderType.asc}) { - final String path = '/storage/files'; - - final Map params = { - 'search': search, - 'limit': limit, - 'offset': offset, - 'orderType': orderType.name(), - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.get, path: path, params: params, headers: headers); - } - - /// Create File - /// - /// Create a new file. The user who creates the file will automatically be - /// assigned to read and write access unless he has passed custom values for - /// read and write arguments. - /// - Future createFile({@required MultipartFile file, @required List read, @required List write}) { - final String path = '/storage/files'; - - final Map params = { - 'file': file, - 'read': read, - 'write': write, - }; - - final Map headers = { - 'content-type': 'multipart/form-data', - }; - - return client.call(HttpMethod.post, path: path, params: params, headers: headers); - } - - /// Get File - /// - /// Get file by its unique ID. This endpoint response returns a JSON object - /// with the file metadata. - /// - Future getFile({@required String fileId}) { - final String path = '/storage/files/{fileId}'.replaceAll(RegExp('{fileId}'), fileId); - - final Map params = { - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.get, path: path, params: params, headers: headers); - } - - /// Update File - /// - /// Update file by its unique ID. Only users with write permissions have access - /// to update this resource. - /// - Future updateFile({@required String fileId, @required List read, @required List write}) { - final String path = '/storage/files/{fileId}'.replaceAll(RegExp('{fileId}'), fileId); - - final Map params = { - 'read': read, - 'write': write, - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.put, path: path, params: params, headers: headers); - } - - /// Delete File - /// - /// Delete a file by its unique ID. Only users with write permissions have - /// access to delete this resource. - /// - Future deleteFile({@required String fileId}) { - final String path = '/storage/files/{fileId}'.replaceAll(RegExp('{fileId}'), fileId); - - final Map params = { - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.delete, path: path, params: params, headers: headers); - } - - /// Get File for Download - /// - /// Get 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. - /// - String getFileDownload({@required String fileId}) { - final String path = '/storage/files/{fileId}/download'.replaceAll(RegExp('{fileId}'), fileId); - - final Map params = { - 'project': client.config['project'], - }; - - params.keys.forEach((key) {if (params[key] is int || params[key] is double) { - params[key] = params[key].toString(); - }}); - - Uri endpoint = Uri.parse(client.endPoint); - Uri location = new Uri(scheme: endpoint.scheme, - host: endpoint.host, - port: endpoint.port, - path: endpoint.path + path, - queryParameters:params, - ); - - return location.toString(); - } - - /// Get File Preview - /// - /// Get a file preview image. Currently, this method supports preview for image - /// files (jpg, png, and gif), other supported formats, like pdf, docs, slides, - /// and spreadsheets, will return the file icon image. You can also pass query - /// string arguments for cutting and resizing your preview image. - /// - String getFilePreview({@required String fileId, int width = 0, int height = 0, int quality = 100, String background = '', String output = ''}) { - final String path = '/storage/files/{fileId}/preview'.replaceAll(RegExp('{fileId}'), fileId); - - final Map params = { - 'width': width, - 'height': height, - 'quality': quality, - 'background': background, - 'output': output, - 'project': client.config['project'], - }; - - params.keys.forEach((key) {if (params[key] is int || params[key] is double) { - params[key] = params[key].toString(); - }}); - - Uri endpoint = Uri.parse(client.endPoint); - Uri location = new Uri(scheme: endpoint.scheme, - host: endpoint.host, - port: endpoint.port, - path: endpoint.path + path, - queryParameters:params, - ); - - return location.toString(); - } - - /// Get File for View - /// - /// Get file content by its unique ID. This endpoint is similar to the download - /// method but returns with no 'Content-Disposition: attachment' header. - /// - String getFileView({@required String fileId, String as = ''}) { - final String path = '/storage/files/{fileId}/view'.replaceAll(RegExp('{fileId}'), fileId); - - final Map params = { - 'as': as, - 'project': client.config['project'], - }; - - params.keys.forEach((key) {if (params[key] is int || params[key] is double) { - params[key] = params[key].toString(); - }}); - - Uri endpoint = Uri.parse(client.endPoint); - Uri location = new Uri(scheme: endpoint.scheme, - host: endpoint.host, - port: endpoint.port, - path: endpoint.path + path, - queryParameters:params, - ); - - return location.toString(); - } -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/lib/services/teams.dart b/app/sdks/0.7.0/client-flutter/lib/services/teams.dart deleted file mode 100644 index b9205da455..0000000000 --- a/app/sdks/0.7.0/client-flutter/lib/services/teams.dart +++ /dev/null @@ -1,207 +0,0 @@ - - -import 'package:dio/dio.dart'; -import 'package:meta/meta.dart'; - -import "../client.dart"; -import '../enums.dart'; -import "../service.dart"; - -class Teams extends Service { - Teams(Client client): super(client); - - /// List Teams - /// - /// Get a list of all the current user teams. You can use the query params to - /// filter your results. On admin mode, this endpoint will return a list of all - /// of the project teams. [Learn more about different API modes](/docs/admin). - /// - Future list({String search = '', int limit = 25, int offset = 0, OrderType orderType = OrderType.asc}) { - final String path = '/teams'; - - final Map params = { - 'search': search, - 'limit': limit, - 'offset': offset, - 'orderType': orderType.name(), - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.get, path: path, params: params, headers: headers); - } - - /// Create Team - /// - /// Create a new team. The user who creates the team will automatically be - /// assigned as the owner of the team. The team owner can invite new members, - /// who will be able add new owners and update or delete the team from your - /// project. - /// - Future create({@required String name, List roles = const ["owner"]}) { - final String path = '/teams'; - - final Map params = { - 'name': name, - 'roles': roles, - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.post, path: path, params: params, headers: headers); - } - - /// Get Team - /// - /// Get team by its unique ID. All team members have read access for this - /// resource. - /// - Future get({@required String teamId}) { - final String path = '/teams/{teamId}'.replaceAll(RegExp('{teamId}'), teamId); - - final Map params = { - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.get, path: path, params: params, headers: headers); - } - - /// Update Team - /// - /// Update team by its unique ID. Only team owners have write access for this - /// resource. - /// - Future update({@required String teamId, @required String name}) { - final String path = '/teams/{teamId}'.replaceAll(RegExp('{teamId}'), teamId); - - final Map params = { - 'name': name, - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.put, path: path, params: params, headers: headers); - } - - /// Delete Team - /// - /// Delete team by its unique ID. Only team owners have write access for this - /// resource. - /// - Future delete({@required String teamId}) { - final String path = '/teams/{teamId}'.replaceAll(RegExp('{teamId}'), teamId); - - final Map params = { - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.delete, path: path, params: params, headers: headers); - } - - /// Get Team Memberships - /// - /// Get team members by the team unique ID. All team members have read access - /// for this list of resources. - /// - Future getMemberships({@required String teamId, String search = '', int limit = 25, int offset = 0, OrderType orderType = OrderType.asc}) { - final String path = '/teams/{teamId}/memberships'.replaceAll(RegExp('{teamId}'), teamId); - - final Map params = { - 'search': search, - 'limit': limit, - 'offset': offset, - 'orderType': orderType.name(), - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.get, path: path, params: params, headers: headers); - } - - /// Create Team Membership - /// - /// Use this endpoint to invite a new member to join your team. An email with a - /// link to join the team will be sent to the new member email address if the - /// member doesn't exist in the project it will be created automatically. - /// - /// Use the 'URL' parameter to redirect the user from the invitation email back - /// to your app. When the user is redirected, use the [Update Team Membership - /// Status](/docs/client/teams#updateMembershipStatus) endpoint to allow the - /// user to accept the invitation to the team. - /// - /// Please note that in order to avoid a [Redirect - /// Attacks](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) - /// the only valid redirect URL's are the once from domains you have set when - /// added your platforms in the console interface. - /// - Future createMembership({@required String teamId, @required String email, @required List roles, @required String url, String name = ''}) { - final String path = '/teams/{teamId}/memberships'.replaceAll(RegExp('{teamId}'), teamId); - - final Map params = { - 'email': email, - 'name': name, - 'roles': roles, - 'url': url, - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.post, path: path, params: params, headers: headers); - } - - /// 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 he didn't accept it. - /// - Future deleteMembership({@required String teamId, @required String inviteId}) { - final String path = '/teams/{teamId}/memberships/{inviteId}'.replaceAll(RegExp('{teamId}'), teamId).replaceAll(RegExp('{inviteId}'), inviteId); - - final Map params = { - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.delete, path: path, params: params, headers: headers); - } - - /// Update Team Membership Status - /// - /// Use this endpoint to allow a user to accept an invitation to join a team - /// after he is being redirected back to your app from the invitation email he - /// was sent. - /// - Future updateMembershipStatus({@required String teamId, @required String inviteId, @required String userId, @required String secret}) { - final String path = '/teams/{teamId}/memberships/{inviteId}/status'.replaceAll(RegExp('{teamId}'), teamId).replaceAll(RegExp('{inviteId}'), inviteId); - - final Map params = { - 'userId': userId, - 'secret': secret, - }; - - final Map headers = { - 'content-type': 'application/json', - }; - - return client.call(HttpMethod.patch, path: path, params: params, headers: headers); - } -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-flutter/pubspec.yaml b/app/sdks/0.7.0/client-flutter/pubspec.yaml deleted file mode 100644 index cabc271c5e..0000000000 --- a/app/sdks/0.7.0/client-flutter/pubspec.yaml +++ /dev/null @@ -1,24 +0,0 @@ -name: appwrite -version: 0.3.0-dev.2 -description: Appwrite is an open-source self-hosted backend server that abstract and simplify complex and repetitive development tasks behind a very simple REST API -homepage: https://appwrite.io -repository: https://github.com/appwrite/sdk-for-flutter -issue_tracker: https://github.com/appwrite/sdk-generator/issues -documentation: https://appwrite.io/support -environment: - sdk: '>=2.6.0 <3.0.0' -dependencies: - meta: ^1.1.8 - path_provider: ^1.6.14 - package_info: ^0.4.3 - dio: ^3.0.10 - cookie_jar: ^1.0.1 - dio_cookie_manager: ^1.0.0 - flutter_web_auth: ^0.2.4 - universal_html: ^1.2.3 - flutter: - sdk: flutter - -dev_dependencies: - flutter_test: - sdk: flutter \ No newline at end of file diff --git a/app/sdks/0.7.0/client-swift/CHANGELOG.md b/app/sdks/0.7.0/client-swift/CHANGELOG.md deleted file mode 100644 index fa4d35e687..0000000000 --- a/app/sdks/0.7.0/client-swift/CHANGELOG.md +++ /dev/null @@ -1 +0,0 @@ -# Change Log \ No newline at end of file diff --git a/app/sdks/0.7.0/client-swift/LICENSE b/app/sdks/0.7.0/client-swift/LICENSE deleted file mode 100644 index fc7c051a91..0000000000 --- a/app/sdks/0.7.0/client-swift/LICENSE +++ /dev/null @@ -1,12 +0,0 @@ -Copyright (c) 2019 Appwrite (https://appwrite.io) and individual contributors. -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - - 3. Neither the name Appwrite nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/app/sdks/0.7.0/client-swift/Package.swift b/app/sdks/0.7.0/client-swift/Package.swift deleted file mode 100644 index 5bea7f1c50..0000000000 --- a/app/sdks/0.7.0/client-swift/Package.swift +++ /dev/null @@ -1,35 +0,0 @@ -// swift-tools-version:5.1 -// The swift-tools-version declares the minimum version of Swift required to build this package. -// -// Created by Armino -// GitHub: https://github.com/armino-dev/sdk-generator -// - -import PackageDescription - -let package = Package( - name: "Appwrite", - products: [ - // Products define the executables and libraries produced by a package, - // and make them visible to other packages. - .library( - name: "Appwrite", - targets: ["Appwrite"]), - ], - dependencies: [ - // Dependencies declare other packages that this package depends on. - // .package(url: /* package url */, from: "1.0.0"), - ], - targets: [ - // Targets are the basic building blocks of a package. - // A target can define a module or a test suite. - // Targets can depend on other targets in this package, - // and on products in packages which this package depends on. - .target( - name: "Appwrite", - dependencies: []), - .testTarget( - name: "AppwriteTests", - dependencies: [Appwrite]), - ] -) diff --git a/app/sdks/0.7.0/client-swift/README.md b/app/sdks/0.7.0/client-swift/README.md deleted file mode 100644 index d46757f068..0000000000 --- a/app/sdks/0.7.0/client-swift/README.md +++ /dev/null @@ -1,24 +0,0 @@ -# Appwrite Swift SDK - -![License](https://img.shields.io/github/license/appwrite/sdk-for-swift.svg?v=1) -![Version](https://img.shields.io/badge/api%20version-0.7.0-blue.svg?v=1) - -Appwrite is an open-source backend as a service server that abstract and simplify complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way. - Use the Swift SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools. - For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs) - - - -![Appwrite](https://appwrite.io/images/github.png) - -## Installation - -``` - git clone appwrite/sdk-for-swift - cd sdk-for-swift - swift run -``` - -## License - -Please see the [BSD-3-Clause license](https://raw.githubusercontent.com/appwrite/appwrite/master/LICENSE) file for more information. diff --git a/app/sdks/0.7.0/client-swift/Sources/Appwrite/Client.swift b/app/sdks/0.7.0/client-swift/Sources/Appwrite/Client.swift deleted file mode 100644 index 8748fbc0f9..0000000000 --- a/app/sdks/0.7.0/client-swift/Sources/Appwrite/Client.swift +++ /dev/null @@ -1,231 +0,0 @@ -// -// Client.swift -// -// Created by Armino -// GitHub: https://github.com/armino-dev/sdk-generator -// - -import Foundation - -open class Client { - - // MARK: Properties - - open var selfSigned = false - - open var endpoint = "https://appwrite.io/v1" - - open var headers: [String: String] = [ - "content-type": "", - "x-sdk-version": "appwrite:swift:" - ] - - - // MARK: Methods - - // default constructor - public init() { - - } - - /// - /// Set Project - /// - /// Your project ID - /// - /// @param String value - /// - /// @return Client - /// - open func setProject(value: String) -> Client { - - self.addHeader(key: "X-Appwrite-Project", value: value) - return self - } - - /// - /// Set Locale - /// - /// @param String value - /// - /// @return Client - /// - open func setLocale(value: String) -> Client { - - self.addHeader(key: "X-Appwrite-Locale", value: value) - return self - } - - - /// - /// @param Bool status - /// @return Client - /// - open func setSelfSigned(status: Bool = true) -> Client { - - self.selfSigned = status - return self - } - - /// - /// @param String endpoint - /// @return Client - /// - open func setEndpoint(endpoint: String) -> Client { - - self.endpoint = endpoint - return self - } - - /// - /// @param String key - /// @param String value - /// - open func addHeader(key: String, value: String) -> Client { - - self.headers[key.lowercased()] = value.lowercased() - - return self - } - - /// - open func httpBuildQuery(params: [String: Any], prefix: String = "") -> String { - var output: String = "" - for (key, value) in params { - let finalKey: String = prefix.isEmpty ? key : (prefix + "[" + key + "]") - if (value is AnyCollection) { - output += self.httpBuildQuery(params: value as! [String : Any], prefix: finalKey) - } else { - output += "\(value)" - } - output += "&" - } - return output - } - - /// - /// Make an API call - /// - /// @param String method - /// @param String path - /// @param Array params - /// @param Array headers - /// @return Array|String - /// @throws Exception - /// - func call(method:String, path:String = "", headers:[String: String] = [:], params:[String: Any] = [:]) -> Any { - - self.headers.merge(headers){(_, new) in new} - let targetURL:URL = URL(string: self.endpoint + path + (( method == HTTPMethod.get.rawValue && !params.isEmpty ) ? "?" + httpBuildQuery(params: params) : ""))! - - var query: String = "" - - var responseStatus: Int = HTTPStatus.unknown.rawValue - var responseType: String = "" - var responseBody: Any = "" - - switch (self.headers["content-type"]) { - case "application/json": - do { - let json = try JSONSerialization.data(withJSONObject:params, options: []) - query = String( data: json, encoding: String.Encoding.utf8)! - } catch { - print("Failed to parse json: \(error.localizedDescription)") - } - break - default: - query = self.httpBuildQuery(params: params) - break - } - - var request = URLRequest(url: targetURL) - let session = URLSession.shared - - for (key, value) in self.headers { - request.setValue(value, forHTTPHeaderField: key) - } - - request.httpMethod = method - if (method.uppercased() == "POST") { - request.httpBody = query.data(using: .utf8) - } - - let semaphore = DispatchSemaphore(value: 0) - - session.dataTask(with: request) { data, response, error in - if (error != nil) { - print(error!) - return - } - do { - let httpResponse = response as! HTTPURLResponse - responseStatus = httpResponse.statusCode - - if (responseStatus == HTTPStatus.internalServerError.rawValue) { - print(responseStatus) - return - } - - responseType = httpResponse.mimeType ?? "" - - if (responseType == "application/json") { - let json = try JSONSerialization.jsonObject(with: data!, options: []) - responseBody = json - } else { - responseBody = String(data: data!, encoding: String.Encoding.utf8)! - } - } catch { - print(error) - } - - semaphore.signal() - }.resume() - - _ = semaphore.wait(wallTimeout: .distantFuture) - - return responseBody - } - -} - -extension Client { - - public enum HTTPStatus: Int { - case unknown = -1 - - case ok = 200 - case created = 201 - case accepted = 202 - - case movedPermanently = 301 - case found = 302 - - case badRequest = 400 - case notAuthorized = 401 - case paymentRequired = 402 - case forbidden = 403 - case notFound = 404 - case methodNotAllowed = 405 - case notAcceptable = 406 - - case internalServerError = 500 - case notImplemented = 501 - } - - public enum HTTPMethod: String { - case get - - case post - case put - case patch - - case delete - - case head - case options - case connect - case trace - } - - -} diff --git a/app/sdks/0.7.0/client-swift/Sources/Appwrite/Service.swift b/app/sdks/0.7.0/client-swift/Sources/Appwrite/Service.swift deleted file mode 100644 index b11a067a5d..0000000000 --- a/app/sdks/0.7.0/client-swift/Sources/Appwrite/Service.swift +++ /dev/null @@ -1,16 +0,0 @@ -// -// Service.swift -// -// Created by Armino -// GitHub: https://github.com/armino-dev/sdk-generator -// - -open class Service { - - open var client: Client; - - public init(client: Client) - { - self.client = client - } -} diff --git a/app/sdks/0.7.0/client-swift/Sources/Appwrite/Services/Account.swift b/app/sdks/0.7.0/client-swift/Sources/Appwrite/Services/Account.swift deleted file mode 100644 index 0ffb74df52..0000000000 --- a/app/sdks/0.7.0/client-swift/Sources/Appwrite/Services/Account.swift +++ /dev/null @@ -1,491 +0,0 @@ - - -class Account: Service -{ - /** - * Get Account - * - * Get currently logged in user data as JSON object. - * - * @throws Exception - * @return array - */ - - func get() -> Array { - let path: String = "/account" - - - let params: [String: Any] = [:] - - - return [self.client.call(method: Client.HTTPMethod.get.rawValue, path: path, headers: [ - "content-type": "application/json", - ], params: params)]; - } - - /** - * Create Account - * - * Use this endpoint to allow a new user to register a new account in your - * project. After the user registration completes successfully, you can use - * the [/account/verfication](/docs/client/account#createVerification) route - * to start verifying the user email address. To allow your new user to login - * to his new account, you need to create a new [account - * session](/docs/client/account#createSession). - * - * @param String _email - * @param String _password - * @param String _name - * @throws Exception - * @return array - */ - - func create(_email: String, _password: String, _name: String = "") -> Array { - let path: String = "/account" - - - var params: [String: Any] = [:] - - params["email"] = _email - params["password"] = _password - params["name"] = _name - - return [self.client.call(method: Client.HTTPMethod.post.rawValue, path: path, headers: [ - "content-type": "application/json", - ], params: params)]; - } - - /** - * Delete Account - * - * Delete a currently logged in user account. Behind the scene, the user - * record is not deleted but permanently blocked from any access. This is done - * to avoid deleted accounts being overtaken by new users with the same email - * address. Any user-related resources like documents or storage files should - * be deleted separately. - * - * @throws Exception - * @return array - */ - - func delete() -> Array { - let path: String = "/account" - - - let params: [String: Any] = [:] - - - return [self.client.call(method: Client.HTTPMethod.delete.rawValue, path: path, headers: [ - "content-type": "application/json", - ], params: params)]; - } - - /** - * Update Account Email - * - * Update currently logged in user account email address. After changing user - * address, user confirmation status is being reset and a new confirmation - * mail is sent. For security measures, user password is required to complete - * this request. - * - * @param String _email - * @param String _password - * @throws Exception - * @return array - */ - - func updateEmail(_email: String, _password: String) -> Array { - let path: String = "/account/email" - - - var params: [String: Any] = [:] - - params["email"] = _email - params["password"] = _password - - return [self.client.call(method: Client.HTTPMethod.patch.rawValue, path: path, headers: [ - "content-type": "application/json", - ], params: params)]; - } - - /** - * Get Account 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. - * - * @throws Exception - * @return array - */ - - func getLogs() -> Array { - let path: String = "/account/logs" - - - let params: [String: Any] = [:] - - - return [self.client.call(method: Client.HTTPMethod.get.rawValue, path: path, headers: [ - "content-type": "application/json", - ], params: params)]; - } - - /** - * Update Account Name - * - * Update currently logged in user account name. - * - * @param String _name - * @throws Exception - * @return array - */ - - func updateName(_name: String) -> Array { - let path: String = "/account/name" - - - var params: [String: Any] = [:] - - params["name"] = _name - - return [self.client.call(method: Client.HTTPMethod.patch.rawValue, path: path, headers: [ - "content-type": "application/json", - ], params: params)]; - } - - /** - * Update Account Password - * - * Update currently logged in user password. For validation, user is required - * to pass the password twice. - * - * @param String _password - * @param String _oldPassword - * @throws Exception - * @return array - */ - - func updatePassword(_password: String, _oldPassword: String) -> Array { - let path: String = "/account/password" - - - var params: [String: Any] = [:] - - params["password"] = _password - params["oldPassword"] = _oldPassword - - return [self.client.call(method: Client.HTTPMethod.patch.rawValue, path: path, headers: [ - "content-type": "application/json", - ], params: params)]; - } - - /** - * Get Account Preferences - * - * Get currently logged in user preferences as a key-value object. - * - * @throws Exception - * @return array - */ - - func getPrefs() -> Array { - let path: String = "/account/prefs" - - - let params: [String: Any] = [:] - - - return [self.client.call(method: Client.HTTPMethod.get.rawValue, path: path, headers: [ - "content-type": "application/json", - ], params: params)]; - } - - /** - * Update Account Preferences - * - * Update currently logged in user account preferences. You can pass only the - * specific settings you wish to update. - * - * @param object _prefs - * @throws Exception - * @return array - */ - - func updatePrefs(_prefs: object) -> Array { - let path: String = "/account/prefs" - - - var params: [String: Any] = [:] - - params["prefs"] = _prefs - - return [self.client.call(method: Client.HTTPMethod.patch.rawValue, path: path, headers: [ - "content-type": "application/json", - ], params: params)]; - } - - /** - * Create Password Recovery - * - * Sends the user an email with a temporary secret key for password reset. - * When the user clicks the confirmation link he is redirected back to your - * app password reset URL with the secret key and email address values - * attached to the URL query string. Use the query string params to submit a - * request to the [PUT /account/recovery](/docs/client/account#updateRecovery) - * endpoint to complete the process. - * - * @param String _email - * @param String _url - * @throws Exception - * @return array - */ - - func createRecovery(_email: String, _url: String) -> Array { - let path: String = "/account/recovery" - - - var params: [String: Any] = [:] - - params["email"] = _email - params["url"] = _url - - return [self.client.call(method: Client.HTTPMethod.post.rawValue, path: path, headers: [ - "content-type": "application/json", - ], params: params)]; - } - - /** - * Complete Password Recovery - * - * Use this endpoint to complete the user account password reset. Both the - * **userId** and **secret** arguments will be passed as query parameters to - * the redirect URL you have provided when sending your request to the [POST - * /account/recovery](/docs/client/account#createRecovery) endpoint. - * - * Please note that in order to avoid a [Redirect - * 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. - * - * @param String _userId - * @param String _secret - * @param String _password - * @param String _passwordAgain - * @throws Exception - * @return array - */ - - func updateRecovery(_userId: String, _secret: String, _password: String, _passwordAgain: String) -> Array { - let path: String = "/account/recovery" - - - var params: [String: Any] = [:] - - params["userId"] = _userId - params["secret"] = _secret - params["password"] = _password - params["passwordAgain"] = _passwordAgain - - return [self.client.call(method: Client.HTTPMethod.put.rawValue, path: path, headers: [ - "content-type": "application/json", - ], params: params)]; - } - - /** - * Get Account Sessions - * - * Get currently logged in user list of active sessions across different - * devices. - * - * @throws Exception - * @return array - */ - - func getSessions() -> Array { - let path: String = "/account/sessions" - - - let params: [String: Any] = [:] - - - return [self.client.call(method: Client.HTTPMethod.get.rawValue, path: path, headers: [ - "content-type": "application/json", - ], params: params)]; - } - - /** - * Create Account Session - * - * Allow the user to login into his account by providing a valid email and - * password combination. This route will create a new session for the user. - * - * @param String _email - * @param String _password - * @throws Exception - * @return array - */ - - func createSession(_email: String, _password: String) -> Array { - let path: String = "/account/sessions" - - - var params: [String: Any] = [:] - - params["email"] = _email - params["password"] = _password - - return [self.client.call(method: Client.HTTPMethod.post.rawValue, path: path, headers: [ - "content-type": "application/json", - ], params: params)]; - } - - /** - * Delete All Account Sessions - * - * Delete all sessions from the user account and remove any sessions cookies - * from the end client. - * - * @throws Exception - * @return array - */ - - func deleteSessions() -> Array { - let path: String = "/account/sessions" - - - let params: [String: Any] = [:] - - - return [self.client.call(method: Client.HTTPMethod.delete.rawValue, path: path, headers: [ - "content-type": "application/json", - ], params: params)]; - } - - /** - * Create Account Session with OAuth2 - * - * Allow the user to login to his account using the OAuth2 provider of his - * choice. Each OAuth2 provider should be enabled from the Appwrite console - * first. Use the success and failure arguments to provide a redirect URL's - * back to your app when login is completed. - * - * @param String _provider - * @param String _success - * @param String _failure - * @param Array _scopes - * @throws Exception - * @return array - */ - - func createOAuth2Session(_provider: String, _success: String = "https://appwrite.io/auth/oauth2/success", _failure: String = "https://appwrite.io/auth/oauth2/failure", _scopes: Array = []) -> Array { - var path: String = "/account/sessions/oauth2/{provider}" - - path = path.replacingOccurrences( - of: "{provider}", - with: _provider - ) - - var params: [String: Any] = [:] - - params["success"] = _success - params["failure"] = _failure - params["scopes"] = _scopes - - return [self.client.call(method: Client.HTTPMethod.get.rawValue, path: path, headers: [ - "content-type": "application/json", - ], params: params)]; - } - - /** - * Delete Account Session - * - * Use this endpoint to log out the currently logged in user from all his - * account sessions across all his different devices. When using the option id - * argument, only the session unique ID provider will be deleted. - * - * @param String _sessionId - * @throws Exception - * @return array - */ - - func deleteSession(_sessionId: String) -> Array { - var path: String = "/account/sessions/{sessionId}" - - path = path.replacingOccurrences( - of: "{sessionId}", - with: _sessionId - ) - - let params: [String: Any] = [:] - - - return [self.client.call(method: Client.HTTPMethod.delete.rawValue, path: path, headers: [ - "content-type": "application/json", - ], params: params)]; - } - - /** - * Create Email Verification - * - * Use this endpoint to send a verification message to your user email address - * to confirm they are the valid owners of that address. Both the **userId** - * and **secret** arguments will be passed as query parameters to the URL you - * have provided to be attached to the verification email. The provided URL - * should redirect the user back to your app and allow you to complete the - * verification process by verifying both the **userId** and **secret** - * parameters. Learn more about how to [complete the verification - * process](/docs/client/account#updateAccountVerification). - * - * Please note that in order to avoid a [Redirect - * 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. - * - * - * @param String _url - * @throws Exception - * @return array - */ - - func createVerification(_url: String) -> Array { - let path: String = "/account/verification" - - - var params: [String: Any] = [:] - - params["url"] = _url - - return [self.client.call(method: Client.HTTPMethod.post.rawValue, path: path, headers: [ - "content-type": "application/json", - ], params: params)]; - } - - /** - * Complete Email Verification - * - * 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. - * - * @param String _userId - * @param String _secret - * @throws Exception - * @return array - */ - - func updateVerification(_userId: String, _secret: String) -> Array { - let path: String = "/account/verification" - - - var params: [String: Any] = [:] - - params["userId"] = _userId - params["secret"] = _secret - - return [self.client.call(method: Client.HTTPMethod.put.rawValue, path: path, headers: [ - "content-type": "application/json", - ], params: params)]; - } - -} diff --git a/app/sdks/0.7.0/client-swift/Sources/Appwrite/Services/Avatars.swift b/app/sdks/0.7.0/client-swift/Sources/Appwrite/Services/Avatars.swift deleted file mode 100644 index 867841bafd..0000000000 --- a/app/sdks/0.7.0/client-swift/Sources/Appwrite/Services/Avatars.swift +++ /dev/null @@ -1,233 +0,0 @@ - - -class Avatars: Service -{ - /** - * Get Browser Icon - * - * You can use this endpoint to show different browser icons to your users. - * The code argument receives the browser code as it appears in your user - * /account/sessions endpoint. Use width, height and quality arguments to - * change the output settings. - * - * @param String _code - * @param Int _width - * @param Int _height - * @param Int _quality - * @throws Exception - * @return array - */ - - func getBrowser(_code: String, _width: Int = 100, _height: Int = 100, _quality: Int = 100) -> Array { - var path: String = "/avatars/browsers/{code}" - - path = path.replacingOccurrences( - of: "{code}", - with: _code - ) - - var params: [String: Any] = [:] - - params["width"] = _width - params["height"] = _height - params["quality"] = _quality - - return [self.client.call(method: Client.HTTPMethod.get.rawValue, path: path, headers: [ - "content-type": "application/json", - ], params: params)]; - } - - /** - * Get Credit Card Icon - * - * Need to display your users with your billing method or their payment - * methods? The credit card endpoint will return you the icon of the credit - * card provider you need. Use width, height and quality arguments to change - * the output settings. - * - * @param String _code - * @param Int _width - * @param Int _height - * @param Int _quality - * @throws Exception - * @return array - */ - - func getCreditCard(_code: String, _width: Int = 100, _height: Int = 100, _quality: Int = 100) -> Array { - var path: String = "/avatars/credit-cards/{code}" - - path = path.replacingOccurrences( - of: "{code}", - with: _code - ) - - var params: [String: Any] = [:] - - params["width"] = _width - params["height"] = _height - params["quality"] = _quality - - return [self.client.call(method: Client.HTTPMethod.get.rawValue, path: path, headers: [ - "content-type": "application/json", - ], params: params)]; - } - - /** - * Get Favicon - * - * Use this endpoint to fetch the favorite icon (AKA favicon) of a any remote - * website URL. - * - * @param String _url - * @throws Exception - * @return array - */ - - func getFavicon(_url: String) -> Array { - let path: String = "/avatars/favicon" - - - var params: [String: Any] = [:] - - params["url"] = _url - - return [self.client.call(method: Client.HTTPMethod.get.rawValue, path: path, headers: [ - "content-type": "application/json", - ], params: params)]; - } - - /** - * Get Country Flag - * - * You can use this endpoint to show different country flags icons to your - * users. The code argument receives the 2 letter country code. Use width, - * height and quality arguments to change the output settings. - * - * @param String _code - * @param Int _width - * @param Int _height - * @param Int _quality - * @throws Exception - * @return array - */ - - func getFlag(_code: String, _width: Int = 100, _height: Int = 100, _quality: Int = 100) -> Array { - var path: String = "/avatars/flags/{code}" - - path = path.replacingOccurrences( - of: "{code}", - with: _code - ) - - var params: [String: Any] = [:] - - params["width"] = _width - params["height"] = _height - params["quality"] = _quality - - return [self.client.call(method: Client.HTTPMethod.get.rawValue, path: path, headers: [ - "content-type": "application/json", - ], params: params)]; - } - - /** - * Get Image from URL - * - * Use this endpoint to fetch a remote image URL and crop it to any image size - * you want. This endpoint is very useful if you need to crop and display - * remote images in your app or in case you want to make sure a 3rd party - * image is properly served using a TLS protocol. - * - * @param String _url - * @param Int _width - * @param Int _height - * @throws Exception - * @return array - */ - - func getImage(_url: String, _width: Int = 400, _height: Int = 400) -> Array { - let path: String = "/avatars/image" - - - var params: [String: Any] = [:] - - params["url"] = _url - params["width"] = _width - params["height"] = _height - - return [self.client.call(method: Client.HTTPMethod.get.rawValue, path: path, headers: [ - "content-type": "application/json", - ], params: params)]; - } - - /** - * Get User Initials - * - * Use this endpoint to show your user initials avatar icon on your website or - * app. By default, this route will try to print your logged-in user name or - * email initials. You can also overwrite the user name if you pass the 'name' - * parameter. If no name is given and no user is logged, an empty avatar will - * be returned. - * - * You can use the color and background params to change the avatar colors. By - * default, a random theme will be selected. The random theme will persist for - * the user's initials when reloading the same theme will always return for - * the same initials. - * - * @param String _name - * @param Int _width - * @param Int _height - * @param String _color - * @param String _background - * @throws Exception - * @return array - */ - - func getInitials(_name: String = "", _width: Int = 500, _height: Int = 500, _color: String = "", _background: String = "") -> Array { - let path: String = "/avatars/initials" - - - var params: [String: Any] = [:] - - params["name"] = _name - params["width"] = _width - params["height"] = _height - params["color"] = _color - params["background"] = _background - - return [self.client.call(method: Client.HTTPMethod.get.rawValue, path: path, headers: [ - "content-type": "application/json", - ], params: params)]; - } - - /** - * 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. - * - * @param String _text - * @param Int _size - * @param Int _margin - * @param Bool _download - * @throws Exception - * @return array - */ - - func getQR(_text: String, _size: Int = 400, _margin: Int = 1, _download: Bool = false) -> Array { - let path: String = "/avatars/qr" - - - var params: [String: Any] = [:] - - params["text"] = _text - params["size"] = _size - params["margin"] = _margin - params["download"] = _download - - return [self.client.call(method: Client.HTTPMethod.get.rawValue, path: path, headers: [ - "content-type": "application/json", - ], params: params)]; - } - -} diff --git a/app/sdks/0.7.0/client-swift/Sources/Appwrite/Services/Database.swift b/app/sdks/0.7.0/client-swift/Sources/Appwrite/Services/Database.swift deleted file mode 100644 index 8436985582..0000000000 --- a/app/sdks/0.7.0/client-swift/Sources/Appwrite/Services/Database.swift +++ /dev/null @@ -1,183 +0,0 @@ - - -class Database: Service -{ - /** - * List Documents - * - * Get a list of all the user documents. You can use the query params to - * filter your results. On admin mode, this endpoint will return a list of all - * of the project documents. [Learn more about different API - * modes](/docs/admin). - * - * @param String _collectionId - * @param Array _filters - * @param Int _limit - * @param Int _offset - * @param String _orderField - * @param String _orderType - * @param String _orderCast - * @param String _search - * @throws Exception - * @return array - */ - - func listDocuments(_collectionId: String, _filters: Array = [], _limit: Int = 25, _offset: Int = 0, _orderField: String = "$id", _orderType: String = "ASC", _orderCast: String = "string", _search: String = "") -> Array { - var path: String = "/database/collections/{collectionId}/documents" - - path = path.replacingOccurrences( - of: "{collectionId}", - with: _collectionId - ) - - var params: [String: Any] = [:] - - params["filters"] = _filters - params["limit"] = _limit - params["offset"] = _offset - params["orderField"] = _orderField - params["orderType"] = _orderType - params["orderCast"] = _orderCast - params["search"] = _search - - return [self.client.call(method: Client.HTTPMethod.get.rawValue, path: path, headers: [ - "content-type": "application/json", - ], params: params)]; - } - - /** - * Create Document - * - * Create a new Document. Before using this route, you should create a new - * collection resource using either a [server - * integration](/docs/server/database?sdk=nodejs#createCollection) API or - * directly from your database console. - * - * @param String _collectionId - * @param object _data - * @param Array _read - * @param Array _write - * @throws Exception - * @return array - */ - - func createDocument(_collectionId: String, _data: object, _read: Array, _write: Array) -> Array { - var path: String = "/database/collections/{collectionId}/documents" - - path = path.replacingOccurrences( - of: "{collectionId}", - with: _collectionId - ) - - var params: [String: Any] = [:] - - params["data"] = _data - params["read"] = _read - params["write"] = _write - - return [self.client.call(method: Client.HTTPMethod.post.rawValue, path: path, headers: [ - "content-type": "application/json", - ], params: params)]; - } - - /** - * Get Document - * - * Get document by its unique ID. This endpoint response returns a JSON object - * with the document data. - * - * @param String _collectionId - * @param String _documentId - * @throws Exception - * @return array - */ - - func getDocument(_collectionId: String, _documentId: String) -> Array { - var path: String = "/database/collections/{collectionId}/documents/{documentId}" - - path = path.replacingOccurrences( - of: "{collectionId}", - with: _collectionId - ) - path = path.replacingOccurrences( - of: "{documentId}", - with: _documentId - ) - - let params: [String: Any] = [:] - - - return [self.client.call(method: Client.HTTPMethod.get.rawValue, path: path, headers: [ - "content-type": "application/json", - ], params: params)]; - } - - /** - * Update Document - * - * @param String _collectionId - * @param String _documentId - * @param object _data - * @param Array _read - * @param Array _write - * @throws Exception - * @return array - */ - - func updateDocument(_collectionId: String, _documentId: String, _data: object, _read: Array, _write: Array) -> Array { - var path: String = "/database/collections/{collectionId}/documents/{documentId}" - - path = path.replacingOccurrences( - of: "{collectionId}", - with: _collectionId - ) - path = path.replacingOccurrences( - of: "{documentId}", - with: _documentId - ) - - var params: [String: Any] = [:] - - params["data"] = _data - params["read"] = _read - params["write"] = _write - - return [self.client.call(method: Client.HTTPMethod.patch.rawValue, path: path, headers: [ - "content-type": "application/json", - ], params: params)]; - } - - /** - * Delete Document - * - * Delete document by its unique ID. This endpoint deletes only the parent - * documents, his attributes and relations to other documents. Child documents - * **will not** be deleted. - * - * @param String _collectionId - * @param String _documentId - * @throws Exception - * @return array - */ - - func deleteDocument(_collectionId: String, _documentId: String) -> Array { - var path: String = "/database/collections/{collectionId}/documents/{documentId}" - - path = path.replacingOccurrences( - of: "{collectionId}", - with: _collectionId - ) - path = path.replacingOccurrences( - of: "{documentId}", - with: _documentId - ) - - let params: [String: Any] = [:] - - - return [self.client.call(method: Client.HTTPMethod.delete.rawValue, path: path, headers: [ - "content-type": "application/json", - ], params: params)]; - } - -} diff --git a/app/sdks/0.7.0/client-swift/Sources/Appwrite/Services/Locale.swift b/app/sdks/0.7.0/client-swift/Sources/Appwrite/Services/Locale.swift deleted file mode 100644 index ef21554cbc..0000000000 --- a/app/sdks/0.7.0/client-swift/Sources/Appwrite/Services/Locale.swift +++ /dev/null @@ -1,164 +0,0 @@ - - -class Locale: Service -{ - /** - * Get User Locale - * - * Get the current user location based on IP. Returns an object with user - * country code, country name, continent name, continent code, ip address and - * suggested currency. You can use the locale header to get the data in a - * supported language. - * - * ([IP Geolocation by DB-IP](https://db-ip.com)) - * - * @throws Exception - * @return array - */ - - func get() -> Array { - let path: String = "/locale" - - - let params: [String: Any] = [:] - - - return [self.client.call(method: Client.HTTPMethod.get.rawValue, path: path, headers: [ - "content-type": "application/json", - ], params: params)]; - } - - /** - * List Continents - * - * List of all continents. You can use the locale header to get the data in a - * supported language. - * - * @throws Exception - * @return array - */ - - func getContinents() -> Array { - let path: String = "/locale/continents" - - - let params: [String: Any] = [:] - - - return [self.client.call(method: Client.HTTPMethod.get.rawValue, path: path, headers: [ - "content-type": "application/json", - ], params: params)]; - } - - /** - * List Countries - * - * List of all countries. You can use the locale header to get the data in a - * supported language. - * - * @throws Exception - * @return array - */ - - func getCountries() -> Array { - let path: String = "/locale/countries" - - - let params: [String: Any] = [:] - - - return [self.client.call(method: Client.HTTPMethod.get.rawValue, path: path, headers: [ - "content-type": "application/json", - ], params: params)]; - } - - /** - * 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. - * - * @throws Exception - * @return array - */ - - func getCountriesEU() -> Array { - let path: String = "/locale/countries/eu" - - - let params: [String: Any] = [:] - - - return [self.client.call(method: Client.HTTPMethod.get.rawValue, path: path, headers: [ - "content-type": "application/json", - ], params: params)]; - } - - /** - * List Countries Phone Codes - * - * List of all countries phone codes. You can use the locale header to get the - * data in a supported language. - * - * @throws Exception - * @return array - */ - - func getCountriesPhones() -> Array { - let path: String = "/locale/countries/phones" - - - let params: [String: Any] = [:] - - - return [self.client.call(method: Client.HTTPMethod.get.rawValue, path: path, headers: [ - "content-type": "application/json", - ], params: params)]; - } - - /** - * 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. - * - * @throws Exception - * @return array - */ - - func getCurrencies() -> Array { - let path: String = "/locale/currencies" - - - let params: [String: Any] = [:] - - - return [self.client.call(method: Client.HTTPMethod.get.rawValue, path: path, headers: [ - "content-type": "application/json", - ], params: params)]; - } - - /** - * List Languages - * - * List of all languages classified by ISO 639-1 including 2-letter code, name - * in English, and name in the respective language. - * - * @throws Exception - * @return array - */ - - func getLanguages() -> Array { - let path: String = "/locale/languages" - - - let params: [String: Any] = [:] - - - return [self.client.call(method: Client.HTTPMethod.get.rawValue, path: path, headers: [ - "content-type": "application/json", - ], params: params)]; - } - -} diff --git a/app/sdks/0.7.0/client-swift/Sources/Appwrite/Services/Storage.swift b/app/sdks/0.7.0/client-swift/Sources/Appwrite/Services/Storage.swift deleted file mode 100644 index b6e98145f7..0000000000 --- a/app/sdks/0.7.0/client-swift/Sources/Appwrite/Services/Storage.swift +++ /dev/null @@ -1,246 +0,0 @@ - - -class Storage: Service -{ - /** - * List Files - * - * Get a list of all the user files. You can use the query params to filter - * your results. On admin mode, this endpoint will return a list of all of the - * project files. [Learn more about different API modes](/docs/admin). - * - * @param String _search - * @param Int _limit - * @param Int _offset - * @param String _orderType - * @throws Exception - * @return array - */ - - func listFiles(_search: String = "", _limit: Int = 25, _offset: Int = 0, _orderType: String = "ASC") -> Array { - let path: String = "/storage/files" - - - var params: [String: Any] = [:] - - params["search"] = _search - params["limit"] = _limit - params["offset"] = _offset - params["orderType"] = _orderType - - return [self.client.call(method: Client.HTTPMethod.get.rawValue, path: path, headers: [ - "content-type": "application/json", - ], params: params)]; - } - - /** - * Create File - * - * Create a new file. The user who creates the file will automatically be - * assigned to read and write access unless he has passed custom values for - * read and write arguments. - * - * @param Array _file - * @param Array _read - * @param Array _write - * @throws Exception - * @return array - */ - - func createFile(_file: Array, _read: Array, _write: Array) -> Array { - let path: String = "/storage/files" - - - var params: [String: Any] = [:] - - params["file"] = _file - params["read"] = _read - params["write"] = _write - - return [self.client.call(method: Client.HTTPMethod.post.rawValue, path: path, headers: [ - "content-type": "multipart/form-data", - ], params: params)]; - } - - /** - * Get File - * - * Get file by its unique ID. This endpoint response returns a JSON object - * with the file metadata. - * - * @param String _fileId - * @throws Exception - * @return array - */ - - func getFile(_fileId: String) -> Array { - var path: String = "/storage/files/{fileId}" - - path = path.replacingOccurrences( - of: "{fileId}", - with: _fileId - ) - - let params: [String: Any] = [:] - - - return [self.client.call(method: Client.HTTPMethod.get.rawValue, path: path, headers: [ - "content-type": "application/json", - ], params: params)]; - } - - /** - * Update File - * - * Update file by its unique ID. Only users with write permissions have access - * to update this resource. - * - * @param String _fileId - * @param Array _read - * @param Array _write - * @throws Exception - * @return array - */ - - func updateFile(_fileId: String, _read: Array, _write: Array) -> Array { - var path: String = "/storage/files/{fileId}" - - path = path.replacingOccurrences( - of: "{fileId}", - with: _fileId - ) - - var params: [String: Any] = [:] - - params["read"] = _read - params["write"] = _write - - return [self.client.call(method: Client.HTTPMethod.put.rawValue, path: path, headers: [ - "content-type": "application/json", - ], params: params)]; - } - - /** - * Delete File - * - * Delete a file by its unique ID. Only users with write permissions have - * access to delete this resource. - * - * @param String _fileId - * @throws Exception - * @return array - */ - - func deleteFile(_fileId: String) -> Array { - var path: String = "/storage/files/{fileId}" - - path = path.replacingOccurrences( - of: "{fileId}", - with: _fileId - ) - - let params: [String: Any] = [:] - - - return [self.client.call(method: Client.HTTPMethod.delete.rawValue, path: path, headers: [ - "content-type": "application/json", - ], params: params)]; - } - - /** - * Get File for Download - * - * Get 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. - * - * @param String _fileId - * @throws Exception - * @return array - */ - - func getFileDownload(_fileId: String) -> Array { - var path: String = "/storage/files/{fileId}/download" - - path = path.replacingOccurrences( - of: "{fileId}", - with: _fileId - ) - - let params: [String: Any] = [:] - - - return [self.client.call(method: Client.HTTPMethod.get.rawValue, path: path, headers: [ - "content-type": "application/json", - ], params: params)]; - } - - /** - * Get File Preview - * - * Get a file preview image. Currently, this method supports preview for image - * files (jpg, png, and gif), other supported formats, like pdf, docs, slides, - * and spreadsheets, will return the file icon image. You can also pass query - * string arguments for cutting and resizing your preview image. - * - * @param String _fileId - * @param Int _width - * @param Int _height - * @param Int _quality - * @param String _background - * @param String _output - * @throws Exception - * @return array - */ - - func getFilePreview(_fileId: String, _width: Int = 0, _height: Int = 0, _quality: Int = 100, _background: String = "", _output: String = "") -> Array { - var path: String = "/storage/files/{fileId}/preview" - - path = path.replacingOccurrences( - of: "{fileId}", - with: _fileId - ) - - var params: [String: Any] = [:] - - params["width"] = _width - params["height"] = _height - params["quality"] = _quality - params["background"] = _background - params["output"] = _output - - return [self.client.call(method: Client.HTTPMethod.get.rawValue, path: path, headers: [ - "content-type": "application/json", - ], params: params)]; - } - - /** - * Get File for View - * - * Get file content by its unique ID. This endpoint is similar to the download - * method but returns with no 'Content-Disposition: attachment' header. - * - * @param String _fileId - * @param String _as - * @throws Exception - * @return array - */ - - func getFileView(_fileId: String, _as: String = "") -> Array { - var path: String = "/storage/files/{fileId}/view" - - path = path.replacingOccurrences( - of: "{fileId}", - with: _fileId - ) - - var params: [String: Any] = [:] - - params["as"] = _as - - return [self.client.call(method: Client.HTTPMethod.get.rawValue, path: path, headers: [ - "content-type": "application/json", - ], params: params)]; - } - -} diff --git a/app/sdks/0.7.0/client-swift/Sources/Appwrite/Services/Teams.swift b/app/sdks/0.7.0/client-swift/Sources/Appwrite/Services/Teams.swift deleted file mode 100644 index 50bee60273..0000000000 --- a/app/sdks/0.7.0/client-swift/Sources/Appwrite/Services/Teams.swift +++ /dev/null @@ -1,298 +0,0 @@ - - -class Teams: Service -{ - /** - * List Teams - * - * Get a list of all the current user teams. You can use the query params to - * filter your results. On admin mode, this endpoint will return a list of all - * of the project teams. [Learn more about different API modes](/docs/admin). - * - * @param String _search - * @param Int _limit - * @param Int _offset - * @param String _orderType - * @throws Exception - * @return array - */ - - func list(_search: String = "", _limit: Int = 25, _offset: Int = 0, _orderType: String = "ASC") -> Array { - let path: String = "/teams" - - - var params: [String: Any] = [:] - - params["search"] = _search - params["limit"] = _limit - params["offset"] = _offset - params["orderType"] = _orderType - - return [self.client.call(method: Client.HTTPMethod.get.rawValue, path: path, headers: [ - "content-type": "application/json", - ], params: params)]; - } - - /** - * Create Team - * - * Create a new team. The user who creates the team will automatically be - * assigned as the owner of the team. The team owner can invite new members, - * who will be able add new owners and update or delete the team from your - * project. - * - * @param String _name - * @param Array _roles - * @throws Exception - * @return array - */ - - func create(_name: String, _roles: Array = ["owner"]) -> Array { - let path: String = "/teams" - - - var params: [String: Any] = [:] - - params["name"] = _name - params["roles"] = _roles - - return [self.client.call(method: Client.HTTPMethod.post.rawValue, path: path, headers: [ - "content-type": "application/json", - ], params: params)]; - } - - /** - * Get Team - * - * Get team by its unique ID. All team members have read access for this - * resource. - * - * @param String _teamId - * @throws Exception - * @return array - */ - - func get(_teamId: String) -> Array { - var path: String = "/teams/{teamId}" - - path = path.replacingOccurrences( - of: "{teamId}", - with: _teamId - ) - - let params: [String: Any] = [:] - - - return [self.client.call(method: Client.HTTPMethod.get.rawValue, path: path, headers: [ - "content-type": "application/json", - ], params: params)]; - } - - /** - * Update Team - * - * Update team by its unique ID. Only team owners have write access for this - * resource. - * - * @param String _teamId - * @param String _name - * @throws Exception - * @return array - */ - - func update(_teamId: String, _name: String) -> Array { - var path: String = "/teams/{teamId}" - - path = path.replacingOccurrences( - of: "{teamId}", - with: _teamId - ) - - var params: [String: Any] = [:] - - params["name"] = _name - - return [self.client.call(method: Client.HTTPMethod.put.rawValue, path: path, headers: [ - "content-type": "application/json", - ], params: params)]; - } - - /** - * Delete Team - * - * Delete team by its unique ID. Only team owners have write access for this - * resource. - * - * @param String _teamId - * @throws Exception - * @return array - */ - - func delete(_teamId: String) -> Array { - var path: String = "/teams/{teamId}" - - path = path.replacingOccurrences( - of: "{teamId}", - with: _teamId - ) - - let params: [String: Any] = [:] - - - return [self.client.call(method: Client.HTTPMethod.delete.rawValue, path: path, headers: [ - "content-type": "application/json", - ], params: params)]; - } - - /** - * Get Team Memberships - * - * Get team members by the team unique ID. All team members have read access - * for this list of resources. - * - * @param String _teamId - * @param String _search - * @param Int _limit - * @param Int _offset - * @param String _orderType - * @throws Exception - * @return array - */ - - func getMemberships(_teamId: String, _search: String = "", _limit: Int = 25, _offset: Int = 0, _orderType: String = "ASC") -> Array { - var path: String = "/teams/{teamId}/memberships" - - path = path.replacingOccurrences( - of: "{teamId}", - with: _teamId - ) - - var params: [String: Any] = [:] - - params["search"] = _search - params["limit"] = _limit - params["offset"] = _offset - params["orderType"] = _orderType - - return [self.client.call(method: Client.HTTPMethod.get.rawValue, path: path, headers: [ - "content-type": "application/json", - ], params: params)]; - } - - /** - * Create Team Membership - * - * Use this endpoint to invite a new member to join your team. An email with a - * link to join the team will be sent to the new member email address if the - * member doesn't exist in the project it will be created automatically. - * - * Use the 'URL' parameter to redirect the user from the invitation email back - * to your app. When the user is redirected, use the [Update Team Membership - * Status](/docs/client/teams#updateMembershipStatus) endpoint to allow the - * user to accept the invitation to the team. - * - * Please note that in order to avoid a [Redirect - * Attacks](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) - * the only valid redirect URL's are the once from domains you have set when - * added your platforms in the console interface. - * - * @param String _teamId - * @param String _email - * @param Array _roles - * @param String _url - * @param String _name - * @throws Exception - * @return array - */ - - func createMembership(_teamId: String, _email: String, _roles: Array, _url: String, _name: String = "") -> Array { - var path: String = "/teams/{teamId}/memberships" - - path = path.replacingOccurrences( - of: "{teamId}", - with: _teamId - ) - - var params: [String: Any] = [:] - - params["email"] = _email - params["name"] = _name - params["roles"] = _roles - params["url"] = _url - - return [self.client.call(method: Client.HTTPMethod.post.rawValue, path: path, headers: [ - "content-type": "application/json", - ], params: params)]; - } - - /** - * 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 he didn't accept it. - * - * @param String _teamId - * @param String _inviteId - * @throws Exception - * @return array - */ - - func deleteMembership(_teamId: String, _inviteId: String) -> Array { - var path: String = "/teams/{teamId}/memberships/{inviteId}" - - path = path.replacingOccurrences( - of: "{teamId}", - with: _teamId - ) - path = path.replacingOccurrences( - of: "{inviteId}", - with: _inviteId - ) - - let params: [String: Any] = [:] - - - return [self.client.call(method: Client.HTTPMethod.delete.rawValue, path: path, headers: [ - "content-type": "application/json", - ], params: params)]; - } - - /** - * Update Team Membership Status - * - * Use this endpoint to allow a user to accept an invitation to join a team - * after he is being redirected back to your app from the invitation email he - * was sent. - * - * @param String _teamId - * @param String _inviteId - * @param String _userId - * @param String _secret - * @throws Exception - * @return array - */ - - func updateMembershipStatus(_teamId: String, _inviteId: String, _userId: String, _secret: String) -> Array { - var path: String = "/teams/{teamId}/memberships/{inviteId}/status" - - path = path.replacingOccurrences( - of: "{teamId}", - with: _teamId - ) - path = path.replacingOccurrences( - of: "{inviteId}", - with: _inviteId - ) - - var params: [String: Any] = [:] - - params["userId"] = _userId - params["secret"] = _secret - - return [self.client.call(method: Client.HTTPMethod.patch.rawValue, path: path, headers: [ - "content-type": "application/json", - ], params: params)]; - } - -} diff --git a/app/sdks/0.7.0/client-swift/docs/account.md b/app/sdks/0.7.0/client-swift/docs/account.md deleted file mode 100644 index 48bc91d213..0000000000 --- a/app/sdks/0.7.0/client-swift/docs/account.md +++ /dev/null @@ -1,240 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - -# Account Service - -## Get Account - -```http request -GET https://appwrite.io/v1/account -``` - -** Get currently logged in user data as JSON object. ** - -## Create Account - -```http request -POST https://appwrite.io/v1/account -``` - -** Use this endpoint to allow a new user to register a new account in your project. After the user registration completes successfully, you can use the [/account/verfication](/docs/client/account#createVerification) route to start verifying the user email address. To allow your new user to login to his new account, you need to create a new [account session](/docs/client/account#createSession). ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| email | string | User email. | | -| password | string | User password. Must be between 6 to 32 chars. | | -| name | string | User name. | | - -## Delete Account - -```http request -DELETE https://appwrite.io/v1/account -``` - -** Delete a currently logged in user account. Behind the scene, the user record is not deleted but permanently blocked from any access. This is done to avoid deleted accounts being overtaken by new users with the same email address. Any user-related resources like documents or storage files should be deleted separately. ** - -## Update Account Email - -```http request -PATCH https://appwrite.io/v1/account/email -``` - -** Update currently logged in user account email address. After changing user address, user confirmation status is being reset and a new confirmation mail is sent. For security measures, user password is required to complete this request. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| email | string | User email. | | -| password | string | User password. Must be between 6 to 32 chars. | | - -## Get Account Logs - -```http request -GET https://appwrite.io/v1/account/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. ** - -## Update Account Name - -```http request -PATCH https://appwrite.io/v1/account/name -``` - -** Update currently logged in user account name. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| name | string | User name. | | - -## Update Account Password - -```http request -PATCH https://appwrite.io/v1/account/password -``` - -** Update currently logged in user password. For validation, user is required to pass the password twice. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| password | string | New user password. Must be between 6 to 32 chars. | | -| oldPassword | string | Old user password. Must be between 6 to 32 chars. | | - -## Get Account Preferences - -```http request -GET https://appwrite.io/v1/account/prefs -``` - -** Get currently logged in user preferences as a key-value object. ** - -## Update Account Preferences - -```http request -PATCH https://appwrite.io/v1/account/prefs -``` - -** Update currently logged in user account preferences. You can pass only the specific settings you wish to update. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| prefs | object | Prefs key-value JSON object. | | - -## Create Password Recovery - -```http request -POST https://appwrite.io/v1/account/recovery -``` - -** Sends the user an email with a temporary secret key for password reset. When the user clicks the confirmation link he is redirected back to your app password reset URL with the secret key and email address values attached to the URL query string. Use the query string params to submit a request to the [PUT /account/recovery](/docs/client/account#updateRecovery) endpoint to complete the process. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| email | string | User email. | | -| url | string | URL to redirect the user back to your app from the recovery email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API. | | - -## Complete Password Recovery - -```http request -PUT https://appwrite.io/v1/account/recovery -``` - -** Use this endpoint to complete the user account password reset. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST /account/recovery](/docs/client/account#createRecovery) endpoint. - -Please note that in order to avoid a [Redirect 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. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| userId | string | User account UID address. | | -| secret | string | Valid reset token. | | -| password | string | New password. Must be between 6 to 32 chars. | | -| passwordAgain | string | New password again. Must be between 6 to 32 chars. | | - -## Get Account Sessions - -```http request -GET https://appwrite.io/v1/account/sessions -``` - -** Get currently logged in user list of active sessions across different devices. ** - -## Create Account Session - -```http request -POST https://appwrite.io/v1/account/sessions -``` - -** Allow the user to login into his account by providing a valid email and password combination. This route will create a new session for the user. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| email | string | User email. | | -| password | string | User password. Must be between 6 to 32 chars. | | - -## Delete All Account Sessions - -```http request -DELETE https://appwrite.io/v1/account/sessions -``` - -** Delete all sessions from the user account and remove any sessions cookies from the end client. ** - -## Create Account Session with OAuth2 - -```http request -GET https://appwrite.io/v1/account/sessions/oauth2/{provider} -``` - -** Allow the user to login to his account using the OAuth2 provider of his choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| provider | string | **Required** OAuth2 Provider. Currently, supported providers are: amazon, apple, bitbucket, bitly, box, discord, dropbox, facebook, github, gitlab, google, linkedin, microsoft, paypal, paypalSandbox, salesforce, slack, spotify, twitch, vk, yahoo, yandex. | | -| success | string | URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API. | https://appwrite.io/auth/oauth2/success | -| failure | string | URL to redirect back to your app after a failed login attempt. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API. | https://appwrite.io/auth/oauth2/failure | -| scopes | array | A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. | [] | - -## Delete Account Session - -```http request -DELETE https://appwrite.io/v1/account/sessions/{sessionId} -``` - -** Use this endpoint to log out the currently logged in user from all his account sessions across all his different devices. When using the option id argument, only the session unique ID provider will be deleted. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| sessionId | string | **Required** Session unique ID. Use the string 'current' to delete the current device session. | | - -## Create Email Verification - -```http request -POST https://appwrite.io/v1/account/verification -``` - -** Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](/docs/client/account#updateAccountVerification). - -Please note that in order to avoid a [Redirect 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. - ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| url | string | URL to redirect the user back to your app from the verification email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API. | | - -## Complete Email Verification - -```http request -PUT https://appwrite.io/v1/account/verification -``` - -** 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. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| userId | string | User unique ID. | | -| secret | string | Valid verification token. | | - diff --git a/app/sdks/0.7.0/client-swift/docs/avatars.md b/app/sdks/0.7.0/client-swift/docs/avatars.md deleted file mode 100644 index 1e17a8e14a..0000000000 --- a/app/sdks/0.7.0/client-swift/docs/avatars.md +++ /dev/null @@ -1,124 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - -# Avatars Service - -## Get Browser Icon - -```http request -GET https://appwrite.io/v1/avatars/browsers/{code} -``` - -** You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user /account/sessions endpoint. Use width, height and quality arguments to change the output settings. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| code | string | **Required** Browser Code. | | -| width | integer | Image width. Pass an integer between 0 to 2000. Defaults to 100. | 100 | -| height | integer | Image height. Pass an integer between 0 to 2000. Defaults to 100. | 100 | -| quality | integer | Image quality. Pass an integer between 0 to 100. Defaults to 100. | 100 | - -## Get Credit Card Icon - -```http request -GET https://appwrite.io/v1/avatars/credit-cards/{code} -``` - -** Need to display your users with your billing method or their payment methods? The credit card endpoint will return you the icon of the credit card provider you need. Use width, height and quality arguments to change the output settings. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| code | string | **Required** Credit Card Code. Possible values: amex, argencard, cabal, censosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa. | | -| width | integer | Image width. Pass an integer between 0 to 2000. Defaults to 100. | 100 | -| height | integer | Image height. Pass an integer between 0 to 2000. Defaults to 100. | 100 | -| quality | integer | Image quality. Pass an integer between 0 to 100. Defaults to 100. | 100 | - -## Get Favicon - -```http request -GET https://appwrite.io/v1/avatars/favicon -``` - -** Use this endpoint to fetch the favorite icon (AKA favicon) of a any remote website URL. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| url | string | **Required** Website URL which you want to fetch the favicon from. | | - -## Get Country Flag - -```http request -GET https://appwrite.io/v1/avatars/flags/{code} -``` - -** You can use this endpoint to show different country flags icons to your users. The code argument receives the 2 letter country code. Use width, height and quality arguments to change the output settings. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| code | string | **Required** Country Code. ISO Alpha-2 country code format. | | -| width | integer | Image width. Pass an integer between 0 to 2000. Defaults to 100. | 100 | -| height | integer | Image height. Pass an integer between 0 to 2000. Defaults to 100. | 100 | -| quality | integer | Image quality. Pass an integer between 0 to 100. Defaults to 100. | 100 | - -## Get Image from URL - -```http request -GET https://appwrite.io/v1/avatars/image -``` - -** Use this endpoint to fetch a remote image URL and crop it to any image size you want. This endpoint is very useful if you need to crop and display remote images in your app or in case you want to make sure a 3rd party image is properly served using a TLS protocol. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| url | string | **Required** Image URL which you want to crop. | | -| width | integer | Resize preview image width, Pass an integer between 0 to 2000. | 400 | -| height | integer | Resize preview image height, Pass an integer between 0 to 2000. | 400 | - -## Get User Initials - -```http request -GET https://appwrite.io/v1/avatars/initials -``` - -** Use this endpoint to show your user initials avatar icon on your website or app. By default, this route will try to print your logged-in user name or email initials. You can also overwrite the user name if you pass the 'name' parameter. If no name is given and no user is logged, an empty avatar will be returned. - -You can use the color and background params to change the avatar colors. By default, a random theme will be selected. The random theme will persist for the user's initials when reloading the same theme will always return for the same initials. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| name | string | Full Name. When empty, current user name or email will be used. | | -| width | integer | Image width. Pass an integer between 0 to 2000. Defaults to 100. | 500 | -| height | integer | Image height. Pass an integer between 0 to 2000. Defaults to 100. | 500 | -| color | string | Changes text color. By default a random color will be picked and stay will persistent to the given name. | | -| background | string | Changes background color. By default a random color will be picked and stay will persistent to the given name. | | - -## Get QR Code - -```http request -GET https://appwrite.io/v1/avatars/qr -``` - -** 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. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| text | string | **Required** Plain text to be converted to QR code image. | | -| size | integer | QR code size. Pass an integer between 0 to 1000. Defaults to 400. | 400 | -| margin | integer | Margin from edge. Pass an integer between 0 to 10. Defaults to 1. | 1 | -| download | boolean | Return resulting image with 'Content-Disposition: attachment ' headers for the browser to start downloading it. Pass 0 for no header, or 1 for otherwise. Default value is set to 0. | | - diff --git a/app/sdks/0.7.0/client-swift/docs/database.md b/app/sdks/0.7.0/client-swift/docs/database.md deleted file mode 100644 index d734cb3c1c..0000000000 --- a/app/sdks/0.7.0/client-swift/docs/database.md +++ /dev/null @@ -1,90 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - -# Database Service - -## List Documents - -```http request -GET https://appwrite.io/v1/database/collections/{collectionId}/documents -``` - -** Get a list of all the user documents. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project documents. [Learn more about different API modes](/docs/admin). ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| collectionId | string | **Required** Collection unique ID. You can create a new collection with validation rules using the Database service [server integration](/docs/server/database#createCollection). | | -| filters | array | Array of filter strings. Each filter is constructed from a key name, comparison operator (=, !=, >, <, <=, >=) and a value. You can also use a dot (.) separator in attribute names to filter by child document attributes. Examples: 'name=John Doe' or 'category.$id>=5bed2d152c362'. | [] | -| limit | integer | Maximum number of documents to return in response. Use this value to manage pagination. | 25 | -| offset | integer | Offset value. Use this value to manage pagination. | 0 | -| orderField | string | Document field that results will be sorted by. | $id | -| orderType | string | Order direction. Possible values are DESC for descending order, or ASC for ascending order. | ASC | -| orderCast | string | Order field type casting. Possible values are int, string, date, time or datetime. The database will attempt to cast the order field to the value you pass here. The default value is a string. | string | -| search | string | Search query. Enter any free text search. The database will try to find a match against all document attributes and children. | | - -## Create Document - -```http request -POST https://appwrite.io/v1/database/collections/{collectionId}/documents -``` - -** Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](/docs/server/database?sdk=nodejs#createCollection) API or directly from your database console. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| collectionId | string | **Required** Collection unique ID. You can create a new collection with validation rules using the Database service [server integration](/docs/server/database#createCollection). | | -| data | object | Document data as JSON object. | | -| read | array | An array of strings with read permissions. By default no user is granted with any read permissions. [learn more about permissions](/docs/permissions) and get a full list of available permissions. | | -| write | array | An array of strings with write permissions. By default no user is granted with any write permissions. [learn more about permissions](/docs/permissions) and get a full list of available permissions. | | - -## Get Document - -```http request -GET https://appwrite.io/v1/database/collections/{collectionId}/documents/{documentId} -``` - -** Get document by its unique ID. This endpoint response returns a JSON object with the document data. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| collectionId | string | **Required** Collection unique ID. You can create a new collection with validation rules using the Database service [server integration](/docs/server/database#createCollection). | | -| documentId | string | **Required** Document unique ID. | | - -## Update Document - -```http request -PATCH https://appwrite.io/v1/database/collections/{collectionId}/documents/{documentId} -``` - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| collectionId | string | **Required** Collection unique ID. You can create a new collection with validation rules using the Database service [server integration](/docs/server/database#createCollection). | | -| documentId | string | **Required** Document unique ID. | | -| data | object | Document data as JSON object. | | -| read | array | An array of strings with read permissions. By default no user is granted with any read permissions. [learn more about permissions](/docs/permissions) and get a full list of available permissions. | | -| write | array | An array of strings with write permissions. By default no user is granted with any write permissions. [learn more about permissions](/docs/permissions) and get a full list of available permissions. | | - -## Delete Document - -```http request -DELETE https://appwrite.io/v1/database/collections/{collectionId}/documents/{documentId} -``` - -** Delete document by its unique ID. This endpoint deletes only the parent documents, his attributes and relations to other documents. Child documents **will not** be deleted. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| collectionId | string | **Required** Collection unique ID. You can create a new collection with validation rules using the Database service [server integration](/docs/server/database#createCollection). | | -| documentId | string | **Required** Document unique ID. | | - diff --git a/app/sdks/0.7.0/client-swift/docs/examples/account/create-o-auth2session.md b/app/sdks/0.7.0/client-swift/docs/examples/account/create-o-auth2session.md deleted file mode 100644 index 0b67257890..0000000000 --- a/app/sdks/0.7.0/client-swift/docs/examples/account/create-o-auth2session.md +++ /dev/null @@ -1,14 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - - -var client: Client = Client() - -client - .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject(value: "5df5acd0d48c2") // Your project ID - -var account: Account = Account(client: client); - -var result = account.createOAuth2Session(_provider: "amazon"); diff --git a/app/sdks/0.7.0/client-swift/docs/examples/account/create-recovery.md b/app/sdks/0.7.0/client-swift/docs/examples/account/create-recovery.md deleted file mode 100644 index 04fdcae541..0000000000 --- a/app/sdks/0.7.0/client-swift/docs/examples/account/create-recovery.md +++ /dev/null @@ -1,14 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - - -var client: Client = Client() - -client - .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject(value: "5df5acd0d48c2") // Your project ID - -var account: Account = Account(client: client); - -var result = account.createRecovery(_email: "email@example.com", _url: "https://example.com"); diff --git a/app/sdks/0.7.0/client-swift/docs/examples/account/create-session.md b/app/sdks/0.7.0/client-swift/docs/examples/account/create-session.md deleted file mode 100644 index 477b20199c..0000000000 --- a/app/sdks/0.7.0/client-swift/docs/examples/account/create-session.md +++ /dev/null @@ -1,14 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - - -var client: Client = Client() - -client - .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject(value: "5df5acd0d48c2") // Your project ID - -var account: Account = Account(client: client); - -var result = account.createSession(_email: "email@example.com", _password: "password"); diff --git a/app/sdks/0.7.0/client-swift/docs/examples/account/create-verification.md b/app/sdks/0.7.0/client-swift/docs/examples/account/create-verification.md deleted file mode 100644 index b0f8d6444e..0000000000 --- a/app/sdks/0.7.0/client-swift/docs/examples/account/create-verification.md +++ /dev/null @@ -1,14 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - - -var client: Client = Client() - -client - .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject(value: "5df5acd0d48c2") // Your project ID - -var account: Account = Account(client: client); - -var result = account.createVerification(_url: "https://example.com"); diff --git a/app/sdks/0.7.0/client-swift/docs/examples/account/create.md b/app/sdks/0.7.0/client-swift/docs/examples/account/create.md deleted file mode 100644 index 176b192c5e..0000000000 --- a/app/sdks/0.7.0/client-swift/docs/examples/account/create.md +++ /dev/null @@ -1,14 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - - -var client: Client = Client() - -client - .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject(value: "5df5acd0d48c2") // Your project ID - -var account: Account = Account(client: client); - -var result = account.create(_email: "email@example.com", _password: "password"); diff --git a/app/sdks/0.7.0/client-swift/docs/examples/account/delete-session.md b/app/sdks/0.7.0/client-swift/docs/examples/account/delete-session.md deleted file mode 100644 index 6f2373dc79..0000000000 --- a/app/sdks/0.7.0/client-swift/docs/examples/account/delete-session.md +++ /dev/null @@ -1,14 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - - -var client: Client = Client() - -client - .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject(value: "5df5acd0d48c2") // Your project ID - -var account: Account = Account(client: client); - -var result = account.deleteSession(_sessionId: "[SESSION_ID]"); diff --git a/app/sdks/0.7.0/client-swift/docs/examples/account/delete-sessions.md b/app/sdks/0.7.0/client-swift/docs/examples/account/delete-sessions.md deleted file mode 100644 index 6df71814c6..0000000000 --- a/app/sdks/0.7.0/client-swift/docs/examples/account/delete-sessions.md +++ /dev/null @@ -1,14 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - - -var client: Client = Client() - -client - .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject(value: "5df5acd0d48c2") // Your project ID - -var account: Account = Account(client: client); - -var result = account.deleteSessions(); diff --git a/app/sdks/0.7.0/client-swift/docs/examples/account/delete.md b/app/sdks/0.7.0/client-swift/docs/examples/account/delete.md deleted file mode 100644 index f4123b0197..0000000000 --- a/app/sdks/0.7.0/client-swift/docs/examples/account/delete.md +++ /dev/null @@ -1,14 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - - -var client: Client = Client() - -client - .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject(value: "5df5acd0d48c2") // Your project ID - -var account: Account = Account(client: client); - -var result = account.delete(); diff --git a/app/sdks/0.7.0/client-swift/docs/examples/account/get-logs.md b/app/sdks/0.7.0/client-swift/docs/examples/account/get-logs.md deleted file mode 100644 index 8d3d965723..0000000000 --- a/app/sdks/0.7.0/client-swift/docs/examples/account/get-logs.md +++ /dev/null @@ -1,14 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - - -var client: Client = Client() - -client - .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject(value: "5df5acd0d48c2") // Your project ID - -var account: Account = Account(client: client); - -var result = account.getLogs(); diff --git a/app/sdks/0.7.0/client-swift/docs/examples/account/get-prefs.md b/app/sdks/0.7.0/client-swift/docs/examples/account/get-prefs.md deleted file mode 100644 index e9746ab34b..0000000000 --- a/app/sdks/0.7.0/client-swift/docs/examples/account/get-prefs.md +++ /dev/null @@ -1,14 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - - -var client: Client = Client() - -client - .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject(value: "5df5acd0d48c2") // Your project ID - -var account: Account = Account(client: client); - -var result = account.getPrefs(); diff --git a/app/sdks/0.7.0/client-swift/docs/examples/account/get-sessions.md b/app/sdks/0.7.0/client-swift/docs/examples/account/get-sessions.md deleted file mode 100644 index 988e91c8e5..0000000000 --- a/app/sdks/0.7.0/client-swift/docs/examples/account/get-sessions.md +++ /dev/null @@ -1,14 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - - -var client: Client = Client() - -client - .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject(value: "5df5acd0d48c2") // Your project ID - -var account: Account = Account(client: client); - -var result = account.getSessions(); diff --git a/app/sdks/0.7.0/client-swift/docs/examples/account/get.md b/app/sdks/0.7.0/client-swift/docs/examples/account/get.md deleted file mode 100644 index b84096bdb8..0000000000 --- a/app/sdks/0.7.0/client-swift/docs/examples/account/get.md +++ /dev/null @@ -1,14 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - - -var client: Client = Client() - -client - .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject(value: "5df5acd0d48c2") // Your project ID - -var account: Account = Account(client: client); - -var result = account.get(); diff --git a/app/sdks/0.7.0/client-swift/docs/examples/account/update-email.md b/app/sdks/0.7.0/client-swift/docs/examples/account/update-email.md deleted file mode 100644 index cec700b330..0000000000 --- a/app/sdks/0.7.0/client-swift/docs/examples/account/update-email.md +++ /dev/null @@ -1,14 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - - -var client: Client = Client() - -client - .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject(value: "5df5acd0d48c2") // Your project ID - -var account: Account = Account(client: client); - -var result = account.updateEmail(_email: "email@example.com", _password: "password"); diff --git a/app/sdks/0.7.0/client-swift/docs/examples/account/update-name.md b/app/sdks/0.7.0/client-swift/docs/examples/account/update-name.md deleted file mode 100644 index dbc6f7d2b8..0000000000 --- a/app/sdks/0.7.0/client-swift/docs/examples/account/update-name.md +++ /dev/null @@ -1,14 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - - -var client: Client = Client() - -client - .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject(value: "5df5acd0d48c2") // Your project ID - -var account: Account = Account(client: client); - -var result = account.updateName(_name: "[NAME]"); diff --git a/app/sdks/0.7.0/client-swift/docs/examples/account/update-password.md b/app/sdks/0.7.0/client-swift/docs/examples/account/update-password.md deleted file mode 100644 index 1346102a32..0000000000 --- a/app/sdks/0.7.0/client-swift/docs/examples/account/update-password.md +++ /dev/null @@ -1,14 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - - -var client: Client = Client() - -client - .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject(value: "5df5acd0d48c2") // Your project ID - -var account: Account = Account(client: client); - -var result = account.updatePassword(_password: "password", _oldPassword: "password"); diff --git a/app/sdks/0.7.0/client-swift/docs/examples/account/update-prefs.md b/app/sdks/0.7.0/client-swift/docs/examples/account/update-prefs.md deleted file mode 100644 index fea1a8d6ff..0000000000 --- a/app/sdks/0.7.0/client-swift/docs/examples/account/update-prefs.md +++ /dev/null @@ -1,14 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - - -var client: Client = Client() - -client - .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject(value: "5df5acd0d48c2") // Your project ID - -var account: Account = Account(client: client); - -var result = account.updatePrefs(_prefs: ); diff --git a/app/sdks/0.7.0/client-swift/docs/examples/account/update-recovery.md b/app/sdks/0.7.0/client-swift/docs/examples/account/update-recovery.md deleted file mode 100644 index 6009d62e2c..0000000000 --- a/app/sdks/0.7.0/client-swift/docs/examples/account/update-recovery.md +++ /dev/null @@ -1,14 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - - -var client: Client = Client() - -client - .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject(value: "5df5acd0d48c2") // Your project ID - -var account: Account = Account(client: client); - -var result = account.updateRecovery(_userId: "[USER_ID]", _secret: "[SECRET]", _password: "password", _passwordAgain: "password"); diff --git a/app/sdks/0.7.0/client-swift/docs/examples/account/update-verification.md b/app/sdks/0.7.0/client-swift/docs/examples/account/update-verification.md deleted file mode 100644 index 376a87a9c3..0000000000 --- a/app/sdks/0.7.0/client-swift/docs/examples/account/update-verification.md +++ /dev/null @@ -1,14 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - - -var client: Client = Client() - -client - .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject(value: "5df5acd0d48c2") // Your project ID - -var account: Account = Account(client: client); - -var result = account.updateVerification(_userId: "[USER_ID]", _secret: "[SECRET]"); diff --git a/app/sdks/0.7.0/client-swift/docs/examples/avatars/get-browser.md b/app/sdks/0.7.0/client-swift/docs/examples/avatars/get-browser.md deleted file mode 100644 index 874ef96d31..0000000000 --- a/app/sdks/0.7.0/client-swift/docs/examples/avatars/get-browser.md +++ /dev/null @@ -1,14 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - - -var client: Client = Client() - -client - .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject(value: "5df5acd0d48c2") // Your project ID - -var avatars: Avatars = Avatars(client: client); - -var result = avatars.getBrowser(_code: "aa"); diff --git a/app/sdks/0.7.0/client-swift/docs/examples/avatars/get-credit-card.md b/app/sdks/0.7.0/client-swift/docs/examples/avatars/get-credit-card.md deleted file mode 100644 index 797431f3dc..0000000000 --- a/app/sdks/0.7.0/client-swift/docs/examples/avatars/get-credit-card.md +++ /dev/null @@ -1,14 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - - -var client: Client = Client() - -client - .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject(value: "5df5acd0d48c2") // Your project ID - -var avatars: Avatars = Avatars(client: client); - -var result = avatars.getCreditCard(_code: "amex"); diff --git a/app/sdks/0.7.0/client-swift/docs/examples/avatars/get-favicon.md b/app/sdks/0.7.0/client-swift/docs/examples/avatars/get-favicon.md deleted file mode 100644 index 5623468481..0000000000 --- a/app/sdks/0.7.0/client-swift/docs/examples/avatars/get-favicon.md +++ /dev/null @@ -1,14 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - - -var client: Client = Client() - -client - .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject(value: "5df5acd0d48c2") // Your project ID - -var avatars: Avatars = Avatars(client: client); - -var result = avatars.getFavicon(_url: "https://example.com"); diff --git a/app/sdks/0.7.0/client-swift/docs/examples/avatars/get-flag.md b/app/sdks/0.7.0/client-swift/docs/examples/avatars/get-flag.md deleted file mode 100644 index fba93ae4d4..0000000000 --- a/app/sdks/0.7.0/client-swift/docs/examples/avatars/get-flag.md +++ /dev/null @@ -1,14 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - - -var client: Client = Client() - -client - .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject(value: "5df5acd0d48c2") // Your project ID - -var avatars: Avatars = Avatars(client: client); - -var result = avatars.getFlag(_code: "af"); diff --git a/app/sdks/0.7.0/client-swift/docs/examples/avatars/get-image.md b/app/sdks/0.7.0/client-swift/docs/examples/avatars/get-image.md deleted file mode 100644 index 4ebe561b3b..0000000000 --- a/app/sdks/0.7.0/client-swift/docs/examples/avatars/get-image.md +++ /dev/null @@ -1,14 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - - -var client: Client = Client() - -client - .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject(value: "5df5acd0d48c2") // Your project ID - -var avatars: Avatars = Avatars(client: client); - -var result = avatars.getImage(_url: "https://example.com"); diff --git a/app/sdks/0.7.0/client-swift/docs/examples/avatars/get-initials.md b/app/sdks/0.7.0/client-swift/docs/examples/avatars/get-initials.md deleted file mode 100644 index d317cfc5a8..0000000000 --- a/app/sdks/0.7.0/client-swift/docs/examples/avatars/get-initials.md +++ /dev/null @@ -1,14 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - - -var client: Client = Client() - -client - .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject(value: "5df5acd0d48c2") // Your project ID - -var avatars: Avatars = Avatars(client: client); - -var result = avatars.getInitials(); diff --git a/app/sdks/0.7.0/client-swift/docs/examples/avatars/get-q-r.md b/app/sdks/0.7.0/client-swift/docs/examples/avatars/get-q-r.md deleted file mode 100644 index 737acfc258..0000000000 --- a/app/sdks/0.7.0/client-swift/docs/examples/avatars/get-q-r.md +++ /dev/null @@ -1,14 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - - -var client: Client = Client() - -client - .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject(value: "5df5acd0d48c2") // Your project ID - -var avatars: Avatars = Avatars(client: client); - -var result = avatars.getQR(_text: "[TEXT]"); diff --git a/app/sdks/0.7.0/client-swift/docs/examples/database/create-document.md b/app/sdks/0.7.0/client-swift/docs/examples/database/create-document.md deleted file mode 100644 index ebd59adc47..0000000000 --- a/app/sdks/0.7.0/client-swift/docs/examples/database/create-document.md +++ /dev/null @@ -1,14 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - - -var client: Client = Client() - -client - .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject(value: "5df5acd0d48c2") // Your project ID - -var database: Database = Database(client: client); - -var result = database.createDocument(_collectionId: "[COLLECTION_ID]", _data: , _read: [], _write: []); diff --git a/app/sdks/0.7.0/client-swift/docs/examples/database/delete-document.md b/app/sdks/0.7.0/client-swift/docs/examples/database/delete-document.md deleted file mode 100644 index faec2ceee9..0000000000 --- a/app/sdks/0.7.0/client-swift/docs/examples/database/delete-document.md +++ /dev/null @@ -1,14 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - - -var client: Client = Client() - -client - .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject(value: "5df5acd0d48c2") // Your project ID - -var database: Database = Database(client: client); - -var result = database.deleteDocument(_collectionId: "[COLLECTION_ID]", _documentId: "[DOCUMENT_ID]"); diff --git a/app/sdks/0.7.0/client-swift/docs/examples/database/get-document.md b/app/sdks/0.7.0/client-swift/docs/examples/database/get-document.md deleted file mode 100644 index 0f3a05bfa5..0000000000 --- a/app/sdks/0.7.0/client-swift/docs/examples/database/get-document.md +++ /dev/null @@ -1,14 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - - -var client: Client = Client() - -client - .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject(value: "5df5acd0d48c2") // Your project ID - -var database: Database = Database(client: client); - -var result = database.getDocument(_collectionId: "[COLLECTION_ID]", _documentId: "[DOCUMENT_ID]"); diff --git a/app/sdks/0.7.0/client-swift/docs/examples/database/list-documents.md b/app/sdks/0.7.0/client-swift/docs/examples/database/list-documents.md deleted file mode 100644 index 2c9f4a2efa..0000000000 --- a/app/sdks/0.7.0/client-swift/docs/examples/database/list-documents.md +++ /dev/null @@ -1,14 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - - -var client: Client = Client() - -client - .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject(value: "5df5acd0d48c2") // Your project ID - -var database: Database = Database(client: client); - -var result = database.listDocuments(_collectionId: "[COLLECTION_ID]"); diff --git a/app/sdks/0.7.0/client-swift/docs/examples/database/update-document.md b/app/sdks/0.7.0/client-swift/docs/examples/database/update-document.md deleted file mode 100644 index bddaf61111..0000000000 --- a/app/sdks/0.7.0/client-swift/docs/examples/database/update-document.md +++ /dev/null @@ -1,14 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - - -var client: Client = Client() - -client - .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject(value: "5df5acd0d48c2") // Your project ID - -var database: Database = Database(client: client); - -var result = database.updateDocument(_collectionId: "[COLLECTION_ID]", _documentId: "[DOCUMENT_ID]", _data: , _read: [], _write: []); diff --git a/app/sdks/0.7.0/client-swift/docs/examples/locale/get-continents.md b/app/sdks/0.7.0/client-swift/docs/examples/locale/get-continents.md deleted file mode 100644 index 3f57d5eb0d..0000000000 --- a/app/sdks/0.7.0/client-swift/docs/examples/locale/get-continents.md +++ /dev/null @@ -1,14 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - - -var client: Client = Client() - -client - .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject(value: "5df5acd0d48c2") // Your project ID - -var locale: Locale = Locale(client: client); - -var result = locale.getContinents(); diff --git a/app/sdks/0.7.0/client-swift/docs/examples/locale/get-countries-e-u.md b/app/sdks/0.7.0/client-swift/docs/examples/locale/get-countries-e-u.md deleted file mode 100644 index 9f2a26213c..0000000000 --- a/app/sdks/0.7.0/client-swift/docs/examples/locale/get-countries-e-u.md +++ /dev/null @@ -1,14 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - - -var client: Client = Client() - -client - .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject(value: "5df5acd0d48c2") // Your project ID - -var locale: Locale = Locale(client: client); - -var result = locale.getCountriesEU(); diff --git a/app/sdks/0.7.0/client-swift/docs/examples/locale/get-countries-phones.md b/app/sdks/0.7.0/client-swift/docs/examples/locale/get-countries-phones.md deleted file mode 100644 index 2cc9c4a9a0..0000000000 --- a/app/sdks/0.7.0/client-swift/docs/examples/locale/get-countries-phones.md +++ /dev/null @@ -1,14 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - - -var client: Client = Client() - -client - .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject(value: "5df5acd0d48c2") // Your project ID - -var locale: Locale = Locale(client: client); - -var result = locale.getCountriesPhones(); diff --git a/app/sdks/0.7.0/client-swift/docs/examples/locale/get-countries.md b/app/sdks/0.7.0/client-swift/docs/examples/locale/get-countries.md deleted file mode 100644 index df52194af1..0000000000 --- a/app/sdks/0.7.0/client-swift/docs/examples/locale/get-countries.md +++ /dev/null @@ -1,14 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - - -var client: Client = Client() - -client - .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject(value: "5df5acd0d48c2") // Your project ID - -var locale: Locale = Locale(client: client); - -var result = locale.getCountries(); diff --git a/app/sdks/0.7.0/client-swift/docs/examples/locale/get-currencies.md b/app/sdks/0.7.0/client-swift/docs/examples/locale/get-currencies.md deleted file mode 100644 index cf5f403eba..0000000000 --- a/app/sdks/0.7.0/client-swift/docs/examples/locale/get-currencies.md +++ /dev/null @@ -1,14 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - - -var client: Client = Client() - -client - .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject(value: "5df5acd0d48c2") // Your project ID - -var locale: Locale = Locale(client: client); - -var result = locale.getCurrencies(); diff --git a/app/sdks/0.7.0/client-swift/docs/examples/locale/get-languages.md b/app/sdks/0.7.0/client-swift/docs/examples/locale/get-languages.md deleted file mode 100644 index e8296dd7ca..0000000000 --- a/app/sdks/0.7.0/client-swift/docs/examples/locale/get-languages.md +++ /dev/null @@ -1,14 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - - -var client: Client = Client() - -client - .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject(value: "5df5acd0d48c2") // Your project ID - -var locale: Locale = Locale(client: client); - -var result = locale.getLanguages(); diff --git a/app/sdks/0.7.0/client-swift/docs/examples/locale/get.md b/app/sdks/0.7.0/client-swift/docs/examples/locale/get.md deleted file mode 100644 index 5685e89440..0000000000 --- a/app/sdks/0.7.0/client-swift/docs/examples/locale/get.md +++ /dev/null @@ -1,14 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - - -var client: Client = Client() - -client - .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject(value: "5df5acd0d48c2") // Your project ID - -var locale: Locale = Locale(client: client); - -var result = locale.get(); diff --git a/app/sdks/0.7.0/client-swift/docs/examples/storage/create-file.md b/app/sdks/0.7.0/client-swift/docs/examples/storage/create-file.md deleted file mode 100644 index b4e15a4ec1..0000000000 --- a/app/sdks/0.7.0/client-swift/docs/examples/storage/create-file.md +++ /dev/null @@ -1,14 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - - -var client: Client = Client() - -client - .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject(value: "5df5acd0d48c2") // Your project ID - -var storage: Storage = Storage(client: client); - -var result = storage.createFile(_file: nil, _read: [], _write: []); diff --git a/app/sdks/0.7.0/client-swift/docs/examples/storage/delete-file.md b/app/sdks/0.7.0/client-swift/docs/examples/storage/delete-file.md deleted file mode 100644 index 83152d9194..0000000000 --- a/app/sdks/0.7.0/client-swift/docs/examples/storage/delete-file.md +++ /dev/null @@ -1,14 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - - -var client: Client = Client() - -client - .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject(value: "5df5acd0d48c2") // Your project ID - -var storage: Storage = Storage(client: client); - -var result = storage.deleteFile(_fileId: "[FILE_ID]"); diff --git a/app/sdks/0.7.0/client-swift/docs/examples/storage/get-file-download.md b/app/sdks/0.7.0/client-swift/docs/examples/storage/get-file-download.md deleted file mode 100644 index 023f1a2243..0000000000 --- a/app/sdks/0.7.0/client-swift/docs/examples/storage/get-file-download.md +++ /dev/null @@ -1,14 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - - -var client: Client = Client() - -client - .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject(value: "5df5acd0d48c2") // Your project ID - -var storage: Storage = Storage(client: client); - -var result = storage.getFileDownload(_fileId: "[FILE_ID]"); diff --git a/app/sdks/0.7.0/client-swift/docs/examples/storage/get-file-preview.md b/app/sdks/0.7.0/client-swift/docs/examples/storage/get-file-preview.md deleted file mode 100644 index faaacd8e8c..0000000000 --- a/app/sdks/0.7.0/client-swift/docs/examples/storage/get-file-preview.md +++ /dev/null @@ -1,14 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - - -var client: Client = Client() - -client - .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject(value: "5df5acd0d48c2") // Your project ID - -var storage: Storage = Storage(client: client); - -var result = storage.getFilePreview(_fileId: "[FILE_ID]"); diff --git a/app/sdks/0.7.0/client-swift/docs/examples/storage/get-file-view.md b/app/sdks/0.7.0/client-swift/docs/examples/storage/get-file-view.md deleted file mode 100644 index d480377b06..0000000000 --- a/app/sdks/0.7.0/client-swift/docs/examples/storage/get-file-view.md +++ /dev/null @@ -1,14 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - - -var client: Client = Client() - -client - .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject(value: "5df5acd0d48c2") // Your project ID - -var storage: Storage = Storage(client: client); - -var result = storage.getFileView(_fileId: "[FILE_ID]"); diff --git a/app/sdks/0.7.0/client-swift/docs/examples/storage/get-file.md b/app/sdks/0.7.0/client-swift/docs/examples/storage/get-file.md deleted file mode 100644 index 15bf5f7241..0000000000 --- a/app/sdks/0.7.0/client-swift/docs/examples/storage/get-file.md +++ /dev/null @@ -1,14 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - - -var client: Client = Client() - -client - .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject(value: "5df5acd0d48c2") // Your project ID - -var storage: Storage = Storage(client: client); - -var result = storage.getFile(_fileId: "[FILE_ID]"); diff --git a/app/sdks/0.7.0/client-swift/docs/examples/storage/list-files.md b/app/sdks/0.7.0/client-swift/docs/examples/storage/list-files.md deleted file mode 100644 index bfce4293e5..0000000000 --- a/app/sdks/0.7.0/client-swift/docs/examples/storage/list-files.md +++ /dev/null @@ -1,14 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - - -var client: Client = Client() - -client - .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject(value: "5df5acd0d48c2") // Your project ID - -var storage: Storage = Storage(client: client); - -var result = storage.listFiles(); diff --git a/app/sdks/0.7.0/client-swift/docs/examples/storage/update-file.md b/app/sdks/0.7.0/client-swift/docs/examples/storage/update-file.md deleted file mode 100644 index 6a14e47773..0000000000 --- a/app/sdks/0.7.0/client-swift/docs/examples/storage/update-file.md +++ /dev/null @@ -1,14 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - - -var client: Client = Client() - -client - .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject(value: "5df5acd0d48c2") // Your project ID - -var storage: Storage = Storage(client: client); - -var result = storage.updateFile(_fileId: "[FILE_ID]", _read: [], _write: []); diff --git a/app/sdks/0.7.0/client-swift/docs/examples/teams/create-membership.md b/app/sdks/0.7.0/client-swift/docs/examples/teams/create-membership.md deleted file mode 100644 index 4af13ae6ee..0000000000 --- a/app/sdks/0.7.0/client-swift/docs/examples/teams/create-membership.md +++ /dev/null @@ -1,14 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - - -var client: Client = Client() - -client - .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject(value: "5df5acd0d48c2") // Your project ID - -var teams: Teams = Teams(client: client); - -var result = teams.createMembership(_teamId: "[TEAM_ID]", _email: "email@example.com", _roles: [], _url: "https://example.com"); diff --git a/app/sdks/0.7.0/client-swift/docs/examples/teams/create.md b/app/sdks/0.7.0/client-swift/docs/examples/teams/create.md deleted file mode 100644 index a5cf829019..0000000000 --- a/app/sdks/0.7.0/client-swift/docs/examples/teams/create.md +++ /dev/null @@ -1,14 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - - -var client: Client = Client() - -client - .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject(value: "5df5acd0d48c2") // Your project ID - -var teams: Teams = Teams(client: client); - -var result = teams.create(_name: "[NAME]"); diff --git a/app/sdks/0.7.0/client-swift/docs/examples/teams/delete-membership.md b/app/sdks/0.7.0/client-swift/docs/examples/teams/delete-membership.md deleted file mode 100644 index 19bf8b2f7d..0000000000 --- a/app/sdks/0.7.0/client-swift/docs/examples/teams/delete-membership.md +++ /dev/null @@ -1,14 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - - -var client: Client = Client() - -client - .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject(value: "5df5acd0d48c2") // Your project ID - -var teams: Teams = Teams(client: client); - -var result = teams.deleteMembership(_teamId: "[TEAM_ID]", _inviteId: "[INVITE_ID]"); diff --git a/app/sdks/0.7.0/client-swift/docs/examples/teams/delete.md b/app/sdks/0.7.0/client-swift/docs/examples/teams/delete.md deleted file mode 100644 index 50cc25892b..0000000000 --- a/app/sdks/0.7.0/client-swift/docs/examples/teams/delete.md +++ /dev/null @@ -1,14 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - - -var client: Client = Client() - -client - .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject(value: "5df5acd0d48c2") // Your project ID - -var teams: Teams = Teams(client: client); - -var result = teams.delete(_teamId: "[TEAM_ID]"); diff --git a/app/sdks/0.7.0/client-swift/docs/examples/teams/get-memberships.md b/app/sdks/0.7.0/client-swift/docs/examples/teams/get-memberships.md deleted file mode 100644 index 089ea8f717..0000000000 --- a/app/sdks/0.7.0/client-swift/docs/examples/teams/get-memberships.md +++ /dev/null @@ -1,14 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - - -var client: Client = Client() - -client - .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject(value: "5df5acd0d48c2") // Your project ID - -var teams: Teams = Teams(client: client); - -var result = teams.getMemberships(_teamId: "[TEAM_ID]"); diff --git a/app/sdks/0.7.0/client-swift/docs/examples/teams/get.md b/app/sdks/0.7.0/client-swift/docs/examples/teams/get.md deleted file mode 100644 index 25bf212a45..0000000000 --- a/app/sdks/0.7.0/client-swift/docs/examples/teams/get.md +++ /dev/null @@ -1,14 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - - -var client: Client = Client() - -client - .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject(value: "5df5acd0d48c2") // Your project ID - -var teams: Teams = Teams(client: client); - -var result = teams.get(_teamId: "[TEAM_ID]"); diff --git a/app/sdks/0.7.0/client-swift/docs/examples/teams/list.md b/app/sdks/0.7.0/client-swift/docs/examples/teams/list.md deleted file mode 100644 index 8333d1fe43..0000000000 --- a/app/sdks/0.7.0/client-swift/docs/examples/teams/list.md +++ /dev/null @@ -1,14 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - - -var client: Client = Client() - -client - .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject(value: "5df5acd0d48c2") // Your project ID - -var teams: Teams = Teams(client: client); - -var result = teams.list(); diff --git a/app/sdks/0.7.0/client-swift/docs/examples/teams/update-membership-status.md b/app/sdks/0.7.0/client-swift/docs/examples/teams/update-membership-status.md deleted file mode 100644 index ae72e4c799..0000000000 --- a/app/sdks/0.7.0/client-swift/docs/examples/teams/update-membership-status.md +++ /dev/null @@ -1,14 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - - -var client: Client = Client() - -client - .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject(value: "5df5acd0d48c2") // Your project ID - -var teams: Teams = Teams(client: client); - -var result = teams.updateMembershipStatus(_teamId: "[TEAM_ID]", _inviteId: "[INVITE_ID]", _userId: "[USER_ID]", _secret: "[SECRET]"); diff --git a/app/sdks/0.7.0/client-swift/docs/examples/teams/update.md b/app/sdks/0.7.0/client-swift/docs/examples/teams/update.md deleted file mode 100644 index fafd98b881..0000000000 --- a/app/sdks/0.7.0/client-swift/docs/examples/teams/update.md +++ /dev/null @@ -1,14 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - - -var client: Client = Client() - -client - .setEndpoint(endpoint: "https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint - .setProject(value: "5df5acd0d48c2") // Your project ID - -var teams: Teams = Teams(client: client); - -var result = teams.update(_teamId: "[TEAM_ID]", _name: "[NAME]"); diff --git a/app/sdks/0.7.0/client-swift/docs/locale.md b/app/sdks/0.7.0/client-swift/docs/locale.md deleted file mode 100644 index efe5a690e2..0000000000 --- a/app/sdks/0.7.0/client-swift/docs/locale.md +++ /dev/null @@ -1,64 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - -# Locale Service - -## Get User Locale - -```http request -GET https://appwrite.io/v1/locale -``` - -** Get the current user location based on IP. Returns an object with user country code, country name, continent name, continent code, ip address and suggested currency. You can use the locale header to get the data in a supported language. - -([IP Geolocation by DB-IP](https://db-ip.com)) ** - -## List Continents - -```http request -GET https://appwrite.io/v1/locale/continents -``` - -** List of all continents. You can use the locale header to get the data in a supported language. ** - -## List Countries - -```http request -GET https://appwrite.io/v1/locale/countries -``` - -** List of all countries. You can use the locale header to get the data in a supported language. ** - -## List EU Countries - -```http request -GET https://appwrite.io/v1/locale/countries/eu -``` - -** 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. ** - -## List Countries Phone Codes - -```http request -GET https://appwrite.io/v1/locale/countries/phones -``` - -** List of all countries phone codes. You can use the locale header to get the data in a supported language. ** - -## List Currencies - -```http request -GET https://appwrite.io/v1/locale/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. ** - -## List Languages - -```http request -GET https://appwrite.io/v1/locale/languages -``` - -** List of all languages classified by ISO 639-1 including 2-letter code, name in English, and name in the respective language. ** - diff --git a/app/sdks/0.7.0/client-swift/docs/storage.md b/app/sdks/0.7.0/client-swift/docs/storage.md deleted file mode 100644 index f902ebd2e9..0000000000 --- a/app/sdks/0.7.0/client-swift/docs/storage.md +++ /dev/null @@ -1,131 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - -# Storage Service - -## List Files - -```http request -GET https://appwrite.io/v1/storage/files -``` - -** Get a list of all the user files. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project files. [Learn more about different API modes](/docs/admin). ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| search | string | Search term to filter your list results. | | -| limit | integer | Results limit value. By default will return maximum 25 results. Maximum of 100 results allowed per request. | 25 | -| offset | integer | Results offset. The default value is 0. Use this param to manage pagination. | 0 | -| orderType | string | Order result by ASC or DESC order. | ASC | - -## Create File - -```http request -POST https://appwrite.io/v1/storage/files -``` - -** Create a new file. The user who creates the file will automatically be assigned to read and write access unless he has passed custom values for read and write arguments. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| file | file | Binary file. | | -| read | array | An array of strings with read permissions. By default no user is granted with any read permissions. [learn more about permissions](/docs/permissions) and get a full list of available permissions. | | -| write | array | An array of strings with write permissions. By default no user is granted with any write permissions. [learn more about permissions](/docs/permissions) and get a full list of available permissions. | | - -## Get File - -```http request -GET https://appwrite.io/v1/storage/files/{fileId} -``` - -** Get file by its unique ID. This endpoint response returns a JSON object with the file metadata. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| fileId | string | **Required** File unique ID. | | - -## Update File - -```http request -PUT https://appwrite.io/v1/storage/files/{fileId} -``` - -** Update file by its unique ID. Only users with write permissions have access to update this resource. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| fileId | string | **Required** File unique ID. | | -| read | array | An array of strings with read permissions. By default no user is granted with any read permissions. [learn more about permissions](/docs/permissions) and get a full list of available permissions. | | -| write | array | An array of strings with write permissions. By default no user is granted with any write permissions. [learn more about permissions](/docs/permissions) and get a full list of available permissions. | | - -## Delete File - -```http request -DELETE https://appwrite.io/v1/storage/files/{fileId} -``` - -** Delete a file by its unique ID. Only users with write permissions have access to delete this resource. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| fileId | string | **Required** File unique ID. | | - -## Get File for Download - -```http request -GET https://appwrite.io/v1/storage/files/{fileId}/download -``` - -** Get 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. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| fileId | string | **Required** File unique ID. | | - -## Get File Preview - -```http request -GET https://appwrite.io/v1/storage/files/{fileId}/preview -``` - -** Get a file preview image. Currently, this method supports preview for image files (jpg, png, and gif), other supported formats, like pdf, docs, slides, and spreadsheets, will return the file icon image. You can also pass query string arguments for cutting and resizing your preview image. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| fileId | string | **Required** File unique ID | | -| width | integer | Resize preview image width, Pass an integer between 0 to 4000. | 0 | -| height | integer | Resize preview image height, Pass an integer between 0 to 4000. | 0 | -| quality | integer | Preview image quality. Pass an integer between 0 to 100. Defaults to 100. | 100 | -| background | string | Preview image background color. Only works with transparent images (png). Use a valid HEX color, no # is needed for prefix. | | -| output | string | Output format type (jpeg, jpg, png, gif and webp). | | - -## Get File for View - -```http request -GET https://appwrite.io/v1/storage/files/{fileId}/view -``` - -** Get file content by its unique ID. This endpoint is similar to the download method but returns with no 'Content-Disposition: attachment' header. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| fileId | string | **Required** File unique ID. | | -| as | string | Choose a file format to convert your file to. Currently you can only convert word and pdf files to pdf or txt. This option is currently experimental only, use at your own risk. | | - diff --git a/app/sdks/0.7.0/client-swift/docs/teams.md b/app/sdks/0.7.0/client-swift/docs/teams.md deleted file mode 100644 index 7f8b4238a7..0000000000 --- a/app/sdks/0.7.0/client-swift/docs/teams.md +++ /dev/null @@ -1,153 +0,0 @@ -/// Swift Appwrite SDK -/// Produced by Appwrite SDK Generator -/// - -# Teams Service - -## List Teams - -```http request -GET https://appwrite.io/v1/teams -``` - -** Get a list of all the current user teams. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project teams. [Learn more about different API modes](/docs/admin). ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| search | string | Search term to filter your list results. | | -| limit | integer | Results limit value. By default will return maximum 25 results. Maximum of 100 results allowed per request. | 25 | -| offset | integer | Results offset. The default value is 0. Use this param to manage pagination. | 0 | -| orderType | string | Order result by ASC or DESC order. | ASC | - -## Create Team - -```http request -POST https://appwrite.io/v1/teams -``` - -** Create a new team. The user who creates the team will automatically be assigned as the owner of the team. The team owner can invite new members, who will be able add new owners and update or delete the team from your project. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| name | string | Team name. | | -| roles | array | Array of strings. Use this param to set the roles in the team for the user who created it. The default role is **owner**. A role can be any string. Learn more about [roles and permissions](/docs/permissions). | ["owner"] | - -## Get Team - -```http request -GET https://appwrite.io/v1/teams/{teamId} -``` - -** Get team by its unique ID. All team members have read access for this resource. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| teamId | string | **Required** Team unique ID. | | - -## Update Team - -```http request -PUT https://appwrite.io/v1/teams/{teamId} -``` - -** Update team by its unique ID. Only team owners have write access for this resource. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| teamId | string | **Required** Team unique ID. | | -| name | string | Team name. | | - -## Delete Team - -```http request -DELETE https://appwrite.io/v1/teams/{teamId} -``` - -** Delete team by its unique ID. Only team owners have write access for this resource. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| teamId | string | **Required** Team unique ID. | | - -## Get Team Memberships - -```http request -GET https://appwrite.io/v1/teams/{teamId}/memberships -``` - -** Get team members by the team unique ID. All team members have read access for this list of resources. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| teamId | string | **Required** Team unique ID. | | -| search | string | Search term to filter your list results. | | -| limit | integer | Results limit value. By default will return maximum 25 results. Maximum of 100 results allowed per request. | 25 | -| offset | integer | Results offset. The default value is 0. Use this param to manage pagination. | 0 | -| orderType | string | Order result by ASC or DESC order. | ASC | - -## Create Team Membership - -```http request -POST https://appwrite.io/v1/teams/{teamId}/memberships -``` - -** Use this endpoint to invite a new member to join your team. An email with a link to join the team will be sent to the new member email address if the member doesn't exist in the project it will be created automatically. - -Use the 'URL' parameter to redirect the user from the invitation email back to your app. When the user is redirected, use the [Update Team Membership Status](/docs/client/teams#updateMembershipStatus) endpoint to allow the user to accept the invitation to the team. - -Please note that in order to avoid a [Redirect Attacks](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URL's are the once from domains you have set when added your platforms in the console interface. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| teamId | string | **Required** Team unique ID. | | -| email | string | New team member email. | | -| name | string | New team member name. | | -| roles | array | Array of strings. Use this param to set the user roles in the team. A role can be any string. Learn more about [roles and permissions](/docs/permissions). | | -| url | string | URL to redirect the user back to your app from the invitation email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API. | | - -## Delete Team Membership - -```http request -DELETE https://appwrite.io/v1/teams/{teamId}/memberships/{inviteId} -``` - -** 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 he didn't accept it. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| teamId | string | **Required** Team unique ID. | | -| inviteId | string | **Required** Invite unique ID. | | - -## Update Team Membership Status - -```http request -PATCH https://appwrite.io/v1/teams/{teamId}/memberships/{inviteId}/status -``` - -** Use this endpoint to allow a user to accept an invitation to join a team after he is being redirected back to your app from the invitation email he was sent. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| teamId | string | **Required** Team unique ID. | | -| inviteId | string | **Required** Invite unique ID. | | -| userId | string | User unique ID. | | -| secret | string | Secret key. | | - diff --git a/app/sdks/0.7.0/client-web/CHANGELOG.md b/app/sdks/0.7.0/client-web/CHANGELOG.md deleted file mode 100644 index fa4d35e687..0000000000 --- a/app/sdks/0.7.0/client-web/CHANGELOG.md +++ /dev/null @@ -1 +0,0 @@ -# Change Log \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/LICENSE b/app/sdks/0.7.0/client-web/LICENSE deleted file mode 100644 index fc7c051a91..0000000000 --- a/app/sdks/0.7.0/client-web/LICENSE +++ /dev/null @@ -1,12 +0,0 @@ -Copyright (c) 2019 Appwrite (https://appwrite.io) and individual contributors. -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - - 3. Neither the name Appwrite nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/README.md b/app/sdks/0.7.0/client-web/README.md deleted file mode 100644 index 41e939b017..0000000000 --- a/app/sdks/0.7.0/client-web/README.md +++ /dev/null @@ -1,44 +0,0 @@ -# Appwrite Web SDK - -![License](https://img.shields.io/github/license/appwrite/sdk-for-js.svg?v=1) -![Version](https://img.shields.io/badge/api%20version-0.7.0-blue.svg?v=1) - -Appwrite is an open-source backend as a service server that abstract and simplify complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way. - Use the Web SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools. - For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs) - -![Appwrite](https://appwrite.io/images/github.png) - -## Installation - -### NPM - -To install via [NPM](https://www.npmjs.com/): - -```bash -npm install appwrite --save -``` - -If you're using a bundler (like [Browserify](http://browserify.org/) or [webpack](https://webpack.js.org/)), you can import the Appwrite module when you need it: - -```js -import * as Appwrite from "appwrite"; -``` - -### CDN - -To install with a CDN (content delivery network) add the following scripts to the bottom of your tag, but before you use any Appwrite services: - -```html - -``` - - - -## Contribution - -This library is auto-generated by Appwrite custom [SDK Generator](https://github.com/appwrite/sdk-generator). To learn more about how you can help us improve this SDK, please check the [contribution guide](https://github.com/appwrite/sdk-generator/blob/master/CONTRIBUTING.md) before sending a pull-request. - -## License - -Please see the [BSD-3-Clause license](https://raw.githubusercontent.com/appwrite/appwrite/master/LICENSE) file for more information. \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/docs/examples/account/create-o-auth2session.md b/app/sdks/0.7.0/client-web/docs/examples/account/create-o-auth2session.md deleted file mode 100644 index 25b02e632e..0000000000 --- a/app/sdks/0.7.0/client-web/docs/examples/account/create-o-auth2session.md +++ /dev/null @@ -1,10 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -// Go to OAuth provider login page -sdk.account.createOAuth2Session('amazon'); - diff --git a/app/sdks/0.7.0/client-web/docs/examples/account/create-recovery.md b/app/sdks/0.7.0/client-web/docs/examples/account/create-recovery.md deleted file mode 100644 index 72130f4de4..0000000000 --- a/app/sdks/0.7.0/client-web/docs/examples/account/create-recovery.md +++ /dev/null @@ -1,14 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.account.createRecovery('email@example.com', 'https://example.com'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/docs/examples/account/create-session.md b/app/sdks/0.7.0/client-web/docs/examples/account/create-session.md deleted file mode 100644 index 4a7682c13d..0000000000 --- a/app/sdks/0.7.0/client-web/docs/examples/account/create-session.md +++ /dev/null @@ -1,14 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.account.createSession('email@example.com', 'password'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/docs/examples/account/create-verification.md b/app/sdks/0.7.0/client-web/docs/examples/account/create-verification.md deleted file mode 100644 index 7903384a9f..0000000000 --- a/app/sdks/0.7.0/client-web/docs/examples/account/create-verification.md +++ /dev/null @@ -1,14 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.account.createVerification('https://example.com'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/docs/examples/account/create.md b/app/sdks/0.7.0/client-web/docs/examples/account/create.md deleted file mode 100644 index c9ce798b6a..0000000000 --- a/app/sdks/0.7.0/client-web/docs/examples/account/create.md +++ /dev/null @@ -1,14 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.account.create('email@example.com', 'password'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/docs/examples/account/delete-session.md b/app/sdks/0.7.0/client-web/docs/examples/account/delete-session.md deleted file mode 100644 index 581e5d132d..0000000000 --- a/app/sdks/0.7.0/client-web/docs/examples/account/delete-session.md +++ /dev/null @@ -1,14 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.account.deleteSession('[SESSION_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/docs/examples/account/delete-sessions.md b/app/sdks/0.7.0/client-web/docs/examples/account/delete-sessions.md deleted file mode 100644 index d037673eb3..0000000000 --- a/app/sdks/0.7.0/client-web/docs/examples/account/delete-sessions.md +++ /dev/null @@ -1,14 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.account.deleteSessions(); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/docs/examples/account/delete.md b/app/sdks/0.7.0/client-web/docs/examples/account/delete.md deleted file mode 100644 index d952d77d7a..0000000000 --- a/app/sdks/0.7.0/client-web/docs/examples/account/delete.md +++ /dev/null @@ -1,14 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.account.delete(); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/docs/examples/account/get-logs.md b/app/sdks/0.7.0/client-web/docs/examples/account/get-logs.md deleted file mode 100644 index c53e0446e9..0000000000 --- a/app/sdks/0.7.0/client-web/docs/examples/account/get-logs.md +++ /dev/null @@ -1,14 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.account.getLogs(); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/docs/examples/account/get-prefs.md b/app/sdks/0.7.0/client-web/docs/examples/account/get-prefs.md deleted file mode 100644 index 75835e37fb..0000000000 --- a/app/sdks/0.7.0/client-web/docs/examples/account/get-prefs.md +++ /dev/null @@ -1,14 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.account.getPrefs(); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/docs/examples/account/get-sessions.md b/app/sdks/0.7.0/client-web/docs/examples/account/get-sessions.md deleted file mode 100644 index b4434de336..0000000000 --- a/app/sdks/0.7.0/client-web/docs/examples/account/get-sessions.md +++ /dev/null @@ -1,14 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.account.getSessions(); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/docs/examples/account/get.md b/app/sdks/0.7.0/client-web/docs/examples/account/get.md deleted file mode 100644 index f0184a8513..0000000000 --- a/app/sdks/0.7.0/client-web/docs/examples/account/get.md +++ /dev/null @@ -1,14 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.account.get(); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/docs/examples/account/update-email.md b/app/sdks/0.7.0/client-web/docs/examples/account/update-email.md deleted file mode 100644 index f48fed78bc..0000000000 --- a/app/sdks/0.7.0/client-web/docs/examples/account/update-email.md +++ /dev/null @@ -1,14 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.account.updateEmail('email@example.com', 'password'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/docs/examples/account/update-name.md b/app/sdks/0.7.0/client-web/docs/examples/account/update-name.md deleted file mode 100644 index e03e72c4b2..0000000000 --- a/app/sdks/0.7.0/client-web/docs/examples/account/update-name.md +++ /dev/null @@ -1,14 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.account.updateName('[NAME]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/docs/examples/account/update-password.md b/app/sdks/0.7.0/client-web/docs/examples/account/update-password.md deleted file mode 100644 index 22539f3f64..0000000000 --- a/app/sdks/0.7.0/client-web/docs/examples/account/update-password.md +++ /dev/null @@ -1,14 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.account.updatePassword('password', 'password'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/docs/examples/account/update-prefs.md b/app/sdks/0.7.0/client-web/docs/examples/account/update-prefs.md deleted file mode 100644 index b2d4ff175e..0000000000 --- a/app/sdks/0.7.0/client-web/docs/examples/account/update-prefs.md +++ /dev/null @@ -1,14 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.account.updatePrefs({}); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/docs/examples/account/update-recovery.md b/app/sdks/0.7.0/client-web/docs/examples/account/update-recovery.md deleted file mode 100644 index 33cf1b63c9..0000000000 --- a/app/sdks/0.7.0/client-web/docs/examples/account/update-recovery.md +++ /dev/null @@ -1,14 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.account.updateRecovery('[USER_ID]', '[SECRET]', 'password', 'password'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/docs/examples/account/update-verification.md b/app/sdks/0.7.0/client-web/docs/examples/account/update-verification.md deleted file mode 100644 index a80e125e30..0000000000 --- a/app/sdks/0.7.0/client-web/docs/examples/account/update-verification.md +++ /dev/null @@ -1,14 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.account.updateVerification('[USER_ID]', '[SECRET]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/docs/examples/avatars/get-browser.md b/app/sdks/0.7.0/client-web/docs/examples/avatars/get-browser.md deleted file mode 100644 index 0855209f58..0000000000 --- a/app/sdks/0.7.0/client-web/docs/examples/avatars/get-browser.md +++ /dev/null @@ -1,10 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let result = sdk.avatars.getBrowser('aa'); - -console.log(result); // Resource URL \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/docs/examples/avatars/get-credit-card.md b/app/sdks/0.7.0/client-web/docs/examples/avatars/get-credit-card.md deleted file mode 100644 index 1aa595bd65..0000000000 --- a/app/sdks/0.7.0/client-web/docs/examples/avatars/get-credit-card.md +++ /dev/null @@ -1,10 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let result = sdk.avatars.getCreditCard('amex'); - -console.log(result); // Resource URL \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/docs/examples/avatars/get-favicon.md b/app/sdks/0.7.0/client-web/docs/examples/avatars/get-favicon.md deleted file mode 100644 index a945e50bb2..0000000000 --- a/app/sdks/0.7.0/client-web/docs/examples/avatars/get-favicon.md +++ /dev/null @@ -1,10 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let result = sdk.avatars.getFavicon('https://example.com'); - -console.log(result); // Resource URL \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/docs/examples/avatars/get-flag.md b/app/sdks/0.7.0/client-web/docs/examples/avatars/get-flag.md deleted file mode 100644 index 222b388afc..0000000000 --- a/app/sdks/0.7.0/client-web/docs/examples/avatars/get-flag.md +++ /dev/null @@ -1,10 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let result = sdk.avatars.getFlag('af'); - -console.log(result); // Resource URL \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/docs/examples/avatars/get-image.md b/app/sdks/0.7.0/client-web/docs/examples/avatars/get-image.md deleted file mode 100644 index 3f15981c71..0000000000 --- a/app/sdks/0.7.0/client-web/docs/examples/avatars/get-image.md +++ /dev/null @@ -1,10 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let result = sdk.avatars.getImage('https://example.com'); - -console.log(result); // Resource URL \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/docs/examples/avatars/get-initials.md b/app/sdks/0.7.0/client-web/docs/examples/avatars/get-initials.md deleted file mode 100644 index ef04988e2d..0000000000 --- a/app/sdks/0.7.0/client-web/docs/examples/avatars/get-initials.md +++ /dev/null @@ -1,10 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let result = sdk.avatars.getInitials(); - -console.log(result); // Resource URL \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/docs/examples/avatars/get-q-r.md b/app/sdks/0.7.0/client-web/docs/examples/avatars/get-q-r.md deleted file mode 100644 index 9d9ee3fea2..0000000000 --- a/app/sdks/0.7.0/client-web/docs/examples/avatars/get-q-r.md +++ /dev/null @@ -1,10 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let result = sdk.avatars.getQR('[TEXT]'); - -console.log(result); // Resource URL \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/docs/examples/database/create-document.md b/app/sdks/0.7.0/client-web/docs/examples/database/create-document.md deleted file mode 100644 index e04f73f73e..0000000000 --- a/app/sdks/0.7.0/client-web/docs/examples/database/create-document.md +++ /dev/null @@ -1,14 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.database.createDocument('[COLLECTION_ID]', {}, [], []); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/docs/examples/database/delete-document.md b/app/sdks/0.7.0/client-web/docs/examples/database/delete-document.md deleted file mode 100644 index 79799b6907..0000000000 --- a/app/sdks/0.7.0/client-web/docs/examples/database/delete-document.md +++ /dev/null @@ -1,14 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.database.deleteDocument('[COLLECTION_ID]', '[DOCUMENT_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/docs/examples/database/get-document.md b/app/sdks/0.7.0/client-web/docs/examples/database/get-document.md deleted file mode 100644 index b9605dccc6..0000000000 --- a/app/sdks/0.7.0/client-web/docs/examples/database/get-document.md +++ /dev/null @@ -1,14 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.database.getDocument('[COLLECTION_ID]', '[DOCUMENT_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/docs/examples/database/list-documents.md b/app/sdks/0.7.0/client-web/docs/examples/database/list-documents.md deleted file mode 100644 index 14f8a423a1..0000000000 --- a/app/sdks/0.7.0/client-web/docs/examples/database/list-documents.md +++ /dev/null @@ -1,14 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.database.listDocuments('[COLLECTION_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/docs/examples/database/update-document.md b/app/sdks/0.7.0/client-web/docs/examples/database/update-document.md deleted file mode 100644 index 9104b77a71..0000000000 --- a/app/sdks/0.7.0/client-web/docs/examples/database/update-document.md +++ /dev/null @@ -1,14 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.database.updateDocument('[COLLECTION_ID]', '[DOCUMENT_ID]', {}, [], []); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/docs/examples/locale/get-continents.md b/app/sdks/0.7.0/client-web/docs/examples/locale/get-continents.md deleted file mode 100644 index 1dfdf8013b..0000000000 --- a/app/sdks/0.7.0/client-web/docs/examples/locale/get-continents.md +++ /dev/null @@ -1,14 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.locale.getContinents(); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/docs/examples/locale/get-countries-e-u.md b/app/sdks/0.7.0/client-web/docs/examples/locale/get-countries-e-u.md deleted file mode 100644 index 6b3f210a1e..0000000000 --- a/app/sdks/0.7.0/client-web/docs/examples/locale/get-countries-e-u.md +++ /dev/null @@ -1,14 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.locale.getCountriesEU(); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/docs/examples/locale/get-countries-phones.md b/app/sdks/0.7.0/client-web/docs/examples/locale/get-countries-phones.md deleted file mode 100644 index f35e2152e4..0000000000 --- a/app/sdks/0.7.0/client-web/docs/examples/locale/get-countries-phones.md +++ /dev/null @@ -1,14 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.locale.getCountriesPhones(); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/docs/examples/locale/get-countries.md b/app/sdks/0.7.0/client-web/docs/examples/locale/get-countries.md deleted file mode 100644 index 53b96375a1..0000000000 --- a/app/sdks/0.7.0/client-web/docs/examples/locale/get-countries.md +++ /dev/null @@ -1,14 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.locale.getCountries(); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/docs/examples/locale/get-currencies.md b/app/sdks/0.7.0/client-web/docs/examples/locale/get-currencies.md deleted file mode 100644 index 57db66401f..0000000000 --- a/app/sdks/0.7.0/client-web/docs/examples/locale/get-currencies.md +++ /dev/null @@ -1,14 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.locale.getCurrencies(); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/docs/examples/locale/get-languages.md b/app/sdks/0.7.0/client-web/docs/examples/locale/get-languages.md deleted file mode 100644 index 04e3063ee7..0000000000 --- a/app/sdks/0.7.0/client-web/docs/examples/locale/get-languages.md +++ /dev/null @@ -1,14 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.locale.getLanguages(); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/docs/examples/locale/get.md b/app/sdks/0.7.0/client-web/docs/examples/locale/get.md deleted file mode 100644 index 469a046dbc..0000000000 --- a/app/sdks/0.7.0/client-web/docs/examples/locale/get.md +++ /dev/null @@ -1,14 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.locale.get(); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/docs/examples/storage/create-file.md b/app/sdks/0.7.0/client-web/docs/examples/storage/create-file.md deleted file mode 100644 index b23c47027a..0000000000 --- a/app/sdks/0.7.0/client-web/docs/examples/storage/create-file.md +++ /dev/null @@ -1,14 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.storage.createFile(document.getElementById('uploader').files[0], [], []); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/docs/examples/storage/delete-file.md b/app/sdks/0.7.0/client-web/docs/examples/storage/delete-file.md deleted file mode 100644 index c38ab4ba9c..0000000000 --- a/app/sdks/0.7.0/client-web/docs/examples/storage/delete-file.md +++ /dev/null @@ -1,14 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.storage.deleteFile('[FILE_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/docs/examples/storage/get-file-download.md b/app/sdks/0.7.0/client-web/docs/examples/storage/get-file-download.md deleted file mode 100644 index 1323b8b8df..0000000000 --- a/app/sdks/0.7.0/client-web/docs/examples/storage/get-file-download.md +++ /dev/null @@ -1,10 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let result = sdk.storage.getFileDownload('[FILE_ID]'); - -console.log(result); // Resource URL \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/docs/examples/storage/get-file-preview.md b/app/sdks/0.7.0/client-web/docs/examples/storage/get-file-preview.md deleted file mode 100644 index 5ede9fdb93..0000000000 --- a/app/sdks/0.7.0/client-web/docs/examples/storage/get-file-preview.md +++ /dev/null @@ -1,10 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let result = sdk.storage.getFilePreview('[FILE_ID]'); - -console.log(result); // Resource URL \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/docs/examples/storage/get-file-view.md b/app/sdks/0.7.0/client-web/docs/examples/storage/get-file-view.md deleted file mode 100644 index 53877ae352..0000000000 --- a/app/sdks/0.7.0/client-web/docs/examples/storage/get-file-view.md +++ /dev/null @@ -1,10 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let result = sdk.storage.getFileView('[FILE_ID]'); - -console.log(result); // Resource URL \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/docs/examples/storage/get-file.md b/app/sdks/0.7.0/client-web/docs/examples/storage/get-file.md deleted file mode 100644 index a1f94c08a6..0000000000 --- a/app/sdks/0.7.0/client-web/docs/examples/storage/get-file.md +++ /dev/null @@ -1,14 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.storage.getFile('[FILE_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/docs/examples/storage/list-files.md b/app/sdks/0.7.0/client-web/docs/examples/storage/list-files.md deleted file mode 100644 index c489a0b46d..0000000000 --- a/app/sdks/0.7.0/client-web/docs/examples/storage/list-files.md +++ /dev/null @@ -1,14 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.storage.listFiles(); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/docs/examples/storage/update-file.md b/app/sdks/0.7.0/client-web/docs/examples/storage/update-file.md deleted file mode 100644 index 2a2f579b3b..0000000000 --- a/app/sdks/0.7.0/client-web/docs/examples/storage/update-file.md +++ /dev/null @@ -1,14 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.storage.updateFile('[FILE_ID]', [], []); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/docs/examples/teams/create-membership.md b/app/sdks/0.7.0/client-web/docs/examples/teams/create-membership.md deleted file mode 100644 index 78b2d7fa77..0000000000 --- a/app/sdks/0.7.0/client-web/docs/examples/teams/create-membership.md +++ /dev/null @@ -1,14 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.teams.createMembership('[TEAM_ID]', 'email@example.com', [], 'https://example.com'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/docs/examples/teams/create.md b/app/sdks/0.7.0/client-web/docs/examples/teams/create.md deleted file mode 100644 index 43205ba888..0000000000 --- a/app/sdks/0.7.0/client-web/docs/examples/teams/create.md +++ /dev/null @@ -1,14 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.teams.create('[NAME]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/docs/examples/teams/delete-membership.md b/app/sdks/0.7.0/client-web/docs/examples/teams/delete-membership.md deleted file mode 100644 index 1b85ef08da..0000000000 --- a/app/sdks/0.7.0/client-web/docs/examples/teams/delete-membership.md +++ /dev/null @@ -1,14 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.teams.deleteMembership('[TEAM_ID]', '[INVITE_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/docs/examples/teams/delete.md b/app/sdks/0.7.0/client-web/docs/examples/teams/delete.md deleted file mode 100644 index 4665ad5773..0000000000 --- a/app/sdks/0.7.0/client-web/docs/examples/teams/delete.md +++ /dev/null @@ -1,14 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.teams.delete('[TEAM_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/docs/examples/teams/get-memberships.md b/app/sdks/0.7.0/client-web/docs/examples/teams/get-memberships.md deleted file mode 100644 index 6235ce33f4..0000000000 --- a/app/sdks/0.7.0/client-web/docs/examples/teams/get-memberships.md +++ /dev/null @@ -1,14 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.teams.getMemberships('[TEAM_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/docs/examples/teams/get.md b/app/sdks/0.7.0/client-web/docs/examples/teams/get.md deleted file mode 100644 index f4b0f040b1..0000000000 --- a/app/sdks/0.7.0/client-web/docs/examples/teams/get.md +++ /dev/null @@ -1,14 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.teams.get('[TEAM_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/docs/examples/teams/list.md b/app/sdks/0.7.0/client-web/docs/examples/teams/list.md deleted file mode 100644 index c4229e2400..0000000000 --- a/app/sdks/0.7.0/client-web/docs/examples/teams/list.md +++ /dev/null @@ -1,14 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.teams.list(); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/docs/examples/teams/update-membership-status.md b/app/sdks/0.7.0/client-web/docs/examples/teams/update-membership-status.md deleted file mode 100644 index e8b3de0a0b..0000000000 --- a/app/sdks/0.7.0/client-web/docs/examples/teams/update-membership-status.md +++ /dev/null @@ -1,14 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.teams.updateMembershipStatus('[TEAM_ID]', '[INVITE_ID]', '[USER_ID]', '[SECRET]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/docs/examples/teams/update.md b/app/sdks/0.7.0/client-web/docs/examples/teams/update.md deleted file mode 100644 index bbab80937d..0000000000 --- a/app/sdks/0.7.0/client-web/docs/examples/teams/update.md +++ /dev/null @@ -1,14 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.teams.update('[TEAM_ID]', '[NAME]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/package.json b/app/sdks/0.7.0/client-web/package.json deleted file mode 100644 index 26dd06fb94..0000000000 --- a/app/sdks/0.7.0/client-web/package.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "appwrite", - "homepage": "https://appwrite.io/support", - "description": "Appwrite is an open-source self-hosted backend server that abstract and simplify complex and repetitive development tasks behind a very simple REST API", - "version": "1.1.0", - "license": "BSD-3-Clause", - "main": "src/sdk.js", - "types": "types/index.d.ts", - "repository": { - "type": "git", - "url": "https://github.com/appwrite/sdk-for-js" - }, - "devDependencies": { - "typescript": "^3.6.4" - }, - "dependencies": {} -} \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/src/sdk.js b/app/sdks/0.7.0/client-web/src/sdk.js deleted file mode 100644 index 90c9b8021b..0000000000 --- a/app/sdks/0.7.0/client-web/src/sdk.js +++ /dev/null @@ -1,2386 +0,0 @@ -(function (window) { - - 'use strict'; - - window.Appwrite = function () { - - let config = { - endpoint: 'https://appwrite.io/v1', - project: '', - locale: '', - }; - - /** - * @param {string} endpoint - * @returns {this} - */ - let setEndpoint = function(endpoint) { - config.endpoint = endpoint; - - return this; - }; - - /** - * Set Project - * - * Your project ID - * - * @param value string - * - * @return this - */ - let setProject = function (value) - { - http.addGlobalHeader('X-Appwrite-Project', value); - - config.project = value; - - return this; - }; - - /** - * Set Locale - * - * @param value string - * - * @return this - */ - let setLocale = function (value) - { - http.addGlobalHeader('X-Appwrite-Locale', value); - - config.locale = value; - - return this; - }; - - let http = function(document) { - let globalParams = [], - globalHeaders = []; - - let addParam = function (url, param, value) { - let a = document.createElement('a'), regex = /(?:\?|&|&)+([^=]+)(?:=([^&]*))*/g; - let match, str = []; - a.href = url; - param = encodeURIComponent(param); - - while (match = regex.exec(a.search)) if (param !== match[1]) str.push(match[1] + (match[2] ? "=" + match[2] : "")); - - str.push(param + (value ? "=" + encodeURIComponent(value) : "")); - - a.search = str.join("&"); - - return a.href; - }; - - /** - * @param {Object} params - * @returns {string} - */ - let buildQuery = function(params) { - let str = []; - - for (let p in params) { - if(Array.isArray(params[p])) { - for (let index = 0; index < params[p].length; index++) { - let param = params[p][index]; - str.push(encodeURIComponent(p + '[]') + "=" + encodeURIComponent(param)); - } - } - else { - str.push(encodeURIComponent(p) + "=" + encodeURIComponent(params[p])); - } - } - - return str.join("&"); - }; - - let addGlobalHeader = function(key, value) { - globalHeaders[key] = {key: key.toLowerCase(), value: value.toLowerCase()}; - }; - - let addGlobalParam = function(key, value) { - globalParams.push({key: key, value: value}); - }; - - addGlobalHeader('x-sdk-version', 'appwrite:javascript:1.1.0'); - addGlobalHeader('content-type', ''); - - /** - * @param {string} method - * @param {string} path string - * @param {Object} headers - * @param {Object} params - * @param {function} progress - * @returns {Promise} - */ - let call = function (method, path, headers = {}, params = {}, progress = null) { - let i; - - path = config.endpoint + path; - - if (-1 === ['GET', 'POST', 'PUT', 'DELETE', 'TRACE', 'HEAD', 'OPTIONS', 'CONNECT', 'PATCH'].indexOf(method)) { - throw new Error('var method must contain a valid HTTP method name'); - } - - if (typeof path !== 'string') { - throw new Error('var path must be of type string'); - } - - if (typeof headers !== 'object') { - throw new Error('var headers must be of type object'); - } - - for (i = 0; i < globalParams.length; i++) { // Add global params to URL - path = addParam(path, globalParams[i].key, globalParams[i].value); - } - - if(window.localStorage && window.localStorage.getItem('cookieFallback')) { - headers['X-Fallback-Cookies'] = window.localStorage.getItem('cookieFallback'); - } - - for (let key in globalHeaders) { // Add Global Headers - if (globalHeaders.hasOwnProperty(key)) { - if (!headers[globalHeaders[key].key]) { - headers[globalHeaders[key].key] = globalHeaders[key].value; - } - } - } - - if(method === 'GET') { - for (let param in params) { - if (param.hasOwnProperty(key)) { - path = addParam(path, key + (Array.isArray(param) ? '[]' : ''), params[key]); - } - } - } - - switch (headers['content-type']) { // Parse request by content type - case 'application/json': - params = JSON.stringify(params); - break; - - case 'multipart/form-data': - let formData = new FormData(); - - Object.keys(params).forEach(function(key) { - let param = params[key]; - formData.append(key + (Array.isArray(param) ? '[]' : ''), param); - }); - - params = formData; - break; - } - - return new Promise(function (resolve, reject) { - - let request = new XMLHttpRequest(), key; - - request.withCredentials = true; - request.open(method, path, true); - - for (key in headers) { // Set Headers - if (headers.hasOwnProperty(key)) { - if (key === 'content-type' && headers[key] === 'multipart/form-data') { // Skip to avoid missing boundary - continue; - } - - request.setRequestHeader(key, headers[key]); - } - } - - request.onload = function () { - let data = request.response; - let contentType = this.getResponseHeader('content-type') || ''; - contentType = contentType.substring(0, contentType.indexOf(';')); - - switch (contentType) { - case 'application/json': - data = JSON.parse(data); - break; - } - - let cookieFallback = this.getResponseHeader('X-Fallback-Cookies') || ''; - - if(window.localStorage && cookieFallback) { - window.console.warn('Appwrite is using localStorage for session management. Increase your security by adding a custom domain as your API endpoint.'); - window.localStorage.setItem('cookieFallback', cookieFallback); - } - - if (4 === request.readyState && 399 >= request.status) { - resolve(data); - } else { - reject(data); - } - }; - - if (progress) { - request.addEventListener('progress', progress); - request.upload.addEventListener('progress', progress, false); - } - - // Handle network errors - request.onerror = function () { - reject(new Error("Network Error")); - }; - - request.send(params); - }) - }; - - return { - 'get': function(path, headers = {}, params = {}) { - return call('GET', path + ((Object.keys(params).length > 0) ? '?' + buildQuery(params) : ''), headers, {}); - }, - 'post': function(path, headers = {}, params = {}, progress = null) { - return call('POST', path, headers, params, progress); - }, - 'put': function(path, headers = {}, params = {}, progress = null) { - return call('PUT', path, headers, params, progress); - }, - 'patch': function(path, headers = {}, params = {}, progress = null) { - return call('PATCH', path, headers, params, progress); - }, - 'delete': function(path, headers = {}, params = {}, progress = null) { - return call('DELETE', path, headers, params, progress); - }, - 'addGlobalParam': addGlobalParam, - 'addGlobalHeader': addGlobalHeader - } - }(window.document); - - let account = { - - /** - * Get Account - * - * Get currently logged in user data as JSON object. - * - * @throws {Error} - * @return {Promise} - */ - get: function() { - let path = '/account'; - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Create Account - * - * Use this endpoint to allow a new user to register a new account in your - * project. After the user registration completes successfully, you can use - * the [/account/verfication](/docs/client/account#createVerification) route - * to start verifying the user email address. To allow your new user to login - * to his new account, you need to create a new [account - * session](/docs/client/account#createSession). - * - * @param {string} email - * @param {string} password - * @param {string} name - * @throws {Error} - * @return {Promise} - */ - create: function(email, password, name = '') { - if(email === undefined) { - throw new Error('Missing required parameter: "email"'); - } - - if(password === undefined) { - throw new Error('Missing required parameter: "password"'); - } - - let path = '/account'; - - let payload = {}; - - if(email) { - payload['email'] = email; - } - - if(password) { - payload['password'] = password; - } - - if(name) { - payload['name'] = name; - } - - return http - .post(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Delete Account - * - * Delete a currently logged in user account. Behind the scene, the user - * record is not deleted but permanently blocked from any access. This is done - * to avoid deleted accounts being overtaken by new users with the same email - * address. Any user-related resources like documents or storage files should - * be deleted separately. - * - * @throws {Error} - * @return {Promise} - */ - delete: function() { - let path = '/account'; - - let payload = {}; - - return http - .delete(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Update Account Email - * - * Update currently logged in user account email address. After changing user - * address, user confirmation status is being reset and a new confirmation - * mail is sent. For security measures, user password is required to complete - * this request. - * - * @param {string} email - * @param {string} password - * @throws {Error} - * @return {Promise} - */ - updateEmail: function(email, password) { - if(email === undefined) { - throw new Error('Missing required parameter: "email"'); - } - - if(password === undefined) { - throw new Error('Missing required parameter: "password"'); - } - - let path = '/account/email'; - - let payload = {}; - - if(email) { - payload['email'] = email; - } - - if(password) { - payload['password'] = password; - } - - return http - .patch(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Get Account 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. - * - * @throws {Error} - * @return {Promise} - */ - getLogs: function() { - let path = '/account/logs'; - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Update Account Name - * - * Update currently logged in user account name. - * - * @param {string} name - * @throws {Error} - * @return {Promise} - */ - updateName: function(name) { - if(name === undefined) { - throw new Error('Missing required parameter: "name"'); - } - - let path = '/account/name'; - - let payload = {}; - - if(name) { - payload['name'] = name; - } - - return http - .patch(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Update Account Password - * - * Update currently logged in user password. For validation, user is required - * to pass the password twice. - * - * @param {string} password - * @param {string} oldPassword - * @throws {Error} - * @return {Promise} - */ - updatePassword: function(password, oldPassword) { - if(password === undefined) { - throw new Error('Missing required parameter: "password"'); - } - - if(oldPassword === undefined) { - throw new Error('Missing required parameter: "oldPassword"'); - } - - let path = '/account/password'; - - let payload = {}; - - if(password) { - payload['password'] = password; - } - - if(oldPassword) { - payload['oldPassword'] = oldPassword; - } - - return http - .patch(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Get Account Preferences - * - * Get currently logged in user preferences as a key-value object. - * - * @throws {Error} - * @return {Promise} - */ - getPrefs: function() { - let path = '/account/prefs'; - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Update Account Preferences - * - * Update currently logged in user account preferences. You can pass only the - * specific settings you wish to update. - * - * @param {object} prefs - * @throws {Error} - * @return {Promise} - */ - updatePrefs: function(prefs) { - if(prefs === undefined) { - throw new Error('Missing required parameter: "prefs"'); - } - - let path = '/account/prefs'; - - let payload = {}; - - if(prefs) { - payload['prefs'] = prefs; - } - - return http - .patch(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Create Password Recovery - * - * Sends the user an email with a temporary secret key for password reset. - * When the user clicks the confirmation link he is redirected back to your - * app password reset URL with the secret key and email address values - * attached to the URL query string. Use the query string params to submit a - * request to the [PUT /account/recovery](/docs/client/account#updateRecovery) - * endpoint to complete the process. - * - * @param {string} email - * @param {string} url - * @throws {Error} - * @return {Promise} - */ - createRecovery: function(email, url) { - if(email === undefined) { - throw new Error('Missing required parameter: "email"'); - } - - if(url === undefined) { - throw new Error('Missing required parameter: "url"'); - } - - let path = '/account/recovery'; - - let payload = {}; - - if(email) { - payload['email'] = email; - } - - if(url) { - payload['url'] = url; - } - - return http - .post(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Complete Password Recovery - * - * Use this endpoint to complete the user account password reset. Both the - * **userId** and **secret** arguments will be passed as query parameters to - * the redirect URL you have provided when sending your request to the [POST - * /account/recovery](/docs/client/account#createRecovery) endpoint. - * - * Please note that in order to avoid a [Redirect - * 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. - * - * @param {string} userId - * @param {string} secret - * @param {string} password - * @param {string} passwordAgain - * @throws {Error} - * @return {Promise} - */ - updateRecovery: function(userId, secret, password, passwordAgain) { - if(userId === undefined) { - throw new Error('Missing required parameter: "userId"'); - } - - if(secret === undefined) { - throw new Error('Missing required parameter: "secret"'); - } - - if(password === undefined) { - throw new Error('Missing required parameter: "password"'); - } - - if(passwordAgain === undefined) { - throw new Error('Missing required parameter: "passwordAgain"'); - } - - let path = '/account/recovery'; - - let payload = {}; - - if(userId) { - payload['userId'] = userId; - } - - if(secret) { - payload['secret'] = secret; - } - - if(password) { - payload['password'] = password; - } - - if(passwordAgain) { - payload['passwordAgain'] = passwordAgain; - } - - return http - .put(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Get Account Sessions - * - * Get currently logged in user list of active sessions across different - * devices. - * - * @throws {Error} - * @return {Promise} - */ - getSessions: function() { - let path = '/account/sessions'; - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Create Account Session - * - * Allow the user to login into his account by providing a valid email and - * password combination. This route will create a new session for the user. - * - * @param {string} email - * @param {string} password - * @throws {Error} - * @return {Promise} - */ - createSession: function(email, password) { - if(email === undefined) { - throw new Error('Missing required parameter: "email"'); - } - - if(password === undefined) { - throw new Error('Missing required parameter: "password"'); - } - - let path = '/account/sessions'; - - let payload = {}; - - if(email) { - payload['email'] = email; - } - - if(password) { - payload['password'] = password; - } - - return http - .post(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Delete All Account Sessions - * - * Delete all sessions from the user account and remove any sessions cookies - * from the end client. - * - * @throws {Error} - * @return {Promise} - */ - deleteSessions: function() { - let path = '/account/sessions'; - - let payload = {}; - - return http - .delete(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Create Account Session with OAuth2 - * - * Allow the user to login to his account using the OAuth2 provider of his - * choice. Each OAuth2 provider should be enabled from the Appwrite console - * first. Use the success and failure arguments to provide a redirect URL's - * back to your app when login is completed. - * - * @param {string} provider - * @param {string} success - * @param {string} failure - * @param {string[]} scopes - * @throws {Error} - * @return {Promise} - */ - createOAuth2Session: function(provider, success = 'https://appwrite.io/auth/oauth2/success', failure = 'https://appwrite.io/auth/oauth2/failure', scopes = []) { - if(provider === undefined) { - throw new Error('Missing required parameter: "provider"'); - } - - let path = '/account/sessions/oauth2/{provider}'.replace(new RegExp('{provider}', 'g'), provider); - - let payload = {}; - - if(success) { - payload['success'] = success; - } - - if(failure) { - payload['failure'] = failure; - } - - if(scopes) { - payload['scopes'] = scopes; - } - - payload['project'] = config.project; - - - let query = []; - - for (let p in payload) { - if(Array.isArray(payload[p])) { - for (let index = 0; index < payload[p].length; index++) { - let param = payload[p][index]; - query.push(encodeURIComponent(p + '[]') + "=" + encodeURIComponent(param)); - } - } - else { - query.push(encodeURIComponent(p) + "=" + encodeURIComponent(payload[p])); - } - } - - query = query.join("&"); - - window.location = config.endpoint + path + ((query) ? '?' + query : ''); - }, - - /** - * Delete Account Session - * - * Use this endpoint to log out the currently logged in user from all his - * account sessions across all his different devices. When using the option id - * argument, only the session unique ID provider will be deleted. - * - * @param {string} sessionId - * @throws {Error} - * @return {Promise} - */ - deleteSession: function(sessionId) { - if(sessionId === undefined) { - throw new Error('Missing required parameter: "sessionId"'); - } - - let path = '/account/sessions/{sessionId}'.replace(new RegExp('{sessionId}', 'g'), sessionId); - - let payload = {}; - - return http - .delete(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Create Email Verification - * - * Use this endpoint to send a verification message to your user email address - * to confirm they are the valid owners of that address. Both the **userId** - * and **secret** arguments will be passed as query parameters to the URL you - * have provided to be attached to the verification email. The provided URL - * should redirect the user back to your app and allow you to complete the - * verification process by verifying both the **userId** and **secret** - * parameters. Learn more about how to [complete the verification - * process](/docs/client/account#updateAccountVerification). - * - * Please note that in order to avoid a [Redirect - * 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. - * - * - * @param {string} url - * @throws {Error} - * @return {Promise} - */ - createVerification: function(url) { - if(url === undefined) { - throw new Error('Missing required parameter: "url"'); - } - - let path = '/account/verification'; - - let payload = {}; - - if(url) { - payload['url'] = url; - } - - return http - .post(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Complete Email Verification - * - * 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. - * - * @param {string} userId - * @param {string} secret - * @throws {Error} - * @return {Promise} - */ - updateVerification: function(userId, secret) { - if(userId === undefined) { - throw new Error('Missing required parameter: "userId"'); - } - - if(secret === undefined) { - throw new Error('Missing required parameter: "secret"'); - } - - let path = '/account/verification'; - - let payload = {}; - - if(userId) { - payload['userId'] = userId; - } - - if(secret) { - payload['secret'] = secret; - } - - return http - .put(path, { - 'content-type': 'application/json', - }, payload); - } - }; - - let avatars = { - - /** - * Get Browser Icon - * - * You can use this endpoint to show different browser icons to your users. - * The code argument receives the browser code as it appears in your user - * /account/sessions endpoint. Use width, height and quality arguments to - * change the output settings. - * - * @param {string} code - * @param {number} width - * @param {number} height - * @param {number} quality - * @throws {Error} - * @return {string} - */ - getBrowser: function(code, width = 100, height = 100, quality = 100) { - if(code === undefined) { - throw new Error('Missing required parameter: "code"'); - } - - let path = '/avatars/browsers/{code}'.replace(new RegExp('{code}', 'g'), code); - - let payload = {}; - - if(width) { - payload['width'] = width; - } - - if(height) { - payload['height'] = height; - } - - if(quality) { - payload['quality'] = quality; - } - - payload['project'] = config.project; - - - let query = []; - - for (let p in payload) { - if(Array.isArray(payload[p])) { - for (let index = 0; index < payload[p].length; index++) { - let param = payload[p][index]; - query.push(encodeURIComponent(p + '[]') + "=" + encodeURIComponent(param)); - } - } - else { - query.push(encodeURIComponent(p) + "=" + encodeURIComponent(payload[p])); - } - } - - query = query.join("&"); - - return config.endpoint + path + ((query) ? '?' + query : ''); - }, - - /** - * Get Credit Card Icon - * - * Need to display your users with your billing method or their payment - * methods? The credit card endpoint will return you the icon of the credit - * card provider you need. Use width, height and quality arguments to change - * the output settings. - * - * @param {string} code - * @param {number} width - * @param {number} height - * @param {number} quality - * @throws {Error} - * @return {string} - */ - getCreditCard: function(code, width = 100, height = 100, quality = 100) { - if(code === undefined) { - throw new Error('Missing required parameter: "code"'); - } - - let path = '/avatars/credit-cards/{code}'.replace(new RegExp('{code}', 'g'), code); - - let payload = {}; - - if(width) { - payload['width'] = width; - } - - if(height) { - payload['height'] = height; - } - - if(quality) { - payload['quality'] = quality; - } - - payload['project'] = config.project; - - - let query = []; - - for (let p in payload) { - if(Array.isArray(payload[p])) { - for (let index = 0; index < payload[p].length; index++) { - let param = payload[p][index]; - query.push(encodeURIComponent(p + '[]') + "=" + encodeURIComponent(param)); - } - } - else { - query.push(encodeURIComponent(p) + "=" + encodeURIComponent(payload[p])); - } - } - - query = query.join("&"); - - return config.endpoint + path + ((query) ? '?' + query : ''); - }, - - /** - * Get Favicon - * - * Use this endpoint to fetch the favorite icon (AKA favicon) of a any remote - * website URL. - * - * @param {string} url - * @throws {Error} - * @return {string} - */ - getFavicon: function(url) { - if(url === undefined) { - throw new Error('Missing required parameter: "url"'); - } - - let path = '/avatars/favicon'; - - let payload = {}; - - if(url) { - payload['url'] = url; - } - - payload['project'] = config.project; - - - let query = []; - - for (let p in payload) { - if(Array.isArray(payload[p])) { - for (let index = 0; index < payload[p].length; index++) { - let param = payload[p][index]; - query.push(encodeURIComponent(p + '[]') + "=" + encodeURIComponent(param)); - } - } - else { - query.push(encodeURIComponent(p) + "=" + encodeURIComponent(payload[p])); - } - } - - query = query.join("&"); - - return config.endpoint + path + ((query) ? '?' + query : ''); - }, - - /** - * Get Country Flag - * - * You can use this endpoint to show different country flags icons to your - * users. The code argument receives the 2 letter country code. Use width, - * height and quality arguments to change the output settings. - * - * @param {string} code - * @param {number} width - * @param {number} height - * @param {number} quality - * @throws {Error} - * @return {string} - */ - getFlag: function(code, width = 100, height = 100, quality = 100) { - if(code === undefined) { - throw new Error('Missing required parameter: "code"'); - } - - let path = '/avatars/flags/{code}'.replace(new RegExp('{code}', 'g'), code); - - let payload = {}; - - if(width) { - payload['width'] = width; - } - - if(height) { - payload['height'] = height; - } - - if(quality) { - payload['quality'] = quality; - } - - payload['project'] = config.project; - - - let query = []; - - for (let p in payload) { - if(Array.isArray(payload[p])) { - for (let index = 0; index < payload[p].length; index++) { - let param = payload[p][index]; - query.push(encodeURIComponent(p + '[]') + "=" + encodeURIComponent(param)); - } - } - else { - query.push(encodeURIComponent(p) + "=" + encodeURIComponent(payload[p])); - } - } - - query = query.join("&"); - - return config.endpoint + path + ((query) ? '?' + query : ''); - }, - - /** - * Get Image from URL - * - * Use this endpoint to fetch a remote image URL and crop it to any image size - * you want. This endpoint is very useful if you need to crop and display - * remote images in your app or in case you want to make sure a 3rd party - * image is properly served using a TLS protocol. - * - * @param {string} url - * @param {number} width - * @param {number} height - * @throws {Error} - * @return {string} - */ - getImage: function(url, width = 400, height = 400) { - if(url === undefined) { - throw new Error('Missing required parameter: "url"'); - } - - let path = '/avatars/image'; - - let payload = {}; - - if(url) { - payload['url'] = url; - } - - if(width) { - payload['width'] = width; - } - - if(height) { - payload['height'] = height; - } - - payload['project'] = config.project; - - - let query = []; - - for (let p in payload) { - if(Array.isArray(payload[p])) { - for (let index = 0; index < payload[p].length; index++) { - let param = payload[p][index]; - query.push(encodeURIComponent(p + '[]') + "=" + encodeURIComponent(param)); - } - } - else { - query.push(encodeURIComponent(p) + "=" + encodeURIComponent(payload[p])); - } - } - - query = query.join("&"); - - return config.endpoint + path + ((query) ? '?' + query : ''); - }, - - /** - * Get User Initials - * - * Use this endpoint to show your user initials avatar icon on your website or - * app. By default, this route will try to print your logged-in user name or - * email initials. You can also overwrite the user name if you pass the 'name' - * parameter. If no name is given and no user is logged, an empty avatar will - * be returned. - * - * You can use the color and background params to change the avatar colors. By - * default, a random theme will be selected. The random theme will persist for - * the user's initials when reloading the same theme will always return for - * the same initials. - * - * @param {string} name - * @param {number} width - * @param {number} height - * @param {string} color - * @param {string} background - * @throws {Error} - * @return {string} - */ - getInitials: function(name = '', width = 500, height = 500, color = '', background = '') { - let path = '/avatars/initials'; - - let payload = {}; - - if(name) { - payload['name'] = name; - } - - if(width) { - payload['width'] = width; - } - - if(height) { - payload['height'] = height; - } - - if(color) { - payload['color'] = color; - } - - if(background) { - payload['background'] = background; - } - - payload['project'] = config.project; - - - let query = []; - - for (let p in payload) { - if(Array.isArray(payload[p])) { - for (let index = 0; index < payload[p].length; index++) { - let param = payload[p][index]; - query.push(encodeURIComponent(p + '[]') + "=" + encodeURIComponent(param)); - } - } - else { - query.push(encodeURIComponent(p) + "=" + encodeURIComponent(payload[p])); - } - } - - query = query.join("&"); - - return config.endpoint + path + ((query) ? '?' + query : ''); - }, - - /** - * 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. - * - * @param {string} text - * @param {number} size - * @param {number} margin - * @param {boolean} download - * @throws {Error} - * @return {string} - */ - getQR: function(text, size = 400, margin = 1, download = false) { - if(text === undefined) { - throw new Error('Missing required parameter: "text"'); - } - - let path = '/avatars/qr'; - - let payload = {}; - - if(text) { - payload['text'] = text; - } - - if(size) { - payload['size'] = size; - } - - if(margin) { - payload['margin'] = margin; - } - - if(download) { - payload['download'] = download; - } - - payload['project'] = config.project; - - - let query = []; - - for (let p in payload) { - if(Array.isArray(payload[p])) { - for (let index = 0; index < payload[p].length; index++) { - let param = payload[p][index]; - query.push(encodeURIComponent(p + '[]') + "=" + encodeURIComponent(param)); - } - } - else { - query.push(encodeURIComponent(p) + "=" + encodeURIComponent(payload[p])); - } - } - - query = query.join("&"); - - return config.endpoint + path + ((query) ? '?' + query : ''); - } - }; - - let database = { - - /** - * List Documents - * - * Get a list of all the user documents. You can use the query params to - * filter your results. On admin mode, this endpoint will return a list of all - * of the project documents. [Learn more about different API - * modes](/docs/admin). - * - * @param {string} collectionId - * @param {string[]} filters - * @param {number} limit - * @param {number} offset - * @param {string} orderField - * @param {string} orderType - * @param {string} orderCast - * @param {string} search - * @throws {Error} - * @return {Promise} - */ - listDocuments: function(collectionId, filters = [], limit = 25, offset = 0, orderField = '$id', orderType = 'ASC', orderCast = 'string', search = '') { - if(collectionId === undefined) { - throw new Error('Missing required parameter: "collectionId"'); - } - - let path = '/database/collections/{collectionId}/documents'.replace(new RegExp('{collectionId}', 'g'), collectionId); - - let payload = {}; - - if(filters) { - payload['filters'] = filters; - } - - if(limit) { - payload['limit'] = limit; - } - - if(offset) { - payload['offset'] = offset; - } - - if(orderField) { - payload['orderField'] = orderField; - } - - if(orderType) { - payload['orderType'] = orderType; - } - - if(orderCast) { - payload['orderCast'] = orderCast; - } - - if(search) { - payload['search'] = search; - } - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Create Document - * - * Create a new Document. Before using this route, you should create a new - * collection resource using either a [server - * integration](/docs/server/database?sdk=nodejs#createCollection) API or - * directly from your database console. - * - * @param {string} collectionId - * @param {object} data - * @param {string[]} read - * @param {string[]} write - * @param {string} parentDocument - * @param {string} parentProperty - * @param {string} parentPropertyType - * @throws {Error} - * @return {Promise} - */ - createDocument: function(collectionId, data, read, write, parentDocument = '', parentProperty = '', parentPropertyType = 'assign') { - if(collectionId === undefined) { - throw new Error('Missing required parameter: "collectionId"'); - } - - if(data === undefined) { - throw new Error('Missing required parameter: "data"'); - } - - if(read === undefined) { - throw new Error('Missing required parameter: "read"'); - } - - if(write === undefined) { - throw new Error('Missing required parameter: "write"'); - } - - let path = '/database/collections/{collectionId}/documents'.replace(new RegExp('{collectionId}', 'g'), collectionId); - - let payload = {}; - - if(data) { - payload['data'] = data; - } - - if(read) { - payload['read'] = read; - } - - if(write) { - payload['write'] = write; - } - - if(parentDocument) { - payload['parentDocument'] = parentDocument; - } - - if(parentProperty) { - payload['parentProperty'] = parentProperty; - } - - if(parentPropertyType) { - payload['parentPropertyType'] = parentPropertyType; - } - - return http - .post(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Get Document - * - * Get document by its unique ID. This endpoint response returns a JSON object - * with the document data. - * - * @param {string} collectionId - * @param {string} documentId - * @throws {Error} - * @return {Promise} - */ - getDocument: function(collectionId, documentId) { - if(collectionId === undefined) { - throw new Error('Missing required parameter: "collectionId"'); - } - - if(documentId === undefined) { - throw new Error('Missing required parameter: "documentId"'); - } - - let path = '/database/collections/{collectionId}/documents/{documentId}'.replace(new RegExp('{collectionId}', 'g'), collectionId).replace(new RegExp('{documentId}', 'g'), documentId); - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Update Document - * - * - * @param {string} collectionId - * @param {string} documentId - * @param {object} data - * @param {string[]} read - * @param {string[]} write - * @throws {Error} - * @return {Promise} - */ - updateDocument: function(collectionId, documentId, data, read, write) { - if(collectionId === undefined) { - throw new Error('Missing required parameter: "collectionId"'); - } - - if(documentId === undefined) { - throw new Error('Missing required parameter: "documentId"'); - } - - if(data === undefined) { - throw new Error('Missing required parameter: "data"'); - } - - if(read === undefined) { - throw new Error('Missing required parameter: "read"'); - } - - if(write === undefined) { - throw new Error('Missing required parameter: "write"'); - } - - let path = '/database/collections/{collectionId}/documents/{documentId}'.replace(new RegExp('{collectionId}', 'g'), collectionId).replace(new RegExp('{documentId}', 'g'), documentId); - - let payload = {}; - - if(data) { - payload['data'] = data; - } - - if(read) { - payload['read'] = read; - } - - if(write) { - payload['write'] = write; - } - - return http - .patch(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Delete Document - * - * Delete document by its unique ID. This endpoint deletes only the parent - * documents, his attributes and relations to other documents. Child documents - * **will not** be deleted. - * - * @param {string} collectionId - * @param {string} documentId - * @throws {Error} - * @return {Promise} - */ - deleteDocument: function(collectionId, documentId) { - if(collectionId === undefined) { - throw new Error('Missing required parameter: "collectionId"'); - } - - if(documentId === undefined) { - throw new Error('Missing required parameter: "documentId"'); - } - - let path = '/database/collections/{collectionId}/documents/{documentId}'.replace(new RegExp('{collectionId}', 'g'), collectionId).replace(new RegExp('{documentId}', 'g'), documentId); - - let payload = {}; - - return http - .delete(path, { - 'content-type': 'application/json', - }, payload); - } - }; - - let locale = { - - /** - * Get User Locale - * - * Get the current user location based on IP. Returns an object with user - * country code, country name, continent name, continent code, ip address and - * suggested currency. You can use the locale header to get the data in a - * supported language. - * - * ([IP Geolocation by DB-IP](https://db-ip.com)) - * - * @throws {Error} - * @return {Promise} - */ - get: function() { - let path = '/locale'; - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * List Continents - * - * List of all continents. You can use the locale header to get the data in a - * supported language. - * - * @throws {Error} - * @return {Promise} - */ - getContinents: function() { - let path = '/locale/continents'; - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * List Countries - * - * List of all countries. You can use the locale header to get the data in a - * supported language. - * - * @throws {Error} - * @return {Promise} - */ - getCountries: function() { - let path = '/locale/countries'; - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * 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. - * - * @throws {Error} - * @return {Promise} - */ - getCountriesEU: function() { - let path = '/locale/countries/eu'; - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * List Countries Phone Codes - * - * List of all countries phone codes. You can use the locale header to get the - * data in a supported language. - * - * @throws {Error} - * @return {Promise} - */ - getCountriesPhones: function() { - let path = '/locale/countries/phones'; - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * 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. - * - * @throws {Error} - * @return {Promise} - */ - getCurrencies: function() { - let path = '/locale/currencies'; - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * List Languages - * - * List of all languages classified by ISO 639-1 including 2-letter code, name - * in English, and name in the respective language. - * - * @throws {Error} - * @return {Promise} - */ - getLanguages: function() { - let path = '/locale/languages'; - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - } - }; - - let storage = { - - /** - * List Files - * - * Get a list of all the user files. You can use the query params to filter - * your results. On admin mode, this endpoint will return a list of all of the - * project files. [Learn more about different API modes](/docs/admin). - * - * @param {string} search - * @param {number} limit - * @param {number} offset - * @param {string} orderType - * @throws {Error} - * @return {Promise} - */ - listFiles: function(search = '', limit = 25, offset = 0, orderType = 'ASC') { - let path = '/storage/files'; - - let payload = {}; - - if(search) { - payload['search'] = search; - } - - if(limit) { - payload['limit'] = limit; - } - - if(offset) { - payload['offset'] = offset; - } - - if(orderType) { - payload['orderType'] = orderType; - } - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Create File - * - * Create a new file. The user who creates the file will automatically be - * assigned to read and write access unless he has passed custom values for - * read and write arguments. - * - * @param {File} file - * @param {string[]} read - * @param {string[]} write - * @throws {Error} - * @return {Promise} - */ - createFile: function(file, read, write) { - if(file === undefined) { - throw new Error('Missing required parameter: "file"'); - } - - if(read === undefined) { - throw new Error('Missing required parameter: "read"'); - } - - if(write === undefined) { - throw new Error('Missing required parameter: "write"'); - } - - let path = '/storage/files'; - - let payload = {}; - - if(file) { - payload['file'] = file; - } - - if(read) { - payload['read'] = read; - } - - if(write) { - payload['write'] = write; - } - - return http - .post(path, { - 'content-type': 'multipart/form-data', - }, payload); - }, - - /** - * Get File - * - * Get file by its unique ID. This endpoint response returns a JSON object - * with the file metadata. - * - * @param {string} fileId - * @throws {Error} - * @return {Promise} - */ - getFile: function(fileId) { - if(fileId === undefined) { - throw new Error('Missing required parameter: "fileId"'); - } - - let path = '/storage/files/{fileId}'.replace(new RegExp('{fileId}', 'g'), fileId); - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Update File - * - * Update file by its unique ID. Only users with write permissions have access - * to update this resource. - * - * @param {string} fileId - * @param {string[]} read - * @param {string[]} write - * @throws {Error} - * @return {Promise} - */ - updateFile: function(fileId, read, write) { - if(fileId === undefined) { - throw new Error('Missing required parameter: "fileId"'); - } - - if(read === undefined) { - throw new Error('Missing required parameter: "read"'); - } - - if(write === undefined) { - throw new Error('Missing required parameter: "write"'); - } - - let path = '/storage/files/{fileId}'.replace(new RegExp('{fileId}', 'g'), fileId); - - let payload = {}; - - if(read) { - payload['read'] = read; - } - - if(write) { - payload['write'] = write; - } - - return http - .put(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Delete File - * - * Delete a file by its unique ID. Only users with write permissions have - * access to delete this resource. - * - * @param {string} fileId - * @throws {Error} - * @return {Promise} - */ - deleteFile: function(fileId) { - if(fileId === undefined) { - throw new Error('Missing required parameter: "fileId"'); - } - - let path = '/storage/files/{fileId}'.replace(new RegExp('{fileId}', 'g'), fileId); - - let payload = {}; - - return http - .delete(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Get File for Download - * - * Get 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. - * - * @param {string} fileId - * @throws {Error} - * @return {string} - */ - getFileDownload: function(fileId) { - if(fileId === undefined) { - throw new Error('Missing required parameter: "fileId"'); - } - - let path = '/storage/files/{fileId}/download'.replace(new RegExp('{fileId}', 'g'), fileId); - - let payload = {}; - - payload['project'] = config.project; - - - let query = []; - - for (let p in payload) { - if(Array.isArray(payload[p])) { - for (let index = 0; index < payload[p].length; index++) { - let param = payload[p][index]; - query.push(encodeURIComponent(p + '[]') + "=" + encodeURIComponent(param)); - } - } - else { - query.push(encodeURIComponent(p) + "=" + encodeURIComponent(payload[p])); - } - } - - query = query.join("&"); - - return config.endpoint + path + ((query) ? '?' + query : ''); - }, - - /** - * Get File Preview - * - * Get a file preview image. Currently, this method supports preview for image - * files (jpg, png, and gif), other supported formats, like pdf, docs, slides, - * and spreadsheets, will return the file icon image. You can also pass query - * string arguments for cutting and resizing your preview image. - * - * @param {string} fileId - * @param {number} width - * @param {number} height - * @param {number} quality - * @param {string} background - * @param {string} output - * @throws {Error} - * @return {string} - */ - getFilePreview: function(fileId, width = 0, height = 0, quality = 100, background = '', output = '') { - if(fileId === undefined) { - throw new Error('Missing required parameter: "fileId"'); - } - - let path = '/storage/files/{fileId}/preview'.replace(new RegExp('{fileId}', 'g'), fileId); - - let payload = {}; - - if(width) { - payload['width'] = width; - } - - if(height) { - payload['height'] = height; - } - - if(quality) { - payload['quality'] = quality; - } - - if(background) { - payload['background'] = background; - } - - if(output) { - payload['output'] = output; - } - - payload['project'] = config.project; - - - let query = []; - - for (let p in payload) { - if(Array.isArray(payload[p])) { - for (let index = 0; index < payload[p].length; index++) { - let param = payload[p][index]; - query.push(encodeURIComponent(p + '[]') + "=" + encodeURIComponent(param)); - } - } - else { - query.push(encodeURIComponent(p) + "=" + encodeURIComponent(payload[p])); - } - } - - query = query.join("&"); - - return config.endpoint + path + ((query) ? '?' + query : ''); - }, - - /** - * Get File for View - * - * Get file content by its unique ID. This endpoint is similar to the download - * method but returns with no 'Content-Disposition: attachment' header. - * - * @param {string} fileId - * @param {string} as - * @throws {Error} - * @return {string} - */ - getFileView: function(fileId, as = '') { - if(fileId === undefined) { - throw new Error('Missing required parameter: "fileId"'); - } - - let path = '/storage/files/{fileId}/view'.replace(new RegExp('{fileId}', 'g'), fileId); - - let payload = {}; - - if(as) { - payload['as'] = as; - } - - payload['project'] = config.project; - - - let query = []; - - for (let p in payload) { - if(Array.isArray(payload[p])) { - for (let index = 0; index < payload[p].length; index++) { - let param = payload[p][index]; - query.push(encodeURIComponent(p + '[]') + "=" + encodeURIComponent(param)); - } - } - else { - query.push(encodeURIComponent(p) + "=" + encodeURIComponent(payload[p])); - } - } - - query = query.join("&"); - - return config.endpoint + path + ((query) ? '?' + query : ''); - } - }; - - let teams = { - - /** - * List Teams - * - * Get a list of all the current user teams. You can use the query params to - * filter your results. On admin mode, this endpoint will return a list of all - * of the project teams. [Learn more about different API modes](/docs/admin). - * - * @param {string} search - * @param {number} limit - * @param {number} offset - * @param {string} orderType - * @throws {Error} - * @return {Promise} - */ - list: function(search = '', limit = 25, offset = 0, orderType = 'ASC') { - let path = '/teams'; - - let payload = {}; - - if(search) { - payload['search'] = search; - } - - if(limit) { - payload['limit'] = limit; - } - - if(offset) { - payload['offset'] = offset; - } - - if(orderType) { - payload['orderType'] = orderType; - } - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Create Team - * - * Create a new team. The user who creates the team will automatically be - * assigned as the owner of the team. The team owner can invite new members, - * who will be able add new owners and update or delete the team from your - * project. - * - * @param {string} name - * @param {string[]} roles - * @throws {Error} - * @return {Promise} - */ - create: function(name, roles = ["owner"]) { - if(name === undefined) { - throw new Error('Missing required parameter: "name"'); - } - - let path = '/teams'; - - let payload = {}; - - if(name) { - payload['name'] = name; - } - - if(roles) { - payload['roles'] = roles; - } - - return http - .post(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Get Team - * - * Get team by its unique ID. All team members have read access for this - * resource. - * - * @param {string} teamId - * @throws {Error} - * @return {Promise} - */ - get: function(teamId) { - if(teamId === undefined) { - throw new Error('Missing required parameter: "teamId"'); - } - - let path = '/teams/{teamId}'.replace(new RegExp('{teamId}', 'g'), teamId); - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Update Team - * - * Update team by its unique ID. Only team owners have write access for this - * resource. - * - * @param {string} teamId - * @param {string} name - * @throws {Error} - * @return {Promise} - */ - update: function(teamId, name) { - if(teamId === undefined) { - throw new Error('Missing required parameter: "teamId"'); - } - - if(name === undefined) { - throw new Error('Missing required parameter: "name"'); - } - - let path = '/teams/{teamId}'.replace(new RegExp('{teamId}', 'g'), teamId); - - let payload = {}; - - if(name) { - payload['name'] = name; - } - - return http - .put(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Delete Team - * - * Delete team by its unique ID. Only team owners have write access for this - * resource. - * - * @param {string} teamId - * @throws {Error} - * @return {Promise} - */ - delete: function(teamId) { - if(teamId === undefined) { - throw new Error('Missing required parameter: "teamId"'); - } - - let path = '/teams/{teamId}'.replace(new RegExp('{teamId}', 'g'), teamId); - - let payload = {}; - - return http - .delete(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Get Team Memberships - * - * Get team members by the team unique ID. All team members have read access - * for this list of resources. - * - * @param {string} teamId - * @param {string} search - * @param {number} limit - * @param {number} offset - * @param {string} orderType - * @throws {Error} - * @return {Promise} - */ - getMemberships: function(teamId, search = '', limit = 25, offset = 0, orderType = 'ASC') { - if(teamId === undefined) { - throw new Error('Missing required parameter: "teamId"'); - } - - let path = '/teams/{teamId}/memberships'.replace(new RegExp('{teamId}', 'g'), teamId); - - let payload = {}; - - if(search) { - payload['search'] = search; - } - - if(limit) { - payload['limit'] = limit; - } - - if(offset) { - payload['offset'] = offset; - } - - if(orderType) { - payload['orderType'] = orderType; - } - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Create Team Membership - * - * Use this endpoint to invite a new member to join your team. An email with a - * link to join the team will be sent to the new member email address if the - * member doesn't exist in the project it will be created automatically. - * - * Use the 'URL' parameter to redirect the user from the invitation email back - * to your app. When the user is redirected, use the [Update Team Membership - * Status](/docs/client/teams#updateMembershipStatus) endpoint to allow the - * user to accept the invitation to the team. - * - * Please note that in order to avoid a [Redirect - * Attacks](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) - * the only valid redirect URL's are the once from domains you have set when - * added your platforms in the console interface. - * - * @param {string} teamId - * @param {string} email - * @param {string[]} roles - * @param {string} url - * @param {string} name - * @throws {Error} - * @return {Promise} - */ - createMembership: function(teamId, email, roles, url, name = '') { - if(teamId === undefined) { - throw new Error('Missing required parameter: "teamId"'); - } - - if(email === undefined) { - throw new Error('Missing required parameter: "email"'); - } - - if(roles === undefined) { - throw new Error('Missing required parameter: "roles"'); - } - - if(url === undefined) { - throw new Error('Missing required parameter: "url"'); - } - - let path = '/teams/{teamId}/memberships'.replace(new RegExp('{teamId}', 'g'), teamId); - - let payload = {}; - - if(email) { - payload['email'] = email; - } - - if(name) { - payload['name'] = name; - } - - if(roles) { - payload['roles'] = roles; - } - - if(url) { - payload['url'] = url; - } - - return http - .post(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * 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 he didn't accept it. - * - * @param {string} teamId - * @param {string} inviteId - * @throws {Error} - * @return {Promise} - */ - deleteMembership: function(teamId, inviteId) { - if(teamId === undefined) { - throw new Error('Missing required parameter: "teamId"'); - } - - if(inviteId === undefined) { - throw new Error('Missing required parameter: "inviteId"'); - } - - let path = '/teams/{teamId}/memberships/{inviteId}'.replace(new RegExp('{teamId}', 'g'), teamId).replace(new RegExp('{inviteId}', 'g'), inviteId); - - let payload = {}; - - return http - .delete(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Update Team Membership Status - * - * Use this endpoint to allow a user to accept an invitation to join a team - * after he is being redirected back to your app from the invitation email he - * was sent. - * - * @param {string} teamId - * @param {string} inviteId - * @param {string} userId - * @param {string} secret - * @throws {Error} - * @return {Promise} - */ - updateMembershipStatus: function(teamId, inviteId, userId, secret) { - if(teamId === undefined) { - throw new Error('Missing required parameter: "teamId"'); - } - - if(inviteId === undefined) { - throw new Error('Missing required parameter: "inviteId"'); - } - - if(userId === undefined) { - throw new Error('Missing required parameter: "userId"'); - } - - if(secret === undefined) { - throw new Error('Missing required parameter: "secret"'); - } - - let path = '/teams/{teamId}/memberships/{inviteId}/status'.replace(new RegExp('{teamId}', 'g'), teamId).replace(new RegExp('{inviteId}', 'g'), inviteId); - - let payload = {}; - - if(userId) { - payload['userId'] = userId; - } - - if(secret) { - payload['secret'] = secret; - } - - return http - .patch(path, { - 'content-type': 'application/json', - }, payload); - } - }; - - return { - setEndpoint: setEndpoint, - setProject: setProject, - setLocale: setLocale, - account: account, - avatars: avatars, - database: database, - locale: locale, - storage: storage, - teams: teams - }; - }; - - if(typeof module !== "undefined") { - module.exports = window.Appwrite; - } - -})((typeof window !== "undefined") ? window : {}); \ No newline at end of file diff --git a/app/sdks/0.7.0/client-web/src/sdk.min.js b/app/sdks/0.7.0/client-web/src/sdk.min.js deleted file mode 100644 index 2bc06cc935..0000000000 --- a/app/sdks/0.7.0/client-web/src/sdk.min.js +++ /dev/null @@ -1,187 +0,0 @@ -(function(window){'use strict';window.Appwrite=function(){let config={endpoint:'https://appwrite.io/v1',project:'',locale:'',};let setEndpoint=function(endpoint){config.endpoint=endpoint;return this};let setProject=function(value){http.addGlobalHeader('X-Appwrite-Project',value);config.project=value;return this};let setLocale=function(value){http.addGlobalHeader('X-Appwrite-Locale',value);config.locale=value;return this};let http=function(document){let globalParams=[],globalHeaders=[];let addParam=function(url,param,value){let a=document.createElement('a'),regex=/(?:\?|&|&)+([^=]+)(?:=([^&]*))*/g;let match,str=[];a.href=url;param=encodeURIComponent(param);while(match=regex.exec(a.search))if(param!==match[1])str.push(match[1]+(match[2]?"="+match[2]:""));str.push(param+(value?"="+encodeURIComponent(value):""));a.search=str.join("&");return a.href};let buildQuery=function(params){let str=[];for(let p in params){if(Array.isArray(params[p])){for(let index=0;index=request.status){resolve(data)}else{reject(data)}};if(progress){request.addEventListener('progress',progress);request.upload.addEventListener('progress',progress,!1)} -request.onerror=function(){reject(new Error("Network Error"))};request.send(params)})};return{'get':function(path,headers={},params={}){return call('GET',path+((Object.keys(params).length>0)?'?'+buildQuery(params):''),headers,{})},'post':function(path,headers={},params={},progress=null){return call('POST',path,headers,params,progress)},'put':function(path,headers={},params={},progress=null){return call('PUT',path,headers,params,progress)},'patch':function(path,headers={},params={},progress=null){return call('PATCH',path,headers,params,progress)},'delete':function(path,headers={},params={},progress=null){return call('DELETE',path,headers,params,progress)},'addGlobalParam':addGlobalParam,'addGlobalHeader':addGlobalHeader}}(window.document);let account={get:function(){let path='/account';let payload={};return http.get(path,{'content-type':'application/json',},payload)},create:function(email,password,name=''){if(email===undefined){throw new Error('Missing required parameter: "email"')} -if(password===undefined){throw new Error('Missing required parameter: "password"')} -let path='/account';let payload={};if(email){payload.email=email} -if(password){payload.password=password} -if(name){payload.name=name} -return http.post(path,{'content-type':'application/json',},payload)},delete:function(){let path='/account';let payload={};return http.delete(path,{'content-type':'application/json',},payload)},updateEmail:function(email,password){if(email===undefined){throw new Error('Missing required parameter: "email"')} -if(password===undefined){throw new Error('Missing required parameter: "password"')} -let path='/account/email';let payload={};if(email){payload.email=email} -if(password){payload.password=password} -return http.patch(path,{'content-type':'application/json',},payload)},getLogs:function(){let path='/account/logs';let payload={};return http.get(path,{'content-type':'application/json',},payload)},updateName:function(name){if(name===undefined){throw new Error('Missing required parameter: "name"')} -let path='/account/name';let payload={};if(name){payload.name=name} -return http.patch(path,{'content-type':'application/json',},payload)},updatePassword:function(password,oldPassword){if(password===undefined){throw new Error('Missing required parameter: "password"')} -if(oldPassword===undefined){throw new Error('Missing required parameter: "oldPassword"')} -let path='/account/password';let payload={};if(password){payload.password=password} -if(oldPassword){payload.oldPassword=oldPassword} -return http.patch(path,{'content-type':'application/json',},payload)},getPrefs:function(){let path='/account/prefs';let payload={};return http.get(path,{'content-type':'application/json',},payload)},updatePrefs:function(prefs){if(prefs===undefined){throw new Error('Missing required parameter: "prefs"')} -let path='/account/prefs';let payload={};if(prefs){payload.prefs=prefs} -return http.patch(path,{'content-type':'application/json',},payload)},createRecovery:function(email,url){if(email===undefined){throw new Error('Missing required parameter: "email"')} -if(url===undefined){throw new Error('Missing required parameter: "url"')} -let path='/account/recovery';let payload={};if(email){payload.email=email} -if(url){payload.url=url} -return http.post(path,{'content-type':'application/json',},payload)},updateRecovery:function(userId,secret,password,passwordAgain){if(userId===undefined){throw new Error('Missing required parameter: "userId"')} -if(secret===undefined){throw new Error('Missing required parameter: "secret"')} -if(password===undefined){throw new Error('Missing required parameter: "password"')} -if(passwordAgain===undefined){throw new Error('Missing required parameter: "passwordAgain"')} -let path='/account/recovery';let payload={};if(userId){payload.userId=userId} -if(secret){payload.secret=secret} -if(password){payload.password=password} -if(passwordAgain){payload.passwordAgain=passwordAgain} -return http.put(path,{'content-type':'application/json',},payload)},getSessions:function(){let path='/account/sessions';let payload={};return http.get(path,{'content-type':'application/json',},payload)},createSession:function(email,password){if(email===undefined){throw new Error('Missing required parameter: "email"')} -if(password===undefined){throw new Error('Missing required parameter: "password"')} -let path='/account/sessions';let payload={};if(email){payload.email=email} -if(password){payload.password=password} -return http.post(path,{'content-type':'application/json',},payload)},deleteSessions:function(){let path='/account/sessions';let payload={};return http.delete(path,{'content-type':'application/json',},payload)},createOAuth2Session:function(provider,success='https://appwrite.io/auth/oauth2/success',failure='https://appwrite.io/auth/oauth2/failure',scopes=[]){if(provider===undefined){throw new Error('Missing required parameter: "provider"')} -let path='/account/sessions/oauth2/{provider}'.replace(new RegExp('{provider}','g'),provider);let payload={};if(success){payload.success=success} -if(failure){payload.failure=failure} -if(scopes){payload.scopes=scopes} -payload.project=config.project;let query=[];for(let p in payload){if(Array.isArray(payload[p])){for(let index=0;index; - - /** - * Create Account - * - * Use this endpoint to allow a new user to register a new account in your - * project. After the user registration completes successfully, you can use - * the [/account/verfication](/docs/client/account#createVerification) route - * to start verifying the user email address. To allow your new user to login - * to his new account, you need to create a new [account - * session](/docs/client/account#createSession). - * - * @param {string} email - * @param {string} password - * @param {string} name - * @throws {Error} - * @return {Promise} - */ - create(email: string, password: string, name: string): Promise; - - /** - * Delete Account - * - * Delete a currently logged in user account. Behind the scene, the user - * record is not deleted but permanently blocked from any access. This is done - * to avoid deleted accounts being overtaken by new users with the same email - * address. Any user-related resources like documents or storage files should - * be deleted separately. - * - * @throws {Error} - * @return {Promise} - */ - delete(): Promise; - - /** - * Update Account Email - * - * Update currently logged in user account email address. After changing user - * address, user confirmation status is being reset and a new confirmation - * mail is sent. For security measures, user password is required to complete - * this request. - * - * @param {string} email - * @param {string} password - * @throws {Error} - * @return {Promise} - */ - updateEmail(email: string, password: string): Promise; - - /** - * Get Account 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. - * - * @throws {Error} - * @return {Promise} - */ - getLogs(): Promise; - - /** - * Update Account Name - * - * Update currently logged in user account name. - * - * @param {string} name - * @throws {Error} - * @return {Promise} - */ - updateName(name: string): Promise; - - /** - * Update Account Password - * - * Update currently logged in user password. For validation, user is required - * to pass the password twice. - * - * @param {string} password - * @param {string} oldPassword - * @throws {Error} - * @return {Promise} - */ - updatePassword(password: string, oldPassword: string): Promise; - - /** - * Get Account Preferences - * - * Get currently logged in user preferences as a key-value object. - * - * @throws {Error} - * @return {Promise} - */ - getPrefs(): Promise; - - /** - * Update Account Preferences - * - * Update currently logged in user account preferences. You can pass only the - * specific settings you wish to update. - * - * @param {object} prefs - * @throws {Error} - * @return {Promise} - */ - updatePrefs(prefs: object): Promise; - - /** - * Create Password Recovery - * - * Sends the user an email with a temporary secret key for password reset. - * When the user clicks the confirmation link he is redirected back to your - * app password reset URL with the secret key and email address values - * attached to the URL query string. Use the query string params to submit a - * request to the [PUT /account/recovery](/docs/client/account#updateRecovery) - * endpoint to complete the process. - * - * @param {string} email - * @param {string} url - * @throws {Error} - * @return {Promise} - */ - createRecovery(email: string, url: string): Promise; - - /** - * Complete Password Recovery - * - * Use this endpoint to complete the user account password reset. Both the - * **userId** and **secret** arguments will be passed as query parameters to - * the redirect URL you have provided when sending your request to the [POST - * /account/recovery](/docs/client/account#createRecovery) endpoint. - * - * Please note that in order to avoid a [Redirect - * 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. - * - * @param {string} userId - * @param {string} secret - * @param {string} password - * @param {string} passwordAgain - * @throws {Error} - * @return {Promise} - */ - updateRecovery(userId: string, secret: string, password: string, passwordAgain: string): Promise; - - /** - * Get Account Sessions - * - * Get currently logged in user list of active sessions across different - * devices. - * - * @throws {Error} - * @return {Promise} - */ - getSessions(): Promise; - - /** - * Create Account Session - * - * Allow the user to login into his account by providing a valid email and - * password combination. This route will create a new session for the user. - * - * @param {string} email - * @param {string} password - * @throws {Error} - * @return {Promise} - */ - createSession(email: string, password: string): Promise; - - /** - * Delete All Account Sessions - * - * Delete all sessions from the user account and remove any sessions cookies - * from the end client. - * - * @throws {Error} - * @return {Promise} - */ - deleteSessions(): Promise; - - /** - * Create Account Session with OAuth2 - * - * Allow the user to login to his account using the OAuth2 provider of his - * choice. Each OAuth2 provider should be enabled from the Appwrite console - * first. Use the success and failure arguments to provide a redirect URL's - * back to your app when login is completed. - * - * @param {string} provider - * @param {string} success - * @param {string} failure - * @param {string[]} scopes - * @throws {Error} - * @return {Promise} - */ - createOAuth2Session(provider: string, success: string, failure: string, scopes: string[]): Promise; - - /** - * Delete Account Session - * - * Use this endpoint to log out the currently logged in user from all his - * account sessions across all his different devices. When using the option id - * argument, only the session unique ID provider will be deleted. - * - * @param {string} sessionId - * @throws {Error} - * @return {Promise} - */ - deleteSession(sessionId: string): Promise; - - /** - * Create Email Verification - * - * Use this endpoint to send a verification message to your user email address - * to confirm they are the valid owners of that address. Both the **userId** - * and **secret** arguments will be passed as query parameters to the URL you - * have provided to be attached to the verification email. The provided URL - * should redirect the user back to your app and allow you to complete the - * verification process by verifying both the **userId** and **secret** - * parameters. Learn more about how to [complete the verification - * process](/docs/client/account#updateAccountVerification). - * - * Please note that in order to avoid a [Redirect - * 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. - * - * - * @param {string} url - * @throws {Error} - * @return {Promise} - */ - createVerification(url: string): Promise; - - /** - * Complete Email Verification - * - * 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. - * - * @param {string} userId - * @param {string} secret - * @throws {Error} - * @return {Promise} - */ - updateVerification(userId: string, secret: string): Promise; - - } - - export interface Avatars { - - /** - * Get Browser Icon - * - * You can use this endpoint to show different browser icons to your users. - * The code argument receives the browser code as it appears in your user - * /account/sessions endpoint. Use width, height and quality arguments to - * change the output settings. - * - * @param {string} code - * @param {number} width - * @param {number} height - * @param {number} quality - * @throws {Error} - * @return {string} - */ - getBrowser(code: string, width: number, height: number, quality: number): string; - - /** - * Get Credit Card Icon - * - * Need to display your users with your billing method or their payment - * methods? The credit card endpoint will return you the icon of the credit - * card provider you need. Use width, height and quality arguments to change - * the output settings. - * - * @param {string} code - * @param {number} width - * @param {number} height - * @param {number} quality - * @throws {Error} - * @return {string} - */ - getCreditCard(code: string, width: number, height: number, quality: number): string; - - /** - * Get Favicon - * - * Use this endpoint to fetch the favorite icon (AKA favicon) of a any remote - * website URL. - * - * @param {string} url - * @throws {Error} - * @return {string} - */ - getFavicon(url: string): string; - - /** - * Get Country Flag - * - * You can use this endpoint to show different country flags icons to your - * users. The code argument receives the 2 letter country code. Use width, - * height and quality arguments to change the output settings. - * - * @param {string} code - * @param {number} width - * @param {number} height - * @param {number} quality - * @throws {Error} - * @return {string} - */ - getFlag(code: string, width: number, height: number, quality: number): string; - - /** - * Get Image from URL - * - * Use this endpoint to fetch a remote image URL and crop it to any image size - * you want. This endpoint is very useful if you need to crop and display - * remote images in your app or in case you want to make sure a 3rd party - * image is properly served using a TLS protocol. - * - * @param {string} url - * @param {number} width - * @param {number} height - * @throws {Error} - * @return {string} - */ - getImage(url: string, width: number, height: number): string; - - /** - * Get User Initials - * - * Use this endpoint to show your user initials avatar icon on your website or - * app. By default, this route will try to print your logged-in user name or - * email initials. You can also overwrite the user name if you pass the 'name' - * parameter. If no name is given and no user is logged, an empty avatar will - * be returned. - * - * You can use the color and background params to change the avatar colors. By - * default, a random theme will be selected. The random theme will persist for - * the user's initials when reloading the same theme will always return for - * the same initials. - * - * @param {string} name - * @param {number} width - * @param {number} height - * @param {string} color - * @param {string} background - * @throws {Error} - * @return {string} - */ - getInitials(name: string, width: number, height: number, color: string, background: string): string; - - /** - * 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. - * - * @param {string} text - * @param {number} size - * @param {number} margin - * @param {boolean} download - * @throws {Error} - * @return {string} - */ - getQR(text: string, size: number, margin: number, download: boolean): string; - - } - - export interface Database { - - /** - * List Documents - * - * Get a list of all the user documents. You can use the query params to - * filter your results. On admin mode, this endpoint will return a list of all - * of the project documents. [Learn more about different API - * modes](/docs/admin). - * - * @param {string} collectionId - * @param {string[]} filters - * @param {number} limit - * @param {number} offset - * @param {string} orderField - * @param {string} orderType - * @param {string} orderCast - * @param {string} search - * @throws {Error} - * @return {Promise} - */ - listDocuments(collectionId: string, filters: string[], limit: number, offset: number, orderField: string, orderType: string, orderCast: string, search: string): Promise; - - /** - * Create Document - * - * Create a new Document. Before using this route, you should create a new - * collection resource using either a [server - * integration](/docs/server/database?sdk=nodejs#createCollection) API or - * directly from your database console. - * - * @param {string} collectionId - * @param {object} data - * @param {string[]} read - * @param {string[]} write - * @param {string} parentDocument - * @param {string} parentProperty - * @param {string} parentPropertyType - * @throws {Error} - * @return {Promise} - */ - createDocument(collectionId: string, data: object, read: string[], write: string[], parentDocument: string, parentProperty: string, parentPropertyType: string): Promise; - - /** - * Get Document - * - * Get document by its unique ID. This endpoint response returns a JSON object - * with the document data. - * - * @param {string} collectionId - * @param {string} documentId - * @throws {Error} - * @return {Promise} - */ - getDocument(collectionId: string, documentId: string): Promise; - - /** - * Update Document - * - * - * @param {string} collectionId - * @param {string} documentId - * @param {object} data - * @param {string[]} read - * @param {string[]} write - * @throws {Error} - * @return {Promise} - */ - updateDocument(collectionId: string, documentId: string, data: object, read: string[], write: string[]): Promise; - - /** - * Delete Document - * - * Delete document by its unique ID. This endpoint deletes only the parent - * documents, his attributes and relations to other documents. Child documents - * **will not** be deleted. - * - * @param {string} collectionId - * @param {string} documentId - * @throws {Error} - * @return {Promise} - */ - deleteDocument(collectionId: string, documentId: string): Promise; - - } - - export interface Locale { - - /** - * Get User Locale - * - * Get the current user location based on IP. Returns an object with user - * country code, country name, continent name, continent code, ip address and - * suggested currency. You can use the locale header to get the data in a - * supported language. - * - * ([IP Geolocation by DB-IP](https://db-ip.com)) - * - * @throws {Error} - * @return {Promise} - */ - get(): Promise; - - /** - * List Continents - * - * List of all continents. You can use the locale header to get the data in a - * supported language. - * - * @throws {Error} - * @return {Promise} - */ - getContinents(): Promise; - - /** - * List Countries - * - * List of all countries. You can use the locale header to get the data in a - * supported language. - * - * @throws {Error} - * @return {Promise} - */ - getCountries(): Promise; - - /** - * 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. - * - * @throws {Error} - * @return {Promise} - */ - getCountriesEU(): Promise; - - /** - * List Countries Phone Codes - * - * List of all countries phone codes. You can use the locale header to get the - * data in a supported language. - * - * @throws {Error} - * @return {Promise} - */ - getCountriesPhones(): Promise; - - /** - * 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. - * - * @throws {Error} - * @return {Promise} - */ - getCurrencies(): Promise; - - /** - * List Languages - * - * List of all languages classified by ISO 639-1 including 2-letter code, name - * in English, and name in the respective language. - * - * @throws {Error} - * @return {Promise} - */ - getLanguages(): Promise; - - } - - export interface Storage { - - /** - * List Files - * - * Get a list of all the user files. You can use the query params to filter - * your results. On admin mode, this endpoint will return a list of all of the - * project files. [Learn more about different API modes](/docs/admin). - * - * @param {string} search - * @param {number} limit - * @param {number} offset - * @param {string} orderType - * @throws {Error} - * @return {Promise} - */ - listFiles(search: string, limit: number, offset: number, orderType: string): Promise; - - /** - * Create File - * - * Create a new file. The user who creates the file will automatically be - * assigned to read and write access unless he has passed custom values for - * read and write arguments. - * - * @param {File} file - * @param {string[]} read - * @param {string[]} write - * @throws {Error} - * @return {Promise} - */ - createFile(file: File, read: string[], write: string[]): Promise; - - /** - * Get File - * - * Get file by its unique ID. This endpoint response returns a JSON object - * with the file metadata. - * - * @param {string} fileId - * @throws {Error} - * @return {Promise} - */ - getFile(fileId: string): Promise; - - /** - * Update File - * - * Update file by its unique ID. Only users with write permissions have access - * to update this resource. - * - * @param {string} fileId - * @param {string[]} read - * @param {string[]} write - * @throws {Error} - * @return {Promise} - */ - updateFile(fileId: string, read: string[], write: string[]): Promise; - - /** - * Delete File - * - * Delete a file by its unique ID. Only users with write permissions have - * access to delete this resource. - * - * @param {string} fileId - * @throws {Error} - * @return {Promise} - */ - deleteFile(fileId: string): Promise; - - /** - * Get File for Download - * - * Get 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. - * - * @param {string} fileId - * @throws {Error} - * @return {string} - */ - getFileDownload(fileId: string): string; - - /** - * Get File Preview - * - * Get a file preview image. Currently, this method supports preview for image - * files (jpg, png, and gif), other supported formats, like pdf, docs, slides, - * and spreadsheets, will return the file icon image. You can also pass query - * string arguments for cutting and resizing your preview image. - * - * @param {string} fileId - * @param {number} width - * @param {number} height - * @param {number} quality - * @param {string} background - * @param {string} output - * @throws {Error} - * @return {string} - */ - getFilePreview(fileId: string, width: number, height: number, quality: number, background: string, output: string): string; - - /** - * Get File for View - * - * Get file content by its unique ID. This endpoint is similar to the download - * method but returns with no 'Content-Disposition: attachment' header. - * - * @param {string} fileId - * @param {string} as - * @throws {Error} - * @return {string} - */ - getFileView(fileId: string, as: string): string; - - } - - export interface Teams { - - /** - * List Teams - * - * Get a list of all the current user teams. You can use the query params to - * filter your results. On admin mode, this endpoint will return a list of all - * of the project teams. [Learn more about different API modes](/docs/admin). - * - * @param {string} search - * @param {number} limit - * @param {number} offset - * @param {string} orderType - * @throws {Error} - * @return {Promise} - */ - list(search: string, limit: number, offset: number, orderType: string): Promise; - - /** - * Create Team - * - * Create a new team. The user who creates the team will automatically be - * assigned as the owner of the team. The team owner can invite new members, - * who will be able add new owners and update or delete the team from your - * project. - * - * @param {string} name - * @param {string[]} roles - * @throws {Error} - * @return {Promise} - */ - create(name: string, roles: string[]): Promise; - - /** - * Get Team - * - * Get team by its unique ID. All team members have read access for this - * resource. - * - * @param {string} teamId - * @throws {Error} - * @return {Promise} - */ - get(teamId: string): Promise; - - /** - * Update Team - * - * Update team by its unique ID. Only team owners have write access for this - * resource. - * - * @param {string} teamId - * @param {string} name - * @throws {Error} - * @return {Promise} - */ - update(teamId: string, name: string): Promise; - - /** - * Delete Team - * - * Delete team by its unique ID. Only team owners have write access for this - * resource. - * - * @param {string} teamId - * @throws {Error} - * @return {Promise} - */ - delete(teamId: string): Promise; - - /** - * Get Team Memberships - * - * Get team members by the team unique ID. All team members have read access - * for this list of resources. - * - * @param {string} teamId - * @param {string} search - * @param {number} limit - * @param {number} offset - * @param {string} orderType - * @throws {Error} - * @return {Promise} - */ - getMemberships(teamId: string, search: string, limit: number, offset: number, orderType: string): Promise; - - /** - * Create Team Membership - * - * Use this endpoint to invite a new member to join your team. An email with a - * link to join the team will be sent to the new member email address if the - * member doesn't exist in the project it will be created automatically. - * - * Use the 'URL' parameter to redirect the user from the invitation email back - * to your app. When the user is redirected, use the [Update Team Membership - * Status](/docs/client/teams#updateMembershipStatus) endpoint to allow the - * user to accept the invitation to the team. - * - * Please note that in order to avoid a [Redirect - * Attacks](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) - * the only valid redirect URL's are the once from domains you have set when - * added your platforms in the console interface. - * - * @param {string} teamId - * @param {string} email - * @param {string[]} roles - * @param {string} url - * @param {string} name - * @throws {Error} - * @return {Promise} - */ - createMembership(teamId: string, email: string, roles: string[], url: string, name: string): Promise; - - /** - * 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 he didn't accept it. - * - * @param {string} teamId - * @param {string} inviteId - * @throws {Error} - * @return {Promise} - */ - deleteMembership(teamId: string, inviteId: string): Promise; - - /** - * Update Team Membership Status - * - * Use this endpoint to allow a user to accept an invitation to join a team - * after he is being redirected back to your app from the invitation email he - * was sent. - * - * @param {string} teamId - * @param {string} inviteId - * @param {string} userId - * @param {string} secret - * @throws {Error} - * @return {Promise} - */ - updateMembershipStatus(teamId: string, inviteId: string, userId: string, secret: string): Promise; - - } - - -} \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/CHANGELOG.md b/app/sdks/0.7.0/console-web/CHANGELOG.md deleted file mode 100644 index fa4d35e687..0000000000 --- a/app/sdks/0.7.0/console-web/CHANGELOG.md +++ /dev/null @@ -1 +0,0 @@ -# Change Log \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/LICENSE b/app/sdks/0.7.0/console-web/LICENSE deleted file mode 100644 index fc7c051a91..0000000000 --- a/app/sdks/0.7.0/console-web/LICENSE +++ /dev/null @@ -1,12 +0,0 @@ -Copyright (c) 2019 Appwrite (https://appwrite.io) and individual contributors. -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - - 3. Neither the name Appwrite nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/README.md b/app/sdks/0.7.0/console-web/README.md deleted file mode 100644 index 000e4988f1..0000000000 --- a/app/sdks/0.7.0/console-web/README.md +++ /dev/null @@ -1,44 +0,0 @@ -# Appwrite Console SDK - -![License](https://img.shields.io/github/license/appwrite/sdk-for-console.svg?v=1) -![Version](https://img.shields.io/badge/api%20version-0.7.0-blue.svg?v=1) - -Appwrite is an open-source backend as a service server that abstract and simplify complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way. - Use the Console SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools. - For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs) - -![Appwrite](https://appwrite.io/images/github.png) - -## Installation - -### NPM - -To install via [NPM](https://www.npmjs.com/): - -```bash -npm install appwrite --save -``` - -If you're using a bundler (like [Browserify](http://browserify.org/) or [webpack](https://webpack.js.org/)), you can import the Appwrite module when you need it: - -```js -import * as Appwrite from "appwrite"; -``` - -### CDN - -To install with a CDN (content delivery network) add the following scripts to the bottom of your tag, but before you use any Appwrite services: - -```html - -``` - - - -## Contribution - -This library is auto-generated by Appwrite custom [SDK Generator](https://github.com/appwrite/sdk-generator). To learn more about how you can help us improve this SDK, please check the [contribution guide](https://github.com/appwrite/sdk-generator/blob/master/CONTRIBUTING.md) before sending a pull-request. - -## License - -Please see the [BSD-3-Clause license](https://raw.githubusercontent.com/appwrite/appwrite/master/LICENSE) file for more information. \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/account/create-o-auth2session.md b/app/sdks/0.7.0/console-web/docs/examples/account/create-o-auth2session.md deleted file mode 100644 index 3a2dcba651..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/account/create-o-auth2session.md +++ /dev/null @@ -1,11 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -// Go to OAuth provider login page -sdk.account.createOAuth2Session('amazon'); - diff --git a/app/sdks/0.7.0/console-web/docs/examples/account/create-recovery.md b/app/sdks/0.7.0/console-web/docs/examples/account/create-recovery.md deleted file mode 100644 index d69269b351..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/account/create-recovery.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.account.createRecovery('email@example.com', 'https://example.com'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/account/create-session.md b/app/sdks/0.7.0/console-web/docs/examples/account/create-session.md deleted file mode 100644 index 0734a84aaa..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/account/create-session.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.account.createSession('email@example.com', 'password'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/account/create-verification.md b/app/sdks/0.7.0/console-web/docs/examples/account/create-verification.md deleted file mode 100644 index 1211b5c642..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/account/create-verification.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.account.createVerification('https://example.com'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/account/create.md b/app/sdks/0.7.0/console-web/docs/examples/account/create.md deleted file mode 100644 index e61b1fbac4..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/account/create.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.account.create('email@example.com', 'password'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/account/delete-session.md b/app/sdks/0.7.0/console-web/docs/examples/account/delete-session.md deleted file mode 100644 index 84505281f0..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/account/delete-session.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.account.deleteSession('[SESSION_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/account/delete-sessions.md b/app/sdks/0.7.0/console-web/docs/examples/account/delete-sessions.md deleted file mode 100644 index 61bec86399..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/account/delete-sessions.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.account.deleteSessions(); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/account/delete.md b/app/sdks/0.7.0/console-web/docs/examples/account/delete.md deleted file mode 100644 index dbb8dbf250..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/account/delete.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.account.delete(); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/account/get-logs.md b/app/sdks/0.7.0/console-web/docs/examples/account/get-logs.md deleted file mode 100644 index 12e6656c96..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/account/get-logs.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.account.getLogs(); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/account/get-prefs.md b/app/sdks/0.7.0/console-web/docs/examples/account/get-prefs.md deleted file mode 100644 index e328baba32..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/account/get-prefs.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.account.getPrefs(); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/account/get-sessions.md b/app/sdks/0.7.0/console-web/docs/examples/account/get-sessions.md deleted file mode 100644 index cb281dd4db..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/account/get-sessions.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.account.getSessions(); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/account/get.md b/app/sdks/0.7.0/console-web/docs/examples/account/get.md deleted file mode 100644 index 82c96fb9db..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/account/get.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.account.get(); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/account/update-email.md b/app/sdks/0.7.0/console-web/docs/examples/account/update-email.md deleted file mode 100644 index c2caaf060e..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/account/update-email.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.account.updateEmail('email@example.com', 'password'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/account/update-name.md b/app/sdks/0.7.0/console-web/docs/examples/account/update-name.md deleted file mode 100644 index 047eba688b..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/account/update-name.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.account.updateName('[NAME]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/account/update-password.md b/app/sdks/0.7.0/console-web/docs/examples/account/update-password.md deleted file mode 100644 index d305031fa0..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/account/update-password.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.account.updatePassword('password', 'password'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/account/update-prefs.md b/app/sdks/0.7.0/console-web/docs/examples/account/update-prefs.md deleted file mode 100644 index 8c4e402ae1..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/account/update-prefs.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.account.updatePrefs({}); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/account/update-recovery.md b/app/sdks/0.7.0/console-web/docs/examples/account/update-recovery.md deleted file mode 100644 index 235a4db481..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/account/update-recovery.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.account.updateRecovery('[USER_ID]', '[SECRET]', 'password', 'password'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/account/update-verification.md b/app/sdks/0.7.0/console-web/docs/examples/account/update-verification.md deleted file mode 100644 index ef2c384853..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/account/update-verification.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.account.updateVerification('[USER_ID]', '[SECRET]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/avatars/get-browser.md b/app/sdks/0.7.0/console-web/docs/examples/avatars/get-browser.md deleted file mode 100644 index bbbdb9738f..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/avatars/get-browser.md +++ /dev/null @@ -1,11 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let result = sdk.avatars.getBrowser('aa'); - -console.log(result); // Resource URL \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/avatars/get-credit-card.md b/app/sdks/0.7.0/console-web/docs/examples/avatars/get-credit-card.md deleted file mode 100644 index e1fab01cf2..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/avatars/get-credit-card.md +++ /dev/null @@ -1,11 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let result = sdk.avatars.getCreditCard('amex'); - -console.log(result); // Resource URL \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/avatars/get-favicon.md b/app/sdks/0.7.0/console-web/docs/examples/avatars/get-favicon.md deleted file mode 100644 index 397986b11a..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/avatars/get-favicon.md +++ /dev/null @@ -1,11 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let result = sdk.avatars.getFavicon('https://example.com'); - -console.log(result); // Resource URL \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/avatars/get-flag.md b/app/sdks/0.7.0/console-web/docs/examples/avatars/get-flag.md deleted file mode 100644 index 6e90b72feb..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/avatars/get-flag.md +++ /dev/null @@ -1,11 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let result = sdk.avatars.getFlag('af'); - -console.log(result); // Resource URL \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/avatars/get-image.md b/app/sdks/0.7.0/console-web/docs/examples/avatars/get-image.md deleted file mode 100644 index afd1a17cb5..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/avatars/get-image.md +++ /dev/null @@ -1,11 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let result = sdk.avatars.getImage('https://example.com'); - -console.log(result); // Resource URL \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/avatars/get-initials.md b/app/sdks/0.7.0/console-web/docs/examples/avatars/get-initials.md deleted file mode 100644 index dab6417ca5..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/avatars/get-initials.md +++ /dev/null @@ -1,11 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let result = sdk.avatars.getInitials(); - -console.log(result); // Resource URL \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/avatars/get-q-r.md b/app/sdks/0.7.0/console-web/docs/examples/avatars/get-q-r.md deleted file mode 100644 index 31f490cedd..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/avatars/get-q-r.md +++ /dev/null @@ -1,11 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let result = sdk.avatars.getQR('[TEXT]'); - -console.log(result); // Resource URL \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/bar/delete.md b/app/sdks/0.7.0/console-web/docs/examples/bar/delete.md deleted file mode 100644 index c60d7a75f0..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/bar/delete.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.bar.delete('[]', null, []); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/bar/get.md b/app/sdks/0.7.0/console-web/docs/examples/bar/get.md deleted file mode 100644 index a690ffc039..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/bar/get.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.bar.get('[]', null, []); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/bar/patch.md b/app/sdks/0.7.0/console-web/docs/examples/bar/patch.md deleted file mode 100644 index 46ac2d7438..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/bar/patch.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.bar.patch('[]', null, []); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/bar/post.md b/app/sdks/0.7.0/console-web/docs/examples/bar/post.md deleted file mode 100644 index 4b21090c3f..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/bar/post.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.bar.post('[]', null, []); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/bar/put.md b/app/sdks/0.7.0/console-web/docs/examples/bar/put.md deleted file mode 100644 index 8eac3ebad8..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/bar/put.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.bar.put('[]', null, []); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/database/create-collection.md b/app/sdks/0.7.0/console-web/docs/examples/database/create-collection.md deleted file mode 100644 index a7a4b90197..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/database/create-collection.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.database.createCollection('[NAME]', [], [], []); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/database/create-document.md b/app/sdks/0.7.0/console-web/docs/examples/database/create-document.md deleted file mode 100644 index 64809c6156..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/database/create-document.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.database.createDocument('[COLLECTION_ID]', {}, [], []); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/database/delete-collection.md b/app/sdks/0.7.0/console-web/docs/examples/database/delete-collection.md deleted file mode 100644 index bfb0706bf5..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/database/delete-collection.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.database.deleteCollection('[COLLECTION_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/database/delete-document.md b/app/sdks/0.7.0/console-web/docs/examples/database/delete-document.md deleted file mode 100644 index 356a71a437..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/database/delete-document.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.database.deleteDocument('[COLLECTION_ID]', '[DOCUMENT_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/database/get-collection-logs.md b/app/sdks/0.7.0/console-web/docs/examples/database/get-collection-logs.md deleted file mode 100644 index 8934910901..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/database/get-collection-logs.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.database.getCollectionLogs('[COLLECTION_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/database/get-collection.md b/app/sdks/0.7.0/console-web/docs/examples/database/get-collection.md deleted file mode 100644 index d74d4b3225..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/database/get-collection.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.database.getCollection('[COLLECTION_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/database/get-document.md b/app/sdks/0.7.0/console-web/docs/examples/database/get-document.md deleted file mode 100644 index 51638880c5..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/database/get-document.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.database.getDocument('[COLLECTION_ID]', '[DOCUMENT_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/database/list-collections.md b/app/sdks/0.7.0/console-web/docs/examples/database/list-collections.md deleted file mode 100644 index 8a18249748..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/database/list-collections.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.database.listCollections(); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/database/list-documents.md b/app/sdks/0.7.0/console-web/docs/examples/database/list-documents.md deleted file mode 100644 index 1d895a566a..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/database/list-documents.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.database.listDocuments('[COLLECTION_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/database/update-collection.md b/app/sdks/0.7.0/console-web/docs/examples/database/update-collection.md deleted file mode 100644 index f00a6c6f8c..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/database/update-collection.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.database.updateCollection('[COLLECTION_ID]', '[NAME]', [], []); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/database/update-document.md b/app/sdks/0.7.0/console-web/docs/examples/database/update-document.md deleted file mode 100644 index 52c172ab6a..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/database/update-document.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.database.updateDocument('[COLLECTION_ID]', '[DOCUMENT_ID]', {}, [], []); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/foo/delete.md b/app/sdks/0.7.0/console-web/docs/examples/foo/delete.md deleted file mode 100644 index 715289a5b8..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/foo/delete.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.foo.delete('[]', null, []); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/foo/get.md b/app/sdks/0.7.0/console-web/docs/examples/foo/get.md deleted file mode 100644 index cb3ee31c9d..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/foo/get.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.foo.get('[]', null, []); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/foo/patch.md b/app/sdks/0.7.0/console-web/docs/examples/foo/patch.md deleted file mode 100644 index e39222e71d..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/foo/patch.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.foo.patch('[]', null, []); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/foo/post.md b/app/sdks/0.7.0/console-web/docs/examples/foo/post.md deleted file mode 100644 index 4c236776f6..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/foo/post.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.foo.post('[]', null, []); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/foo/put.md b/app/sdks/0.7.0/console-web/docs/examples/foo/put.md deleted file mode 100644 index d13c4c44ff..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/foo/put.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.foo.put('[]', null, []); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/functions/create-execution.md b/app/sdks/0.7.0/console-web/docs/examples/functions/create-execution.md deleted file mode 100644 index e70d7f931a..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/functions/create-execution.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.functions.createExecution('[FUNCTION_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/functions/create-tag.md b/app/sdks/0.7.0/console-web/docs/examples/functions/create-tag.md deleted file mode 100644 index 743517ff1a..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/functions/create-tag.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.functions.createTag('[FUNCTION_ID]', '[COMMAND]', document.getElementById('uploader').files[0]); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/functions/create.md b/app/sdks/0.7.0/console-web/docs/examples/functions/create.md deleted file mode 100644 index 6fb506816f..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/functions/create.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.functions.create('[NAME]', 'node-14'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/functions/delete-tag.md b/app/sdks/0.7.0/console-web/docs/examples/functions/delete-tag.md deleted file mode 100644 index 9c1b5cdda3..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/functions/delete-tag.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.functions.deleteTag('[FUNCTION_ID]', '[TAG_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/functions/delete.md b/app/sdks/0.7.0/console-web/docs/examples/functions/delete.md deleted file mode 100644 index f76f809c2b..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/functions/delete.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.functions.delete('[FUNCTION_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/functions/get-execution.md b/app/sdks/0.7.0/console-web/docs/examples/functions/get-execution.md deleted file mode 100644 index 8287c4709e..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/functions/get-execution.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.functions.getExecution('[FUNCTION_ID]', '[EXECUTION_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/functions/get-tag.md b/app/sdks/0.7.0/console-web/docs/examples/functions/get-tag.md deleted file mode 100644 index c6021ccdac..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/functions/get-tag.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.functions.getTag('[FUNCTION_ID]', '[TAG_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/functions/get.md b/app/sdks/0.7.0/console-web/docs/examples/functions/get.md deleted file mode 100644 index dc068ffa09..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/functions/get.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.functions.get('[FUNCTION_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/functions/list-executions.md b/app/sdks/0.7.0/console-web/docs/examples/functions/list-executions.md deleted file mode 100644 index 9367a9eb52..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/functions/list-executions.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.functions.listExecutions('[FUNCTION_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/functions/list-tags.md b/app/sdks/0.7.0/console-web/docs/examples/functions/list-tags.md deleted file mode 100644 index 4542bae44b..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/functions/list-tags.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.functions.listTags('[FUNCTION_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/functions/list.md b/app/sdks/0.7.0/console-web/docs/examples/functions/list.md deleted file mode 100644 index e2ce2511e0..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/functions/list.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.functions.list(); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/functions/update-active.md b/app/sdks/0.7.0/console-web/docs/examples/functions/update-active.md deleted file mode 100644 index eed2be885c..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/functions/update-active.md +++ /dev/null @@ -1,14 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.functions.updateActive('[FUNCTION_ID]', '[ACTIVE]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/functions/update-tag.md b/app/sdks/0.7.0/console-web/docs/examples/functions/update-tag.md deleted file mode 100644 index 7ea2ba1808..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/functions/update-tag.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.functions.updateTag('[FUNCTION_ID]', '[TAG]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/functions/update.md b/app/sdks/0.7.0/console-web/docs/examples/functions/update.md deleted file mode 100644 index c6a34cff5c..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/functions/update.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.functions.update('[FUNCTION_ID]', '[NAME]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/general/empty.md b/app/sdks/0.7.0/console-web/docs/examples/general/empty.md deleted file mode 100644 index 50fd0e8a5c..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/general/empty.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.general.empty(); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/general/get-cookie.md b/app/sdks/0.7.0/console-web/docs/examples/general/get-cookie.md deleted file mode 100644 index 5785a0323f..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/general/get-cookie.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.general.getCookie(); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/general/redirect.md b/app/sdks/0.7.0/console-web/docs/examples/general/redirect.md deleted file mode 100644 index 769533f6f6..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/general/redirect.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.general.redirect(); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/general/redirected.md b/app/sdks/0.7.0/console-web/docs/examples/general/redirected.md deleted file mode 100644 index 712e614ac9..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/general/redirected.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.general.redirected(); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/general/set-cookie.md b/app/sdks/0.7.0/console-web/docs/examples/general/set-cookie.md deleted file mode 100644 index ee0f85cc1f..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/general/set-cookie.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.general.setCookie(); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/general/upload.md b/app/sdks/0.7.0/console-web/docs/examples/general/upload.md deleted file mode 100644 index bbc2bee92a..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/general/upload.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.general.upload('[]', null, [], document.getElementById('uploader').files[0]); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/health/get-anti-virus.md b/app/sdks/0.7.0/console-web/docs/examples/health/get-anti-virus.md deleted file mode 100644 index 95b671992b..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/health/get-anti-virus.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.health.getAntiVirus(); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/health/get-cache.md b/app/sdks/0.7.0/console-web/docs/examples/health/get-cache.md deleted file mode 100644 index 5c41d81868..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/health/get-cache.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.health.getCache(); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/health/get-d-b.md b/app/sdks/0.7.0/console-web/docs/examples/health/get-d-b.md deleted file mode 100644 index 407f87e2a1..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/health/get-d-b.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.health.getDB(); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/health/get-queue-certificates.md b/app/sdks/0.7.0/console-web/docs/examples/health/get-queue-certificates.md deleted file mode 100644 index a115c869ba..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/health/get-queue-certificates.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.health.getQueueCertificates(); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/health/get-queue-functions.md b/app/sdks/0.7.0/console-web/docs/examples/health/get-queue-functions.md deleted file mode 100644 index 3c0dc33acf..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/health/get-queue-functions.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.health.getQueueFunctions(); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/health/get-queue-logs.md b/app/sdks/0.7.0/console-web/docs/examples/health/get-queue-logs.md deleted file mode 100644 index b3d41b49c6..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/health/get-queue-logs.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.health.getQueueLogs(); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/health/get-queue-tasks.md b/app/sdks/0.7.0/console-web/docs/examples/health/get-queue-tasks.md deleted file mode 100644 index 4f34f670a6..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/health/get-queue-tasks.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.health.getQueueTasks(); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/health/get-queue-usage.md b/app/sdks/0.7.0/console-web/docs/examples/health/get-queue-usage.md deleted file mode 100644 index 3d234be2de..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/health/get-queue-usage.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.health.getQueueUsage(); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/health/get-queue-webhooks.md b/app/sdks/0.7.0/console-web/docs/examples/health/get-queue-webhooks.md deleted file mode 100644 index c5825dcf6c..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/health/get-queue-webhooks.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.health.getQueueWebhooks(); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/health/get-storage-local.md b/app/sdks/0.7.0/console-web/docs/examples/health/get-storage-local.md deleted file mode 100644 index 7287745704..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/health/get-storage-local.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.health.getStorageLocal(); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/health/get-time.md b/app/sdks/0.7.0/console-web/docs/examples/health/get-time.md deleted file mode 100644 index b6087b73d5..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/health/get-time.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.health.getTime(); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/health/get.md b/app/sdks/0.7.0/console-web/docs/examples/health/get.md deleted file mode 100644 index 1e7d6fe4e8..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/health/get.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.health.get(); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/locale/get-continents.md b/app/sdks/0.7.0/console-web/docs/examples/locale/get-continents.md deleted file mode 100644 index 93144335ea..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/locale/get-continents.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.locale.getContinents(); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/locale/get-countries-e-u.md b/app/sdks/0.7.0/console-web/docs/examples/locale/get-countries-e-u.md deleted file mode 100644 index fffc8696e8..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/locale/get-countries-e-u.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.locale.getCountriesEU(); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/locale/get-countries-phones.md b/app/sdks/0.7.0/console-web/docs/examples/locale/get-countries-phones.md deleted file mode 100644 index 751f4f6cc4..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/locale/get-countries-phones.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.locale.getCountriesPhones(); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/locale/get-countries.md b/app/sdks/0.7.0/console-web/docs/examples/locale/get-countries.md deleted file mode 100644 index 30b1dd95c7..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/locale/get-countries.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.locale.getCountries(); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/locale/get-currencies.md b/app/sdks/0.7.0/console-web/docs/examples/locale/get-currencies.md deleted file mode 100644 index 4c92714062..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/locale/get-currencies.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.locale.getCurrencies(); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/locale/get-languages.md b/app/sdks/0.7.0/console-web/docs/examples/locale/get-languages.md deleted file mode 100644 index 2d1f713eeb..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/locale/get-languages.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.locale.getLanguages(); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/locale/get.md b/app/sdks/0.7.0/console-web/docs/examples/locale/get.md deleted file mode 100644 index 1fba9877b5..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/locale/get.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.locale.get(); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/projects/create-domain.md b/app/sdks/0.7.0/console-web/docs/examples/projects/create-domain.md deleted file mode 100644 index 756b869a85..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/projects/create-domain.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.projects.createDomain('[PROJECT_ID]', ''); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/projects/create-key.md b/app/sdks/0.7.0/console-web/docs/examples/projects/create-key.md deleted file mode 100644 index 9556f5b7f7..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/projects/create-key.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.projects.createKey('[PROJECT_ID]', '[NAME]', []); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/projects/create-platform.md b/app/sdks/0.7.0/console-web/docs/examples/projects/create-platform.md deleted file mode 100644 index f4476fe599..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/projects/create-platform.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.projects.createPlatform('[PROJECT_ID]', 'web', '[NAME]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/projects/create-task.md b/app/sdks/0.7.0/console-web/docs/examples/projects/create-task.md deleted file mode 100644 index 9b0f3c1e03..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/projects/create-task.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.projects.createTask('[PROJECT_ID]', '[NAME]', 'play', '', false, 'GET', 'https://example.com'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/projects/create-webhook.md b/app/sdks/0.7.0/console-web/docs/examples/projects/create-webhook.md deleted file mode 100644 index be722f3dbe..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/projects/create-webhook.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.projects.createWebhook('[PROJECT_ID]', '[NAME]', [], 'https://example.com', false); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/projects/create.md b/app/sdks/0.7.0/console-web/docs/examples/projects/create.md deleted file mode 100644 index 8041ed154e..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/projects/create.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.projects.create('[NAME]', '[TEAM_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/projects/delete-domain.md b/app/sdks/0.7.0/console-web/docs/examples/projects/delete-domain.md deleted file mode 100644 index 1b3df9363b..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/projects/delete-domain.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.projects.deleteDomain('[PROJECT_ID]', '[DOMAIN_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/projects/delete-key.md b/app/sdks/0.7.0/console-web/docs/examples/projects/delete-key.md deleted file mode 100644 index dc855bcc30..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/projects/delete-key.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.projects.deleteKey('[PROJECT_ID]', '[KEY_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/projects/delete-platform.md b/app/sdks/0.7.0/console-web/docs/examples/projects/delete-platform.md deleted file mode 100644 index 2a180c47e4..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/projects/delete-platform.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.projects.deletePlatform('[PROJECT_ID]', '[PLATFORM_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/projects/delete-task.md b/app/sdks/0.7.0/console-web/docs/examples/projects/delete-task.md deleted file mode 100644 index b7f9ad3e47..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/projects/delete-task.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.projects.deleteTask('[PROJECT_ID]', '[TASK_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/projects/delete-webhook.md b/app/sdks/0.7.0/console-web/docs/examples/projects/delete-webhook.md deleted file mode 100644 index c5e0588ad1..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/projects/delete-webhook.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.projects.deleteWebhook('[PROJECT_ID]', '[WEBHOOK_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/projects/delete.md b/app/sdks/0.7.0/console-web/docs/examples/projects/delete.md deleted file mode 100644 index 20b67370f0..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/projects/delete.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.projects.delete('[PROJECT_ID]', '[PASSWORD]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/projects/get-domain.md b/app/sdks/0.7.0/console-web/docs/examples/projects/get-domain.md deleted file mode 100644 index 1622546719..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/projects/get-domain.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.projects.getDomain('[PROJECT_ID]', '[DOMAIN_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/projects/get-key.md b/app/sdks/0.7.0/console-web/docs/examples/projects/get-key.md deleted file mode 100644 index 8bb458c335..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/projects/get-key.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.projects.getKey('[PROJECT_ID]', '[KEY_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/projects/get-platform.md b/app/sdks/0.7.0/console-web/docs/examples/projects/get-platform.md deleted file mode 100644 index bfeb49393b..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/projects/get-platform.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.projects.getPlatform('[PROJECT_ID]', '[PLATFORM_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/projects/get-task.md b/app/sdks/0.7.0/console-web/docs/examples/projects/get-task.md deleted file mode 100644 index c405299d74..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/projects/get-task.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.projects.getTask('[PROJECT_ID]', '[TASK_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/projects/get-usage.md b/app/sdks/0.7.0/console-web/docs/examples/projects/get-usage.md deleted file mode 100644 index e024a2966c..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/projects/get-usage.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.projects.getUsage('[PROJECT_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/projects/get-webhook.md b/app/sdks/0.7.0/console-web/docs/examples/projects/get-webhook.md deleted file mode 100644 index 2629d4424d..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/projects/get-webhook.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.projects.getWebhook('[PROJECT_ID]', '[WEBHOOK_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/projects/get.md b/app/sdks/0.7.0/console-web/docs/examples/projects/get.md deleted file mode 100644 index bcfb35186b..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/projects/get.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.projects.get('[PROJECT_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/projects/list-domains.md b/app/sdks/0.7.0/console-web/docs/examples/projects/list-domains.md deleted file mode 100644 index 5ddfec49b5..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/projects/list-domains.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.projects.listDomains('[PROJECT_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/projects/list-keys.md b/app/sdks/0.7.0/console-web/docs/examples/projects/list-keys.md deleted file mode 100644 index 497ddf9bac..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/projects/list-keys.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.projects.listKeys('[PROJECT_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/projects/list-platforms.md b/app/sdks/0.7.0/console-web/docs/examples/projects/list-platforms.md deleted file mode 100644 index 4fd2d311f3..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/projects/list-platforms.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.projects.listPlatforms('[PROJECT_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/projects/list-tasks.md b/app/sdks/0.7.0/console-web/docs/examples/projects/list-tasks.md deleted file mode 100644 index d42efc2b80..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/projects/list-tasks.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.projects.listTasks('[PROJECT_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/projects/list-webhooks.md b/app/sdks/0.7.0/console-web/docs/examples/projects/list-webhooks.md deleted file mode 100644 index 6c45849399..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/projects/list-webhooks.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.projects.listWebhooks('[PROJECT_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/projects/list.md b/app/sdks/0.7.0/console-web/docs/examples/projects/list.md deleted file mode 100644 index 428fc4545f..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/projects/list.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.projects.list(); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/projects/update-domain-verification.md b/app/sdks/0.7.0/console-web/docs/examples/projects/update-domain-verification.md deleted file mode 100644 index ea53295bcf..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/projects/update-domain-verification.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.projects.updateDomainVerification('[PROJECT_ID]', '[DOMAIN_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/projects/update-key.md b/app/sdks/0.7.0/console-web/docs/examples/projects/update-key.md deleted file mode 100644 index f19b593c9f..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/projects/update-key.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.projects.updateKey('[PROJECT_ID]', '[KEY_ID]', '[NAME]', []); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/projects/update-o-auth2.md b/app/sdks/0.7.0/console-web/docs/examples/projects/update-o-auth2.md deleted file mode 100644 index 479c5e9d30..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/projects/update-o-auth2.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.projects.updateOAuth2('[PROJECT_ID]', 'amazon'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/projects/update-platform.md b/app/sdks/0.7.0/console-web/docs/examples/projects/update-platform.md deleted file mode 100644 index 0e22080ed0..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/projects/update-platform.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.projects.updatePlatform('[PROJECT_ID]', '[PLATFORM_ID]', '[NAME]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/projects/update-task.md b/app/sdks/0.7.0/console-web/docs/examples/projects/update-task.md deleted file mode 100644 index 38744a36bd..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/projects/update-task.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.projects.updateTask('[PROJECT_ID]', '[TASK_ID]', '[NAME]', 'play', '', false, 'GET', 'https://example.com'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/projects/update-webhook.md b/app/sdks/0.7.0/console-web/docs/examples/projects/update-webhook.md deleted file mode 100644 index cdef2ec479..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/projects/update-webhook.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.projects.updateWebhook('[PROJECT_ID]', '[WEBHOOK_ID]', '[NAME]', [], 'https://example.com', false); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/projects/update.md b/app/sdks/0.7.0/console-web/docs/examples/projects/update.md deleted file mode 100644 index 9d06850534..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/projects/update.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.projects.update('[PROJECT_ID]', '[NAME]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/storage/create-file.md b/app/sdks/0.7.0/console-web/docs/examples/storage/create-file.md deleted file mode 100644 index 673777e380..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/storage/create-file.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.storage.createFile(document.getElementById('uploader').files[0], [], []); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/storage/delete-file.md b/app/sdks/0.7.0/console-web/docs/examples/storage/delete-file.md deleted file mode 100644 index 7278b682ae..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/storage/delete-file.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.storage.deleteFile('[FILE_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/storage/get-file-download.md b/app/sdks/0.7.0/console-web/docs/examples/storage/get-file-download.md deleted file mode 100644 index 0a4677fe80..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/storage/get-file-download.md +++ /dev/null @@ -1,11 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let result = sdk.storage.getFileDownload('[FILE_ID]'); - -console.log(result); // Resource URL \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/storage/get-file-preview.md b/app/sdks/0.7.0/console-web/docs/examples/storage/get-file-preview.md deleted file mode 100644 index a44cb6479c..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/storage/get-file-preview.md +++ /dev/null @@ -1,11 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let result = sdk.storage.getFilePreview('[FILE_ID]'); - -console.log(result); // Resource URL \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/storage/get-file-view.md b/app/sdks/0.7.0/console-web/docs/examples/storage/get-file-view.md deleted file mode 100644 index adfb6320c3..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/storage/get-file-view.md +++ /dev/null @@ -1,11 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let result = sdk.storage.getFileView('[FILE_ID]'); - -console.log(result); // Resource URL \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/storage/get-file.md b/app/sdks/0.7.0/console-web/docs/examples/storage/get-file.md deleted file mode 100644 index 9691be3056..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/storage/get-file.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.storage.getFile('[FILE_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/storage/list-files.md b/app/sdks/0.7.0/console-web/docs/examples/storage/list-files.md deleted file mode 100644 index 5c2560d06d..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/storage/list-files.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.storage.listFiles(); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/storage/update-file.md b/app/sdks/0.7.0/console-web/docs/examples/storage/update-file.md deleted file mode 100644 index c053d60470..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/storage/update-file.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.storage.updateFile('[FILE_ID]', [], []); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/teams/create-membership.md b/app/sdks/0.7.0/console-web/docs/examples/teams/create-membership.md deleted file mode 100644 index 534577ead3..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/teams/create-membership.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.teams.createMembership('[TEAM_ID]', 'email@example.com', [], 'https://example.com'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/teams/create.md b/app/sdks/0.7.0/console-web/docs/examples/teams/create.md deleted file mode 100644 index 6f7232b9c5..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/teams/create.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.teams.create('[NAME]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/teams/delete-membership.md b/app/sdks/0.7.0/console-web/docs/examples/teams/delete-membership.md deleted file mode 100644 index fa1efe401b..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/teams/delete-membership.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.teams.deleteMembership('[TEAM_ID]', '[INVITE_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/teams/delete.md b/app/sdks/0.7.0/console-web/docs/examples/teams/delete.md deleted file mode 100644 index cacad26c02..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/teams/delete.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.teams.delete('[TEAM_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/teams/get-memberships.md b/app/sdks/0.7.0/console-web/docs/examples/teams/get-memberships.md deleted file mode 100644 index e1b959d1eb..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/teams/get-memberships.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.teams.getMemberships('[TEAM_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/teams/get.md b/app/sdks/0.7.0/console-web/docs/examples/teams/get.md deleted file mode 100644 index a8496ad76d..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/teams/get.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.teams.get('[TEAM_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/teams/list.md b/app/sdks/0.7.0/console-web/docs/examples/teams/list.md deleted file mode 100644 index b94d6c32ff..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/teams/list.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.teams.list(); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/teams/update-membership-status.md b/app/sdks/0.7.0/console-web/docs/examples/teams/update-membership-status.md deleted file mode 100644 index 4931f02689..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/teams/update-membership-status.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.teams.updateMembershipStatus('[TEAM_ID]', '[INVITE_ID]', '[USER_ID]', '[SECRET]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/teams/update.md b/app/sdks/0.7.0/console-web/docs/examples/teams/update.md deleted file mode 100644 index 5b73121518..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/teams/update.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.teams.update('[TEAM_ID]', '[NAME]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/users/create.md b/app/sdks/0.7.0/console-web/docs/examples/users/create.md deleted file mode 100644 index 9adc060ff5..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/users/create.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.users.create('email@example.com', 'password'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/users/delete-session.md b/app/sdks/0.7.0/console-web/docs/examples/users/delete-session.md deleted file mode 100644 index 96a9b5c94f..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/users/delete-session.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.users.deleteSession('[USER_ID]', '[SESSION_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/users/delete-sessions.md b/app/sdks/0.7.0/console-web/docs/examples/users/delete-sessions.md deleted file mode 100644 index 56092ab5fc..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/users/delete-sessions.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.users.deleteSessions('[USER_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/users/delete-user.md b/app/sdks/0.7.0/console-web/docs/examples/users/delete-user.md deleted file mode 100644 index 40f33e34c2..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/users/delete-user.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.users.deleteUser('[USER_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/users/get-logs.md b/app/sdks/0.7.0/console-web/docs/examples/users/get-logs.md deleted file mode 100644 index c349383ec1..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/users/get-logs.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.users.getLogs('[USER_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/users/get-prefs.md b/app/sdks/0.7.0/console-web/docs/examples/users/get-prefs.md deleted file mode 100644 index 7d8a3cd33f..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/users/get-prefs.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.users.getPrefs('[USER_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/users/get-sessions.md b/app/sdks/0.7.0/console-web/docs/examples/users/get-sessions.md deleted file mode 100644 index 1b7535855e..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/users/get-sessions.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.users.getSessions('[USER_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/users/get.md b/app/sdks/0.7.0/console-web/docs/examples/users/get.md deleted file mode 100644 index 751798de39..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/users/get.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.users.get('[USER_ID]'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/users/list.md b/app/sdks/0.7.0/console-web/docs/examples/users/list.md deleted file mode 100644 index bbc4895412..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/users/list.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.users.list(); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/users/update-prefs.md b/app/sdks/0.7.0/console-web/docs/examples/users/update-prefs.md deleted file mode 100644 index 877aa309a1..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/users/update-prefs.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.users.updatePrefs('[USER_ID]', {}); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/docs/examples/users/update-status.md b/app/sdks/0.7.0/console-web/docs/examples/users/update-status.md deleted file mode 100644 index 6c432ff4c6..0000000000 --- a/app/sdks/0.7.0/console-web/docs/examples/users/update-status.md +++ /dev/null @@ -1,15 +0,0 @@ -let sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = sdk.users.updateStatus('[USER_ID]', '1'); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/package.json b/app/sdks/0.7.0/console-web/package.json deleted file mode 100644 index 6c53a70307..0000000000 --- a/app/sdks/0.7.0/console-web/package.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "appwrite", - "homepage": "https://appwrite.io/support", - "description": "Appwrite is an open-source self-hosted backend server that abstract and simplify complex and repetitive development tasks behind a very simple REST API", - "version": "1.0.0", - "license": "BSD-3-Clause", - "main": "src/sdk.js", - "types": "types/index.d.ts", - "repository": { - "type": "git", - "url": "https://github.com/appwrite/sdk-for-console" - }, - "devDependencies": { - "typescript": "^3.6.4" - }, - "dependencies": {} -} \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/src/sdk.js b/app/sdks/0.7.0/console-web/src/sdk.js deleted file mode 100644 index fc8da5a1c2..0000000000 --- a/app/sdks/0.7.0/console-web/src/sdk.js +++ /dev/null @@ -1,4993 +0,0 @@ -(function (window) { - - 'use strict'; - - window.Appwrite = function () { - - let config = { - endpoint: 'https://appwrite.io/v1', - project: '', - key: '', - locale: '', - mode: '', - }; - - /** - * @param {string} endpoint - * @returns {this} - */ - let setEndpoint = function(endpoint) { - config.endpoint = endpoint; - - return this; - }; - - /** - * Set Project - * - * Your project ID - * - * @param value string - * - * @return this - */ - let setProject = function (value) - { - http.addGlobalHeader('X-Appwrite-Project', value); - - config.project = value; - - return this; - }; - - /** - * Set Key - * - * Your secret API key - * - * @param value string - * - * @return this - */ - let setKey = function (value) - { - http.addGlobalHeader('X-Appwrite-Key', value); - - config.key = value; - - return this; - }; - - /** - * Set Locale - * - * @param value string - * - * @return this - */ - let setLocale = function (value) - { - http.addGlobalHeader('X-Appwrite-Locale', value); - - config.locale = value; - - return this; - }; - - /** - * Set Mode - * - * @param value string - * - * @return this - */ - let setMode = function (value) - { - http.addGlobalHeader('X-Appwrite-Mode', value); - - config.mode = value; - - return this; - }; - - let http = function(document) { - let globalParams = [], - globalHeaders = []; - - let addParam = function (url, param, value) { - let a = document.createElement('a'), regex = /(?:\?|&|&)+([^=]+)(?:=([^&]*))*/g; - let match, str = []; - a.href = url; - param = encodeURIComponent(param); - - while (match = regex.exec(a.search)) if (param !== match[1]) str.push(match[1] + (match[2] ? "=" + match[2] : "")); - - str.push(param + (value ? "=" + encodeURIComponent(value) : "")); - - a.search = str.join("&"); - - return a.href; - }; - - /** - * @param {Object} params - * @returns {string} - */ - let buildQuery = function(params) { - let str = []; - - for (let p in params) { - if(Array.isArray(params[p])) { - for (let index = 0; index < params[p].length; index++) { - let param = params[p][index]; - str.push(encodeURIComponent(p + '[]') + "=" + encodeURIComponent(param)); - } - } - else { - str.push(encodeURIComponent(p) + "=" + encodeURIComponent(params[p])); - } - } - - return str.join("&"); - }; - - let addGlobalHeader = function(key, value) { - globalHeaders[key] = {key: key.toLowerCase(), value: value.toLowerCase()}; - }; - - let addGlobalParam = function(key, value) { - globalParams.push({key: key, value: value}); - }; - - addGlobalHeader('x-sdk-version', 'appwrite:javascript:1.0.0'); - addGlobalHeader('content-type', ''); - - /** - * @param {string} method - * @param {string} path string - * @param {Object} headers - * @param {Object} params - * @param {function} progress - * @returns {Promise} - */ - let call = function (method, path, headers = {}, params = {}, progress = null) { - let i; - - path = config.endpoint + path; - - if (-1 === ['GET', 'POST', 'PUT', 'DELETE', 'TRACE', 'HEAD', 'OPTIONS', 'CONNECT', 'PATCH'].indexOf(method)) { - throw new Error('var method must contain a valid HTTP method name'); - } - - if (typeof path !== 'string') { - throw new Error('var path must be of type string'); - } - - if (typeof headers !== 'object') { - throw new Error('var headers must be of type object'); - } - - for (i = 0; i < globalParams.length; i++) { // Add global params to URL - path = addParam(path, globalParams[i].key, globalParams[i].value); - } - - if(window.localStorage && window.localStorage.getItem('cookieFallback')) { - headers['X-Fallback-Cookies'] = window.localStorage.getItem('cookieFallback'); - } - - for (let key in globalHeaders) { // Add Global Headers - if (globalHeaders.hasOwnProperty(key)) { - if (!headers[globalHeaders[key].key]) { - headers[globalHeaders[key].key] = globalHeaders[key].value; - } - } - } - - if(method === 'GET') { - for (let param in params) { - if (param.hasOwnProperty(key)) { - path = addParam(path, key + (Array.isArray(param) ? '[]' : ''), params[key]); - } - } - } - - switch (headers['content-type']) { // Parse request by content type - case 'application/json': - params = JSON.stringify(params); - break; - - case 'multipart/form-data': - let formData = new FormData(); - - Object.keys(params).forEach(function(key) { - let param = params[key]; - formData.append(key + (Array.isArray(param) ? '[]' : ''), param); - }); - - params = formData; - break; - } - - return new Promise(function (resolve, reject) { - - let request = new XMLHttpRequest(), key; - - request.withCredentials = true; - request.open(method, path, true); - - for (key in headers) { // Set Headers - if (headers.hasOwnProperty(key)) { - if (key === 'content-type' && headers[key] === 'multipart/form-data') { // Skip to avoid missing boundary - continue; - } - - request.setRequestHeader(key, headers[key]); - } - } - - request.onload = function () { - let data = request.response; - let contentType = this.getResponseHeader('content-type') || ''; - contentType = contentType.substring(0, contentType.indexOf(';')); - - switch (contentType) { - case 'application/json': - data = JSON.parse(data); - break; - } - - let cookieFallback = this.getResponseHeader('X-Fallback-Cookies') || ''; - - if(window.localStorage && cookieFallback) { - window.console.warn('Appwrite is using localStorage for session management. Increase your security by adding a custom domain as your API endpoint.'); - window.localStorage.setItem('cookieFallback', cookieFallback); - } - - if (4 === request.readyState && 399 >= request.status) { - resolve(data); - } else { - reject(data); - } - }; - - if (progress) { - request.addEventListener('progress', progress); - request.upload.addEventListener('progress', progress, false); - } - - // Handle network errors - request.onerror = function () { - reject(new Error("Network Error")); - }; - - request.send(params); - }) - }; - - return { - 'get': function(path, headers = {}, params = {}) { - return call('GET', path + ((Object.keys(params).length > 0) ? '?' + buildQuery(params) : ''), headers, {}); - }, - 'post': function(path, headers = {}, params = {}, progress = null) { - return call('POST', path, headers, params, progress); - }, - 'put': function(path, headers = {}, params = {}, progress = null) { - return call('PUT', path, headers, params, progress); - }, - 'patch': function(path, headers = {}, params = {}, progress = null) { - return call('PATCH', path, headers, params, progress); - }, - 'delete': function(path, headers = {}, params = {}, progress = null) { - return call('DELETE', path, headers, params, progress); - }, - 'addGlobalParam': addGlobalParam, - 'addGlobalHeader': addGlobalHeader - } - }(window.document); - - let account = { - - /** - * Get Account - * - * Get currently logged in user data as JSON object. - * - * @throws {Error} - * @return {Promise} - */ - get: function() { - let path = '/account'; - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Create Account - * - * Use this endpoint to allow a new user to register a new account in your - * project. After the user registration completes successfully, you can use - * the [/account/verfication](/docs/client/account#createVerification) route - * to start verifying the user email address. To allow your new user to login - * to his new account, you need to create a new [account - * session](/docs/client/account#createSession). - * - * @param {string} email - * @param {string} password - * @param {string} name - * @throws {Error} - * @return {Promise} - */ - create: function(email, password, name = '') { - if(email === undefined) { - throw new Error('Missing required parameter: "email"'); - } - - if(password === undefined) { - throw new Error('Missing required parameter: "password"'); - } - - let path = '/account'; - - let payload = {}; - - if(email) { - payload['email'] = email; - } - - if(password) { - payload['password'] = password; - } - - if(name) { - payload['name'] = name; - } - - return http - .post(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Delete Account - * - * Delete a currently logged in user account. Behind the scene, the user - * record is not deleted but permanently blocked from any access. This is done - * to avoid deleted accounts being overtaken by new users with the same email - * address. Any user-related resources like documents or storage files should - * be deleted separately. - * - * @throws {Error} - * @return {Promise} - */ - delete: function() { - let path = '/account'; - - let payload = {}; - - return http - .delete(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Update Account Email - * - * Update currently logged in user account email address. After changing user - * address, user confirmation status is being reset and a new confirmation - * mail is sent. For security measures, user password is required to complete - * this request. - * - * @param {string} email - * @param {string} password - * @throws {Error} - * @return {Promise} - */ - updateEmail: function(email, password) { - if(email === undefined) { - throw new Error('Missing required parameter: "email"'); - } - - if(password === undefined) { - throw new Error('Missing required parameter: "password"'); - } - - let path = '/account/email'; - - let payload = {}; - - if(email) { - payload['email'] = email; - } - - if(password) { - payload['password'] = password; - } - - return http - .patch(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Get Account 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. - * - * @throws {Error} - * @return {Promise} - */ - getLogs: function() { - let path = '/account/logs'; - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Update Account Name - * - * Update currently logged in user account name. - * - * @param {string} name - * @throws {Error} - * @return {Promise} - */ - updateName: function(name) { - if(name === undefined) { - throw new Error('Missing required parameter: "name"'); - } - - let path = '/account/name'; - - let payload = {}; - - if(name) { - payload['name'] = name; - } - - return http - .patch(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Update Account Password - * - * Update currently logged in user password. For validation, user is required - * to pass the password twice. - * - * @param {string} password - * @param {string} oldPassword - * @throws {Error} - * @return {Promise} - */ - updatePassword: function(password, oldPassword) { - if(password === undefined) { - throw new Error('Missing required parameter: "password"'); - } - - if(oldPassword === undefined) { - throw new Error('Missing required parameter: "oldPassword"'); - } - - let path = '/account/password'; - - let payload = {}; - - if(password) { - payload['password'] = password; - } - - if(oldPassword) { - payload['oldPassword'] = oldPassword; - } - - return http - .patch(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Get Account Preferences - * - * Get currently logged in user preferences as a key-value object. - * - * @throws {Error} - * @return {Promise} - */ - getPrefs: function() { - let path = '/account/prefs'; - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Update Account Preferences - * - * Update currently logged in user account preferences. You can pass only the - * specific settings you wish to update. - * - * @param {object} prefs - * @throws {Error} - * @return {Promise} - */ - updatePrefs: function(prefs) { - if(prefs === undefined) { - throw new Error('Missing required parameter: "prefs"'); - } - - let path = '/account/prefs'; - - let payload = {}; - - if(prefs) { - payload['prefs'] = prefs; - } - - return http - .patch(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Create Password Recovery - * - * Sends the user an email with a temporary secret key for password reset. - * When the user clicks the confirmation link he is redirected back to your - * app password reset URL with the secret key and email address values - * attached to the URL query string. Use the query string params to submit a - * request to the [PUT /account/recovery](/docs/client/account#updateRecovery) - * endpoint to complete the process. - * - * @param {string} email - * @param {string} url - * @throws {Error} - * @return {Promise} - */ - createRecovery: function(email, url) { - if(email === undefined) { - throw new Error('Missing required parameter: "email"'); - } - - if(url === undefined) { - throw new Error('Missing required parameter: "url"'); - } - - let path = '/account/recovery'; - - let payload = {}; - - if(email) { - payload['email'] = email; - } - - if(url) { - payload['url'] = url; - } - - return http - .post(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Complete Password Recovery - * - * Use this endpoint to complete the user account password reset. Both the - * **userId** and **secret** arguments will be passed as query parameters to - * the redirect URL you have provided when sending your request to the [POST - * /account/recovery](/docs/client/account#createRecovery) endpoint. - * - * Please note that in order to avoid a [Redirect - * 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. - * - * @param {string} userId - * @param {string} secret - * @param {string} password - * @param {string} passwordAgain - * @throws {Error} - * @return {Promise} - */ - updateRecovery: function(userId, secret, password, passwordAgain) { - if(userId === undefined) { - throw new Error('Missing required parameter: "userId"'); - } - - if(secret === undefined) { - throw new Error('Missing required parameter: "secret"'); - } - - if(password === undefined) { - throw new Error('Missing required parameter: "password"'); - } - - if(passwordAgain === undefined) { - throw new Error('Missing required parameter: "passwordAgain"'); - } - - let path = '/account/recovery'; - - let payload = {}; - - if(userId) { - payload['userId'] = userId; - } - - if(secret) { - payload['secret'] = secret; - } - - if(password) { - payload['password'] = password; - } - - if(passwordAgain) { - payload['passwordAgain'] = passwordAgain; - } - - return http - .put(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Get Account Sessions - * - * Get currently logged in user list of active sessions across different - * devices. - * - * @throws {Error} - * @return {Promise} - */ - getSessions: function() { - let path = '/account/sessions'; - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Create Account Session - * - * Allow the user to login into his account by providing a valid email and - * password combination. This route will create a new session for the user. - * - * @param {string} email - * @param {string} password - * @throws {Error} - * @return {Promise} - */ - createSession: function(email, password) { - if(email === undefined) { - throw new Error('Missing required parameter: "email"'); - } - - if(password === undefined) { - throw new Error('Missing required parameter: "password"'); - } - - let path = '/account/sessions'; - - let payload = {}; - - if(email) { - payload['email'] = email; - } - - if(password) { - payload['password'] = password; - } - - return http - .post(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Delete All Account Sessions - * - * Delete all sessions from the user account and remove any sessions cookies - * from the end client. - * - * @throws {Error} - * @return {Promise} - */ - deleteSessions: function() { - let path = '/account/sessions'; - - let payload = {}; - - return http - .delete(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Create Account Session with OAuth2 - * - * Allow the user to login to his account using the OAuth2 provider of his - * choice. Each OAuth2 provider should be enabled from the Appwrite console - * first. Use the success and failure arguments to provide a redirect URL's - * back to your app when login is completed. - * - * @param {string} provider - * @param {string} success - * @param {string} failure - * @param {string[]} scopes - * @throws {Error} - * @return {Promise} - */ - createOAuth2Session: function(provider, success = 'https://appwrite.io/auth/oauth2/success', failure = 'https://appwrite.io/auth/oauth2/failure', scopes = []) { - if(provider === undefined) { - throw new Error('Missing required parameter: "provider"'); - } - - let path = '/account/sessions/oauth2/{provider}'.replace(new RegExp('{provider}', 'g'), provider); - - let payload = {}; - - if(success) { - payload['success'] = success; - } - - if(failure) { - payload['failure'] = failure; - } - - if(scopes) { - payload['scopes'] = scopes; - } - - payload['project'] = config.project; - - payload['key'] = config.key; - - - let query = []; - - for (let p in payload) { - if(Array.isArray(payload[p])) { - for (let index = 0; index < payload[p].length; index++) { - let param = payload[p][index]; - query.push(encodeURIComponent(p + '[]') + "=" + encodeURIComponent(param)); - } - } - else { - query.push(encodeURIComponent(p) + "=" + encodeURIComponent(payload[p])); - } - } - - query = query.join("&"); - - window.location = config.endpoint + path + ((query) ? '?' + query : ''); - }, - - /** - * Delete Account Session - * - * Use this endpoint to log out the currently logged in user from all his - * account sessions across all his different devices. When using the option id - * argument, only the session unique ID provider will be deleted. - * - * @param {string} sessionId - * @throws {Error} - * @return {Promise} - */ - deleteSession: function(sessionId) { - if(sessionId === undefined) { - throw new Error('Missing required parameter: "sessionId"'); - } - - let path = '/account/sessions/{sessionId}'.replace(new RegExp('{sessionId}', 'g'), sessionId); - - let payload = {}; - - return http - .delete(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Create Email Verification - * - * Use this endpoint to send a verification message to your user email address - * to confirm they are the valid owners of that address. Both the **userId** - * and **secret** arguments will be passed as query parameters to the URL you - * have provided to be attached to the verification email. The provided URL - * should redirect the user back to your app and allow you to complete the - * verification process by verifying both the **userId** and **secret** - * parameters. Learn more about how to [complete the verification - * process](/docs/client/account#updateAccountVerification). - * - * Please note that in order to avoid a [Redirect - * 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. - * - * - * @param {string} url - * @throws {Error} - * @return {Promise} - */ - createVerification: function(url) { - if(url === undefined) { - throw new Error('Missing required parameter: "url"'); - } - - let path = '/account/verification'; - - let payload = {}; - - if(url) { - payload['url'] = url; - } - - return http - .post(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Complete Email Verification - * - * 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. - * - * @param {string} userId - * @param {string} secret - * @throws {Error} - * @return {Promise} - */ - updateVerification: function(userId, secret) { - if(userId === undefined) { - throw new Error('Missing required parameter: "userId"'); - } - - if(secret === undefined) { - throw new Error('Missing required parameter: "secret"'); - } - - let path = '/account/verification'; - - let payload = {}; - - if(userId) { - payload['userId'] = userId; - } - - if(secret) { - payload['secret'] = secret; - } - - return http - .put(path, { - 'content-type': 'application/json', - }, payload); - } - }; - - let avatars = { - - /** - * Get Browser Icon - * - * You can use this endpoint to show different browser icons to your users. - * The code argument receives the browser code as it appears in your user - * /account/sessions endpoint. Use width, height and quality arguments to - * change the output settings. - * - * @param {string} code - * @param {number} width - * @param {number} height - * @param {number} quality - * @throws {Error} - * @return {string} - */ - getBrowser: function(code, width = 100, height = 100, quality = 100) { - if(code === undefined) { - throw new Error('Missing required parameter: "code"'); - } - - let path = '/avatars/browsers/{code}'.replace(new RegExp('{code}', 'g'), code); - - let payload = {}; - - if(width) { - payload['width'] = width; - } - - if(height) { - payload['height'] = height; - } - - if(quality) { - payload['quality'] = quality; - } - - payload['project'] = config.project; - - payload['key'] = config.key; - - - let query = []; - - for (let p in payload) { - if(Array.isArray(payload[p])) { - for (let index = 0; index < payload[p].length; index++) { - let param = payload[p][index]; - query.push(encodeURIComponent(p + '[]') + "=" + encodeURIComponent(param)); - } - } - else { - query.push(encodeURIComponent(p) + "=" + encodeURIComponent(payload[p])); - } - } - - query = query.join("&"); - - return config.endpoint + path + ((query) ? '?' + query : ''); - }, - - /** - * Get Credit Card Icon - * - * Need to display your users with your billing method or their payment - * methods? The credit card endpoint will return you the icon of the credit - * card provider you need. Use width, height and quality arguments to change - * the output settings. - * - * @param {string} code - * @param {number} width - * @param {number} height - * @param {number} quality - * @throws {Error} - * @return {string} - */ - getCreditCard: function(code, width = 100, height = 100, quality = 100) { - if(code === undefined) { - throw new Error('Missing required parameter: "code"'); - } - - let path = '/avatars/credit-cards/{code}'.replace(new RegExp('{code}', 'g'), code); - - let payload = {}; - - if(width) { - payload['width'] = width; - } - - if(height) { - payload['height'] = height; - } - - if(quality) { - payload['quality'] = quality; - } - - payload['project'] = config.project; - - payload['key'] = config.key; - - - let query = []; - - for (let p in payload) { - if(Array.isArray(payload[p])) { - for (let index = 0; index < payload[p].length; index++) { - let param = payload[p][index]; - query.push(encodeURIComponent(p + '[]') + "=" + encodeURIComponent(param)); - } - } - else { - query.push(encodeURIComponent(p) + "=" + encodeURIComponent(payload[p])); - } - } - - query = query.join("&"); - - return config.endpoint + path + ((query) ? '?' + query : ''); - }, - - /** - * Get Favicon - * - * Use this endpoint to fetch the favorite icon (AKA favicon) of a any remote - * website URL. - * - * @param {string} url - * @throws {Error} - * @return {string} - */ - getFavicon: function(url) { - if(url === undefined) { - throw new Error('Missing required parameter: "url"'); - } - - let path = '/avatars/favicon'; - - let payload = {}; - - if(url) { - payload['url'] = url; - } - - payload['project'] = config.project; - - payload['key'] = config.key; - - - let query = []; - - for (let p in payload) { - if(Array.isArray(payload[p])) { - for (let index = 0; index < payload[p].length; index++) { - let param = payload[p][index]; - query.push(encodeURIComponent(p + '[]') + "=" + encodeURIComponent(param)); - } - } - else { - query.push(encodeURIComponent(p) + "=" + encodeURIComponent(payload[p])); - } - } - - query = query.join("&"); - - return config.endpoint + path + ((query) ? '?' + query : ''); - }, - - /** - * Get Country Flag - * - * You can use this endpoint to show different country flags icons to your - * users. The code argument receives the 2 letter country code. Use width, - * height and quality arguments to change the output settings. - * - * @param {string} code - * @param {number} width - * @param {number} height - * @param {number} quality - * @throws {Error} - * @return {string} - */ - getFlag: function(code, width = 100, height = 100, quality = 100) { - if(code === undefined) { - throw new Error('Missing required parameter: "code"'); - } - - let path = '/avatars/flags/{code}'.replace(new RegExp('{code}', 'g'), code); - - let payload = {}; - - if(width) { - payload['width'] = width; - } - - if(height) { - payload['height'] = height; - } - - if(quality) { - payload['quality'] = quality; - } - - payload['project'] = config.project; - - payload['key'] = config.key; - - - let query = []; - - for (let p in payload) { - if(Array.isArray(payload[p])) { - for (let index = 0; index < payload[p].length; index++) { - let param = payload[p][index]; - query.push(encodeURIComponent(p + '[]') + "=" + encodeURIComponent(param)); - } - } - else { - query.push(encodeURIComponent(p) + "=" + encodeURIComponent(payload[p])); - } - } - - query = query.join("&"); - - return config.endpoint + path + ((query) ? '?' + query : ''); - }, - - /** - * Get Image from URL - * - * Use this endpoint to fetch a remote image URL and crop it to any image size - * you want. This endpoint is very useful if you need to crop and display - * remote images in your app or in case you want to make sure a 3rd party - * image is properly served using a TLS protocol. - * - * @param {string} url - * @param {number} width - * @param {number} height - * @throws {Error} - * @return {string} - */ - getImage: function(url, width = 400, height = 400) { - if(url === undefined) { - throw new Error('Missing required parameter: "url"'); - } - - let path = '/avatars/image'; - - let payload = {}; - - if(url) { - payload['url'] = url; - } - - if(width) { - payload['width'] = width; - } - - if(height) { - payload['height'] = height; - } - - payload['project'] = config.project; - - payload['key'] = config.key; - - - let query = []; - - for (let p in payload) { - if(Array.isArray(payload[p])) { - for (let index = 0; index < payload[p].length; index++) { - let param = payload[p][index]; - query.push(encodeURIComponent(p + '[]') + "=" + encodeURIComponent(param)); - } - } - else { - query.push(encodeURIComponent(p) + "=" + encodeURIComponent(payload[p])); - } - } - - query = query.join("&"); - - return config.endpoint + path + ((query) ? '?' + query : ''); - }, - - /** - * Get User Initials - * - * Use this endpoint to show your user initials avatar icon on your website or - * app. By default, this route will try to print your logged-in user name or - * email initials. You can also overwrite the user name if you pass the 'name' - * parameter. If no name is given and no user is logged, an empty avatar will - * be returned. - * - * You can use the color and background params to change the avatar colors. By - * default, a random theme will be selected. The random theme will persist for - * the user's initials when reloading the same theme will always return for - * the same initials. - * - * @param {string} name - * @param {number} width - * @param {number} height - * @param {string} color - * @param {string} background - * @throws {Error} - * @return {string} - */ - getInitials: function(name = '', width = 500, height = 500, color = '', background = '') { - let path = '/avatars/initials'; - - let payload = {}; - - if(name) { - payload['name'] = name; - } - - if(width) { - payload['width'] = width; - } - - if(height) { - payload['height'] = height; - } - - if(color) { - payload['color'] = color; - } - - if(background) { - payload['background'] = background; - } - - payload['project'] = config.project; - - payload['key'] = config.key; - - - let query = []; - - for (let p in payload) { - if(Array.isArray(payload[p])) { - for (let index = 0; index < payload[p].length; index++) { - let param = payload[p][index]; - query.push(encodeURIComponent(p + '[]') + "=" + encodeURIComponent(param)); - } - } - else { - query.push(encodeURIComponent(p) + "=" + encodeURIComponent(payload[p])); - } - } - - query = query.join("&"); - - return config.endpoint + path + ((query) ? '?' + query : ''); - }, - - /** - * 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. - * - * @param {string} text - * @param {number} size - * @param {number} margin - * @param {boolean} download - * @throws {Error} - * @return {string} - */ - getQR: function(text, size = 400, margin = 1, download = false) { - if(text === undefined) { - throw new Error('Missing required parameter: "text"'); - } - - let path = '/avatars/qr'; - - let payload = {}; - - if(text) { - payload['text'] = text; - } - - if(size) { - payload['size'] = size; - } - - if(margin) { - payload['margin'] = margin; - } - - if(download) { - payload['download'] = download; - } - - payload['project'] = config.project; - - payload['key'] = config.key; - - - let query = []; - - for (let p in payload) { - if(Array.isArray(payload[p])) { - for (let index = 0; index < payload[p].length; index++) { - let param = payload[p][index]; - query.push(encodeURIComponent(p + '[]') + "=" + encodeURIComponent(param)); - } - } - else { - query.push(encodeURIComponent(p) + "=" + encodeURIComponent(payload[p])); - } - } - - query = query.join("&"); - - return config.endpoint + path + ((query) ? '?' + query : ''); - } - }; - - let database = { - - /** - * List Collections - * - * Get a list of all the user collections. You can use the query params to - * filter your results. On admin mode, this endpoint will return a list of all - * of the project collections. [Learn more about different API - * modes](/docs/admin). - * - * @param {string} search - * @param {number} limit - * @param {number} offset - * @param {string} orderType - * @throws {Error} - * @return {Promise} - */ - listCollections: function(search = '', limit = 25, offset = 0, orderType = 'ASC') { - let path = '/database/collections'; - - let payload = {}; - - if(search) { - payload['search'] = search; - } - - if(limit) { - payload['limit'] = limit; - } - - if(offset) { - payload['offset'] = offset; - } - - if(orderType) { - payload['orderType'] = orderType; - } - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Create Collection - * - * Create a new Collection. - * - * @param {string} name - * @param {string[]} read - * @param {string[]} write - * @param {string[]} rules - * @throws {Error} - * @return {Promise} - */ - createCollection: function(name, read, write, rules) { - if(name === undefined) { - throw new Error('Missing required parameter: "name"'); - } - - if(read === undefined) { - throw new Error('Missing required parameter: "read"'); - } - - if(write === undefined) { - throw new Error('Missing required parameter: "write"'); - } - - if(rules === undefined) { - throw new Error('Missing required parameter: "rules"'); - } - - let path = '/database/collections'; - - let payload = {}; - - if(name) { - payload['name'] = name; - } - - if(read) { - payload['read'] = read; - } - - if(write) { - payload['write'] = write; - } - - if(rules) { - payload['rules'] = rules; - } - - return http - .post(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Get Collection - * - * Get collection by its unique ID. This endpoint response returns a JSON - * object with the collection metadata. - * - * @param {string} collectionId - * @throws {Error} - * @return {Promise} - */ - getCollection: function(collectionId) { - if(collectionId === undefined) { - throw new Error('Missing required parameter: "collectionId"'); - } - - let path = '/database/collections/{collectionId}'.replace(new RegExp('{collectionId}', 'g'), collectionId); - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Update Collection - * - * Update collection by its unique ID. - * - * @param {string} collectionId - * @param {string} name - * @param {string[]} read - * @param {string[]} write - * @param {string[]} rules - * @throws {Error} - * @return {Promise} - */ - updateCollection: function(collectionId, name, read, write, rules = []) { - if(collectionId === undefined) { - throw new Error('Missing required parameter: "collectionId"'); - } - - if(name === undefined) { - throw new Error('Missing required parameter: "name"'); - } - - if(read === undefined) { - throw new Error('Missing required parameter: "read"'); - } - - if(write === undefined) { - throw new Error('Missing required parameter: "write"'); - } - - let path = '/database/collections/{collectionId}'.replace(new RegExp('{collectionId}', 'g'), collectionId); - - let payload = {}; - - if(name) { - payload['name'] = name; - } - - if(read) { - payload['read'] = read; - } - - if(write) { - payload['write'] = write; - } - - if(rules) { - payload['rules'] = rules; - } - - return http - .put(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Delete Collection - * - * Delete a collection by its unique ID. Only users with write permissions - * have access to delete this resource. - * - * @param {string} collectionId - * @throws {Error} - * @return {Promise} - */ - deleteCollection: function(collectionId) { - if(collectionId === undefined) { - throw new Error('Missing required parameter: "collectionId"'); - } - - let path = '/database/collections/{collectionId}'.replace(new RegExp('{collectionId}', 'g'), collectionId); - - let payload = {}; - - return http - .delete(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * List Documents - * - * Get a list of all the user documents. You can use the query params to - * filter your results. On admin mode, this endpoint will return a list of all - * of the project documents. [Learn more about different API - * modes](/docs/admin). - * - * @param {string} collectionId - * @param {string[]} filters - * @param {number} limit - * @param {number} offset - * @param {string} orderField - * @param {string} orderType - * @param {string} orderCast - * @param {string} search - * @throws {Error} - * @return {Promise} - */ - listDocuments: function(collectionId, filters = [], limit = 25, offset = 0, orderField = '$id', orderType = 'ASC', orderCast = 'string', search = '') { - if(collectionId === undefined) { - throw new Error('Missing required parameter: "collectionId"'); - } - - let path = '/database/collections/{collectionId}/documents'.replace(new RegExp('{collectionId}', 'g'), collectionId); - - let payload = {}; - - if(filters) { - payload['filters'] = filters; - } - - if(limit) { - payload['limit'] = limit; - } - - if(offset) { - payload['offset'] = offset; - } - - if(orderField) { - payload['orderField'] = orderField; - } - - if(orderType) { - payload['orderType'] = orderType; - } - - if(orderCast) { - payload['orderCast'] = orderCast; - } - - if(search) { - payload['search'] = search; - } - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Create Document - * - * Create a new Document. Before using this route, you should create a new - * collection resource using either a [server - * integration](/docs/server/database?sdk=nodejs#createCollection) API or - * directly from your database console. - * - * @param {string} collectionId - * @param {object} data - * @param {string[]} read - * @param {string[]} write - * @param {string} parentDocument - * @param {string} parentProperty - * @param {string} parentPropertyType - * @throws {Error} - * @return {Promise} - */ - createDocument: function(collectionId, data, read, write, parentDocument = '', parentProperty = '', parentPropertyType = 'assign') { - if(collectionId === undefined) { - throw new Error('Missing required parameter: "collectionId"'); - } - - if(data === undefined) { - throw new Error('Missing required parameter: "data"'); - } - - if(read === undefined) { - throw new Error('Missing required parameter: "read"'); - } - - if(write === undefined) { - throw new Error('Missing required parameter: "write"'); - } - - let path = '/database/collections/{collectionId}/documents'.replace(new RegExp('{collectionId}', 'g'), collectionId); - - let payload = {}; - - if(data) { - payload['data'] = data; - } - - if(read) { - payload['read'] = read; - } - - if(write) { - payload['write'] = write; - } - - if(parentDocument) { - payload['parentDocument'] = parentDocument; - } - - if(parentProperty) { - payload['parentProperty'] = parentProperty; - } - - if(parentPropertyType) { - payload['parentPropertyType'] = parentPropertyType; - } - - return http - .post(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Get Document - * - * Get document by its unique ID. This endpoint response returns a JSON object - * with the document data. - * - * @param {string} collectionId - * @param {string} documentId - * @throws {Error} - * @return {Promise} - */ - getDocument: function(collectionId, documentId) { - if(collectionId === undefined) { - throw new Error('Missing required parameter: "collectionId"'); - } - - if(documentId === undefined) { - throw new Error('Missing required parameter: "documentId"'); - } - - let path = '/database/collections/{collectionId}/documents/{documentId}'.replace(new RegExp('{collectionId}', 'g'), collectionId).replace(new RegExp('{documentId}', 'g'), documentId); - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Update Document - * - * - * @param {string} collectionId - * @param {string} documentId - * @param {object} data - * @param {string[]} read - * @param {string[]} write - * @throws {Error} - * @return {Promise} - */ - updateDocument: function(collectionId, documentId, data, read, write) { - if(collectionId === undefined) { - throw new Error('Missing required parameter: "collectionId"'); - } - - if(documentId === undefined) { - throw new Error('Missing required parameter: "documentId"'); - } - - if(data === undefined) { - throw new Error('Missing required parameter: "data"'); - } - - if(read === undefined) { - throw new Error('Missing required parameter: "read"'); - } - - if(write === undefined) { - throw new Error('Missing required parameter: "write"'); - } - - let path = '/database/collections/{collectionId}/documents/{documentId}'.replace(new RegExp('{collectionId}', 'g'), collectionId).replace(new RegExp('{documentId}', 'g'), documentId); - - let payload = {}; - - if(data) { - payload['data'] = data; - } - - if(read) { - payload['read'] = read; - } - - if(write) { - payload['write'] = write; - } - - return http - .patch(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Delete Document - * - * Delete document by its unique ID. This endpoint deletes only the parent - * documents, his attributes and relations to other documents. Child documents - * **will not** be deleted. - * - * @param {string} collectionId - * @param {string} documentId - * @throws {Error} - * @return {Promise} - */ - deleteDocument: function(collectionId, documentId) { - if(collectionId === undefined) { - throw new Error('Missing required parameter: "collectionId"'); - } - - if(documentId === undefined) { - throw new Error('Missing required parameter: "documentId"'); - } - - let path = '/database/collections/{collectionId}/documents/{documentId}'.replace(new RegExp('{collectionId}', 'g'), collectionId).replace(new RegExp('{documentId}', 'g'), documentId); - - let payload = {}; - - return http - .delete(path, { - 'content-type': 'application/json', - }, payload); - } - }; - - let functions = { - - /** - * List Functions - * - * - * @param {string} search - * @param {number} limit - * @param {number} offset - * @param {string} orderType - * @throws {Error} - * @return {Promise} - */ - list: function(search = '', limit = 25, offset = 0, orderType = 'ASC') { - let path = '/functions'; - - let payload = {}; - - if(search) { - payload['search'] = search; - } - - if(limit) { - payload['limit'] = limit; - } - - if(offset) { - payload['offset'] = offset; - } - - if(orderType) { - payload['orderType'] = orderType; - } - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Create Function - * - * - * @param {string} name - * @param {string} env - * @param {object} vars - * @param {string[]} events - * @param {string} schedule - * @param {number} timeout - * @throws {Error} - * @return {Promise} - */ - create: function(name, env, vars = [], events = [], schedule = '', timeout = 15) { - if(name === undefined) { - throw new Error('Missing required parameter: "name"'); - } - - if(env === undefined) { - throw new Error('Missing required parameter: "env"'); - } - - let path = '/functions'; - - let payload = {}; - - if(name) { - payload['name'] = name; - } - - if(env) { - payload['env'] = env; - } - - if(vars) { - payload['vars'] = vars; - } - - if(events) { - payload['events'] = events; - } - - if(schedule) { - payload['schedule'] = schedule; - } - - if(timeout) { - payload['timeout'] = timeout; - } - - return http - .post(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Get Function - * - * - * @param {string} functionId - * @throws {Error} - * @return {Promise} - */ - get: function(functionId) { - if(functionId === undefined) { - throw new Error('Missing required parameter: "functionId"'); - } - - let path = '/functions/{functionId}'.replace(new RegExp('{functionId}', 'g'), functionId); - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Update Function - * - * - * @param {string} functionId - * @param {string} name - * @param {object} vars - * @param {string[]} events - * @param {string} schedule - * @param {number} timeout - * @throws {Error} - * @return {Promise} - */ - update: function(functionId, name, vars = [], events = [], schedule = '', timeout = 15) { - if(functionId === undefined) { - throw new Error('Missing required parameter: "functionId"'); - } - - if(name === undefined) { - throw new Error('Missing required parameter: "name"'); - } - - let path = '/functions/{functionId}'.replace(new RegExp('{functionId}', 'g'), functionId); - - let payload = {}; - - if(name) { - payload['name'] = name; - } - - if(vars) { - payload['vars'] = vars; - } - - if(events) { - payload['events'] = events; - } - - if(schedule) { - payload['schedule'] = schedule; - } - - if(timeout) { - payload['timeout'] = timeout; - } - - return http - .put(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Delete Function - * - * - * @param {string} functionId - * @throws {Error} - * @return {Promise} - */ - delete: function(functionId) { - if(functionId === undefined) { - throw new Error('Missing required parameter: "functionId"'); - } - - let path = '/functions/{functionId}'.replace(new RegExp('{functionId}', 'g'), functionId); - - let payload = {}; - - return http - .delete(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * List Executions - * - * - * @param {string} functionId - * @param {string} search - * @param {number} limit - * @param {number} offset - * @param {string} orderType - * @throws {Error} - * @return {Promise} - */ - listExecutions: function(functionId, search = '', limit = 25, offset = 0, orderType = 'ASC') { - if(functionId === undefined) { - throw new Error('Missing required parameter: "functionId"'); - } - - let path = '/functions/{functionId}/executions'.replace(new RegExp('{functionId}', 'g'), functionId); - - let payload = {}; - - if(search) { - payload['search'] = search; - } - - if(limit) { - payload['limit'] = limit; - } - - if(offset) { - payload['offset'] = offset; - } - - if(orderType) { - payload['orderType'] = orderType; - } - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Create Execution - * - * - * @param {string} functionId - * @param {number} async - * @throws {Error} - * @return {Promise} - */ - createExecution: function(functionId, async = 1) { - if(functionId === undefined) { - throw new Error('Missing required parameter: "functionId"'); - } - - let path = '/functions/{functionId}/executions'.replace(new RegExp('{functionId}', 'g'), functionId); - - let payload = {}; - - if(async) { - payload['async'] = async; - } - - return http - .post(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Get Execution - * - * - * @param {string} functionId - * @param {string} executionId - * @throws {Error} - * @return {Promise} - */ - getExecution: function(functionId, executionId) { - if(functionId === undefined) { - throw new Error('Missing required parameter: "functionId"'); - } - - if(executionId === undefined) { - throw new Error('Missing required parameter: "executionId"'); - } - - let path = '/functions/{functionId}/executions/{executionId}'.replace(new RegExp('{functionId}', 'g'), functionId).replace(new RegExp('{executionId}', 'g'), executionId); - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Update Function Tag - * - * - * @param {string} functionId - * @param {string} tag - * @throws {Error} - * @return {Promise} - */ - updateTag: function(functionId, tag) { - if(functionId === undefined) { - throw new Error('Missing required parameter: "functionId"'); - } - - if(tag === undefined) { - throw new Error('Missing required parameter: "tag"'); - } - - let path = '/functions/{functionId}/tag'.replace(new RegExp('{functionId}', 'g'), functionId); - - let payload = {}; - - if(tag) { - payload['tag'] = tag; - } - - return http - .patch(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * List Tags - * - * - * @param {string} functionId - * @param {string} search - * @param {number} limit - * @param {number} offset - * @param {string} orderType - * @throws {Error} - * @return {Promise} - */ - listTags: function(functionId, search = '', limit = 25, offset = 0, orderType = 'ASC') { - if(functionId === undefined) { - throw new Error('Missing required parameter: "functionId"'); - } - - let path = '/functions/{functionId}/tags'.replace(new RegExp('{functionId}', 'g'), functionId); - - let payload = {}; - - if(search) { - payload['search'] = search; - } - - if(limit) { - payload['limit'] = limit; - } - - if(offset) { - payload['offset'] = offset; - } - - if(orderType) { - payload['orderType'] = orderType; - } - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Create Tag - * - * - * @param {string} functionId - * @param {string} command - * @param {File} code - * @throws {Error} - * @return {Promise} - */ - createTag: function(functionId, command, code) { - if(functionId === undefined) { - throw new Error('Missing required parameter: "functionId"'); - } - - if(command === undefined) { - throw new Error('Missing required parameter: "command"'); - } - - if(code === undefined) { - throw new Error('Missing required parameter: "code"'); - } - - let path = '/functions/{functionId}/tags'.replace(new RegExp('{functionId}', 'g'), functionId); - - let payload = {}; - - if(command) { - payload['command'] = command; - } - - if(code) { - payload['code'] = code; - } - - return http - .post(path, { - 'content-type': 'multipart/form-data', - }, payload); - }, - - /** - * Get Tag - * - * - * @param {string} functionId - * @param {string} tagId - * @throws {Error} - * @return {Promise} - */ - getTag: function(functionId, tagId) { - if(functionId === undefined) { - throw new Error('Missing required parameter: "functionId"'); - } - - if(tagId === undefined) { - throw new Error('Missing required parameter: "tagId"'); - } - - let path = '/functions/{functionId}/tags/{tagId}'.replace(new RegExp('{functionId}', 'g'), functionId).replace(new RegExp('{tagId}', 'g'), tagId); - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Delete Tag - * - * - * @param {string} functionId - * @param {string} tagId - * @throws {Error} - * @return {Promise} - */ - deleteTag: function(functionId, tagId) { - if(functionId === undefined) { - throw new Error('Missing required parameter: "functionId"'); - } - - if(tagId === undefined) { - throw new Error('Missing required parameter: "tagId"'); - } - - let path = '/functions/{functionId}/tags/{tagId}'.replace(new RegExp('{functionId}', 'g'), functionId).replace(new RegExp('{tagId}', 'g'), tagId); - - let payload = {}; - - return http - .delete(path, { - 'content-type': 'application/json', - }, payload); - } - }; - - let health = { - - /** - * Get HTTP - * - * Check the Appwrite HTTP server is up and responsive. - * - * @throws {Error} - * @return {Promise} - */ - get: function() { - let path = '/health'; - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Get Anti virus - * - * Check the Appwrite Anti Virus server is up and connection is successful. - * - * @throws {Error} - * @return {Promise} - */ - getAntiVirus: function() { - let path = '/health/anti-virus'; - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Get Cache - * - * Check the Appwrite in-memory cache server is up and connection is - * successful. - * - * @throws {Error} - * @return {Promise} - */ - getCache: function() { - let path = '/health/cache'; - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Get DB - * - * Check the Appwrite database server is up and connection is successful. - * - * @throws {Error} - * @return {Promise} - */ - getDB: function() { - let path = '/health/db'; - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Get Certificate Queue - * - * Get the number of certificates that are waiting to be issued against - * [Letsencrypt](https://letsencrypt.org/) in the Appwrite internal queue - * server. - * - * @throws {Error} - * @return {Promise} - */ - getQueueCertificates: function() { - let path = '/health/queue/certificates'; - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Get Functions Queue - * - * - * @throws {Error} - * @return {Promise} - */ - getQueueFunctions: function() { - let path = '/health/queue/functions'; - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Get Logs Queue - * - * Get the number of logs that are waiting to be processed in the Appwrite - * internal queue server. - * - * @throws {Error} - * @return {Promise} - */ - getQueueLogs: function() { - let path = '/health/queue/logs'; - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Get Tasks Queue - * - * Get the number of tasks that are waiting to be processed in the Appwrite - * internal queue server. - * - * @throws {Error} - * @return {Promise} - */ - getQueueTasks: function() { - let path = '/health/queue/tasks'; - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Get Usage Queue - * - * Get the number of usage stats that are waiting to be processed in the - * Appwrite internal queue server. - * - * @throws {Error} - * @return {Promise} - */ - getQueueUsage: function() { - let path = '/health/queue/usage'; - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Get Webhooks Queue - * - * Get the number of webhooks that are waiting to be processed in the Appwrite - * internal queue server. - * - * @throws {Error} - * @return {Promise} - */ - getQueueWebhooks: function() { - let path = '/health/queue/webhooks'; - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Get Local Storage - * - * Check the Appwrite local storage device is up and connection is successful. - * - * @throws {Error} - * @return {Promise} - */ - getStorageLocal: function() { - let path = '/health/storage/local'; - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Get Time - * - * Check the Appwrite server time is synced with Google remote NTP server. We - * use this technology to smoothly handle leap seconds with no disruptive - * events. The [Network Time - * Protocol](https://en.wikipedia.org/wiki/Network_Time_Protocol) (NTP) is - * 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. - * - * @throws {Error} - * @return {Promise} - */ - getTime: function() { - let path = '/health/time'; - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - } - }; - - let locale = { - - /** - * Get User Locale - * - * Get the current user location based on IP. Returns an object with user - * country code, country name, continent name, continent code, ip address and - * suggested currency. You can use the locale header to get the data in a - * supported language. - * - * ([IP Geolocation by DB-IP](https://db-ip.com)) - * - * @throws {Error} - * @return {Promise} - */ - get: function() { - let path = '/locale'; - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * List Continents - * - * List of all continents. You can use the locale header to get the data in a - * supported language. - * - * @throws {Error} - * @return {Promise} - */ - getContinents: function() { - let path = '/locale/continents'; - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * List Countries - * - * List of all countries. You can use the locale header to get the data in a - * supported language. - * - * @throws {Error} - * @return {Promise} - */ - getCountries: function() { - let path = '/locale/countries'; - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * 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. - * - * @throws {Error} - * @return {Promise} - */ - getCountriesEU: function() { - let path = '/locale/countries/eu'; - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * List Countries Phone Codes - * - * List of all countries phone codes. You can use the locale header to get the - * data in a supported language. - * - * @throws {Error} - * @return {Promise} - */ - getCountriesPhones: function() { - let path = '/locale/countries/phones'; - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * 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. - * - * @throws {Error} - * @return {Promise} - */ - getCurrencies: function() { - let path = '/locale/currencies'; - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * List Languages - * - * List of all languages classified by ISO 639-1 including 2-letter code, name - * in English, and name in the respective language. - * - * @throws {Error} - * @return {Promise} - */ - getLanguages: function() { - let path = '/locale/languages'; - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - } - }; - - let projects = { - - /** - * List Projects - * - * - * @param {string} search - * @param {number} limit - * @param {number} offset - * @param {string} orderType - * @throws {Error} - * @return {Promise} - */ - list: function(search = '', limit = 25, offset = 0, orderType = 'ASC') { - let path = '/projects'; - - let payload = {}; - - if(search) { - payload['search'] = search; - } - - if(limit) { - payload['limit'] = limit; - } - - if(offset) { - payload['offset'] = offset; - } - - if(orderType) { - payload['orderType'] = orderType; - } - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Create Project - * - * - * @param {string} name - * @param {string} teamId - * @param {string} description - * @param {string} logo - * @param {string} url - * @param {string} legalName - * @param {string} legalCountry - * @param {string} legalState - * @param {string} legalCity - * @param {string} legalAddress - * @param {string} legalTaxId - * @throws {Error} - * @return {Promise} - */ - create: function(name, teamId, description = '', logo = '', url = '', legalName = '', legalCountry = '', legalState = '', legalCity = '', legalAddress = '', legalTaxId = '') { - if(name === undefined) { - throw new Error('Missing required parameter: "name"'); - } - - if(teamId === undefined) { - throw new Error('Missing required parameter: "teamId"'); - } - - let path = '/projects'; - - let payload = {}; - - if(name) { - payload['name'] = name; - } - - if(teamId) { - payload['teamId'] = teamId; - } - - if(description) { - payload['description'] = description; - } - - if(logo) { - payload['logo'] = logo; - } - - if(url) { - payload['url'] = url; - } - - if(legalName) { - payload['legalName'] = legalName; - } - - if(legalCountry) { - payload['legalCountry'] = legalCountry; - } - - if(legalState) { - payload['legalState'] = legalState; - } - - if(legalCity) { - payload['legalCity'] = legalCity; - } - - if(legalAddress) { - payload['legalAddress'] = legalAddress; - } - - if(legalTaxId) { - payload['legalTaxId'] = legalTaxId; - } - - return http - .post(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Get Project - * - * - * @param {string} projectId - * @throws {Error} - * @return {Promise} - */ - get: function(projectId) { - if(projectId === undefined) { - throw new Error('Missing required parameter: "projectId"'); - } - - let path = '/projects/{projectId}'.replace(new RegExp('{projectId}', 'g'), projectId); - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Update Project - * - * - * @param {string} projectId - * @param {string} name - * @param {string} description - * @param {string} logo - * @param {string} url - * @param {string} legalName - * @param {string} legalCountry - * @param {string} legalState - * @param {string} legalCity - * @param {string} legalAddress - * @param {string} legalTaxId - * @throws {Error} - * @return {Promise} - */ - update: function(projectId, name, description = '', logo = '', url = '', legalName = '', legalCountry = '', legalState = '', legalCity = '', legalAddress = '', legalTaxId = '') { - if(projectId === undefined) { - throw new Error('Missing required parameter: "projectId"'); - } - - if(name === undefined) { - throw new Error('Missing required parameter: "name"'); - } - - let path = '/projects/{projectId}'.replace(new RegExp('{projectId}', 'g'), projectId); - - let payload = {}; - - if(name) { - payload['name'] = name; - } - - if(description) { - payload['description'] = description; - } - - if(logo) { - payload['logo'] = logo; - } - - if(url) { - payload['url'] = url; - } - - if(legalName) { - payload['legalName'] = legalName; - } - - if(legalCountry) { - payload['legalCountry'] = legalCountry; - } - - if(legalState) { - payload['legalState'] = legalState; - } - - if(legalCity) { - payload['legalCity'] = legalCity; - } - - if(legalAddress) { - payload['legalAddress'] = legalAddress; - } - - if(legalTaxId) { - payload['legalTaxId'] = legalTaxId; - } - - return http - .patch(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Delete Project - * - * - * @param {string} projectId - * @param {string} password - * @throws {Error} - * @return {Promise} - */ - delete: function(projectId, password) { - if(projectId === undefined) { - throw new Error('Missing required parameter: "projectId"'); - } - - if(password === undefined) { - throw new Error('Missing required parameter: "password"'); - } - - let path = '/projects/{projectId}'.replace(new RegExp('{projectId}', 'g'), projectId); - - let payload = {}; - - if(password) { - payload['password'] = password; - } - - return http - .delete(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * List Domains - * - * - * @param {string} projectId - * @throws {Error} - * @return {Promise} - */ - listDomains: function(projectId) { - if(projectId === undefined) { - throw new Error('Missing required parameter: "projectId"'); - } - - let path = '/projects/{projectId}/domains'.replace(new RegExp('{projectId}', 'g'), projectId); - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Create Domain - * - * - * @param {string} projectId - * @param {string} domain - * @throws {Error} - * @return {Promise} - */ - createDomain: function(projectId, domain) { - if(projectId === undefined) { - throw new Error('Missing required parameter: "projectId"'); - } - - if(domain === undefined) { - throw new Error('Missing required parameter: "domain"'); - } - - let path = '/projects/{projectId}/domains'.replace(new RegExp('{projectId}', 'g'), projectId); - - let payload = {}; - - if(domain) { - payload['domain'] = domain; - } - - return http - .post(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Get Domain - * - * - * @param {string} projectId - * @param {string} domainId - * @throws {Error} - * @return {Promise} - */ - getDomain: function(projectId, domainId) { - if(projectId === undefined) { - throw new Error('Missing required parameter: "projectId"'); - } - - if(domainId === undefined) { - throw new Error('Missing required parameter: "domainId"'); - } - - let path = '/projects/{projectId}/domains/{domainId}'.replace(new RegExp('{projectId}', 'g'), projectId).replace(new RegExp('{domainId}', 'g'), domainId); - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Delete Domain - * - * - * @param {string} projectId - * @param {string} domainId - * @throws {Error} - * @return {Promise} - */ - deleteDomain: function(projectId, domainId) { - if(projectId === undefined) { - throw new Error('Missing required parameter: "projectId"'); - } - - if(domainId === undefined) { - throw new Error('Missing required parameter: "domainId"'); - } - - let path = '/projects/{projectId}/domains/{domainId}'.replace(new RegExp('{projectId}', 'g'), projectId).replace(new RegExp('{domainId}', 'g'), domainId); - - let payload = {}; - - return http - .delete(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Update Domain Verification Status - * - * - * @param {string} projectId - * @param {string} domainId - * @throws {Error} - * @return {Promise} - */ - updateDomainVerification: function(projectId, domainId) { - if(projectId === undefined) { - throw new Error('Missing required parameter: "projectId"'); - } - - if(domainId === undefined) { - throw new Error('Missing required parameter: "domainId"'); - } - - let path = '/projects/{projectId}/domains/{domainId}/verification'.replace(new RegExp('{projectId}', 'g'), projectId).replace(new RegExp('{domainId}', 'g'), domainId); - - let payload = {}; - - return http - .patch(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * List Keys - * - * - * @param {string} projectId - * @throws {Error} - * @return {Promise} - */ - listKeys: function(projectId) { - if(projectId === undefined) { - throw new Error('Missing required parameter: "projectId"'); - } - - let path = '/projects/{projectId}/keys'.replace(new RegExp('{projectId}', 'g'), projectId); - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Create Key - * - * - * @param {string} projectId - * @param {string} name - * @param {string[]} scopes - * @throws {Error} - * @return {Promise} - */ - createKey: function(projectId, name, scopes) { - if(projectId === undefined) { - throw new Error('Missing required parameter: "projectId"'); - } - - if(name === undefined) { - throw new Error('Missing required parameter: "name"'); - } - - if(scopes === undefined) { - throw new Error('Missing required parameter: "scopes"'); - } - - let path = '/projects/{projectId}/keys'.replace(new RegExp('{projectId}', 'g'), projectId); - - let payload = {}; - - if(name) { - payload['name'] = name; - } - - if(scopes) { - payload['scopes'] = scopes; - } - - return http - .post(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Get Key - * - * - * @param {string} projectId - * @param {string} keyId - * @throws {Error} - * @return {Promise} - */ - getKey: function(projectId, keyId) { - if(projectId === undefined) { - throw new Error('Missing required parameter: "projectId"'); - } - - if(keyId === undefined) { - throw new Error('Missing required parameter: "keyId"'); - } - - let path = '/projects/{projectId}/keys/{keyId}'.replace(new RegExp('{projectId}', 'g'), projectId).replace(new RegExp('{keyId}', 'g'), keyId); - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Update Key - * - * - * @param {string} projectId - * @param {string} keyId - * @param {string} name - * @param {string[]} scopes - * @throws {Error} - * @return {Promise} - */ - updateKey: function(projectId, keyId, name, scopes) { - if(projectId === undefined) { - throw new Error('Missing required parameter: "projectId"'); - } - - if(keyId === undefined) { - throw new Error('Missing required parameter: "keyId"'); - } - - if(name === undefined) { - throw new Error('Missing required parameter: "name"'); - } - - if(scopes === undefined) { - throw new Error('Missing required parameter: "scopes"'); - } - - let path = '/projects/{projectId}/keys/{keyId}'.replace(new RegExp('{projectId}', 'g'), projectId).replace(new RegExp('{keyId}', 'g'), keyId); - - let payload = {}; - - if(name) { - payload['name'] = name; - } - - if(scopes) { - payload['scopes'] = scopes; - } - - return http - .put(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Delete Key - * - * - * @param {string} projectId - * @param {string} keyId - * @throws {Error} - * @return {Promise} - */ - deleteKey: function(projectId, keyId) { - if(projectId === undefined) { - throw new Error('Missing required parameter: "projectId"'); - } - - if(keyId === undefined) { - throw new Error('Missing required parameter: "keyId"'); - } - - let path = '/projects/{projectId}/keys/{keyId}'.replace(new RegExp('{projectId}', 'g'), projectId).replace(new RegExp('{keyId}', 'g'), keyId); - - let payload = {}; - - return http - .delete(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Update Project OAuth2 - * - * - * @param {string} projectId - * @param {string} provider - * @param {string} appId - * @param {string} secret - * @throws {Error} - * @return {Promise} - */ - updateOAuth2: function(projectId, provider, appId = '', secret = '') { - if(projectId === undefined) { - throw new Error('Missing required parameter: "projectId"'); - } - - if(provider === undefined) { - throw new Error('Missing required parameter: "provider"'); - } - - let path = '/projects/{projectId}/oauth2'.replace(new RegExp('{projectId}', 'g'), projectId); - - let payload = {}; - - if(provider) { - payload['provider'] = provider; - } - - if(appId) { - payload['appId'] = appId; - } - - if(secret) { - payload['secret'] = secret; - } - - return http - .patch(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * List Platforms - * - * - * @param {string} projectId - * @throws {Error} - * @return {Promise} - */ - listPlatforms: function(projectId) { - if(projectId === undefined) { - throw new Error('Missing required parameter: "projectId"'); - } - - let path = '/projects/{projectId}/platforms'.replace(new RegExp('{projectId}', 'g'), projectId); - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Create Platform - * - * - * @param {string} projectId - * @param {string} type - * @param {string} name - * @param {string} key - * @param {string} store - * @param {string} hostname - * @throws {Error} - * @return {Promise} - */ - createPlatform: function(projectId, type, name, key = '', store = '', hostname = '') { - if(projectId === undefined) { - throw new Error('Missing required parameter: "projectId"'); - } - - if(type === undefined) { - throw new Error('Missing required parameter: "type"'); - } - - if(name === undefined) { - throw new Error('Missing required parameter: "name"'); - } - - let path = '/projects/{projectId}/platforms'.replace(new RegExp('{projectId}', 'g'), projectId); - - let payload = {}; - - if(type) { - payload['type'] = type; - } - - if(name) { - payload['name'] = name; - } - - if(key) { - payload['key'] = key; - } - - if(store) { - payload['store'] = store; - } - - if(hostname) { - payload['hostname'] = hostname; - } - - return http - .post(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Get Platform - * - * - * @param {string} projectId - * @param {string} platformId - * @throws {Error} - * @return {Promise} - */ - getPlatform: function(projectId, platformId) { - if(projectId === undefined) { - throw new Error('Missing required parameter: "projectId"'); - } - - if(platformId === undefined) { - throw new Error('Missing required parameter: "platformId"'); - } - - let path = '/projects/{projectId}/platforms/{platformId}'.replace(new RegExp('{projectId}', 'g'), projectId).replace(new RegExp('{platformId}', 'g'), platformId); - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Update Platform - * - * - * @param {string} projectId - * @param {string} platformId - * @param {string} name - * @param {string} key - * @param {string} store - * @param {string} hostname - * @throws {Error} - * @return {Promise} - */ - updatePlatform: function(projectId, platformId, name, key = '', store = '', hostname = '') { - if(projectId === undefined) { - throw new Error('Missing required parameter: "projectId"'); - } - - if(platformId === undefined) { - throw new Error('Missing required parameter: "platformId"'); - } - - if(name === undefined) { - throw new Error('Missing required parameter: "name"'); - } - - let path = '/projects/{projectId}/platforms/{platformId}'.replace(new RegExp('{projectId}', 'g'), projectId).replace(new RegExp('{platformId}', 'g'), platformId); - - let payload = {}; - - if(name) { - payload['name'] = name; - } - - if(key) { - payload['key'] = key; - } - - if(store) { - payload['store'] = store; - } - - if(hostname) { - payload['hostname'] = hostname; - } - - return http - .put(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Delete Platform - * - * - * @param {string} projectId - * @param {string} platformId - * @throws {Error} - * @return {Promise} - */ - deletePlatform: function(projectId, platformId) { - if(projectId === undefined) { - throw new Error('Missing required parameter: "projectId"'); - } - - if(platformId === undefined) { - throw new Error('Missing required parameter: "platformId"'); - } - - let path = '/projects/{projectId}/platforms/{platformId}'.replace(new RegExp('{projectId}', 'g'), projectId).replace(new RegExp('{platformId}', 'g'), platformId); - - let payload = {}; - - return http - .delete(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * List Tasks - * - * - * @param {string} projectId - * @throws {Error} - * @return {Promise} - */ - listTasks: function(projectId) { - if(projectId === undefined) { - throw new Error('Missing required parameter: "projectId"'); - } - - let path = '/projects/{projectId}/tasks'.replace(new RegExp('{projectId}', 'g'), projectId); - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Create Task - * - * - * @param {string} projectId - * @param {string} name - * @param {string} status - * @param {string} schedule - * @param {boolean} security - * @param {string} httpMethod - * @param {string} httpUrl - * @param {string[]} httpHeaders - * @param {string} httpUser - * @param {string} httpPass - * @throws {Error} - * @return {Promise} - */ - createTask: function(projectId, name, status, schedule, security, httpMethod, httpUrl, httpHeaders = [], httpUser = '', httpPass = '') { - if(projectId === undefined) { - throw new Error('Missing required parameter: "projectId"'); - } - - if(name === undefined) { - throw new Error('Missing required parameter: "name"'); - } - - if(status === undefined) { - throw new Error('Missing required parameter: "status"'); - } - - if(schedule === undefined) { - throw new Error('Missing required parameter: "schedule"'); - } - - if(security === undefined) { - throw new Error('Missing required parameter: "security"'); - } - - if(httpMethod === undefined) { - throw new Error('Missing required parameter: "httpMethod"'); - } - - if(httpUrl === undefined) { - throw new Error('Missing required parameter: "httpUrl"'); - } - - let path = '/projects/{projectId}/tasks'.replace(new RegExp('{projectId}', 'g'), projectId); - - let payload = {}; - - if(name) { - payload['name'] = name; - } - - if(status) { - payload['status'] = status; - } - - if(schedule) { - payload['schedule'] = schedule; - } - - if(security) { - payload['security'] = security; - } - - if(httpMethod) { - payload['httpMethod'] = httpMethod; - } - - if(httpUrl) { - payload['httpUrl'] = httpUrl; - } - - if(httpHeaders) { - payload['httpHeaders'] = httpHeaders; - } - - if(httpUser) { - payload['httpUser'] = httpUser; - } - - if(httpPass) { - payload['httpPass'] = httpPass; - } - - return http - .post(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Get Task - * - * - * @param {string} projectId - * @param {string} taskId - * @throws {Error} - * @return {Promise} - */ - getTask: function(projectId, taskId) { - if(projectId === undefined) { - throw new Error('Missing required parameter: "projectId"'); - } - - if(taskId === undefined) { - throw new Error('Missing required parameter: "taskId"'); - } - - let path = '/projects/{projectId}/tasks/{taskId}'.replace(new RegExp('{projectId}', 'g'), projectId).replace(new RegExp('{taskId}', 'g'), taskId); - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Update Task - * - * - * @param {string} projectId - * @param {string} taskId - * @param {string} name - * @param {string} status - * @param {string} schedule - * @param {boolean} security - * @param {string} httpMethod - * @param {string} httpUrl - * @param {string[]} httpHeaders - * @param {string} httpUser - * @param {string} httpPass - * @throws {Error} - * @return {Promise} - */ - updateTask: function(projectId, taskId, name, status, schedule, security, httpMethod, httpUrl, httpHeaders = [], httpUser = '', httpPass = '') { - if(projectId === undefined) { - throw new Error('Missing required parameter: "projectId"'); - } - - if(taskId === undefined) { - throw new Error('Missing required parameter: "taskId"'); - } - - if(name === undefined) { - throw new Error('Missing required parameter: "name"'); - } - - if(status === undefined) { - throw new Error('Missing required parameter: "status"'); - } - - if(schedule === undefined) { - throw new Error('Missing required parameter: "schedule"'); - } - - if(security === undefined) { - throw new Error('Missing required parameter: "security"'); - } - - if(httpMethod === undefined) { - throw new Error('Missing required parameter: "httpMethod"'); - } - - if(httpUrl === undefined) { - throw new Error('Missing required parameter: "httpUrl"'); - } - - let path = '/projects/{projectId}/tasks/{taskId}'.replace(new RegExp('{projectId}', 'g'), projectId).replace(new RegExp('{taskId}', 'g'), taskId); - - let payload = {}; - - if(name) { - payload['name'] = name; - } - - if(status) { - payload['status'] = status; - } - - if(schedule) { - payload['schedule'] = schedule; - } - - if(security) { - payload['security'] = security; - } - - if(httpMethod) { - payload['httpMethod'] = httpMethod; - } - - if(httpUrl) { - payload['httpUrl'] = httpUrl; - } - - if(httpHeaders) { - payload['httpHeaders'] = httpHeaders; - } - - if(httpUser) { - payload['httpUser'] = httpUser; - } - - if(httpPass) { - payload['httpPass'] = httpPass; - } - - return http - .put(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Delete Task - * - * - * @param {string} projectId - * @param {string} taskId - * @throws {Error} - * @return {Promise} - */ - deleteTask: function(projectId, taskId) { - if(projectId === undefined) { - throw new Error('Missing required parameter: "projectId"'); - } - - if(taskId === undefined) { - throw new Error('Missing required parameter: "taskId"'); - } - - let path = '/projects/{projectId}/tasks/{taskId}'.replace(new RegExp('{projectId}', 'g'), projectId).replace(new RegExp('{taskId}', 'g'), taskId); - - let payload = {}; - - return http - .delete(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Get Project - * - * - * @param {string} projectId - * @param {string} range - * @throws {Error} - * @return {Promise} - */ - getUsage: function(projectId, range = 'last30') { - if(projectId === undefined) { - throw new Error('Missing required parameter: "projectId"'); - } - - let path = '/projects/{projectId}/usage'.replace(new RegExp('{projectId}', 'g'), projectId); - - let payload = {}; - - if(range) { - payload['range'] = range; - } - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * List Webhooks - * - * - * @param {string} projectId - * @throws {Error} - * @return {Promise} - */ - listWebhooks: function(projectId) { - if(projectId === undefined) { - throw new Error('Missing required parameter: "projectId"'); - } - - let path = '/projects/{projectId}/webhooks'.replace(new RegExp('{projectId}', 'g'), projectId); - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Create Webhook - * - * - * @param {string} projectId - * @param {string} name - * @param {string[]} events - * @param {string} url - * @param {boolean} security - * @param {string} httpUser - * @param {string} httpPass - * @throws {Error} - * @return {Promise} - */ - createWebhook: function(projectId, name, events, url, security, httpUser = '', httpPass = '') { - if(projectId === undefined) { - throw new Error('Missing required parameter: "projectId"'); - } - - if(name === undefined) { - throw new Error('Missing required parameter: "name"'); - } - - if(events === undefined) { - throw new Error('Missing required parameter: "events"'); - } - - if(url === undefined) { - throw new Error('Missing required parameter: "url"'); - } - - if(security === undefined) { - throw new Error('Missing required parameter: "security"'); - } - - let path = '/projects/{projectId}/webhooks'.replace(new RegExp('{projectId}', 'g'), projectId); - - let payload = {}; - - if(name) { - payload['name'] = name; - } - - if(events) { - payload['events'] = events; - } - - if(url) { - payload['url'] = url; - } - - if(security) { - payload['security'] = security; - } - - if(httpUser) { - payload['httpUser'] = httpUser; - } - - if(httpPass) { - payload['httpPass'] = httpPass; - } - - return http - .post(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Get Webhook - * - * - * @param {string} projectId - * @param {string} webhookId - * @throws {Error} - * @return {Promise} - */ - getWebhook: function(projectId, webhookId) { - if(projectId === undefined) { - throw new Error('Missing required parameter: "projectId"'); - } - - if(webhookId === undefined) { - throw new Error('Missing required parameter: "webhookId"'); - } - - let path = '/projects/{projectId}/webhooks/{webhookId}'.replace(new RegExp('{projectId}', 'g'), projectId).replace(new RegExp('{webhookId}', 'g'), webhookId); - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Update Webhook - * - * - * @param {string} projectId - * @param {string} webhookId - * @param {string} name - * @param {string[]} events - * @param {string} url - * @param {boolean} security - * @param {string} httpUser - * @param {string} httpPass - * @throws {Error} - * @return {Promise} - */ - updateWebhook: function(projectId, webhookId, name, events, url, security, httpUser = '', httpPass = '') { - if(projectId === undefined) { - throw new Error('Missing required parameter: "projectId"'); - } - - if(webhookId === undefined) { - throw new Error('Missing required parameter: "webhookId"'); - } - - if(name === undefined) { - throw new Error('Missing required parameter: "name"'); - } - - if(events === undefined) { - throw new Error('Missing required parameter: "events"'); - } - - if(url === undefined) { - throw new Error('Missing required parameter: "url"'); - } - - if(security === undefined) { - throw new Error('Missing required parameter: "security"'); - } - - let path = '/projects/{projectId}/webhooks/{webhookId}'.replace(new RegExp('{projectId}', 'g'), projectId).replace(new RegExp('{webhookId}', 'g'), webhookId); - - let payload = {}; - - if(name) { - payload['name'] = name; - } - - if(events) { - payload['events'] = events; - } - - if(url) { - payload['url'] = url; - } - - if(security) { - payload['security'] = security; - } - - if(httpUser) { - payload['httpUser'] = httpUser; - } - - if(httpPass) { - payload['httpPass'] = httpPass; - } - - return http - .put(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Delete Webhook - * - * - * @param {string} projectId - * @param {string} webhookId - * @throws {Error} - * @return {Promise} - */ - deleteWebhook: function(projectId, webhookId) { - if(projectId === undefined) { - throw new Error('Missing required parameter: "projectId"'); - } - - if(webhookId === undefined) { - throw new Error('Missing required parameter: "webhookId"'); - } - - let path = '/projects/{projectId}/webhooks/{webhookId}'.replace(new RegExp('{projectId}', 'g'), projectId).replace(new RegExp('{webhookId}', 'g'), webhookId); - - let payload = {}; - - return http - .delete(path, { - 'content-type': 'application/json', - }, payload); - } - }; - - let storage = { - - /** - * List Files - * - * Get a list of all the user files. You can use the query params to filter - * your results. On admin mode, this endpoint will return a list of all of the - * project files. [Learn more about different API modes](/docs/admin). - * - * @param {string} search - * @param {number} limit - * @param {number} offset - * @param {string} orderType - * @throws {Error} - * @return {Promise} - */ - listFiles: function(search = '', limit = 25, offset = 0, orderType = 'ASC') { - let path = '/storage/files'; - - let payload = {}; - - if(search) { - payload['search'] = search; - } - - if(limit) { - payload['limit'] = limit; - } - - if(offset) { - payload['offset'] = offset; - } - - if(orderType) { - payload['orderType'] = orderType; - } - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Create File - * - * Create a new file. The user who creates the file will automatically be - * assigned to read and write access unless he has passed custom values for - * read and write arguments. - * - * @param {File} file - * @param {string[]} read - * @param {string[]} write - * @throws {Error} - * @return {Promise} - */ - createFile: function(file, read, write) { - if(file === undefined) { - throw new Error('Missing required parameter: "file"'); - } - - if(read === undefined) { - throw new Error('Missing required parameter: "read"'); - } - - if(write === undefined) { - throw new Error('Missing required parameter: "write"'); - } - - let path = '/storage/files'; - - let payload = {}; - - if(file) { - payload['file'] = file; - } - - if(read) { - payload['read'] = read; - } - - if(write) { - payload['write'] = write; - } - - return http - .post(path, { - 'content-type': 'multipart/form-data', - }, payload); - }, - - /** - * Get File - * - * Get file by its unique ID. This endpoint response returns a JSON object - * with the file metadata. - * - * @param {string} fileId - * @throws {Error} - * @return {Promise} - */ - getFile: function(fileId) { - if(fileId === undefined) { - throw new Error('Missing required parameter: "fileId"'); - } - - let path = '/storage/files/{fileId}'.replace(new RegExp('{fileId}', 'g'), fileId); - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Update File - * - * Update file by its unique ID. Only users with write permissions have access - * to update this resource. - * - * @param {string} fileId - * @param {string[]} read - * @param {string[]} write - * @throws {Error} - * @return {Promise} - */ - updateFile: function(fileId, read, write) { - if(fileId === undefined) { - throw new Error('Missing required parameter: "fileId"'); - } - - if(read === undefined) { - throw new Error('Missing required parameter: "read"'); - } - - if(write === undefined) { - throw new Error('Missing required parameter: "write"'); - } - - let path = '/storage/files/{fileId}'.replace(new RegExp('{fileId}', 'g'), fileId); - - let payload = {}; - - if(read) { - payload['read'] = read; - } - - if(write) { - payload['write'] = write; - } - - return http - .put(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Delete File - * - * Delete a file by its unique ID. Only users with write permissions have - * access to delete this resource. - * - * @param {string} fileId - * @throws {Error} - * @return {Promise} - */ - deleteFile: function(fileId) { - if(fileId === undefined) { - throw new Error('Missing required parameter: "fileId"'); - } - - let path = '/storage/files/{fileId}'.replace(new RegExp('{fileId}', 'g'), fileId); - - let payload = {}; - - return http - .delete(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Get File for Download - * - * Get 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. - * - * @param {string} fileId - * @throws {Error} - * @return {string} - */ - getFileDownload: function(fileId) { - if(fileId === undefined) { - throw new Error('Missing required parameter: "fileId"'); - } - - let path = '/storage/files/{fileId}/download'.replace(new RegExp('{fileId}', 'g'), fileId); - - let payload = {}; - - payload['project'] = config.project; - - payload['key'] = config.key; - - - let query = []; - - for (let p in payload) { - if(Array.isArray(payload[p])) { - for (let index = 0; index < payload[p].length; index++) { - let param = payload[p][index]; - query.push(encodeURIComponent(p + '[]') + "=" + encodeURIComponent(param)); - } - } - else { - query.push(encodeURIComponent(p) + "=" + encodeURIComponent(payload[p])); - } - } - - query = query.join("&"); - - return config.endpoint + path + ((query) ? '?' + query : ''); - }, - - /** - * Get File Preview - * - * Get a file preview image. Currently, this method supports preview for image - * files (jpg, png, and gif), other supported formats, like pdf, docs, slides, - * and spreadsheets, will return the file icon image. You can also pass query - * string arguments for cutting and resizing your preview image. - * - * @param {string} fileId - * @param {number} width - * @param {number} height - * @param {number} quality - * @param {string} background - * @param {string} output - * @throws {Error} - * @return {string} - */ - getFilePreview: function(fileId, width = 0, height = 0, quality = 100, background = '', output = '') { - if(fileId === undefined) { - throw new Error('Missing required parameter: "fileId"'); - } - - let path = '/storage/files/{fileId}/preview'.replace(new RegExp('{fileId}', 'g'), fileId); - - let payload = {}; - - if(width) { - payload['width'] = width; - } - - if(height) { - payload['height'] = height; - } - - if(quality) { - payload['quality'] = quality; - } - - if(background) { - payload['background'] = background; - } - - if(output) { - payload['output'] = output; - } - - payload['project'] = config.project; - - payload['key'] = config.key; - - - let query = []; - - for (let p in payload) { - if(Array.isArray(payload[p])) { - for (let index = 0; index < payload[p].length; index++) { - let param = payload[p][index]; - query.push(encodeURIComponent(p + '[]') + "=" + encodeURIComponent(param)); - } - } - else { - query.push(encodeURIComponent(p) + "=" + encodeURIComponent(payload[p])); - } - } - - query = query.join("&"); - - return config.endpoint + path + ((query) ? '?' + query : ''); - }, - - /** - * Get File for View - * - * Get file content by its unique ID. This endpoint is similar to the download - * method but returns with no 'Content-Disposition: attachment' header. - * - * @param {string} fileId - * @param {string} as - * @throws {Error} - * @return {string} - */ - getFileView: function(fileId, as = '') { - if(fileId === undefined) { - throw new Error('Missing required parameter: "fileId"'); - } - - let path = '/storage/files/{fileId}/view'.replace(new RegExp('{fileId}', 'g'), fileId); - - let payload = {}; - - if(as) { - payload['as'] = as; - } - - payload['project'] = config.project; - - payload['key'] = config.key; - - - let query = []; - - for (let p in payload) { - if(Array.isArray(payload[p])) { - for (let index = 0; index < payload[p].length; index++) { - let param = payload[p][index]; - query.push(encodeURIComponent(p + '[]') + "=" + encodeURIComponent(param)); - } - } - else { - query.push(encodeURIComponent(p) + "=" + encodeURIComponent(payload[p])); - } - } - - query = query.join("&"); - - return config.endpoint + path + ((query) ? '?' + query : ''); - } - }; - - let teams = { - - /** - * List Teams - * - * Get a list of all the current user teams. You can use the query params to - * filter your results. On admin mode, this endpoint will return a list of all - * of the project teams. [Learn more about different API modes](/docs/admin). - * - * @param {string} search - * @param {number} limit - * @param {number} offset - * @param {string} orderType - * @throws {Error} - * @return {Promise} - */ - list: function(search = '', limit = 25, offset = 0, orderType = 'ASC') { - let path = '/teams'; - - let payload = {}; - - if(search) { - payload['search'] = search; - } - - if(limit) { - payload['limit'] = limit; - } - - if(offset) { - payload['offset'] = offset; - } - - if(orderType) { - payload['orderType'] = orderType; - } - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Create Team - * - * Create a new team. The user who creates the team will automatically be - * assigned as the owner of the team. The team owner can invite new members, - * who will be able add new owners and update or delete the team from your - * project. - * - * @param {string} name - * @param {string[]} roles - * @throws {Error} - * @return {Promise} - */ - create: function(name, roles = ["owner"]) { - if(name === undefined) { - throw new Error('Missing required parameter: "name"'); - } - - let path = '/teams'; - - let payload = {}; - - if(name) { - payload['name'] = name; - } - - if(roles) { - payload['roles'] = roles; - } - - return http - .post(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Get Team - * - * Get team by its unique ID. All team members have read access for this - * resource. - * - * @param {string} teamId - * @throws {Error} - * @return {Promise} - */ - get: function(teamId) { - if(teamId === undefined) { - throw new Error('Missing required parameter: "teamId"'); - } - - let path = '/teams/{teamId}'.replace(new RegExp('{teamId}', 'g'), teamId); - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Update Team - * - * Update team by its unique ID. Only team owners have write access for this - * resource. - * - * @param {string} teamId - * @param {string} name - * @throws {Error} - * @return {Promise} - */ - update: function(teamId, name) { - if(teamId === undefined) { - throw new Error('Missing required parameter: "teamId"'); - } - - if(name === undefined) { - throw new Error('Missing required parameter: "name"'); - } - - let path = '/teams/{teamId}'.replace(new RegExp('{teamId}', 'g'), teamId); - - let payload = {}; - - if(name) { - payload['name'] = name; - } - - return http - .put(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Delete Team - * - * Delete team by its unique ID. Only team owners have write access for this - * resource. - * - * @param {string} teamId - * @throws {Error} - * @return {Promise} - */ - delete: function(teamId) { - if(teamId === undefined) { - throw new Error('Missing required parameter: "teamId"'); - } - - let path = '/teams/{teamId}'.replace(new RegExp('{teamId}', 'g'), teamId); - - let payload = {}; - - return http - .delete(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Get Team Memberships - * - * Get team members by the team unique ID. All team members have read access - * for this list of resources. - * - * @param {string} teamId - * @param {string} search - * @param {number} limit - * @param {number} offset - * @param {string} orderType - * @throws {Error} - * @return {Promise} - */ - getMemberships: function(teamId, search = '', limit = 25, offset = 0, orderType = 'ASC') { - if(teamId === undefined) { - throw new Error('Missing required parameter: "teamId"'); - } - - let path = '/teams/{teamId}/memberships'.replace(new RegExp('{teamId}', 'g'), teamId); - - let payload = {}; - - if(search) { - payload['search'] = search; - } - - if(limit) { - payload['limit'] = limit; - } - - if(offset) { - payload['offset'] = offset; - } - - if(orderType) { - payload['orderType'] = orderType; - } - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Create Team Membership - * - * Use this endpoint to invite a new member to join your team. An email with a - * link to join the team will be sent to the new member email address if the - * member doesn't exist in the project it will be created automatically. - * - * Use the 'URL' parameter to redirect the user from the invitation email back - * to your app. When the user is redirected, use the [Update Team Membership - * Status](/docs/client/teams#updateMembershipStatus) endpoint to allow the - * user to accept the invitation to the team. - * - * Please note that in order to avoid a [Redirect - * Attacks](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) - * the only valid redirect URL's are the once from domains you have set when - * added your platforms in the console interface. - * - * @param {string} teamId - * @param {string} email - * @param {string[]} roles - * @param {string} url - * @param {string} name - * @throws {Error} - * @return {Promise} - */ - createMembership: function(teamId, email, roles, url, name = '') { - if(teamId === undefined) { - throw new Error('Missing required parameter: "teamId"'); - } - - if(email === undefined) { - throw new Error('Missing required parameter: "email"'); - } - - if(roles === undefined) { - throw new Error('Missing required parameter: "roles"'); - } - - if(url === undefined) { - throw new Error('Missing required parameter: "url"'); - } - - let path = '/teams/{teamId}/memberships'.replace(new RegExp('{teamId}', 'g'), teamId); - - let payload = {}; - - if(email) { - payload['email'] = email; - } - - if(name) { - payload['name'] = name; - } - - if(roles) { - payload['roles'] = roles; - } - - if(url) { - payload['url'] = url; - } - - return http - .post(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * 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 he didn't accept it. - * - * @param {string} teamId - * @param {string} inviteId - * @throws {Error} - * @return {Promise} - */ - deleteMembership: function(teamId, inviteId) { - if(teamId === undefined) { - throw new Error('Missing required parameter: "teamId"'); - } - - if(inviteId === undefined) { - throw new Error('Missing required parameter: "inviteId"'); - } - - let path = '/teams/{teamId}/memberships/{inviteId}'.replace(new RegExp('{teamId}', 'g'), teamId).replace(new RegExp('{inviteId}', 'g'), inviteId); - - let payload = {}; - - return http - .delete(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Update Team Membership Status - * - * Use this endpoint to allow a user to accept an invitation to join a team - * after he is being redirected back to your app from the invitation email he - * was sent. - * - * @param {string} teamId - * @param {string} inviteId - * @param {string} userId - * @param {string} secret - * @throws {Error} - * @return {Promise} - */ - updateMembershipStatus: function(teamId, inviteId, userId, secret) { - if(teamId === undefined) { - throw new Error('Missing required parameter: "teamId"'); - } - - if(inviteId === undefined) { - throw new Error('Missing required parameter: "inviteId"'); - } - - if(userId === undefined) { - throw new Error('Missing required parameter: "userId"'); - } - - if(secret === undefined) { - throw new Error('Missing required parameter: "secret"'); - } - - let path = '/teams/{teamId}/memberships/{inviteId}/status'.replace(new RegExp('{teamId}', 'g'), teamId).replace(new RegExp('{inviteId}', 'g'), inviteId); - - let payload = {}; - - if(userId) { - payload['userId'] = userId; - } - - if(secret) { - payload['secret'] = secret; - } - - return http - .patch(path, { - 'content-type': 'application/json', - }, payload); - } - }; - - let users = { - - /** - * List Users - * - * Get a list of all the project users. You can use the query params to filter - * your results. - * - * @param {string} search - * @param {number} limit - * @param {number} offset - * @param {string} orderType - * @throws {Error} - * @return {Promise} - */ - list: function(search = '', limit = 25, offset = 0, orderType = 'ASC') { - let path = '/users'; - - let payload = {}; - - if(search) { - payload['search'] = search; - } - - if(limit) { - payload['limit'] = limit; - } - - if(offset) { - payload['offset'] = offset; - } - - if(orderType) { - payload['orderType'] = orderType; - } - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Create User - * - * Create a new user. - * - * @param {string} email - * @param {string} password - * @param {string} name - * @throws {Error} - * @return {Promise} - */ - create: function(email, password, name = '') { - if(email === undefined) { - throw new Error('Missing required parameter: "email"'); - } - - if(password === undefined) { - throw new Error('Missing required parameter: "password"'); - } - - let path = '/users'; - - let payload = {}; - - if(email) { - payload['email'] = email; - } - - if(password) { - payload['password'] = password; - } - - if(name) { - payload['name'] = name; - } - - return http - .post(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Get User - * - * Get user by its unique ID. - * - * @param {string} userId - * @throws {Error} - * @return {Promise} - */ - get: function(userId) { - if(userId === undefined) { - throw new Error('Missing required parameter: "userId"'); - } - - let path = '/users/{userId}'.replace(new RegExp('{userId}', 'g'), userId); - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Delete User - * - * Delete a user by its unique ID. - * - * @param {string} userId - * @throws {Error} - * @return {Promise} - */ - deleteUser: function(userId) { - if(userId === undefined) { - throw new Error('Missing required parameter: "userId"'); - } - - let path = '/users/{userId}'.replace(new RegExp('{userId}', 'g'), userId); - - let payload = {}; - - return http - .delete(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Get User Logs - * - * Get user activity logs list by its unique ID. - * - * @param {string} userId - * @throws {Error} - * @return {Promise} - */ - getLogs: function(userId) { - if(userId === undefined) { - throw new Error('Missing required parameter: "userId"'); - } - - let path = '/users/{userId}/logs'.replace(new RegExp('{userId}', 'g'), userId); - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Get User Preferences - * - * Get user preferences by its unique ID. - * - * @param {string} userId - * @throws {Error} - * @return {Promise} - */ - getPrefs: function(userId) { - if(userId === undefined) { - throw new Error('Missing required parameter: "userId"'); - } - - let path = '/users/{userId}/prefs'.replace(new RegExp('{userId}', 'g'), userId); - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Update User Preferences - * - * Update user preferences by its unique ID. You can pass only the specific - * settings you wish to update. - * - * @param {string} userId - * @param {object} prefs - * @throws {Error} - * @return {Promise} - */ - updatePrefs: function(userId, prefs) { - if(userId === undefined) { - throw new Error('Missing required parameter: "userId"'); - } - - if(prefs === undefined) { - throw new Error('Missing required parameter: "prefs"'); - } - - let path = '/users/{userId}/prefs'.replace(new RegExp('{userId}', 'g'), userId); - - let payload = {}; - - if(prefs) { - payload['prefs'] = prefs; - } - - return http - .patch(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Get User Sessions - * - * Get user sessions list by its unique ID. - * - * @param {string} userId - * @throws {Error} - * @return {Promise} - */ - getSessions: function(userId) { - if(userId === undefined) { - throw new Error('Missing required parameter: "userId"'); - } - - let path = '/users/{userId}/sessions'.replace(new RegExp('{userId}', 'g'), userId); - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Delete User Sessions - * - * Delete all user sessions by its unique ID. - * - * @param {string} userId - * @throws {Error} - * @return {Promise} - */ - deleteSessions: function(userId) { - if(userId === undefined) { - throw new Error('Missing required parameter: "userId"'); - } - - let path = '/users/{userId}/sessions'.replace(new RegExp('{userId}', 'g'), userId); - - let payload = {}; - - return http - .delete(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Delete User Session - * - * Delete user sessions by its unique ID. - * - * @param {string} userId - * @param {string} sessionId - * @throws {Error} - * @return {Promise} - */ - deleteSession: function(userId, sessionId) { - if(userId === undefined) { - throw new Error('Missing required parameter: "userId"'); - } - - if(sessionId === undefined) { - throw new Error('Missing required parameter: "sessionId"'); - } - - let path = '/users/{userId}/sessions/{sessionId}'.replace(new RegExp('{userId}', 'g'), userId).replace(new RegExp('{sessionId}', 'g'), sessionId); - - let payload = {}; - - return http - .delete(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Update User Status - * - * Update user status by its unique ID. - * - * @param {string} userId - * @param {string} status - * @throws {Error} - * @return {Promise} - */ - updateStatus: function(userId, status) { - if(userId === undefined) { - throw new Error('Missing required parameter: "userId"'); - } - - if(status === undefined) { - throw new Error('Missing required parameter: "status"'); - } - - let path = '/users/{userId}/status'.replace(new RegExp('{userId}', 'g'), userId); - - let payload = {}; - - if(status) { - payload['status'] = status; - } - - return http - .patch(path, { - 'content-type': 'application/json', - }, payload); - } - }; - - return { - setEndpoint: setEndpoint, - setProject: setProject, - setKey: setKey, - setLocale: setLocale, - setMode: setMode, - account: account, - avatars: avatars, - database: database, - functions: functions, - health: health, - locale: locale, - projects: projects, - storage: storage, - teams: teams, - users: users - }; - }; - - if(typeof module !== "undefined") { - module.exports = window.Appwrite; - } - -})((typeof window !== "undefined") ? window : {}); \ No newline at end of file diff --git a/app/sdks/0.7.0/console-web/src/sdk.min.js b/app/sdks/0.7.0/console-web/src/sdk.min.js deleted file mode 100644 index 2413458654..0000000000 --- a/app/sdks/0.7.0/console-web/src/sdk.min.js +++ /dev/null @@ -1,431 +0,0 @@ -(function(window){'use strict';window.Appwrite=function(){let config={endpoint:'https://appwrite.io/v1',project:'',key:'',locale:'',mode:'',};let setEndpoint=function(endpoint){config.endpoint=endpoint;return this};let setProject=function(value){http.addGlobalHeader('X-Appwrite-Project',value);config.project=value;return this};let setKey=function(value){http.addGlobalHeader('X-Appwrite-Key',value);config.key=value;return this};let setLocale=function(value){http.addGlobalHeader('X-Appwrite-Locale',value);config.locale=value;return this};let setMode=function(value){http.addGlobalHeader('X-Appwrite-Mode',value);config.mode=value;return this};let http=function(document){let globalParams=[],globalHeaders=[];let addParam=function(url,param,value){let a=document.createElement('a'),regex=/(?:\?|&|&)+([^=]+)(?:=([^&]*))*/g;let match,str=[];a.href=url;param=encodeURIComponent(param);while(match=regex.exec(a.search))if(param!==match[1])str.push(match[1]+(match[2]?"="+match[2]:""));str.push(param+(value?"="+encodeURIComponent(value):""));a.search=str.join("&");return a.href};let buildQuery=function(params){let str=[];for(let p in params){if(Array.isArray(params[p])){for(let index=0;index=request.status){resolve(data)}else{reject(data)}};if(progress){request.addEventListener('progress',progress);request.upload.addEventListener('progress',progress,!1)} -request.onerror=function(){reject(new Error("Network Error"))};request.send(params)})};return{'get':function(path,headers={},params={}){return call('GET',path+((Object.keys(params).length>0)?'?'+buildQuery(params):''),headers,{})},'post':function(path,headers={},params={},progress=null){return call('POST',path,headers,params,progress)},'put':function(path,headers={},params={},progress=null){return call('PUT',path,headers,params,progress)},'patch':function(path,headers={},params={},progress=null){return call('PATCH',path,headers,params,progress)},'delete':function(path,headers={},params={},progress=null){return call('DELETE',path,headers,params,progress)},'addGlobalParam':addGlobalParam,'addGlobalHeader':addGlobalHeader}}(window.document);let account={get:function(){let path='/account';let payload={};return http.get(path,{'content-type':'application/json',},payload)},create:function(email,password,name=''){if(email===undefined){throw new Error('Missing required parameter: "email"')} -if(password===undefined){throw new Error('Missing required parameter: "password"')} -let path='/account';let payload={};if(email){payload.email=email} -if(password){payload.password=password} -if(name){payload.name=name} -return http.post(path,{'content-type':'application/json',},payload)},delete:function(){let path='/account';let payload={};return http.delete(path,{'content-type':'application/json',},payload)},updateEmail:function(email,password){if(email===undefined){throw new Error('Missing required parameter: "email"')} -if(password===undefined){throw new Error('Missing required parameter: "password"')} -let path='/account/email';let payload={};if(email){payload.email=email} -if(password){payload.password=password} -return http.patch(path,{'content-type':'application/json',},payload)},getLogs:function(){let path='/account/logs';let payload={};return http.get(path,{'content-type':'application/json',},payload)},updateName:function(name){if(name===undefined){throw new Error('Missing required parameter: "name"')} -let path='/account/name';let payload={};if(name){payload.name=name} -return http.patch(path,{'content-type':'application/json',},payload)},updatePassword:function(password,oldPassword){if(password===undefined){throw new Error('Missing required parameter: "password"')} -if(oldPassword===undefined){throw new Error('Missing required parameter: "oldPassword"')} -let path='/account/password';let payload={};if(password){payload.password=password} -if(oldPassword){payload.oldPassword=oldPassword} -return http.patch(path,{'content-type':'application/json',},payload)},getPrefs:function(){let path='/account/prefs';let payload={};return http.get(path,{'content-type':'application/json',},payload)},updatePrefs:function(prefs){if(prefs===undefined){throw new Error('Missing required parameter: "prefs"')} -let path='/account/prefs';let payload={};if(prefs){payload.prefs=prefs} -return http.patch(path,{'content-type':'application/json',},payload)},createRecovery:function(email,url){if(email===undefined){throw new Error('Missing required parameter: "email"')} -if(url===undefined){throw new Error('Missing required parameter: "url"')} -let path='/account/recovery';let payload={};if(email){payload.email=email} -if(url){payload.url=url} -return http.post(path,{'content-type':'application/json',},payload)},updateRecovery:function(userId,secret,password,passwordAgain){if(userId===undefined){throw new Error('Missing required parameter: "userId"')} -if(secret===undefined){throw new Error('Missing required parameter: "secret"')} -if(password===undefined){throw new Error('Missing required parameter: "password"')} -if(passwordAgain===undefined){throw new Error('Missing required parameter: "passwordAgain"')} -let path='/account/recovery';let payload={};if(userId){payload.userId=userId} -if(secret){payload.secret=secret} -if(password){payload.password=password} -if(passwordAgain){payload.passwordAgain=passwordAgain} -return http.put(path,{'content-type':'application/json',},payload)},getSessions:function(){let path='/account/sessions';let payload={};return http.get(path,{'content-type':'application/json',},payload)},createSession:function(email,password){if(email===undefined){throw new Error('Missing required parameter: "email"')} -if(password===undefined){throw new Error('Missing required parameter: "password"')} -let path='/account/sessions';let payload={};if(email){payload.email=email} -if(password){payload.password=password} -return http.post(path,{'content-type':'application/json',},payload)},deleteSessions:function(){let path='/account/sessions';let payload={};return http.delete(path,{'content-type':'application/json',},payload)},createOAuth2Session:function(provider,success='https://appwrite.io/auth/oauth2/success',failure='https://appwrite.io/auth/oauth2/failure',scopes=[]){if(provider===undefined){throw new Error('Missing required parameter: "provider"')} -let path='/account/sessions/oauth2/{provider}'.replace(new RegExp('{provider}','g'),provider);let payload={};if(success){payload.success=success} -if(failure){payload.failure=failure} -if(scopes){payload.scopes=scopes} -payload.project=config.project;payload.key=config.key;let query=[];for(let p in payload){if(Array.isArray(payload[p])){for(let index=0;index; - - /** - * Create Account - * - * Use this endpoint to allow a new user to register a new account in your - * project. After the user registration completes successfully, you can use - * the [/account/verfication](/docs/client/account#createVerification) route - * to start verifying the user email address. To allow your new user to login - * to his new account, you need to create a new [account - * session](/docs/client/account#createSession). - * - * @param {string} email - * @param {string} password - * @param {string} name - * @throws {Error} - * @return {Promise} - */ - create(email: string, password: string, name: string): Promise; - - /** - * Delete Account - * - * Delete a currently logged in user account. Behind the scene, the user - * record is not deleted but permanently blocked from any access. This is done - * to avoid deleted accounts being overtaken by new users with the same email - * address. Any user-related resources like documents or storage files should - * be deleted separately. - * - * @throws {Error} - * @return {Promise} - */ - delete(): Promise; - - /** - * Update Account Email - * - * Update currently logged in user account email address. After changing user - * address, user confirmation status is being reset and a new confirmation - * mail is sent. For security measures, user password is required to complete - * this request. - * - * @param {string} email - * @param {string} password - * @throws {Error} - * @return {Promise} - */ - updateEmail(email: string, password: string): Promise; - - /** - * Get Account 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. - * - * @throws {Error} - * @return {Promise} - */ - getLogs(): Promise; - - /** - * Update Account Name - * - * Update currently logged in user account name. - * - * @param {string} name - * @throws {Error} - * @return {Promise} - */ - updateName(name: string): Promise; - - /** - * Update Account Password - * - * Update currently logged in user password. For validation, user is required - * to pass the password twice. - * - * @param {string} password - * @param {string} oldPassword - * @throws {Error} - * @return {Promise} - */ - updatePassword(password: string, oldPassword: string): Promise; - - /** - * Get Account Preferences - * - * Get currently logged in user preferences as a key-value object. - * - * @throws {Error} - * @return {Promise} - */ - getPrefs(): Promise; - - /** - * Update Account Preferences - * - * Update currently logged in user account preferences. You can pass only the - * specific settings you wish to update. - * - * @param {object} prefs - * @throws {Error} - * @return {Promise} - */ - updatePrefs(prefs: object): Promise; - - /** - * Create Password Recovery - * - * Sends the user an email with a temporary secret key for password reset. - * When the user clicks the confirmation link he is redirected back to your - * app password reset URL with the secret key and email address values - * attached to the URL query string. Use the query string params to submit a - * request to the [PUT /account/recovery](/docs/client/account#updateRecovery) - * endpoint to complete the process. - * - * @param {string} email - * @param {string} url - * @throws {Error} - * @return {Promise} - */ - createRecovery(email: string, url: string): Promise; - - /** - * Complete Password Recovery - * - * Use this endpoint to complete the user account password reset. Both the - * **userId** and **secret** arguments will be passed as query parameters to - * the redirect URL you have provided when sending your request to the [POST - * /account/recovery](/docs/client/account#createRecovery) endpoint. - * - * Please note that in order to avoid a [Redirect - * 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. - * - * @param {string} userId - * @param {string} secret - * @param {string} password - * @param {string} passwordAgain - * @throws {Error} - * @return {Promise} - */ - updateRecovery(userId: string, secret: string, password: string, passwordAgain: string): Promise; - - /** - * Get Account Sessions - * - * Get currently logged in user list of active sessions across different - * devices. - * - * @throws {Error} - * @return {Promise} - */ - getSessions(): Promise; - - /** - * Create Account Session - * - * Allow the user to login into his account by providing a valid email and - * password combination. This route will create a new session for the user. - * - * @param {string} email - * @param {string} password - * @throws {Error} - * @return {Promise} - */ - createSession(email: string, password: string): Promise; - - /** - * Delete All Account Sessions - * - * Delete all sessions from the user account and remove any sessions cookies - * from the end client. - * - * @throws {Error} - * @return {Promise} - */ - deleteSessions(): Promise; - - /** - * Create Account Session with OAuth2 - * - * Allow the user to login to his account using the OAuth2 provider of his - * choice. Each OAuth2 provider should be enabled from the Appwrite console - * first. Use the success and failure arguments to provide a redirect URL's - * back to your app when login is completed. - * - * @param {string} provider - * @param {string} success - * @param {string} failure - * @param {string[]} scopes - * @throws {Error} - * @return {Promise} - */ - createOAuth2Session(provider: string, success: string, failure: string, scopes: string[]): Promise; - - /** - * Delete Account Session - * - * Use this endpoint to log out the currently logged in user from all his - * account sessions across all his different devices. When using the option id - * argument, only the session unique ID provider will be deleted. - * - * @param {string} sessionId - * @throws {Error} - * @return {Promise} - */ - deleteSession(sessionId: string): Promise; - - /** - * Create Email Verification - * - * Use this endpoint to send a verification message to your user email address - * to confirm they are the valid owners of that address. Both the **userId** - * and **secret** arguments will be passed as query parameters to the URL you - * have provided to be attached to the verification email. The provided URL - * should redirect the user back to your app and allow you to complete the - * verification process by verifying both the **userId** and **secret** - * parameters. Learn more about how to [complete the verification - * process](/docs/client/account#updateAccountVerification). - * - * Please note that in order to avoid a [Redirect - * 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. - * - * - * @param {string} url - * @throws {Error} - * @return {Promise} - */ - createVerification(url: string): Promise; - - /** - * Complete Email Verification - * - * 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. - * - * @param {string} userId - * @param {string} secret - * @throws {Error} - * @return {Promise} - */ - updateVerification(userId: string, secret: string): Promise; - - } - - export interface Avatars { - - /** - * Get Browser Icon - * - * You can use this endpoint to show different browser icons to your users. - * The code argument receives the browser code as it appears in your user - * /account/sessions endpoint. Use width, height and quality arguments to - * change the output settings. - * - * @param {string} code - * @param {number} width - * @param {number} height - * @param {number} quality - * @throws {Error} - * @return {string} - */ - getBrowser(code: string, width: number, height: number, quality: number): string; - - /** - * Get Credit Card Icon - * - * Need to display your users with your billing method or their payment - * methods? The credit card endpoint will return you the icon of the credit - * card provider you need. Use width, height and quality arguments to change - * the output settings. - * - * @param {string} code - * @param {number} width - * @param {number} height - * @param {number} quality - * @throws {Error} - * @return {string} - */ - getCreditCard(code: string, width: number, height: number, quality: number): string; - - /** - * Get Favicon - * - * Use this endpoint to fetch the favorite icon (AKA favicon) of a any remote - * website URL. - * - * @param {string} url - * @throws {Error} - * @return {string} - */ - getFavicon(url: string): string; - - /** - * Get Country Flag - * - * You can use this endpoint to show different country flags icons to your - * users. The code argument receives the 2 letter country code. Use width, - * height and quality arguments to change the output settings. - * - * @param {string} code - * @param {number} width - * @param {number} height - * @param {number} quality - * @throws {Error} - * @return {string} - */ - getFlag(code: string, width: number, height: number, quality: number): string; - - /** - * Get Image from URL - * - * Use this endpoint to fetch a remote image URL and crop it to any image size - * you want. This endpoint is very useful if you need to crop and display - * remote images in your app or in case you want to make sure a 3rd party - * image is properly served using a TLS protocol. - * - * @param {string} url - * @param {number} width - * @param {number} height - * @throws {Error} - * @return {string} - */ - getImage(url: string, width: number, height: number): string; - - /** - * Get User Initials - * - * Use this endpoint to show your user initials avatar icon on your website or - * app. By default, this route will try to print your logged-in user name or - * email initials. You can also overwrite the user name if you pass the 'name' - * parameter. If no name is given and no user is logged, an empty avatar will - * be returned. - * - * You can use the color and background params to change the avatar colors. By - * default, a random theme will be selected. The random theme will persist for - * the user's initials when reloading the same theme will always return for - * the same initials. - * - * @param {string} name - * @param {number} width - * @param {number} height - * @param {string} color - * @param {string} background - * @throws {Error} - * @return {string} - */ - getInitials(name: string, width: number, height: number, color: string, background: string): string; - - /** - * 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. - * - * @param {string} text - * @param {number} size - * @param {number} margin - * @param {boolean} download - * @throws {Error} - * @return {string} - */ - getQR(text: string, size: number, margin: number, download: boolean): string; - - } - - export interface Database { - - /** - * List Collections - * - * Get a list of all the user collections. You can use the query params to - * filter your results. On admin mode, this endpoint will return a list of all - * of the project collections. [Learn more about different API - * modes](/docs/admin). - * - * @param {string} search - * @param {number} limit - * @param {number} offset - * @param {string} orderType - * @throws {Error} - * @return {Promise} - */ - listCollections(search: string, limit: number, offset: number, orderType: string): Promise; - - /** - * Create Collection - * - * Create a new Collection. - * - * @param {string} name - * @param {string[]} read - * @param {string[]} write - * @param {string[]} rules - * @throws {Error} - * @return {Promise} - */ - createCollection(name: string, read: string[], write: string[], rules: string[]): Promise; - - /** - * Get Collection - * - * Get collection by its unique ID. This endpoint response returns a JSON - * object with the collection metadata. - * - * @param {string} collectionId - * @throws {Error} - * @return {Promise} - */ - getCollection(collectionId: string): Promise; - - /** - * Update Collection - * - * Update collection by its unique ID. - * - * @param {string} collectionId - * @param {string} name - * @param {string[]} read - * @param {string[]} write - * @param {string[]} rules - * @throws {Error} - * @return {Promise} - */ - updateCollection(collectionId: string, name: string, read: string[], write: string[], rules: string[]): Promise; - - /** - * Delete Collection - * - * Delete a collection by its unique ID. Only users with write permissions - * have access to delete this resource. - * - * @param {string} collectionId - * @throws {Error} - * @return {Promise} - */ - deleteCollection(collectionId: string): Promise; - - /** - * List Documents - * - * Get a list of all the user documents. You can use the query params to - * filter your results. On admin mode, this endpoint will return a list of all - * of the project documents. [Learn more about different API - * modes](/docs/admin). - * - * @param {string} collectionId - * @param {string[]} filters - * @param {number} limit - * @param {number} offset - * @param {string} orderField - * @param {string} orderType - * @param {string} orderCast - * @param {string} search - * @throws {Error} - * @return {Promise} - */ - listDocuments(collectionId: string, filters: string[], limit: number, offset: number, orderField: string, orderType: string, orderCast: string, search: string): Promise; - - /** - * Create Document - * - * Create a new Document. Before using this route, you should create a new - * collection resource using either a [server - * integration](/docs/server/database?sdk=nodejs#createCollection) API or - * directly from your database console. - * - * @param {string} collectionId - * @param {object} data - * @param {string[]} read - * @param {string[]} write - * @param {string} parentDocument - * @param {string} parentProperty - * @param {string} parentPropertyType - * @throws {Error} - * @return {Promise} - */ - createDocument(collectionId: string, data: object, read: string[], write: string[], parentDocument: string, parentProperty: string, parentPropertyType: string): Promise; - - /** - * Get Document - * - * Get document by its unique ID. This endpoint response returns a JSON object - * with the document data. - * - * @param {string} collectionId - * @param {string} documentId - * @throws {Error} - * @return {Promise} - */ - getDocument(collectionId: string, documentId: string): Promise; - - /** - * Update Document - * - * - * @param {string} collectionId - * @param {string} documentId - * @param {object} data - * @param {string[]} read - * @param {string[]} write - * @throws {Error} - * @return {Promise} - */ - updateDocument(collectionId: string, documentId: string, data: object, read: string[], write: string[]): Promise; - - /** - * Delete Document - * - * Delete document by its unique ID. This endpoint deletes only the parent - * documents, his attributes and relations to other documents. Child documents - * **will not** be deleted. - * - * @param {string} collectionId - * @param {string} documentId - * @throws {Error} - * @return {Promise} - */ - deleteDocument(collectionId: string, documentId: string): Promise; - - } - - export interface Functions { - - /** - * List Functions - * - * - * @param {string} search - * @param {number} limit - * @param {number} offset - * @param {string} orderType - * @throws {Error} - * @return {Promise} - */ - list(search: string, limit: number, offset: number, orderType: string): Promise; - - /** - * Create Function - * - * - * @param {string} name - * @param {string} env - * @param {object} vars - * @param {string[]} events - * @param {string} schedule - * @param {number} timeout - * @throws {Error} - * @return {Promise} - */ - create(name: string, env: string, vars: object, events: string[], schedule: string, timeout: number): Promise; - - /** - * Get Function - * - * - * @param {string} functionId - * @throws {Error} - * @return {Promise} - */ - get(functionId: string): Promise; - - /** - * Update Function - * - * - * @param {string} functionId - * @param {string} name - * @param {object} vars - * @param {string[]} events - * @param {string} schedule - * @param {number} timeout - * @throws {Error} - * @return {Promise} - */ - update(functionId: string, name: string, vars: object, events: string[], schedule: string, timeout: number): Promise; - - /** - * Delete Function - * - * - * @param {string} functionId - * @throws {Error} - * @return {Promise} - */ - delete(functionId: string): Promise; - - /** - * List Executions - * - * - * @param {string} functionId - * @param {string} search - * @param {number} limit - * @param {number} offset - * @param {string} orderType - * @throws {Error} - * @return {Promise} - */ - listExecutions(functionId: string, search: string, limit: number, offset: number, orderType: string): Promise; - - /** - * Create Execution - * - * - * @param {string} functionId - * @param {number} async - * @throws {Error} - * @return {Promise} - */ - createExecution(functionId: string, async: number): Promise; - - /** - * Get Execution - * - * - * @param {string} functionId - * @param {string} executionId - * @throws {Error} - * @return {Promise} - */ - getExecution(functionId: string, executionId: string): Promise; - - /** - * Update Function Tag - * - * - * @param {string} functionId - * @param {string} tag - * @throws {Error} - * @return {Promise} - */ - updateTag(functionId: string, tag: string): Promise; - - /** - * List Tags - * - * - * @param {string} functionId - * @param {string} search - * @param {number} limit - * @param {number} offset - * @param {string} orderType - * @throws {Error} - * @return {Promise} - */ - listTags(functionId: string, search: string, limit: number, offset: number, orderType: string): Promise; - - /** - * Create Tag - * - * - * @param {string} functionId - * @param {string} command - * @param {File} code - * @throws {Error} - * @return {Promise} - */ - createTag(functionId: string, command: string, code: File): Promise; - - /** - * Get Tag - * - * - * @param {string} functionId - * @param {string} tagId - * @throws {Error} - * @return {Promise} - */ - getTag(functionId: string, tagId: string): Promise; - - /** - * Delete Tag - * - * - * @param {string} functionId - * @param {string} tagId - * @throws {Error} - * @return {Promise} - */ - deleteTag(functionId: string, tagId: string): Promise; - - } - - export interface Health { - - /** - * Get HTTP - * - * Check the Appwrite HTTP server is up and responsive. - * - * @throws {Error} - * @return {Promise} - */ - get(): Promise; - - /** - * Get Anti virus - * - * Check the Appwrite Anti Virus server is up and connection is successful. - * - * @throws {Error} - * @return {Promise} - */ - getAntiVirus(): Promise; - - /** - * Get Cache - * - * Check the Appwrite in-memory cache server is up and connection is - * successful. - * - * @throws {Error} - * @return {Promise} - */ - getCache(): Promise; - - /** - * Get DB - * - * Check the Appwrite database server is up and connection is successful. - * - * @throws {Error} - * @return {Promise} - */ - getDB(): Promise; - - /** - * Get Certificate Queue - * - * Get the number of certificates that are waiting to be issued against - * [Letsencrypt](https://letsencrypt.org/) in the Appwrite internal queue - * server. - * - * @throws {Error} - * @return {Promise} - */ - getQueueCertificates(): Promise; - - /** - * Get Functions Queue - * - * - * @throws {Error} - * @return {Promise} - */ - getQueueFunctions(): Promise; - - /** - * Get Logs Queue - * - * Get the number of logs that are waiting to be processed in the Appwrite - * internal queue server. - * - * @throws {Error} - * @return {Promise} - */ - getQueueLogs(): Promise; - - /** - * Get Tasks Queue - * - * Get the number of tasks that are waiting to be processed in the Appwrite - * internal queue server. - * - * @throws {Error} - * @return {Promise} - */ - getQueueTasks(): Promise; - - /** - * Get Usage Queue - * - * Get the number of usage stats that are waiting to be processed in the - * Appwrite internal queue server. - * - * @throws {Error} - * @return {Promise} - */ - getQueueUsage(): Promise; - - /** - * Get Webhooks Queue - * - * Get the number of webhooks that are waiting to be processed in the Appwrite - * internal queue server. - * - * @throws {Error} - * @return {Promise} - */ - getQueueWebhooks(): Promise; - - /** - * Get Local Storage - * - * Check the Appwrite local storage device is up and connection is successful. - * - * @throws {Error} - * @return {Promise} - */ - getStorageLocal(): Promise; - - /** - * Get Time - * - * Check the Appwrite server time is synced with Google remote NTP server. We - * use this technology to smoothly handle leap seconds with no disruptive - * events. The [Network Time - * Protocol](https://en.wikipedia.org/wiki/Network_Time_Protocol) (NTP) is - * 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. - * - * @throws {Error} - * @return {Promise} - */ - getTime(): Promise; - - } - - export interface Locale { - - /** - * Get User Locale - * - * Get the current user location based on IP. Returns an object with user - * country code, country name, continent name, continent code, ip address and - * suggested currency. You can use the locale header to get the data in a - * supported language. - * - * ([IP Geolocation by DB-IP](https://db-ip.com)) - * - * @throws {Error} - * @return {Promise} - */ - get(): Promise; - - /** - * List Continents - * - * List of all continents. You can use the locale header to get the data in a - * supported language. - * - * @throws {Error} - * @return {Promise} - */ - getContinents(): Promise; - - /** - * List Countries - * - * List of all countries. You can use the locale header to get the data in a - * supported language. - * - * @throws {Error} - * @return {Promise} - */ - getCountries(): Promise; - - /** - * 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. - * - * @throws {Error} - * @return {Promise} - */ - getCountriesEU(): Promise; - - /** - * List Countries Phone Codes - * - * List of all countries phone codes. You can use the locale header to get the - * data in a supported language. - * - * @throws {Error} - * @return {Promise} - */ - getCountriesPhones(): Promise; - - /** - * 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. - * - * @throws {Error} - * @return {Promise} - */ - getCurrencies(): Promise; - - /** - * List Languages - * - * List of all languages classified by ISO 639-1 including 2-letter code, name - * in English, and name in the respective language. - * - * @throws {Error} - * @return {Promise} - */ - getLanguages(): Promise; - - } - - export interface Projects { - - /** - * List Projects - * - * - * @param {string} search - * @param {number} limit - * @param {number} offset - * @param {string} orderType - * @throws {Error} - * @return {Promise} - */ - list(search: string, limit: number, offset: number, orderType: string): Promise; - - /** - * Create Project - * - * - * @param {string} name - * @param {string} teamId - * @param {string} description - * @param {string} logo - * @param {string} url - * @param {string} legalName - * @param {string} legalCountry - * @param {string} legalState - * @param {string} legalCity - * @param {string} legalAddress - * @param {string} legalTaxId - * @throws {Error} - * @return {Promise} - */ - create(name: string, teamId: string, description: string, logo: string, url: string, legalName: string, legalCountry: string, legalState: string, legalCity: string, legalAddress: string, legalTaxId: string): Promise; - - /** - * Get Project - * - * - * @param {string} projectId - * @throws {Error} - * @return {Promise} - */ - get(projectId: string): Promise; - - /** - * Update Project - * - * - * @param {string} projectId - * @param {string} name - * @param {string} description - * @param {string} logo - * @param {string} url - * @param {string} legalName - * @param {string} legalCountry - * @param {string} legalState - * @param {string} legalCity - * @param {string} legalAddress - * @param {string} legalTaxId - * @throws {Error} - * @return {Promise} - */ - update(projectId: string, name: string, description: string, logo: string, url: string, legalName: string, legalCountry: string, legalState: string, legalCity: string, legalAddress: string, legalTaxId: string): Promise; - - /** - * Delete Project - * - * - * @param {string} projectId - * @param {string} password - * @throws {Error} - * @return {Promise} - */ - delete(projectId: string, password: string): Promise; - - /** - * List Domains - * - * - * @param {string} projectId - * @throws {Error} - * @return {Promise} - */ - listDomains(projectId: string): Promise; - - /** - * Create Domain - * - * - * @param {string} projectId - * @param {string} domain - * @throws {Error} - * @return {Promise} - */ - createDomain(projectId: string, domain: string): Promise; - - /** - * Get Domain - * - * - * @param {string} projectId - * @param {string} domainId - * @throws {Error} - * @return {Promise} - */ - getDomain(projectId: string, domainId: string): Promise; - - /** - * Delete Domain - * - * - * @param {string} projectId - * @param {string} domainId - * @throws {Error} - * @return {Promise} - */ - deleteDomain(projectId: string, domainId: string): Promise; - - /** - * Update Domain Verification Status - * - * - * @param {string} projectId - * @param {string} domainId - * @throws {Error} - * @return {Promise} - */ - updateDomainVerification(projectId: string, domainId: string): Promise; - - /** - * List Keys - * - * - * @param {string} projectId - * @throws {Error} - * @return {Promise} - */ - listKeys(projectId: string): Promise; - - /** - * Create Key - * - * - * @param {string} projectId - * @param {string} name - * @param {string[]} scopes - * @throws {Error} - * @return {Promise} - */ - createKey(projectId: string, name: string, scopes: string[]): Promise; - - /** - * Get Key - * - * - * @param {string} projectId - * @param {string} keyId - * @throws {Error} - * @return {Promise} - */ - getKey(projectId: string, keyId: string): Promise; - - /** - * Update Key - * - * - * @param {string} projectId - * @param {string} keyId - * @param {string} name - * @param {string[]} scopes - * @throws {Error} - * @return {Promise} - */ - updateKey(projectId: string, keyId: string, name: string, scopes: string[]): Promise; - - /** - * Delete Key - * - * - * @param {string} projectId - * @param {string} keyId - * @throws {Error} - * @return {Promise} - */ - deleteKey(projectId: string, keyId: string): Promise; - - /** - * Update Project OAuth2 - * - * - * @param {string} projectId - * @param {string} provider - * @param {string} appId - * @param {string} secret - * @throws {Error} - * @return {Promise} - */ - updateOAuth2(projectId: string, provider: string, appId: string, secret: string): Promise; - - /** - * List Platforms - * - * - * @param {string} projectId - * @throws {Error} - * @return {Promise} - */ - listPlatforms(projectId: string): Promise; - - /** - * Create Platform - * - * - * @param {string} projectId - * @param {string} type - * @param {string} name - * @param {string} key - * @param {string} store - * @param {string} hostname - * @throws {Error} - * @return {Promise} - */ - createPlatform(projectId: string, type: string, name: string, key: string, store: string, hostname: string): Promise; - - /** - * Get Platform - * - * - * @param {string} projectId - * @param {string} platformId - * @throws {Error} - * @return {Promise} - */ - getPlatform(projectId: string, platformId: string): Promise; - - /** - * Update Platform - * - * - * @param {string} projectId - * @param {string} platformId - * @param {string} name - * @param {string} key - * @param {string} store - * @param {string} hostname - * @throws {Error} - * @return {Promise} - */ - updatePlatform(projectId: string, platformId: string, name: string, key: string, store: string, hostname: string): Promise; - - /** - * Delete Platform - * - * - * @param {string} projectId - * @param {string} platformId - * @throws {Error} - * @return {Promise} - */ - deletePlatform(projectId: string, platformId: string): Promise; - - /** - * List Tasks - * - * - * @param {string} projectId - * @throws {Error} - * @return {Promise} - */ - listTasks(projectId: string): Promise; - - /** - * Create Task - * - * - * @param {string} projectId - * @param {string} name - * @param {string} status - * @param {string} schedule - * @param {boolean} security - * @param {string} httpMethod - * @param {string} httpUrl - * @param {string[]} httpHeaders - * @param {string} httpUser - * @param {string} httpPass - * @throws {Error} - * @return {Promise} - */ - createTask(projectId: string, name: string, status: string, schedule: string, security: boolean, httpMethod: string, httpUrl: string, httpHeaders: string[], httpUser: string, httpPass: string): Promise; - - /** - * Get Task - * - * - * @param {string} projectId - * @param {string} taskId - * @throws {Error} - * @return {Promise} - */ - getTask(projectId: string, taskId: string): Promise; - - /** - * Update Task - * - * - * @param {string} projectId - * @param {string} taskId - * @param {string} name - * @param {string} status - * @param {string} schedule - * @param {boolean} security - * @param {string} httpMethod - * @param {string} httpUrl - * @param {string[]} httpHeaders - * @param {string} httpUser - * @param {string} httpPass - * @throws {Error} - * @return {Promise} - */ - updateTask(projectId: string, taskId: string, name: string, status: string, schedule: string, security: boolean, httpMethod: string, httpUrl: string, httpHeaders: string[], httpUser: string, httpPass: string): Promise; - - /** - * Delete Task - * - * - * @param {string} projectId - * @param {string} taskId - * @throws {Error} - * @return {Promise} - */ - deleteTask(projectId: string, taskId: string): Promise; - - /** - * Get Project - * - * - * @param {string} projectId - * @param {string} range - * @throws {Error} - * @return {Promise} - */ - getUsage(projectId: string, range: string): Promise; - - /** - * List Webhooks - * - * - * @param {string} projectId - * @throws {Error} - * @return {Promise} - */ - listWebhooks(projectId: string): Promise; - - /** - * Create Webhook - * - * - * @param {string} projectId - * @param {string} name - * @param {string[]} events - * @param {string} url - * @param {boolean} security - * @param {string} httpUser - * @param {string} httpPass - * @throws {Error} - * @return {Promise} - */ - createWebhook(projectId: string, name: string, events: string[], url: string, security: boolean, httpUser: string, httpPass: string): Promise; - - /** - * Get Webhook - * - * - * @param {string} projectId - * @param {string} webhookId - * @throws {Error} - * @return {Promise} - */ - getWebhook(projectId: string, webhookId: string): Promise; - - /** - * Update Webhook - * - * - * @param {string} projectId - * @param {string} webhookId - * @param {string} name - * @param {string[]} events - * @param {string} url - * @param {boolean} security - * @param {string} httpUser - * @param {string} httpPass - * @throws {Error} - * @return {Promise} - */ - updateWebhook(projectId: string, webhookId: string, name: string, events: string[], url: string, security: boolean, httpUser: string, httpPass: string): Promise; - - /** - * Delete Webhook - * - * - * @param {string} projectId - * @param {string} webhookId - * @throws {Error} - * @return {Promise} - */ - deleteWebhook(projectId: string, webhookId: string): Promise; - - } - - export interface Storage { - - /** - * List Files - * - * Get a list of all the user files. You can use the query params to filter - * your results. On admin mode, this endpoint will return a list of all of the - * project files. [Learn more about different API modes](/docs/admin). - * - * @param {string} search - * @param {number} limit - * @param {number} offset - * @param {string} orderType - * @throws {Error} - * @return {Promise} - */ - listFiles(search: string, limit: number, offset: number, orderType: string): Promise; - - /** - * Create File - * - * Create a new file. The user who creates the file will automatically be - * assigned to read and write access unless he has passed custom values for - * read and write arguments. - * - * @param {File} file - * @param {string[]} read - * @param {string[]} write - * @throws {Error} - * @return {Promise} - */ - createFile(file: File, read: string[], write: string[]): Promise; - - /** - * Get File - * - * Get file by its unique ID. This endpoint response returns a JSON object - * with the file metadata. - * - * @param {string} fileId - * @throws {Error} - * @return {Promise} - */ - getFile(fileId: string): Promise; - - /** - * Update File - * - * Update file by its unique ID. Only users with write permissions have access - * to update this resource. - * - * @param {string} fileId - * @param {string[]} read - * @param {string[]} write - * @throws {Error} - * @return {Promise} - */ - updateFile(fileId: string, read: string[], write: string[]): Promise; - - /** - * Delete File - * - * Delete a file by its unique ID. Only users with write permissions have - * access to delete this resource. - * - * @param {string} fileId - * @throws {Error} - * @return {Promise} - */ - deleteFile(fileId: string): Promise; - - /** - * Get File for Download - * - * Get 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. - * - * @param {string} fileId - * @throws {Error} - * @return {string} - */ - getFileDownload(fileId: string): string; - - /** - * Get File Preview - * - * Get a file preview image. Currently, this method supports preview for image - * files (jpg, png, and gif), other supported formats, like pdf, docs, slides, - * and spreadsheets, will return the file icon image. You can also pass query - * string arguments for cutting and resizing your preview image. - * - * @param {string} fileId - * @param {number} width - * @param {number} height - * @param {number} quality - * @param {string} background - * @param {string} output - * @throws {Error} - * @return {string} - */ - getFilePreview(fileId: string, width: number, height: number, quality: number, background: string, output: string): string; - - /** - * Get File for View - * - * Get file content by its unique ID. This endpoint is similar to the download - * method but returns with no 'Content-Disposition: attachment' header. - * - * @param {string} fileId - * @param {string} as - * @throws {Error} - * @return {string} - */ - getFileView(fileId: string, as: string): string; - - } - - export interface Teams { - - /** - * List Teams - * - * Get a list of all the current user teams. You can use the query params to - * filter your results. On admin mode, this endpoint will return a list of all - * of the project teams. [Learn more about different API modes](/docs/admin). - * - * @param {string} search - * @param {number} limit - * @param {number} offset - * @param {string} orderType - * @throws {Error} - * @return {Promise} - */ - list(search: string, limit: number, offset: number, orderType: string): Promise; - - /** - * Create Team - * - * Create a new team. The user who creates the team will automatically be - * assigned as the owner of the team. The team owner can invite new members, - * who will be able add new owners and update or delete the team from your - * project. - * - * @param {string} name - * @param {string[]} roles - * @throws {Error} - * @return {Promise} - */ - create(name: string, roles: string[]): Promise; - - /** - * Get Team - * - * Get team by its unique ID. All team members have read access for this - * resource. - * - * @param {string} teamId - * @throws {Error} - * @return {Promise} - */ - get(teamId: string): Promise; - - /** - * Update Team - * - * Update team by its unique ID. Only team owners have write access for this - * resource. - * - * @param {string} teamId - * @param {string} name - * @throws {Error} - * @return {Promise} - */ - update(teamId: string, name: string): Promise; - - /** - * Delete Team - * - * Delete team by its unique ID. Only team owners have write access for this - * resource. - * - * @param {string} teamId - * @throws {Error} - * @return {Promise} - */ - delete(teamId: string): Promise; - - /** - * Get Team Memberships - * - * Get team members by the team unique ID. All team members have read access - * for this list of resources. - * - * @param {string} teamId - * @param {string} search - * @param {number} limit - * @param {number} offset - * @param {string} orderType - * @throws {Error} - * @return {Promise} - */ - getMemberships(teamId: string, search: string, limit: number, offset: number, orderType: string): Promise; - - /** - * Create Team Membership - * - * Use this endpoint to invite a new member to join your team. An email with a - * link to join the team will be sent to the new member email address if the - * member doesn't exist in the project it will be created automatically. - * - * Use the 'URL' parameter to redirect the user from the invitation email back - * to your app. When the user is redirected, use the [Update Team Membership - * Status](/docs/client/teams#updateMembershipStatus) endpoint to allow the - * user to accept the invitation to the team. - * - * Please note that in order to avoid a [Redirect - * Attacks](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) - * the only valid redirect URL's are the once from domains you have set when - * added your platforms in the console interface. - * - * @param {string} teamId - * @param {string} email - * @param {string[]} roles - * @param {string} url - * @param {string} name - * @throws {Error} - * @return {Promise} - */ - createMembership(teamId: string, email: string, roles: string[], url: string, name: string): Promise; - - /** - * 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 he didn't accept it. - * - * @param {string} teamId - * @param {string} inviteId - * @throws {Error} - * @return {Promise} - */ - deleteMembership(teamId: string, inviteId: string): Promise; - - /** - * Update Team Membership Status - * - * Use this endpoint to allow a user to accept an invitation to join a team - * after he is being redirected back to your app from the invitation email he - * was sent. - * - * @param {string} teamId - * @param {string} inviteId - * @param {string} userId - * @param {string} secret - * @throws {Error} - * @return {Promise} - */ - updateMembershipStatus(teamId: string, inviteId: string, userId: string, secret: string): Promise; - - } - - export interface Users { - - /** - * List Users - * - * Get a list of all the project users. You can use the query params to filter - * your results. - * - * @param {string} search - * @param {number} limit - * @param {number} offset - * @param {string} orderType - * @throws {Error} - * @return {Promise} - */ - list(search: string, limit: number, offset: number, orderType: string): Promise; - - /** - * Create User - * - * Create a new user. - * - * @param {string} email - * @param {string} password - * @param {string} name - * @throws {Error} - * @return {Promise} - */ - create(email: string, password: string, name: string): Promise; - - /** - * Get User - * - * Get user by its unique ID. - * - * @param {string} userId - * @throws {Error} - * @return {Promise} - */ - get(userId: string): Promise; - - /** - * Delete User - * - * Delete a user by its unique ID. - * - * @param {string} userId - * @throws {Error} - * @return {Promise} - */ - deleteUser(userId: string): Promise; - - /** - * Get User Logs - * - * Get user activity logs list by its unique ID. - * - * @param {string} userId - * @throws {Error} - * @return {Promise} - */ - getLogs(userId: string): Promise; - - /** - * Get User Preferences - * - * Get user preferences by its unique ID. - * - * @param {string} userId - * @throws {Error} - * @return {Promise} - */ - getPrefs(userId: string): Promise; - - /** - * Update User Preferences - * - * Update user preferences by its unique ID. You can pass only the specific - * settings you wish to update. - * - * @param {string} userId - * @param {object} prefs - * @throws {Error} - * @return {Promise} - */ - updatePrefs(userId: string, prefs: object): Promise; - - /** - * Get User Sessions - * - * Get user sessions list by its unique ID. - * - * @param {string} userId - * @throws {Error} - * @return {Promise} - */ - getSessions(userId: string): Promise; - - /** - * Delete User Sessions - * - * Delete all user sessions by its unique ID. - * - * @param {string} userId - * @throws {Error} - * @return {Promise} - */ - deleteSessions(userId: string): Promise; - - /** - * Delete User Session - * - * Delete user sessions by its unique ID. - * - * @param {string} userId - * @param {string} sessionId - * @throws {Error} - * @return {Promise} - */ - deleteSession(userId: string, sessionId: string): Promise; - - /** - * Update User Status - * - * Update user status by its unique ID. - * - * @param {string} userId - * @param {string} status - * @throws {Error} - * @return {Promise} - */ - updateStatus(userId: string, status: string): Promise; - - } - - -} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/CHANGELOG.md b/app/sdks/0.7.0/server-deno/CHANGELOG.md deleted file mode 100644 index fa4d35e687..0000000000 --- a/app/sdks/0.7.0/server-deno/CHANGELOG.md +++ /dev/null @@ -1 +0,0 @@ -# Change Log \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/LICENSE b/app/sdks/0.7.0/server-deno/LICENSE deleted file mode 100644 index fc7c051a91..0000000000 --- a/app/sdks/0.7.0/server-deno/LICENSE +++ /dev/null @@ -1,12 +0,0 @@ -Copyright (c) 2019 Appwrite (https://appwrite.io) and individual contributors. -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - - 3. Neither the name Appwrite nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/README.md b/app/sdks/0.7.0/server-deno/README.md deleted file mode 100644 index 82bd02c8ef..0000000000 --- a/app/sdks/0.7.0/server-deno/README.md +++ /dev/null @@ -1,28 +0,0 @@ -# Appwrite Deno SDK - -![License](https://img.shields.io/github/license/appwrite/sdk-for-deno.svg?v=1) -![Version](https://img.shields.io/badge/api%20version-0.6.2-blue.svg?v=1) - -**This SDK is compatible with Appwrite server version 0.6.2. For older versions, please check previous releases.** - -Appwrite is an open-source backend as a service server that abstract and simplify complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way. - Use the Deno SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools. - For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs) - - - -![Appwrite](https://appwrite.io/images/github.png) - -## Installation - -```javascript -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; -``` - -## Contribution - -This library is auto-generated by Appwrite custom [SDK Generator](https://github.com/appwrite/sdk-generator). To learn more about how you can help us improve this SDK, please check the [contribution guide](https://github.com/appwrite/sdk-generator/blob/master/CONTRIBUTING.md) before sending a pull-request. - -## License - -Please see the [BSD-3-Clause license](https://raw.githubusercontent.com/appwrite/appwrite/master/LICENSE) file for more information. \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/avatars/get-browser.md b/app/sdks/0.7.0/server-deno/docs/examples/avatars/get-browser.md deleted file mode 100644 index 27c0336054..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/avatars/get-browser.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let avatars = new sdk.Avatars(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = avatars.getBrowser('aa'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/avatars/get-credit-card.md b/app/sdks/0.7.0/server-deno/docs/examples/avatars/get-credit-card.md deleted file mode 100644 index 998356a106..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/avatars/get-credit-card.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let avatars = new sdk.Avatars(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = avatars.getCreditCard('amex'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/avatars/get-favicon.md b/app/sdks/0.7.0/server-deno/docs/examples/avatars/get-favicon.md deleted file mode 100644 index 43afe096c4..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/avatars/get-favicon.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let avatars = new sdk.Avatars(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = avatars.getFavicon('https://example.com'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/avatars/get-flag.md b/app/sdks/0.7.0/server-deno/docs/examples/avatars/get-flag.md deleted file mode 100644 index 6b28e5db2f..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/avatars/get-flag.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let avatars = new sdk.Avatars(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = avatars.getFlag('af'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/avatars/get-image.md b/app/sdks/0.7.0/server-deno/docs/examples/avatars/get-image.md deleted file mode 100644 index 0a2693c768..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/avatars/get-image.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let avatars = new sdk.Avatars(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = avatars.getImage('https://example.com'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/avatars/get-q-r.md b/app/sdks/0.7.0/server-deno/docs/examples/avatars/get-q-r.md deleted file mode 100644 index 6d8446b105..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/avatars/get-q-r.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let avatars = new sdk.Avatars(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = avatars.getQR('[TEXT]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/database/create-collection.md b/app/sdks/0.7.0/server-deno/docs/examples/database/create-collection.md deleted file mode 100644 index 316ae6b222..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/database/create-collection.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let database = new sdk.Database(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = database.createCollection('[NAME]', [], [], []); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/database/create-document.md b/app/sdks/0.7.0/server-deno/docs/examples/database/create-document.md deleted file mode 100644 index ef78a839a4..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/database/create-document.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let database = new sdk.Database(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = database.createDocument('[COLLECTION_ID]', {}, [], []); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/database/delete-collection.md b/app/sdks/0.7.0/server-deno/docs/examples/database/delete-collection.md deleted file mode 100644 index e9b5d6392b..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/database/delete-collection.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let database = new sdk.Database(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = database.deleteCollection('[COLLECTION_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/database/delete-document.md b/app/sdks/0.7.0/server-deno/docs/examples/database/delete-document.md deleted file mode 100644 index b7d3f52c71..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/database/delete-document.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let database = new sdk.Database(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = database.deleteDocument('[COLLECTION_ID]', '[DOCUMENT_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/database/get-collection-logs.md b/app/sdks/0.7.0/server-deno/docs/examples/database/get-collection-logs.md deleted file mode 100644 index a72c17bc16..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/database/get-collection-logs.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let database = new sdk.Database(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = database.getCollectionLogs('[COLLECTION_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/database/get-collection.md b/app/sdks/0.7.0/server-deno/docs/examples/database/get-collection.md deleted file mode 100644 index 323bc7ec74..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/database/get-collection.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let database = new sdk.Database(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = database.getCollection('[COLLECTION_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/database/get-document.md b/app/sdks/0.7.0/server-deno/docs/examples/database/get-document.md deleted file mode 100644 index 7a0332251a..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/database/get-document.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let database = new sdk.Database(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = database.getDocument('[COLLECTION_ID]', '[DOCUMENT_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/database/list-collections.md b/app/sdks/0.7.0/server-deno/docs/examples/database/list-collections.md deleted file mode 100644 index 292e46f860..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/database/list-collections.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let database = new sdk.Database(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = database.listCollections(); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/database/list-documents.md b/app/sdks/0.7.0/server-deno/docs/examples/database/list-documents.md deleted file mode 100644 index bb22a3956a..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/database/list-documents.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let database = new sdk.Database(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = database.listDocuments('[COLLECTION_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/database/update-collection.md b/app/sdks/0.7.0/server-deno/docs/examples/database/update-collection.md deleted file mode 100644 index 8239e45f28..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/database/update-collection.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let database = new sdk.Database(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = database.updateCollection('[COLLECTION_ID]', '[NAME]', [], []); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/database/update-document.md b/app/sdks/0.7.0/server-deno/docs/examples/database/update-document.md deleted file mode 100644 index cd079c8f2d..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/database/update-document.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let database = new sdk.Database(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = database.updateDocument('[COLLECTION_ID]', '[DOCUMENT_ID]', {}, [], []); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/health/get-anti-virus.md b/app/sdks/0.7.0/server-deno/docs/examples/health/get-anti-virus.md deleted file mode 100644 index e06fbf86de..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/health/get-anti-virus.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let health = new sdk.Health(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = health.getAntiVirus(); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/health/get-cache.md b/app/sdks/0.7.0/server-deno/docs/examples/health/get-cache.md deleted file mode 100644 index b58ca1bc15..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/health/get-cache.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let health = new sdk.Health(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = health.getCache(); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/health/get-d-b.md b/app/sdks/0.7.0/server-deno/docs/examples/health/get-d-b.md deleted file mode 100644 index 946cfb03a8..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/health/get-d-b.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let health = new sdk.Health(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = health.getDB(); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/health/get-queue-certificates.md b/app/sdks/0.7.0/server-deno/docs/examples/health/get-queue-certificates.md deleted file mode 100644 index a86358bb22..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/health/get-queue-certificates.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let health = new sdk.Health(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = health.getQueueCertificates(); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/health/get-queue-functions.md b/app/sdks/0.7.0/server-deno/docs/examples/health/get-queue-functions.md deleted file mode 100644 index 033248b118..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/health/get-queue-functions.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let health = new sdk.Health(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = health.getQueueFunctions(); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/health/get-queue-logs.md b/app/sdks/0.7.0/server-deno/docs/examples/health/get-queue-logs.md deleted file mode 100644 index d4c3300a35..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/health/get-queue-logs.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let health = new sdk.Health(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = health.getQueueLogs(); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/health/get-queue-tasks.md b/app/sdks/0.7.0/server-deno/docs/examples/health/get-queue-tasks.md deleted file mode 100644 index 01e3094ffc..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/health/get-queue-tasks.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let health = new sdk.Health(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = health.getQueueTasks(); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/health/get-queue-usage.md b/app/sdks/0.7.0/server-deno/docs/examples/health/get-queue-usage.md deleted file mode 100644 index d0d8faf7b6..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/health/get-queue-usage.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let health = new sdk.Health(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = health.getQueueUsage(); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/health/get-queue-webhooks.md b/app/sdks/0.7.0/server-deno/docs/examples/health/get-queue-webhooks.md deleted file mode 100644 index 268c521373..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/health/get-queue-webhooks.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let health = new sdk.Health(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = health.getQueueWebhooks(); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/health/get-storage-local.md b/app/sdks/0.7.0/server-deno/docs/examples/health/get-storage-local.md deleted file mode 100644 index 77bb658f9a..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/health/get-storage-local.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let health = new sdk.Health(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = health.getStorageLocal(); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/health/get-time.md b/app/sdks/0.7.0/server-deno/docs/examples/health/get-time.md deleted file mode 100644 index 0e5205b075..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/health/get-time.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let health = new sdk.Health(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = health.getTime(); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/health/get.md b/app/sdks/0.7.0/server-deno/docs/examples/health/get.md deleted file mode 100644 index c2e6ecdf65..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/health/get.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let health = new sdk.Health(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = health.get(); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/locale/get-continents.md b/app/sdks/0.7.0/server-deno/docs/examples/locale/get-continents.md deleted file mode 100644 index 18221d44b4..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/locale/get-continents.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let locale = new sdk.Locale(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = locale.getContinents(); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/locale/get-countries-e-u.md b/app/sdks/0.7.0/server-deno/docs/examples/locale/get-countries-e-u.md deleted file mode 100644 index 4a3e49f755..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/locale/get-countries-e-u.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let locale = new sdk.Locale(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = locale.getCountriesEU(); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/locale/get-countries-phones.md b/app/sdks/0.7.0/server-deno/docs/examples/locale/get-countries-phones.md deleted file mode 100644 index 61a1790806..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/locale/get-countries-phones.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let locale = new sdk.Locale(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = locale.getCountriesPhones(); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/locale/get-countries.md b/app/sdks/0.7.0/server-deno/docs/examples/locale/get-countries.md deleted file mode 100644 index 20f544e617..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/locale/get-countries.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let locale = new sdk.Locale(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = locale.getCountries(); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/locale/get-currencies.md b/app/sdks/0.7.0/server-deno/docs/examples/locale/get-currencies.md deleted file mode 100644 index 13b975291d..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/locale/get-currencies.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let locale = new sdk.Locale(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = locale.getCurrencies(); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/locale/get.md b/app/sdks/0.7.0/server-deno/docs/examples/locale/get.md deleted file mode 100644 index 2336c3289d..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/locale/get.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let locale = new sdk.Locale(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = locale.get(); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/storage/create-file.md b/app/sdks/0.7.0/server-deno/docs/examples/storage/create-file.md deleted file mode 100644 index 5b446e1a38..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/storage/create-file.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let storage = new sdk.Storage(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = storage.createFile(new File([fileBlob], 'file.png'), [], []); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/storage/delete-file.md b/app/sdks/0.7.0/server-deno/docs/examples/storage/delete-file.md deleted file mode 100644 index 6469308c74..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/storage/delete-file.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let storage = new sdk.Storage(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = storage.deleteFile('[FILE_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/storage/get-file-download.md b/app/sdks/0.7.0/server-deno/docs/examples/storage/get-file-download.md deleted file mode 100644 index 4510257bad..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/storage/get-file-download.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let storage = new sdk.Storage(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = storage.getFileDownload('[FILE_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/storage/get-file-preview.md b/app/sdks/0.7.0/server-deno/docs/examples/storage/get-file-preview.md deleted file mode 100644 index 282fb30324..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/storage/get-file-preview.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let storage = new sdk.Storage(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = storage.getFilePreview('[FILE_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/storage/get-file-view.md b/app/sdks/0.7.0/server-deno/docs/examples/storage/get-file-view.md deleted file mode 100644 index 8af5391017..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/storage/get-file-view.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let storage = new sdk.Storage(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = storage.getFileView('[FILE_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/storage/get-file.md b/app/sdks/0.7.0/server-deno/docs/examples/storage/get-file.md deleted file mode 100644 index 393ce229cb..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/storage/get-file.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let storage = new sdk.Storage(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = storage.getFile('[FILE_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/storage/list-files.md b/app/sdks/0.7.0/server-deno/docs/examples/storage/list-files.md deleted file mode 100644 index 0e57cd01de..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/storage/list-files.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let storage = new sdk.Storage(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = storage.listFiles(); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/storage/update-file.md b/app/sdks/0.7.0/server-deno/docs/examples/storage/update-file.md deleted file mode 100644 index 33b2263540..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/storage/update-file.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let storage = new sdk.Storage(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = storage.updateFile('[FILE_ID]', [], []); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/teams/create-membership.md b/app/sdks/0.7.0/server-deno/docs/examples/teams/create-membership.md deleted file mode 100644 index b277899c91..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/teams/create-membership.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let teams = new sdk.Teams(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = teams.createMembership('[TEAM_ID]', 'email@example.com', [], 'https://example.com'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/teams/create.md b/app/sdks/0.7.0/server-deno/docs/examples/teams/create.md deleted file mode 100644 index 1ef3e01b81..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/teams/create.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let teams = new sdk.Teams(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = teams.create('[NAME]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/teams/delete-membership.md b/app/sdks/0.7.0/server-deno/docs/examples/teams/delete-membership.md deleted file mode 100644 index 911fa30075..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/teams/delete-membership.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let teams = new sdk.Teams(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = teams.deleteMembership('[TEAM_ID]', '[INVITE_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/teams/delete.md b/app/sdks/0.7.0/server-deno/docs/examples/teams/delete.md deleted file mode 100644 index 61ac03483f..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/teams/delete.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let teams = new sdk.Teams(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = teams.delete('[TEAM_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/teams/get-memberships.md b/app/sdks/0.7.0/server-deno/docs/examples/teams/get-memberships.md deleted file mode 100644 index b652f8e4e5..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/teams/get-memberships.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let teams = new sdk.Teams(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = teams.getMemberships('[TEAM_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/teams/get.md b/app/sdks/0.7.0/server-deno/docs/examples/teams/get.md deleted file mode 100644 index 69496e3eef..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/teams/get.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let teams = new sdk.Teams(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = teams.get('[TEAM_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/teams/list.md b/app/sdks/0.7.0/server-deno/docs/examples/teams/list.md deleted file mode 100644 index 70851dda51..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/teams/list.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let teams = new sdk.Teams(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = teams.list(); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/teams/update.md b/app/sdks/0.7.0/server-deno/docs/examples/teams/update.md deleted file mode 100644 index 7b815b4050..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/teams/update.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let teams = new sdk.Teams(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = teams.update('[TEAM_ID]', '[NAME]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/users/create.md b/app/sdks/0.7.0/server-deno/docs/examples/users/create.md deleted file mode 100644 index 593eee6e9f..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/users/create.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let users = new sdk.Users(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = users.create('email@example.com', 'password'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/users/delete-session.md b/app/sdks/0.7.0/server-deno/docs/examples/users/delete-session.md deleted file mode 100644 index e4940773e4..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/users/delete-session.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let users = new sdk.Users(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = users.deleteSession('[USER_ID]', '[SESSION_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/users/delete-sessions.md b/app/sdks/0.7.0/server-deno/docs/examples/users/delete-sessions.md deleted file mode 100644 index e772c00a5f..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/users/delete-sessions.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let users = new sdk.Users(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = users.deleteSessions('[USER_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/users/get-logs.md b/app/sdks/0.7.0/server-deno/docs/examples/users/get-logs.md deleted file mode 100644 index 58cc4fc529..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/users/get-logs.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let users = new sdk.Users(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = users.getLogs('[USER_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/users/get-prefs.md b/app/sdks/0.7.0/server-deno/docs/examples/users/get-prefs.md deleted file mode 100644 index 4cda0bb73e..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/users/get-prefs.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let users = new sdk.Users(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = users.getPrefs('[USER_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/users/get-sessions.md b/app/sdks/0.7.0/server-deno/docs/examples/users/get-sessions.md deleted file mode 100644 index 6686e21564..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/users/get-sessions.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let users = new sdk.Users(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = users.getSessions('[USER_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/users/get.md b/app/sdks/0.7.0/server-deno/docs/examples/users/get.md deleted file mode 100644 index dce73d62c5..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/users/get.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let users = new sdk.Users(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = users.get('[USER_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/users/list.md b/app/sdks/0.7.0/server-deno/docs/examples/users/list.md deleted file mode 100644 index b089c3e7e9..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/users/list.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let users = new sdk.Users(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = users.list(); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/users/update-prefs.md b/app/sdks/0.7.0/server-deno/docs/examples/users/update-prefs.md deleted file mode 100644 index b06185ee91..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/users/update-prefs.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let users = new sdk.Users(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = users.updatePrefs('[USER_ID]', {}); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/docs/examples/users/update-status.md b/app/sdks/0.7.0/server-deno/docs/examples/users/update-status.md deleted file mode 100644 index a0f028bde5..0000000000 --- a/app/sdks/0.7.0/server-deno/docs/examples/users/update-status.md +++ /dev/null @@ -1,20 +0,0 @@ -import * as sdk from "https://deno.land/x/appwrite/mod.ts"; - -// Init SDK -let client = new sdk.Client(); - -let users = new sdk.Users(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - - -let promise = users.updateStatus('[USER_ID]', '1'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/mod.ts b/app/sdks/0.7.0/server-deno/mod.ts deleted file mode 100644 index 3e51466fe6..0000000000 --- a/app/sdks/0.7.0/server-deno/mod.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { Client } from "./src/client.ts"; -import { Avatars } from "./src/services/avatars.ts"; -import { Database } from "./src/services/database.ts"; -import { Health } from "./src/services/health.ts"; -import { Locale } from "./src/services/locale.ts"; -import { Storage } from "./src/services/storage.ts"; -import { Teams } from "./src/services/teams.ts"; -import { Users } from "./src/services/users.ts"; - -export { - Client, - Avatars, - Database, - Health, - Locale, - Storage, - Teams, - Users, -}; \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/src/client.ts b/app/sdks/0.7.0/server-deno/src/client.ts deleted file mode 100644 index 3bf22034b8..0000000000 --- a/app/sdks/0.7.0/server-deno/src/client.ts +++ /dev/null @@ -1,138 +0,0 @@ -export interface DocumentData { - [key: string]: any; -} - -export class Client { - - endpoint: string = 'https://appwrite.io/v1'; - headers: DocumentData = { - 'content-type': '', - 'x-sdk-version': 'appwrite:deno:0.0.2', - }; - - /** - * Set Project - * - * Your project ID - * - * @param string value - * - * @return self - */ - setProject(value: string): this { - this.addHeader('X-Appwrite-Project', value); - - return this; - } - - /** - * Set Key - * - * Your secret API key - * - * @param string value - * - * @return self - */ - setKey(value: string): this { - this.addHeader('X-Appwrite-Key', value); - - return this; - } - - /** - * Set Locale - * - * @param string value - * - * @return self - */ - setLocale(value: string): this { - this.addHeader('X-Appwrite-Locale', value); - - return this; - } - - - /*** - * @param endpoint - * @return this - */ - setEndpoint(endpoint: string): this { - this.endpoint = endpoint; - - return this; - } - - /** - * @param key string - * @param value string - */ - addHeader(key: string, value: string): this { - this.headers[key.toLowerCase()] = value.toLowerCase(); - - return this; - } - - withoutHeader(key: string, headers: DocumentData): DocumentData { - return Object.keys(headers).reduce((acc: DocumentData, cv) => { - if (cv == 'content-type') return acc - acc[cv] = headers[cv] - return acc - }, {}) - } - - async call(method: string, path: string = '', headers: DocumentData = {}, params: DocumentData = {}) { - headers = Object.assign(this.headers, headers); - - let body; - const url = new URL(this.endpoint + path) - if (method.toUpperCase() === 'GET') { - url.search = new URLSearchParams(this.flatten(params)).toString() - body = null - } else if (headers['content-type'].toLowerCase().startsWith('multipart/form-data')) { - headers = this.withoutHeader('content-type', headers) - const formData = new FormData() - const flatParams = this.flatten(params) - for (const key in flatParams) { - formData.append(key, flatParams[key]); - } - body = formData - } else { - body = JSON.stringify(params) - } - - const options = { - method: method.toUpperCase(), - headers: headers, - body: body, - }; - - let response = await fetch(url.toString(), options); - const contentType = response.headers.get('content-type'); - - if (contentType && contentType.includes('application/json')) { - return response.json() - } - - return response; - } - - flatten(data: DocumentData, prefix = '') { - let output: DocumentData = {}; - - for (const key in data) { - let value = data[key]; - let finalKey = prefix ? prefix + '[' + key +']' : key; - - if (Array.isArray(value)) { - output = Object.assign(output, this.flatten(value, finalKey)); // @todo: handle name collision here if needed - } - else { - output[finalKey] = value; - } - } - - return output; - } -} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/src/service.ts b/app/sdks/0.7.0/server-deno/src/service.ts deleted file mode 100644 index ceedf1a0c3..0000000000 --- a/app/sdks/0.7.0/server-deno/src/service.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { Client } from "./client.ts"; - -export abstract class Service { - - client: Client; - - /** - * @param client - */ - constructor(client: Client) { - this.client = client; - } -} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/src/services/avatars.ts b/app/sdks/0.7.0/server-deno/src/services/avatars.ts deleted file mode 100644 index f70e950bed..0000000000 --- a/app/sdks/0.7.0/server-deno/src/services/avatars.ts +++ /dev/null @@ -1,163 +0,0 @@ -import { Service } from "../service.ts"; -import { DocumentData } from '../client.ts' - -export class Avatars extends Service { - - /** - * Get Browser Icon - * - * You can use this endpoint to show different browser icons to your users. - * The code argument receives the browser code as it appears in your user - * /account/sessions endpoint. Use width, height and quality arguments to - * change the output settings. - * - * @param string code - * @param number width - * @param number height - * @param number quality - * @throws Exception - * @return Promise - */ - async getBrowser(code: string, width: number = 100, height: number = 100, quality: number = 100): Promise { - let path = '/avatars/browsers/{code}'.replace(new RegExp('{code}', 'g'), code); - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - 'width': width, - 'height': height, - 'quality': quality - }); - } - - /** - * Get Credit Card Icon - * - * Need to display your users with your billing method or their payment - * methods? The credit card endpoint will return you the icon of the credit - * card provider you need. Use width, height and quality arguments to change - * the output settings. - * - * @param string code - * @param number width - * @param number height - * @param number quality - * @throws Exception - * @return Promise - */ - async getCreditCard(code: string, width: number = 100, height: number = 100, quality: number = 100): Promise { - let path = '/avatars/credit-cards/{code}'.replace(new RegExp('{code}', 'g'), code); - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - 'width': width, - 'height': height, - 'quality': quality - }); - } - - /** - * Get Favicon - * - * Use this endpoint to fetch the favorite icon (AKA favicon) of a any remote - * website URL. - * - * @param string url - * @throws Exception - * @return Promise - */ - async getFavicon(url: string): Promise { - let path = '/avatars/favicon'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - 'url': url - }); - } - - /** - * Get Country Flag - * - * You can use this endpoint to show different country flags icons to your - * users. The code argument receives the 2 letter country code. Use width, - * height and quality arguments to change the output settings. - * - * @param string code - * @param number width - * @param number height - * @param number quality - * @throws Exception - * @return Promise - */ - async getFlag(code: string, width: number = 100, height: number = 100, quality: number = 100): Promise { - let path = '/avatars/flags/{code}'.replace(new RegExp('{code}', 'g'), code); - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - 'width': width, - 'height': height, - 'quality': quality - }); - } - - /** - * Get Image from URL - * - * Use this endpoint to fetch a remote image URL and crop it to any image size - * you want. This endpoint is very useful if you need to crop and display - * remote images in your app or in case you want to make sure a 3rd party - * image is properly served using a TLS protocol. - * - * @param string url - * @param number width - * @param number height - * @throws Exception - * @return Promise - */ - async getImage(url: string, width: number = 400, height: number = 400): Promise { - let path = '/avatars/image'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - 'url': url, - 'width': width, - 'height': height - }); - } - - /** - * 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. - * - * @param string text - * @param number size - * @param number margin - * @param number download - * @throws Exception - * @return Promise - */ - async getQR(text: string, size: number = 400, margin: number = 1, download: number = 0): Promise { - let path = '/avatars/qr'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - 'text': text, - 'size': size, - 'margin': margin, - 'download': download - }); - } -} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/src/services/database.ts b/app/sdks/0.7.0/server-deno/src/services/database.ts deleted file mode 100644 index 164145ef82..0000000000 --- a/app/sdks/0.7.0/server-deno/src/services/database.ts +++ /dev/null @@ -1,285 +0,0 @@ -import { Service } from "../service.ts"; -import { DocumentData } from '../client.ts' - -export class Database extends Service { - - /** - * List Collections - * - * Get a list of all the user collections. You can use the query params to - * filter your results. On admin mode, this endpoint will return a list of all - * of the project collections. [Learn more about different API - * modes](/docs/admin). - * - * @param string search - * @param number limit - * @param number offset - * @param string orderType - * @throws Exception - * @return Promise - */ - async listCollections(search: string = '', limit: number = 25, offset: number = 0, orderType: string = 'ASC'): Promise { - let path = '/database/collections'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - 'search': search, - 'limit': limit, - 'offset': offset, - 'orderType': orderType - }); - } - - /** - * Create Collection - * - * Create a new Collection. - * - * @param string name - * @param Array read - * @param Array write - * @param Array rules - * @throws Exception - * @return Promise - */ - async createCollection(name: string, read: Array, write: Array, rules: Array): Promise { - let path = '/database/collections'; - - return await this.client.call('post', path, { - 'content-type': 'application/json', - }, - { - 'name': name, - 'read': read, - 'write': write, - 'rules': rules - }); - } - - /** - * Get Collection - * - * Get collection by its unique ID. This endpoint response returns a JSON - * object with the collection metadata. - * - * @param string collectionId - * @throws Exception - * @return Promise - */ - async getCollection(collectionId: string): Promise { - let path = '/database/collections/{collectionId}'.replace(new RegExp('{collectionId}', 'g'), collectionId); - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Update Collection - * - * Update collection by its unique ID. - * - * @param string collectionId - * @param string name - * @param Array read - * @param Array write - * @param Array rules - * @throws Exception - * @return Promise - */ - async updateCollection(collectionId: string, name: string, read: Array, write: Array, rules: Array = []): Promise { - let path = '/database/collections/{collectionId}'.replace(new RegExp('{collectionId}', 'g'), collectionId); - - return await this.client.call('put', path, { - 'content-type': 'application/json', - }, - { - 'name': name, - 'read': read, - 'write': write, - 'rules': rules - }); - } - - /** - * Delete Collection - * - * Delete a collection by its unique ID. Only users with write permissions - * have access to delete this resource. - * - * @param string collectionId - * @throws Exception - * @return Promise - */ - async deleteCollection(collectionId: string): Promise { - let path = '/database/collections/{collectionId}'.replace(new RegExp('{collectionId}', 'g'), collectionId); - - return await this.client.call('delete', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * List Documents - * - * Get a list of all the user documents. You can use the query params to - * filter your results. On admin mode, this endpoint will return a list of all - * of the project documents. [Learn more about different API - * modes](/docs/admin). - * - * @param string collectionId - * @param Array filters - * @param number offset - * @param number limit - * @param string orderField - * @param string orderType - * @param string orderCast - * @param string search - * @param number first - * @param number last - * @throws Exception - * @return Promise - */ - async listDocuments(collectionId: string, filters: Array = [], offset: number = 0, limit: number = 50, orderField: string = '$id', orderType: string = 'ASC', orderCast: string = 'string', search: string = '', first: number = 0, last: number = 0): Promise { - let path = '/database/collections/{collectionId}/documents'.replace(new RegExp('{collectionId}', 'g'), collectionId); - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - 'filters': filters, - 'offset': offset, - 'limit': limit, - 'orderField': orderField, - 'orderType': orderType, - 'orderCast': orderCast, - 'search': search, - 'first': first, - 'last': last - }); - } - - /** - * Create Document - * - * Create a new Document. Before using this route, you should create a new - * collection resource using either a [server - * integration](/docs/server/database?sdk=nodejs#createCollection) API or - * directly from your database console. - * - * @param string collectionId - * @param DocumentData data - * @param Array read - * @param Array write - * @param string parentDocument - * @param string parentProperty - * @param string parentPropertyType - * @throws Exception - * @return Promise - */ - async createDocument(collectionId: string, data: DocumentData, read: Array, write: Array, parentDocument: string = '', parentProperty: string = '', parentPropertyType: string = 'assign'): Promise { - let path = '/database/collections/{collectionId}/documents'.replace(new RegExp('{collectionId}', 'g'), collectionId); - - return await this.client.call('post', path, { - 'content-type': 'application/json', - }, - { - 'data': data, - 'read': read, - 'write': write, - 'parentDocument': parentDocument, - 'parentProperty': parentProperty, - 'parentPropertyType': parentPropertyType - }); - } - - /** - * Get Document - * - * Get document by its unique ID. This endpoint response returns a JSON object - * with the document data. - * - * @param string collectionId - * @param string documentId - * @throws Exception - * @return Promise - */ - async getDocument(collectionId: string, documentId: string): Promise { - let path = '/database/collections/{collectionId}/documents/{documentId}'.replace(new RegExp('{collectionId}', 'g'), collectionId).replace(new RegExp('{documentId}', 'g'), documentId); - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Update Document - * - * @param string collectionId - * @param string documentId - * @param DocumentData data - * @param Array read - * @param Array write - * @throws Exception - * @return Promise - */ - async updateDocument(collectionId: string, documentId: string, data: DocumentData, read: Array, write: Array): Promise { - let path = '/database/collections/{collectionId}/documents/{documentId}'.replace(new RegExp('{collectionId}', 'g'), collectionId).replace(new RegExp('{documentId}', 'g'), documentId); - - return await this.client.call('patch', path, { - 'content-type': 'application/json', - }, - { - 'data': data, - 'read': read, - 'write': write - }); - } - - /** - * Delete Document - * - * Delete document by its unique ID. This endpoint deletes only the parent - * documents, his attributes and relations to other documents. Child documents - * **will not** be deleted. - * - * @param string collectionId - * @param string documentId - * @throws Exception - * @return Promise - */ - async deleteDocument(collectionId: string, documentId: string): Promise { - let path = '/database/collections/{collectionId}/documents/{documentId}'.replace(new RegExp('{collectionId}', 'g'), collectionId).replace(new RegExp('{documentId}', 'g'), documentId); - - return await this.client.call('delete', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Get Collection Logs - * - * @param string collectionId - * @throws Exception - * @return Promise - */ - async getCollectionLogs(collectionId: string): Promise { - let path = '/database/collections/{collectionId}/logs'.replace(new RegExp('{collectionId}', 'g'), collectionId); - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } -} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/src/services/health.ts b/app/sdks/0.7.0/server-deno/src/services/health.ts deleted file mode 100644 index df5c18a2cb..0000000000 --- a/app/sdks/0.7.0/server-deno/src/services/health.ts +++ /dev/null @@ -1,232 +0,0 @@ -import { Service } from "../service.ts"; -import { DocumentData } from '../client.ts' - -export class Health extends Service { - - /** - * Get HTTP - * - * Check the Appwrite HTTP server is up and responsive. - * - * @throws Exception - * @return Promise - */ - async get(): Promise { - let path = '/health'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Get Anti virus - * - * Check the Appwrite Anti Virus server is up and connection is successful. - * - * @throws Exception - * @return Promise - */ - async getAntiVirus(): Promise { - let path = '/health/anti-virus'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Get Cache - * - * Check the Appwrite in-memory cache server is up and connection is - * successful. - * - * @throws Exception - * @return Promise - */ - async getCache(): Promise { - let path = '/health/cache'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Get DB - * - * Check the Appwrite database server is up and connection is successful. - * - * @throws Exception - * @return Promise - */ - async getDB(): Promise { - let path = '/health/db'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Get Certificate Queue - * - * Get the number of certificates that are waiting to be issued against - * [Letsencrypt](https://letsencrypt.org/) in the Appwrite internal queue - * server. - * - * @throws Exception - * @return Promise - */ - async getQueueCertificates(): Promise { - let path = '/health/queue/certificates'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Get Functions Queue - * - * @throws Exception - * @return Promise - */ - async getQueueFunctions(): Promise { - let path = '/health/queue/functions'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Get Logs Queue - * - * Get the number of logs that are waiting to be processed in the Appwrite - * internal queue server. - * - * @throws Exception - * @return Promise - */ - async getQueueLogs(): Promise { - let path = '/health/queue/logs'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Get Tasks Queue - * - * Get the number of tasks that are waiting to be processed in the Appwrite - * internal queue server. - * - * @throws Exception - * @return Promise - */ - async getQueueTasks(): Promise { - let path = '/health/queue/tasks'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Get Usage Queue - * - * Get the number of usage stats that are waiting to be processed in the - * Appwrite internal queue server. - * - * @throws Exception - * @return Promise - */ - async getQueueUsage(): Promise { - let path = '/health/queue/usage'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Get Webhooks Queue - * - * Get the number of webhooks that are waiting to be processed in the Appwrite - * internal queue server. - * - * @throws Exception - * @return Promise - */ - async getQueueWebhooks(): Promise { - let path = '/health/queue/webhooks'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Get Local Storage - * - * Check the Appwrite local storage device is up and connection is successful. - * - * @throws Exception - * @return Promise - */ - async getStorageLocal(): Promise { - let path = '/health/storage/local'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Get Time - * - * Check the Appwrite server time is synced with Google remote NTP server. We - * use this technology to smoothly handle leap seconds with no disruptive - * events. The [Network Time - * Protocol](https://en.wikipedia.org/wiki/Network_Time_Protocol) (NTP) is - * 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. - * - * @throws Exception - * @return Promise - */ - async getTime(): Promise { - let path = '/health/time'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } -} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/src/services/locale.ts b/app/sdks/0.7.0/server-deno/src/services/locale.ts deleted file mode 100644 index 0c42ac61d2..0000000000 --- a/app/sdks/0.7.0/server-deno/src/services/locale.ts +++ /dev/null @@ -1,124 +0,0 @@ -import { Service } from "../service.ts"; -import { DocumentData } from '../client.ts' - -export class Locale extends Service { - - /** - * Get User Locale - * - * Get the current user location based on IP. Returns an object with user - * country code, country name, continent name, continent code, ip address and - * suggested currency. You can use the locale header to get the data in a - * supported language. - * - * ([IP Geolocation by DB-IP](https://db-ip.com)) - * - * @throws Exception - * @return Promise - */ - async get(): Promise { - let path = '/locale'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * List Continents - * - * List of all continents. You can use the locale header to get the data in a - * supported language. - * - * @throws Exception - * @return Promise - */ - async getContinents(): Promise { - let path = '/locale/continents'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * List Countries - * - * List of all countries. You can use the locale header to get the data in a - * supported language. - * - * @throws Exception - * @return Promise - */ - async getCountries(): Promise { - let path = '/locale/countries'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * 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. - * - * @throws Exception - * @return Promise - */ - async getCountriesEU(): Promise { - let path = '/locale/countries/eu'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * List Countries Phone Codes - * - * List of all countries phone codes. You can use the locale header to get the - * data in a supported language. - * - * @throws Exception - * @return Promise - */ - async getCountriesPhones(): Promise { - let path = '/locale/countries/phones'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * List Currencies - * - * List of all currencies, including currency symol, 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. - * - * @throws Exception - * @return Promise - */ - async getCurrencies(): Promise { - let path = '/locale/currencies'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } -} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/src/services/storage.ts b/app/sdks/0.7.0/server-deno/src/services/storage.ts deleted file mode 100644 index b663739e05..0000000000 --- a/app/sdks/0.7.0/server-deno/src/services/storage.ts +++ /dev/null @@ -1,198 +0,0 @@ -import { Service } from "../service.ts"; -import { DocumentData } from '../client.ts' - -export class Storage extends Service { - - /** - * List Files - * - * Get a list of all the user files. You can use the query params to filter - * your results. On admin mode, this endpoint will return a list of all of the - * project files. [Learn more about different API modes](/docs/admin). - * - * @param string search - * @param number limit - * @param number offset - * @param string orderType - * @throws Exception - * @return Promise - */ - async listFiles(search: string = '', limit: number = 25, offset: number = 0, orderType: string = 'ASC'): Promise { - let path = '/storage/files'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - 'search': search, - 'limit': limit, - 'offset': offset, - 'orderType': orderType - }); - } - - /** - * Create File - * - * Create a new file. The user who creates the file will automatically be - * assigned to read and write access unless he has passed custom values for - * read and write arguments. - * - * @param File | Blob file - * @param Array read - * @param Array write - * @throws Exception - * @return Promise - */ - async createFile(file: File | Blob, read: Array, write: Array): Promise { - let path = '/storage/files'; - - return await this.client.call('post', path, { - 'content-type': 'multipart/form-data', - }, - { - 'file': file, - 'read': read, - 'write': write - }); - } - - /** - * Get File - * - * Get file by its unique ID. This endpoint response returns a JSON object - * with the file metadata. - * - * @param string fileId - * @throws Exception - * @return Promise - */ - async getFile(fileId: string): Promise { - let path = '/storage/files/{fileId}'.replace(new RegExp('{fileId}', 'g'), fileId); - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Update File - * - * Update file by its unique ID. Only users with write permissions have access - * to update this resource. - * - * @param string fileId - * @param Array read - * @param Array write - * @throws Exception - * @return Promise - */ - async updateFile(fileId: string, read: Array, write: Array): Promise { - let path = '/storage/files/{fileId}'.replace(new RegExp('{fileId}', 'g'), fileId); - - return await this.client.call('put', path, { - 'content-type': 'application/json', - }, - { - 'read': read, - 'write': write - }); - } - - /** - * Delete File - * - * Delete a file by its unique ID. Only users with write permissions have - * access to delete this resource. - * - * @param string fileId - * @throws Exception - * @return Promise - */ - async deleteFile(fileId: string): Promise { - let path = '/storage/files/{fileId}'.replace(new RegExp('{fileId}', 'g'), fileId); - - return await this.client.call('delete', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Get File for Download - * - * Get 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. - * - * @param string fileId - * @throws Exception - * @return Promise - */ - async getFileDownload(fileId: string): Promise { - let path = '/storage/files/{fileId}/download'.replace(new RegExp('{fileId}', 'g'), fileId); - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Get File Preview - * - * Get a file preview image. Currently, this method supports preview for image - * files (jpg, png, and gif), other supported formats, like pdf, docs, slides, - * and spreadsheets, will return the file icon image. You can also pass query - * string arguments for cutting and resizing your preview image. - * - * @param string fileId - * @param number width - * @param number height - * @param number quality - * @param string background - * @param string output - * @throws Exception - * @return Promise - */ - async getFilePreview(fileId: string, width: number = 0, height: number = 0, quality: number = 100, background: string = '', output: string = ''): Promise { - let path = '/storage/files/{fileId}/preview'.replace(new RegExp('{fileId}', 'g'), fileId); - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - 'width': width, - 'height': height, - 'quality': quality, - 'background': background, - 'output': output - }); - } - - /** - * Get File for View - * - * Get file content by its unique ID. This endpoint is similar to the download - * method but returns with no 'Content-Disposition: attachment' header. - * - * @param string fileId - * @param string as - * @throws Exception - * @return Promise - */ - async getFileView(fileId: string, as: string = ''): Promise { - let path = '/storage/files/{fileId}/view'.replace(new RegExp('{fileId}', 'g'), fileId); - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - 'as': as - }); - } -} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/src/services/teams.ts b/app/sdks/0.7.0/server-deno/src/services/teams.ts deleted file mode 100644 index b80c2f6714..0000000000 --- a/app/sdks/0.7.0/server-deno/src/services/teams.ts +++ /dev/null @@ -1,201 +0,0 @@ -import { Service } from "../service.ts"; -import { DocumentData } from '../client.ts' - -export class Teams extends Service { - - /** - * List Teams - * - * Get a list of all the current user teams. You can use the query params to - * filter your results. On admin mode, this endpoint will return a list of all - * of the project teams. [Learn more about different API modes](/docs/admin). - * - * @param string search - * @param number limit - * @param number offset - * @param string orderType - * @throws Exception - * @return Promise - */ - async list(search: string = '', limit: number = 25, offset: number = 0, orderType: string = 'ASC'): Promise { - let path = '/teams'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - 'search': search, - 'limit': limit, - 'offset': offset, - 'orderType': orderType - }); - } - - /** - * Create Team - * - * Create a new team. The user who creates the team will automatically be - * assigned as the owner of the team. The team owner can invite new members, - * who will be able add new owners and update or delete the team from your - * project. - * - * @param string name - * @param Array roles - * @throws Exception - * @return Promise - */ - async create(name: string, roles: Array = ["owner"]): Promise { - let path = '/teams'; - - return await this.client.call('post', path, { - 'content-type': 'application/json', - }, - { - 'name': name, - 'roles': roles - }); - } - - /** - * Get Team - * - * Get team by its unique ID. All team members have read access for this - * resource. - * - * @param string teamId - * @throws Exception - * @return Promise - */ - async get(teamId: string): Promise { - let path = '/teams/{teamId}'.replace(new RegExp('{teamId}', 'g'), teamId); - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Update Team - * - * Update team by its unique ID. Only team owners have write access for this - * resource. - * - * @param string teamId - * @param string name - * @throws Exception - * @return Promise - */ - async update(teamId: string, name: string): Promise { - let path = '/teams/{teamId}'.replace(new RegExp('{teamId}', 'g'), teamId); - - return await this.client.call('put', path, { - 'content-type': 'application/json', - }, - { - 'name': name - }); - } - - /** - * Delete Team - * - * Delete team by its unique ID. Only team owners have write access for this - * resource. - * - * @param string teamId - * @throws Exception - * @return Promise - */ - async delete(teamId: string): Promise { - let path = '/teams/{teamId}'.replace(new RegExp('{teamId}', 'g'), teamId); - - return await this.client.call('delete', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Get Team Memberships - * - * Get team members by the team unique ID. All team members have read access - * for this list of resources. - * - * @param string teamId - * @throws Exception - * @return Promise - */ - async getMemberships(teamId: string): Promise { - let path = '/teams/{teamId}/memberships'.replace(new RegExp('{teamId}', 'g'), teamId); - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Create Team Membership - * - * Use this endpoint to invite a new member to join your team. An email with a - * link to join the team will be sent to the new member email address if the - * member doesn't exist in the project it will be created automatically. - * - * Use the 'URL' parameter to redirect the user from the invitation email back - * to your app. When the user is redirected, use the [Update Team Membership - * Status](/docs/client/teams#updateMembershipStatus) endpoint to allow the - * user to accept the invitation to the team. - * - * Please note that in order to avoid a [Redirect - * Attacks](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) - * the only valid redirect URL's are the once from domains you have set when - * added your platforms in the console interface. - * - * @param string teamId - * @param string email - * @param Array roles - * @param string url - * @param string name - * @throws Exception - * @return Promise - */ - async createMembership(teamId: string, email: string, roles: Array, url: string, name: string = ''): Promise { - let path = '/teams/{teamId}/memberships'.replace(new RegExp('{teamId}', 'g'), teamId); - - return await this.client.call('post', path, { - 'content-type': 'application/json', - }, - { - 'email': email, - 'name': name, - 'roles': roles, - 'url': url - }); - } - - /** - * 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 he didn't accept it. - * - * @param string teamId - * @param string inviteId - * @throws Exception - * @return Promise - */ - async deleteMembership(teamId: string, inviteId: string): Promise { - let path = '/teams/{teamId}/memberships/{inviteId}'.replace(new RegExp('{teamId}', 'g'), teamId).replace(new RegExp('{inviteId}', 'g'), inviteId); - - return await this.client.call('delete', path, { - 'content-type': 'application/json', - }, - { - }); - } -} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-deno/src/services/users.ts b/app/sdks/0.7.0/server-deno/src/services/users.ts deleted file mode 100644 index ac48507f08..0000000000 --- a/app/sdks/0.7.0/server-deno/src/services/users.ts +++ /dev/null @@ -1,214 +0,0 @@ -import { Service } from "../service.ts"; -import { DocumentData } from '../client.ts' - -export class Users extends Service { - - /** - * List Users - * - * Get a list of all the project users. You can use the query params to filter - * your results. - * - * @param string search - * @param number limit - * @param number offset - * @param string orderType - * @throws Exception - * @return Promise - */ - async list(search: string = '', limit: number = 25, offset: number = 0, orderType: string = 'ASC'): Promise { - let path = '/users'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - 'search': search, - 'limit': limit, - 'offset': offset, - 'orderType': orderType - }); - } - - /** - * Create User - * - * Create a new user. - * - * @param string email - * @param string password - * @param string name - * @throws Exception - * @return Promise - */ - async create(email: string, password: string, name: string = ''): Promise { - let path = '/users'; - - return await this.client.call('post', path, { - 'content-type': 'application/json', - }, - { - 'email': email, - 'password': password, - 'name': name - }); - } - - /** - * Get User - * - * Get user by its unique ID. - * - * @param string userId - * @throws Exception - * @return Promise - */ - async get(userId: string): Promise { - let path = '/users/{userId}'.replace(new RegExp('{userId}', 'g'), userId); - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Get User Logs - * - * Get user activity logs list by its unique ID. - * - * @param string userId - * @throws Exception - * @return Promise - */ - async getLogs(userId: string): Promise { - let path = '/users/{userId}/logs'.replace(new RegExp('{userId}', 'g'), userId); - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Get User Preferences - * - * Get user preferences by its unique ID. - * - * @param string userId - * @throws Exception - * @return Promise - */ - async getPrefs(userId: string): Promise { - let path = '/users/{userId}/prefs'.replace(new RegExp('{userId}', 'g'), userId); - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Update User Preferences - * - * Update user preferences by its unique ID. You can pass only the specific - * settings you wish to update. - * - * @param string userId - * @param DocumentData prefs - * @throws Exception - * @return Promise - */ - async updatePrefs(userId: string, prefs: DocumentData): Promise { - let path = '/users/{userId}/prefs'.replace(new RegExp('{userId}', 'g'), userId); - - return await this.client.call('patch', path, { - 'content-type': 'application/json', - }, - { - 'prefs': prefs - }); - } - - /** - * Get User Sessions - * - * Get user sessions list by its unique ID. - * - * @param string userId - * @throws Exception - * @return Promise - */ - async getSessions(userId: string): Promise { - let path = '/users/{userId}/sessions'.replace(new RegExp('{userId}', 'g'), userId); - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Delete User Sessions - * - * Delete all user sessions by its unique ID. - * - * @param string userId - * @throws Exception - * @return Promise - */ - async deleteSessions(userId: string): Promise { - let path = '/users/{userId}/sessions'.replace(new RegExp('{userId}', 'g'), userId); - - return await this.client.call('delete', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Delete User Session - * - * Delete user sessions by its unique ID. - * - * @param string userId - * @param string sessionId - * @throws Exception - * @return Promise - */ - async deleteSession(userId: string, sessionId: string): Promise { - let path = '/users/{userId}/sessions/{sessionId}'.replace(new RegExp('{userId}', 'g'), userId).replace(new RegExp('{sessionId}', 'g'), sessionId); - - return await this.client.call('delete', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Update User Status - * - * Update user status by its unique ID. - * - * @param string userId - * @param string status - * @throws Exception - * @return Promise - */ - async updateStatus(userId: string, status: string): Promise { - let path = '/users/{userId}/status'.replace(new RegExp('{userId}', 'g'), userId); - - return await this.client.call('patch', path, { - 'content-type': 'application/json', - }, - { - 'status': status - }); - } -} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/CHANGELOG.md b/app/sdks/0.7.0/server-go/CHANGELOG.md deleted file mode 100644 index fa4d35e687..0000000000 --- a/app/sdks/0.7.0/server-go/CHANGELOG.md +++ /dev/null @@ -1 +0,0 @@ -# Change Log \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/LICENSE b/app/sdks/0.7.0/server-go/LICENSE deleted file mode 100644 index fc7c051a91..0000000000 --- a/app/sdks/0.7.0/server-go/LICENSE +++ /dev/null @@ -1,12 +0,0 @@ -Copyright (c) 2019 Appwrite (https://appwrite.io) and individual contributors. -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - - 3. Neither the name Appwrite nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/README.md b/app/sdks/0.7.0/server-go/README.md deleted file mode 100644 index 3b46d51f79..0000000000 --- a/app/sdks/0.7.0/server-go/README.md +++ /dev/null @@ -1,30 +0,0 @@ -# Appwrite SDK for Go - -![License](https://img.shields.io/github/license/appwrite/sdk-for-go.svg?v=1) -![Version](https://img.shields.io/badge/api%20version-0.6.0-blue.svg?v=1) - -**This SDK is compatible with Appwrite server version 0.6.0. For older versions, please check previous releases.** - -Appwrite is an open-source backend as a service server that abstract and simplify complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way. - Use the Go SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools. - For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs) - - - -![Appwrite](https://appwrite.io/images/github.png) - -## Installation - -To install using `go get`: - -```bash -go get github.com/appwrite/sdk-for-go -``` - -## Contribution - -This library is auto-generated by Appwrite custom [SDK Generator](https://github.com/appwrite/sdk-generator). To learn more about how you can help us improve this SDK, please check the [contribution guide](https://github.com/appwrite/sdk-generator/blob/master/CONTRIBUTING.md) before sending a pull-request. - -## License - -Please see the [BSD-3-Clause license](https://raw.githubusercontent.com/appwrite/appwrite/master/LICENSE) file for more information. \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/avatars.go b/app/sdks/0.7.0/server-go/avatars.go deleted file mode 100644 index feafa9da31..0000000000 --- a/app/sdks/0.7.0/server-go/avatars.go +++ /dev/null @@ -1,111 +0,0 @@ -package appwrite - -import ( - "strings" -) - -// Avatars service -type Avatars struct { - client Client -} - -func NewAvatars(clt Client) Avatars { - service := Avatars{ - client: clt, - } - - return service -} - -// GetBrowser you can use this endpoint to show different browser icons to -// your users. The code argument receives the browser code as it appears in -// your user /account/sessions endpoint. Use width, height and quality -// arguments to change the output settings. -func (srv *Avatars) GetBrowser(Code string, Width int, Height int, Quality int) (map[string]interface{}, error) { - r := strings.NewReplacer("{code}", Code) - path := r.Replace("/avatars/browsers/{code}") - - params := map[string]interface{}{ - "width": Width, - "height": Height, - "quality": Quality, - } - - return srv.client.Call("GET", path, nil, params) -} - -// GetCreditCard need to display your users with your billing method or their -// payment methods? The credit card endpoint will return you the icon of the -// credit card provider you need. Use width, height and quality arguments to -// change the output settings. -func (srv *Avatars) GetCreditCard(Code string, Width int, Height int, Quality int) (map[string]interface{}, error) { - r := strings.NewReplacer("{code}", Code) - path := r.Replace("/avatars/credit-cards/{code}") - - params := map[string]interface{}{ - "width": Width, - "height": Height, - "quality": Quality, - } - - return srv.client.Call("GET", path, nil, params) -} - -// GetFavicon use this endpoint to fetch the favorite icon (AKA favicon) of a -// any remote website URL. -func (srv *Avatars) GetFavicon(Url string) (map[string]interface{}, error) { - path := "/avatars/favicon" - - params := map[string]interface{}{ - "url": Url, - } - - return srv.client.Call("GET", path, nil, params) -} - -// GetFlag you can use this endpoint to show different country flags icons to -// your users. The code argument receives the 2 letter country code. Use -// width, height and quality arguments to change the output settings. -func (srv *Avatars) GetFlag(Code string, Width int, Height int, Quality int) (map[string]interface{}, error) { - r := strings.NewReplacer("{code}", Code) - path := r.Replace("/avatars/flags/{code}") - - params := map[string]interface{}{ - "width": Width, - "height": Height, - "quality": Quality, - } - - return srv.client.Call("GET", path, nil, params) -} - -// GetImage use this endpoint to fetch a remote image URL and crop it to any -// image size you want. This endpoint is very useful if you need to crop and -// display remote images in your app or in case you want to make sure a 3rd -// party image is properly served using a TLS protocol. -func (srv *Avatars) GetImage(Url string, Width int, Height int) (map[string]interface{}, error) { - path := "/avatars/image" - - params := map[string]interface{}{ - "url": Url, - "width": Width, - "height": Height, - } - - return srv.client.Call("GET", path, nil, params) -} - -// GetQR 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. -func (srv *Avatars) GetQR(Text string, Size int, Margin int, Download int) (map[string]interface{}, error) { - path := "/avatars/qr" - - params := map[string]interface{}{ - "text": Text, - "size": Size, - "margin": Margin, - "download": Download, - } - - return srv.client.Call("GET", path, nil, params) -} diff --git a/app/sdks/0.7.0/server-go/client.go b/app/sdks/0.7.0/server-go/client.go deleted file mode 100644 index bd21f5f347..0000000000 --- a/app/sdks/0.7.0/server-go/client.go +++ /dev/null @@ -1,113 +0,0 @@ -package appwrite - -import ( - "encoding/json" - "io/ioutil" - "net/http" - "net/url" - "strings" -) - -// Client is the client struct to access Appwrite services -type Client struct { - client *http.Client - endpoint string - headers map[string]string - selfSigned bool -} - -// SetEndpoint sets the default endpoint to which the Client connects to -func (clt *Client) SetEndpoint(endpoint string) { - clt.endpoint = endpoint -} - -// SetSelfSigned sets the condition that specify if the Client should allow connections to a server using a self-signed certificate -func (clt *Client) SetSelfSigned(status bool) { - clt.selfSigned = status -} - -// AddHeader add a new custom header that the Client should send on each request -func (clt *Client) AddHeader(key string, value string) { - clt.headers[key] = value -} - -// Your project ID -func (clt *Client) SetProject(value string) { - clt.headers["X-Appwrite-Project"] = value -} - -// Your secret API key -func (clt *Client) SetKey(value string) { - clt.headers["X-Appwrite-Key"] = value -} - -func (clt *Client) SetLocale(value string) { - clt.headers["X-Appwrite-Locale"] = value -} - -// Call an API using Client -func (clt *Client) Call(method string, path string, headers map[string]interface{}, params map[string]interface{}) (map[string]interface{}, error) { - if clt.client == nil { - // Create HTTP client - clt.client = &http.Client{} - } - - if clt.selfSigned { - // Allow self signed requests - } - - urlPath := clt.endpoint + path - isGet := strings.ToUpper(method) == "GET" - - var reqBody *strings.Reader - if !isGet { - frm := url.Values{} - for key, val := range params { - frm.Add(key, ToString(val)) - } - reqBody = strings.NewReader(frm.Encode()) - } - - // Create and modify HTTP request before sending - req, err := http.NewRequest(method, urlPath, reqBody) - if err != nil { - return nil, err - } - - // Set Client headers - for key, val := range clt.headers { - req.Header.Set(key, ToString(val)) - } - - // Set Custom headers - for key, val := range headers { - req.Header.Set(key, ToString(val)) - } - - if isGet { - q := req.URL.Query() - for key, val := range params { - q.Add(key, ToString(val)) - } - req.URL.RawQuery = q.Encode() - } - - // Make request - response, err := clt.client.Do(req) - if err != nil { - return nil, err - } - - // Handle response - defer response.Body.Close() - - responseData, err := ioutil.ReadAll(response.Body) - if err != nil { - return nil, err - } - - var jsonResponse map[string]interface{} - json.Unmarshal(responseData, &jsonResponse) - - return jsonResponse, nil -} diff --git a/app/sdks/0.7.0/server-go/database.go b/app/sdks/0.7.0/server-go/database.go deleted file mode 100644 index d420d69fde..0000000000 --- a/app/sdks/0.7.0/server-go/database.go +++ /dev/null @@ -1,178 +0,0 @@ -package appwrite - -import ( - "strings" -) - -// Database service -type Database struct { - client Client -} - -func NewDatabase(clt Client) Database { - service := Database{ - client: clt, - } - - return service -} - -// ListCollections get a list of all the user collections. You can use the -// query params to filter your results. On admin mode, this endpoint will -// return a list of all of the project collections. [Learn more about -// different API modes](/docs/admin). -func (srv *Database) ListCollections(Search string, Limit int, Offset int, OrderType string) (map[string]interface{}, error) { - path := "/database/collections" - - params := map[string]interface{}{ - "search": Search, - "limit": Limit, - "offset": Offset, - "orderType": OrderType, - } - - return srv.client.Call("GET", path, nil, params) -} - -// CreateCollection create a new Collection. -func (srv *Database) CreateCollection(Name string, Read []interface{}, Write []interface{}, Rules []interface{}) (map[string]interface{}, error) { - path := "/database/collections" - - params := map[string]interface{}{ - "name": Name, - "read": Read, - "write": Write, - "rules": Rules, - } - - return srv.client.Call("POST", path, nil, params) -} - -// GetCollection get collection by its unique ID. This endpoint response -// returns a JSON object with the collection metadata. -func (srv *Database) GetCollection(CollectionId string) (map[string]interface{}, error) { - r := strings.NewReplacer("{collectionId}", CollectionId) - path := r.Replace("/database/collections/{collectionId}") - - params := map[string]interface{}{ - } - - return srv.client.Call("GET", path, nil, params) -} - -// UpdateCollection update collection by its unique ID. -func (srv *Database) UpdateCollection(CollectionId string, Name string, Read []interface{}, Write []interface{}, Rules []interface{}) (map[string]interface{}, error) { - r := strings.NewReplacer("{collectionId}", CollectionId) - path := r.Replace("/database/collections/{collectionId}") - - params := map[string]interface{}{ - "name": Name, - "read": Read, - "write": Write, - "rules": Rules, - } - - return srv.client.Call("PUT", path, nil, params) -} - -// DeleteCollection delete a collection by its unique ID. Only users with -// write permissions have access to delete this resource. -func (srv *Database) DeleteCollection(CollectionId string) (map[string]interface{}, error) { - r := strings.NewReplacer("{collectionId}", CollectionId) - path := r.Replace("/database/collections/{collectionId}") - - params := map[string]interface{}{ - } - - return srv.client.Call("DELETE", path, nil, params) -} - -// ListDocuments get a list of all the user documents. You can use the query -// params to filter your results. On admin mode, this endpoint will return a -// list of all of the project documents. [Learn more about different API -// modes](/docs/admin). -func (srv *Database) ListDocuments(CollectionId string, Filters []interface{}, Offset int, Limit int, OrderField string, OrderType string, OrderCast string, Search string, First int, Last int) (map[string]interface{}, error) { - r := strings.NewReplacer("{collectionId}", CollectionId) - path := r.Replace("/database/collections/{collectionId}/documents") - - params := map[string]interface{}{ - "filters": Filters, - "offset": Offset, - "limit": Limit, - "orderField": OrderField, - "orderType": OrderType, - "orderCast": OrderCast, - "search": Search, - "first": First, - "last": Last, - } - - return srv.client.Call("GET", path, nil, params) -} - -// CreateDocument create a new Document. -func (srv *Database) CreateDocument(CollectionId string, Data object, Read []interface{}, Write []interface{}, ParentDocument string, ParentProperty string, ParentPropertyType string) (map[string]interface{}, error) { - r := strings.NewReplacer("{collectionId}", CollectionId) - path := r.Replace("/database/collections/{collectionId}/documents") - - params := map[string]interface{}{ - "data": Data, - "read": Read, - "write": Write, - "parentDocument": ParentDocument, - "parentProperty": ParentProperty, - "parentPropertyType": ParentPropertyType, - } - - return srv.client.Call("POST", path, nil, params) -} - -// GetDocument get document by its unique ID. This endpoint response returns a -// JSON object with the document data. -func (srv *Database) GetDocument(CollectionId string, DocumentId string) (map[string]interface{}, error) { - r := strings.NewReplacer("{collectionId}", CollectionId, "{documentId}", DocumentId) - path := r.Replace("/database/collections/{collectionId}/documents/{documentId}") - - params := map[string]interface{}{ - } - - return srv.client.Call("GET", path, nil, params) -} - -// UpdateDocument -func (srv *Database) UpdateDocument(CollectionId string, DocumentId string, Data object, Read []interface{}, Write []interface{}) (map[string]interface{}, error) { - r := strings.NewReplacer("{collectionId}", CollectionId, "{documentId}", DocumentId) - path := r.Replace("/database/collections/{collectionId}/documents/{documentId}") - - params := map[string]interface{}{ - "data": Data, - "read": Read, - "write": Write, - } - - return srv.client.Call("PATCH", path, nil, params) -} - -// DeleteDocument delete document by its unique ID. This endpoint deletes only -// the parent documents, his attributes and relations to other documents. -// Child documents **will not** be deleted. -func (srv *Database) DeleteDocument(CollectionId string, DocumentId string) (map[string]interface{}, error) { - r := strings.NewReplacer("{collectionId}", CollectionId, "{documentId}", DocumentId) - path := r.Replace("/database/collections/{collectionId}/documents/{documentId}") - - params := map[string]interface{}{ - } - - return srv.client.Call("DELETE", path, nil, params) -} - -// GetCollectionLogs -func (srv *Database) GetCollectionLogs(CollectionId string) (map[string]interface{}, error) { - r := strings.NewReplacer("{collectionId}", CollectionId) - path := r.Replace("/database/collections/{collectionId}/logs") - - params := map[string]interface{}{ - } - - return srv.client.Call("GET", path, nil, params) -} diff --git a/app/sdks/0.7.0/server-go/docs/examples/avatars/get-browser.md b/app/sdks/0.7.0/server-go/docs/examples/avatars/get-browser.md deleted file mode 100644 index b307cd8dbc..0000000000 --- a/app/sdks/0.7.0/server-go/docs/examples/avatars/get-browser.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Avatars{ - client: &client - } - - var response, error := service.GetBrowser("aa", 0, 0, 0) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/avatars/get-credit-card.md b/app/sdks/0.7.0/server-go/docs/examples/avatars/get-credit-card.md deleted file mode 100644 index ffc748d052..0000000000 --- a/app/sdks/0.7.0/server-go/docs/examples/avatars/get-credit-card.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Avatars{ - client: &client - } - - var response, error := service.GetCreditCard("amex", 0, 0, 0) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/avatars/get-favicon.md b/app/sdks/0.7.0/server-go/docs/examples/avatars/get-favicon.md deleted file mode 100644 index 596a9d9fd3..0000000000 --- a/app/sdks/0.7.0/server-go/docs/examples/avatars/get-favicon.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Avatars{ - client: &client - } - - var response, error := service.GetFavicon("https://example.com") - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/avatars/get-flag.md b/app/sdks/0.7.0/server-go/docs/examples/avatars/get-flag.md deleted file mode 100644 index 63042ef0a6..0000000000 --- a/app/sdks/0.7.0/server-go/docs/examples/avatars/get-flag.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Avatars{ - client: &client - } - - var response, error := service.GetFlag("af", 0, 0, 0) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/avatars/get-image.md b/app/sdks/0.7.0/server-go/docs/examples/avatars/get-image.md deleted file mode 100644 index 7095ee3658..0000000000 --- a/app/sdks/0.7.0/server-go/docs/examples/avatars/get-image.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Avatars{ - client: &client - } - - var response, error := service.GetImage("https://example.com", 0, 0) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/avatars/get-q-r.md b/app/sdks/0.7.0/server-go/docs/examples/avatars/get-q-r.md deleted file mode 100644 index 37425a463e..0000000000 --- a/app/sdks/0.7.0/server-go/docs/examples/avatars/get-q-r.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Avatars{ - client: &client - } - - var response, error := service.GetQR("[TEXT]", 0, 0, 0) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/database/create-collection.md b/app/sdks/0.7.0/server-go/docs/examples/database/create-collection.md deleted file mode 100644 index 947ce799ff..0000000000 --- a/app/sdks/0.7.0/server-go/docs/examples/database/create-collection.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Database{ - client: &client - } - - var response, error := service.CreateCollection("[NAME]", [], [], []) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/database/create-document.md b/app/sdks/0.7.0/server-go/docs/examples/database/create-document.md deleted file mode 100644 index 5b63002464..0000000000 --- a/app/sdks/0.7.0/server-go/docs/examples/database/create-document.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Database{ - client: &client - } - - var response, error := service.CreateDocument("[COLLECTION_ID]", , [], [], "[PARENT_DOCUMENT]", "", "assign") - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/database/delete-collection.md b/app/sdks/0.7.0/server-go/docs/examples/database/delete-collection.md deleted file mode 100644 index 2b5744730b..0000000000 --- a/app/sdks/0.7.0/server-go/docs/examples/database/delete-collection.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Database{ - client: &client - } - - var response, error := service.DeleteCollection("[COLLECTION_ID]") - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/database/delete-document.md b/app/sdks/0.7.0/server-go/docs/examples/database/delete-document.md deleted file mode 100644 index 5dfa23e1b1..0000000000 --- a/app/sdks/0.7.0/server-go/docs/examples/database/delete-document.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Database{ - client: &client - } - - var response, error := service.DeleteDocument("[COLLECTION_ID]", "[DOCUMENT_ID]") - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/database/get-collection-logs.md b/app/sdks/0.7.0/server-go/docs/examples/database/get-collection-logs.md deleted file mode 100644 index 4427295371..0000000000 --- a/app/sdks/0.7.0/server-go/docs/examples/database/get-collection-logs.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Database{ - client: &client - } - - var response, error := service.GetCollectionLogs("[COLLECTION_ID]") - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/database/get-collection.md b/app/sdks/0.7.0/server-go/docs/examples/database/get-collection.md deleted file mode 100644 index bc6d9f7746..0000000000 --- a/app/sdks/0.7.0/server-go/docs/examples/database/get-collection.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Database{ - client: &client - } - - var response, error := service.GetCollection("[COLLECTION_ID]") - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/database/get-document.md b/app/sdks/0.7.0/server-go/docs/examples/database/get-document.md deleted file mode 100644 index ba4b063f57..0000000000 --- a/app/sdks/0.7.0/server-go/docs/examples/database/get-document.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Database{ - client: &client - } - - var response, error := service.GetDocument("[COLLECTION_ID]", "[DOCUMENT_ID]") - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/database/list-collections.md b/app/sdks/0.7.0/server-go/docs/examples/database/list-collections.md deleted file mode 100644 index 0dda37d5e3..0000000000 --- a/app/sdks/0.7.0/server-go/docs/examples/database/list-collections.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Database{ - client: &client - } - - var response, error := service.ListCollections("[SEARCH]", 0, 0, "ASC") - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/database/list-documents.md b/app/sdks/0.7.0/server-go/docs/examples/database/list-documents.md deleted file mode 100644 index 9f2e36d591..0000000000 --- a/app/sdks/0.7.0/server-go/docs/examples/database/list-documents.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Database{ - client: &client - } - - var response, error := service.ListDocuments("[COLLECTION_ID]", [], 0, 0, "[ORDER_FIELD]", "DESC", "int", "[SEARCH]", 0, 0) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/database/update-collection.md b/app/sdks/0.7.0/server-go/docs/examples/database/update-collection.md deleted file mode 100644 index 2b5e7f6d37..0000000000 --- a/app/sdks/0.7.0/server-go/docs/examples/database/update-collection.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Database{ - client: &client - } - - var response, error := service.UpdateCollection("[COLLECTION_ID]", "[NAME]", [], [], []) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/database/update-document.md b/app/sdks/0.7.0/server-go/docs/examples/database/update-document.md deleted file mode 100644 index 65a3eefa4a..0000000000 --- a/app/sdks/0.7.0/server-go/docs/examples/database/update-document.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Database{ - client: &client - } - - var response, error := service.UpdateDocument("[COLLECTION_ID]", "[DOCUMENT_ID]", , [], []) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/functions/create-execution.md b/app/sdks/0.7.0/server-go/docs/examples/functions/create-execution.md deleted file mode 100644 index ea060d6f7f..0000000000 --- a/app/sdks/0.7.0/server-go/docs/examples/functions/create-execution.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Functions{ - client: &client - } - - var response, error := service.CreateExecution("[FUNCTION_ID]", 0) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/functions/create-tag.md b/app/sdks/0.7.0/server-go/docs/examples/functions/create-tag.md deleted file mode 100644 index 84d5e80787..0000000000 --- a/app/sdks/0.7.0/server-go/docs/examples/functions/create-tag.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Functions{ - client: &client - } - - var response, error := service.CreateTag("[FUNCTION_ID]", "node-14", "[COMMAND]", "[CODE]") - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/functions/create.md b/app/sdks/0.7.0/server-go/docs/examples/functions/create.md deleted file mode 100644 index a87a23b944..0000000000 --- a/app/sdks/0.7.0/server-go/docs/examples/functions/create.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Functions{ - client: &client - } - - var response, error := service.Create("[NAME]", , [], "", 0) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/functions/delete-tag.md b/app/sdks/0.7.0/server-go/docs/examples/functions/delete-tag.md deleted file mode 100644 index caf36146da..0000000000 --- a/app/sdks/0.7.0/server-go/docs/examples/functions/delete-tag.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Functions{ - client: &client - } - - var response, error := service.DeleteTag("[FUNCTION_ID]", "[TAG_ID]") - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/functions/delete.md b/app/sdks/0.7.0/server-go/docs/examples/functions/delete.md deleted file mode 100644 index e49addb2b1..0000000000 --- a/app/sdks/0.7.0/server-go/docs/examples/functions/delete.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Functions{ - client: &client - } - - var response, error := service.Delete("[FUNCTION_ID]") - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/functions/get-execution.md b/app/sdks/0.7.0/server-go/docs/examples/functions/get-execution.md deleted file mode 100644 index 13a3ad4685..0000000000 --- a/app/sdks/0.7.0/server-go/docs/examples/functions/get-execution.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Functions{ - client: &client - } - - var response, error := service.GetExecution("[FUNCTION_ID]", "[EXECUTION_ID]") - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/functions/get-tag.md b/app/sdks/0.7.0/server-go/docs/examples/functions/get-tag.md deleted file mode 100644 index 640543d94b..0000000000 --- a/app/sdks/0.7.0/server-go/docs/examples/functions/get-tag.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Functions{ - client: &client - } - - var response, error := service.GetTag("[FUNCTION_ID]", "[TAG_ID]") - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/functions/get.md b/app/sdks/0.7.0/server-go/docs/examples/functions/get.md deleted file mode 100644 index 2bba5028c0..0000000000 --- a/app/sdks/0.7.0/server-go/docs/examples/functions/get.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Functions{ - client: &client - } - - var response, error := service.Get("[FUNCTION_ID]") - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/functions/list-executions.md b/app/sdks/0.7.0/server-go/docs/examples/functions/list-executions.md deleted file mode 100644 index 5115928c29..0000000000 --- a/app/sdks/0.7.0/server-go/docs/examples/functions/list-executions.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Functions{ - client: &client - } - - var response, error := service.ListExecutions("[FUNCTION_ID]", "[SEARCH]", 0, 0, "ASC") - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/functions/list-tags.md b/app/sdks/0.7.0/server-go/docs/examples/functions/list-tags.md deleted file mode 100644 index b6e495988e..0000000000 --- a/app/sdks/0.7.0/server-go/docs/examples/functions/list-tags.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Functions{ - client: &client - } - - var response, error := service.ListTags("[FUNCTION_ID]", "[SEARCH]", 0, 0, "ASC") - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/functions/list.md b/app/sdks/0.7.0/server-go/docs/examples/functions/list.md deleted file mode 100644 index 0a208e367d..0000000000 --- a/app/sdks/0.7.0/server-go/docs/examples/functions/list.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Functions{ - client: &client - } - - var response, error := service.List("[SEARCH]", 0, 0, "ASC") - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/functions/update-active.md b/app/sdks/0.7.0/server-go/docs/examples/functions/update-active.md deleted file mode 100644 index da3b0f1227..0000000000 --- a/app/sdks/0.7.0/server-go/docs/examples/functions/update-active.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Functions{ - client: &client - } - - var response, error := service.UpdateActive("[FUNCTION_ID]", "[ACTIVE]") - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/functions/update-tag.md b/app/sdks/0.7.0/server-go/docs/examples/functions/update-tag.md deleted file mode 100644 index 299b095736..0000000000 --- a/app/sdks/0.7.0/server-go/docs/examples/functions/update-tag.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Functions{ - client: &client - } - - var response, error := service.UpdateTag("[FUNCTION_ID]", "[TAG]") - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/functions/update.md b/app/sdks/0.7.0/server-go/docs/examples/functions/update.md deleted file mode 100644 index 0f8f9e0190..0000000000 --- a/app/sdks/0.7.0/server-go/docs/examples/functions/update.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Functions{ - client: &client - } - - var response, error := service.Update("[FUNCTION_ID]", "[NAME]", , [], "", 0) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/health/get-anti-virus.md b/app/sdks/0.7.0/server-go/docs/examples/health/get-anti-virus.md deleted file mode 100644 index a6f363dde1..0000000000 --- a/app/sdks/0.7.0/server-go/docs/examples/health/get-anti-virus.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Health{ - client: &client - } - - var response, error := service.GetAntiVirus() - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/health/get-cache.md b/app/sdks/0.7.0/server-go/docs/examples/health/get-cache.md deleted file mode 100644 index ce7b1c6f93..0000000000 --- a/app/sdks/0.7.0/server-go/docs/examples/health/get-cache.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Health{ - client: &client - } - - var response, error := service.GetCache() - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/health/get-d-b.md b/app/sdks/0.7.0/server-go/docs/examples/health/get-d-b.md deleted file mode 100644 index 6d86894417..0000000000 --- a/app/sdks/0.7.0/server-go/docs/examples/health/get-d-b.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Health{ - client: &client - } - - var response, error := service.GetDB() - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/health/get-queue-certificates.md b/app/sdks/0.7.0/server-go/docs/examples/health/get-queue-certificates.md deleted file mode 100644 index 9954551580..0000000000 --- a/app/sdks/0.7.0/server-go/docs/examples/health/get-queue-certificates.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Health{ - client: &client - } - - var response, error := service.GetQueueCertificates() - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/health/get-queue-functions.md b/app/sdks/0.7.0/server-go/docs/examples/health/get-queue-functions.md deleted file mode 100644 index 5df453068b..0000000000 --- a/app/sdks/0.7.0/server-go/docs/examples/health/get-queue-functions.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Health{ - client: &client - } - - var response, error := service.GetQueueFunctions() - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/health/get-queue-logs.md b/app/sdks/0.7.0/server-go/docs/examples/health/get-queue-logs.md deleted file mode 100644 index 0b6280a42a..0000000000 --- a/app/sdks/0.7.0/server-go/docs/examples/health/get-queue-logs.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Health{ - client: &client - } - - var response, error := service.GetQueueLogs() - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/health/get-queue-tasks.md b/app/sdks/0.7.0/server-go/docs/examples/health/get-queue-tasks.md deleted file mode 100644 index 28d615dc2c..0000000000 --- a/app/sdks/0.7.0/server-go/docs/examples/health/get-queue-tasks.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Health{ - client: &client - } - - var response, error := service.GetQueueTasks() - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/health/get-queue-usage.md b/app/sdks/0.7.0/server-go/docs/examples/health/get-queue-usage.md deleted file mode 100644 index e9fe988aa2..0000000000 --- a/app/sdks/0.7.0/server-go/docs/examples/health/get-queue-usage.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Health{ - client: &client - } - - var response, error := service.GetQueueUsage() - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/health/get-queue-webhooks.md b/app/sdks/0.7.0/server-go/docs/examples/health/get-queue-webhooks.md deleted file mode 100644 index 2f92835a12..0000000000 --- a/app/sdks/0.7.0/server-go/docs/examples/health/get-queue-webhooks.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Health{ - client: &client - } - - var response, error := service.GetQueueWebhooks() - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/health/get-storage-anti-virus.md b/app/sdks/0.7.0/server-go/docs/examples/health/get-storage-anti-virus.md deleted file mode 100644 index 8369b5ba07..0000000000 --- a/app/sdks/0.7.0/server-go/docs/examples/health/get-storage-anti-virus.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Health{ - client: &client - } - - var response, error := service.GetStorageAntiVirus() - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/health/get-storage-local.md b/app/sdks/0.7.0/server-go/docs/examples/health/get-storage-local.md deleted file mode 100644 index db0d5a5b21..0000000000 --- a/app/sdks/0.7.0/server-go/docs/examples/health/get-storage-local.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Health{ - client: &client - } - - var response, error := service.GetStorageLocal() - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/health/get-time.md b/app/sdks/0.7.0/server-go/docs/examples/health/get-time.md deleted file mode 100644 index dd8486a484..0000000000 --- a/app/sdks/0.7.0/server-go/docs/examples/health/get-time.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Health{ - client: &client - } - - var response, error := service.GetTime() - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/health/get.md b/app/sdks/0.7.0/server-go/docs/examples/health/get.md deleted file mode 100644 index df1cb27243..0000000000 --- a/app/sdks/0.7.0/server-go/docs/examples/health/get.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Health{ - client: &client - } - - var response, error := service.Get() - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/locale/get-continents.md b/app/sdks/0.7.0/server-go/docs/examples/locale/get-continents.md deleted file mode 100644 index dd9b96ca66..0000000000 --- a/app/sdks/0.7.0/server-go/docs/examples/locale/get-continents.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Locale{ - client: &client - } - - var response, error := service.GetContinents() - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/locale/get-countries-e-u.md b/app/sdks/0.7.0/server-go/docs/examples/locale/get-countries-e-u.md deleted file mode 100644 index 01a2fedc1b..0000000000 --- a/app/sdks/0.7.0/server-go/docs/examples/locale/get-countries-e-u.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Locale{ - client: &client - } - - var response, error := service.GetCountriesEU() - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/locale/get-countries-phones.md b/app/sdks/0.7.0/server-go/docs/examples/locale/get-countries-phones.md deleted file mode 100644 index 87de9bb2f5..0000000000 --- a/app/sdks/0.7.0/server-go/docs/examples/locale/get-countries-phones.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Locale{ - client: &client - } - - var response, error := service.GetCountriesPhones() - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/locale/get-countries.md b/app/sdks/0.7.0/server-go/docs/examples/locale/get-countries.md deleted file mode 100644 index 58c74f5f73..0000000000 --- a/app/sdks/0.7.0/server-go/docs/examples/locale/get-countries.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Locale{ - client: &client - } - - var response, error := service.GetCountries() - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/locale/get-currencies.md b/app/sdks/0.7.0/server-go/docs/examples/locale/get-currencies.md deleted file mode 100644 index c736db8336..0000000000 --- a/app/sdks/0.7.0/server-go/docs/examples/locale/get-currencies.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Locale{ - client: &client - } - - var response, error := service.GetCurrencies() - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/locale/get.md b/app/sdks/0.7.0/server-go/docs/examples/locale/get.md deleted file mode 100644 index 3245b79cb5..0000000000 --- a/app/sdks/0.7.0/server-go/docs/examples/locale/get.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Locale{ - client: &client - } - - var response, error := service.Get() - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/storage/create-file.md b/app/sdks/0.7.0/server-go/docs/examples/storage/create-file.md deleted file mode 100644 index 1348acb40b..0000000000 --- a/app/sdks/0.7.0/server-go/docs/examples/storage/create-file.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Storage{ - client: &client - } - - var response, error := service.CreateFile(file, [], []) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/storage/delete-file.md b/app/sdks/0.7.0/server-go/docs/examples/storage/delete-file.md deleted file mode 100644 index 6b00581d75..0000000000 --- a/app/sdks/0.7.0/server-go/docs/examples/storage/delete-file.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Storage{ - client: &client - } - - var response, error := service.DeleteFile("[FILE_ID]") - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/storage/get-file-download.md b/app/sdks/0.7.0/server-go/docs/examples/storage/get-file-download.md deleted file mode 100644 index 6c68b14c3b..0000000000 --- a/app/sdks/0.7.0/server-go/docs/examples/storage/get-file-download.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Storage{ - client: &client - } - - var response, error := service.GetFileDownload("[FILE_ID]") - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/storage/get-file-preview.md b/app/sdks/0.7.0/server-go/docs/examples/storage/get-file-preview.md deleted file mode 100644 index 86212c82d3..0000000000 --- a/app/sdks/0.7.0/server-go/docs/examples/storage/get-file-preview.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Storage{ - client: &client - } - - var response, error := service.GetFilePreview("[FILE_ID]", 0, 0, 0, "", "jpg") - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/storage/get-file-view.md b/app/sdks/0.7.0/server-go/docs/examples/storage/get-file-view.md deleted file mode 100644 index b9ddb637de..0000000000 --- a/app/sdks/0.7.0/server-go/docs/examples/storage/get-file-view.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Storage{ - client: &client - } - - var response, error := service.GetFileView("[FILE_ID]", "pdf") - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/storage/get-file.md b/app/sdks/0.7.0/server-go/docs/examples/storage/get-file.md deleted file mode 100644 index f9aaa6eb81..0000000000 --- a/app/sdks/0.7.0/server-go/docs/examples/storage/get-file.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Storage{ - client: &client - } - - var response, error := service.GetFile("[FILE_ID]") - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/storage/list-files.md b/app/sdks/0.7.0/server-go/docs/examples/storage/list-files.md deleted file mode 100644 index 53e7e37d5c..0000000000 --- a/app/sdks/0.7.0/server-go/docs/examples/storage/list-files.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Storage{ - client: &client - } - - var response, error := service.ListFiles("[SEARCH]", 0, 0, "ASC") - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/storage/update-file.md b/app/sdks/0.7.0/server-go/docs/examples/storage/update-file.md deleted file mode 100644 index 1ec409de9f..0000000000 --- a/app/sdks/0.7.0/server-go/docs/examples/storage/update-file.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Storage{ - client: &client - } - - var response, error := service.UpdateFile("[FILE_ID]", [], []) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/teams/create-membership.md b/app/sdks/0.7.0/server-go/docs/examples/teams/create-membership.md deleted file mode 100644 index a346deaa64..0000000000 --- a/app/sdks/0.7.0/server-go/docs/examples/teams/create-membership.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Teams{ - client: &client - } - - var response, error := service.CreateMembership("[TEAM_ID]", "email@example.com", [], "https://example.com", "[NAME]") - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/teams/create.md b/app/sdks/0.7.0/server-go/docs/examples/teams/create.md deleted file mode 100644 index 8e3a100573..0000000000 --- a/app/sdks/0.7.0/server-go/docs/examples/teams/create.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Teams{ - client: &client - } - - var response, error := service.Create("[NAME]", []) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/teams/delete-membership.md b/app/sdks/0.7.0/server-go/docs/examples/teams/delete-membership.md deleted file mode 100644 index 809413a3bf..0000000000 --- a/app/sdks/0.7.0/server-go/docs/examples/teams/delete-membership.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Teams{ - client: &client - } - - var response, error := service.DeleteMembership("[TEAM_ID]", "[INVITE_ID]") - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/teams/delete.md b/app/sdks/0.7.0/server-go/docs/examples/teams/delete.md deleted file mode 100644 index 5cf65c2f6f..0000000000 --- a/app/sdks/0.7.0/server-go/docs/examples/teams/delete.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Teams{ - client: &client - } - - var response, error := service.Delete("[TEAM_ID]") - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/teams/get-memberships.md b/app/sdks/0.7.0/server-go/docs/examples/teams/get-memberships.md deleted file mode 100644 index b59a8ff33b..0000000000 --- a/app/sdks/0.7.0/server-go/docs/examples/teams/get-memberships.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Teams{ - client: &client - } - - var response, error := service.GetMemberships("[TEAM_ID]") - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/teams/get.md b/app/sdks/0.7.0/server-go/docs/examples/teams/get.md deleted file mode 100644 index 2920f547f2..0000000000 --- a/app/sdks/0.7.0/server-go/docs/examples/teams/get.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Teams{ - client: &client - } - - var response, error := service.Get("[TEAM_ID]") - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/teams/list.md b/app/sdks/0.7.0/server-go/docs/examples/teams/list.md deleted file mode 100644 index 5cd9e3e29e..0000000000 --- a/app/sdks/0.7.0/server-go/docs/examples/teams/list.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Teams{ - client: &client - } - - var response, error := service.List("[SEARCH]", 0, 0, "ASC") - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/teams/update.md b/app/sdks/0.7.0/server-go/docs/examples/teams/update.md deleted file mode 100644 index 40178c8424..0000000000 --- a/app/sdks/0.7.0/server-go/docs/examples/teams/update.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Teams{ - client: &client - } - - var response, error := service.Update("[TEAM_ID]", "[NAME]") - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/users/create.md b/app/sdks/0.7.0/server-go/docs/examples/users/create.md deleted file mode 100644 index 3a27b00f54..0000000000 --- a/app/sdks/0.7.0/server-go/docs/examples/users/create.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Users{ - client: &client - } - - var response, error := service.Create("email@example.com", "password", "[NAME]") - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/users/delete-session.md b/app/sdks/0.7.0/server-go/docs/examples/users/delete-session.md deleted file mode 100644 index e1840ba133..0000000000 --- a/app/sdks/0.7.0/server-go/docs/examples/users/delete-session.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Users{ - client: &client - } - - var response, error := service.DeleteSession("[USER_ID]", "[SESSION_ID]") - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/users/delete-sessions.md b/app/sdks/0.7.0/server-go/docs/examples/users/delete-sessions.md deleted file mode 100644 index 682ea0cada..0000000000 --- a/app/sdks/0.7.0/server-go/docs/examples/users/delete-sessions.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Users{ - client: &client - } - - var response, error := service.DeleteSessions("[USER_ID]") - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/users/get-logs.md b/app/sdks/0.7.0/server-go/docs/examples/users/get-logs.md deleted file mode 100644 index 6917cc71db..0000000000 --- a/app/sdks/0.7.0/server-go/docs/examples/users/get-logs.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Users{ - client: &client - } - - var response, error := service.GetLogs("[USER_ID]") - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/users/get-prefs.md b/app/sdks/0.7.0/server-go/docs/examples/users/get-prefs.md deleted file mode 100644 index 17676eaa36..0000000000 --- a/app/sdks/0.7.0/server-go/docs/examples/users/get-prefs.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Users{ - client: &client - } - - var response, error := service.GetPrefs("[USER_ID]") - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/users/get-sessions.md b/app/sdks/0.7.0/server-go/docs/examples/users/get-sessions.md deleted file mode 100644 index cc53abfdab..0000000000 --- a/app/sdks/0.7.0/server-go/docs/examples/users/get-sessions.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Users{ - client: &client - } - - var response, error := service.GetSessions("[USER_ID]") - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/users/get.md b/app/sdks/0.7.0/server-go/docs/examples/users/get.md deleted file mode 100644 index 8809d1b29b..0000000000 --- a/app/sdks/0.7.0/server-go/docs/examples/users/get.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Users{ - client: &client - } - - var response, error := service.Get("[USER_ID]") - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/users/list.md b/app/sdks/0.7.0/server-go/docs/examples/users/list.md deleted file mode 100644 index ad37e72219..0000000000 --- a/app/sdks/0.7.0/server-go/docs/examples/users/list.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Users{ - client: &client - } - - var response, error := service.List("[SEARCH]", 0, 0, "ASC") - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/users/update-prefs.md b/app/sdks/0.7.0/server-go/docs/examples/users/update-prefs.md deleted file mode 100644 index 9789b90f25..0000000000 --- a/app/sdks/0.7.0/server-go/docs/examples/users/update-prefs.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Users{ - client: &client - } - - var response, error := service.UpdatePrefs("[USER_ID]", ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/docs/examples/users/update-status.md b/app/sdks/0.7.0/server-go/docs/examples/users/update-status.md deleted file mode 100644 index eff2fb5072..0000000000 --- a/app/sdks/0.7.0/server-go/docs/examples/users/update-status.md +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go" -) - -func main() { - var client := appwrite.Client{} - - client.SetProject("5df5acd0d48c2") // Your project ID - client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - - var service := appwrite.Users{ - client: &client - } - - var response, error := service.UpdateStatus("[USER_ID]", "1") - - if error != nil { - panic(error) - } - - fmt.Println(response) -} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-go/functions.go b/app/sdks/0.7.0/server-go/functions.go deleted file mode 100644 index 3f82eb1fb2..0000000000 --- a/app/sdks/0.7.0/server-go/functions.go +++ /dev/null @@ -1,186 +0,0 @@ -package appwrite - -import ( - "strings" -) - -// Functions service -type Functions struct { - client Client -} - -func NewFunctions(clt Client) Functions { - service := Functions{ - client: clt, - } - - return service -} - -// List -func (srv *Functions) List(Search string, Limit int, Offset int, OrderType string) (map[string]interface{}, error) { - path := "/functions" - - params := map[string]interface{}{ - "search": Search, - "limit": Limit, - "offset": Offset, - "orderType": OrderType, - } - - return srv.client.Call("GET", path, nil, params) -} - -// Create -func (srv *Functions) Create(Name string, Vars object, Events []interface{}, Schedule string, Timeout int) (map[string]interface{}, error) { - path := "/functions" - - params := map[string]interface{}{ - "name": Name, - "vars": Vars, - "events": Events, - "schedule": Schedule, - "timeout": Timeout, - } - - return srv.client.Call("POST", path, nil, params) -} - -// Get -func (srv *Functions) Get(FunctionId string) (map[string]interface{}, error) { - r := strings.NewReplacer("{functionId}", FunctionId) - path := r.Replace("/functions/{functionId}") - - params := map[string]interface{}{ - } - - return srv.client.Call("GET", path, nil, params) -} - -// Update -func (srv *Functions) Update(FunctionId string, Name string, Vars object, Events []interface{}, Schedule string, Timeout int) (map[string]interface{}, error) { - r := strings.NewReplacer("{functionId}", FunctionId) - path := r.Replace("/functions/{functionId}") - - params := map[string]interface{}{ - "name": Name, - "vars": Vars, - "events": Events, - "schedule": Schedule, - "timeout": Timeout, - } - - return srv.client.Call("PUT", path, nil, params) -} - -// Delete -func (srv *Functions) Delete(FunctionId string) (map[string]interface{}, error) { - r := strings.NewReplacer("{functionId}", FunctionId) - path := r.Replace("/functions/{functionId}") - - params := map[string]interface{}{ - } - - return srv.client.Call("DELETE", path, nil, params) -} - -// ListExecutions -func (srv *Functions) ListExecutions(FunctionId string, Search string, Limit int, Offset int, OrderType string) (map[string]interface{}, error) { - r := strings.NewReplacer("{functionId}", FunctionId) - path := r.Replace("/functions/{functionId}/executions") - - params := map[string]interface{}{ - "search": Search, - "limit": Limit, - "offset": Offset, - "orderType": OrderType, - } - - return srv.client.Call("GET", path, nil, params) -} - -// CreateExecution -func (srv *Functions) CreateExecution(FunctionId string, Async int) (map[string]interface{}, error) { - r := strings.NewReplacer("{functionId}", FunctionId) - path := r.Replace("/functions/{functionId}/executions") - - params := map[string]interface{}{ - "async": Async, - } - - return srv.client.Call("POST", path, nil, params) -} - -// GetExecution -func (srv *Functions) GetExecution(FunctionId string, ExecutionId string) (map[string]interface{}, error) { - r := strings.NewReplacer("{functionId}", FunctionId, "{executionId}", ExecutionId) - path := r.Replace("/functions/{functionId}/executions/{executionId}") - - params := map[string]interface{}{ - } - - return srv.client.Call("GET", path, nil, params) -} - -// UpdateTag -func (srv *Functions) UpdateTag(FunctionId string, Tag string) (map[string]interface{}, error) { - r := strings.NewReplacer("{functionId}", FunctionId) - path := r.Replace("/functions/{functionId}/tag") - - params := map[string]interface{}{ - "tag": Tag, - } - - return srv.client.Call("PATCH", path, nil, params) -} - -// ListTags -func (srv *Functions) ListTags(FunctionId string, Search string, Limit int, Offset int, OrderType string) (map[string]interface{}, error) { - r := strings.NewReplacer("{functionId}", FunctionId) - path := r.Replace("/functions/{functionId}/tags") - - params := map[string]interface{}{ - "search": Search, - "limit": Limit, - "offset": Offset, - "orderType": OrderType, - } - - return srv.client.Call("GET", path, nil, params) -} - -// CreateTag -func (srv *Functions) CreateTag(FunctionId string, Env string, Command string, Code string) (map[string]interface{}, error) { - r := strings.NewReplacer("{functionId}", FunctionId) - path := r.Replace("/functions/{functionId}/tags") - - params := map[string]interface{}{ - "env": Env, - "command": Command, - "code": Code, - } - - return srv.client.Call("POST", path, nil, params) -} - -// GetTag -func (srv *Functions) GetTag(FunctionId string, TagId string) (map[string]interface{}, error) { - r := strings.NewReplacer("{functionId}", FunctionId, "{tagId}", TagId) - path := r.Replace("/functions/{functionId}/tags/{tagId}") - - params := map[string]interface{}{ - } - - return srv.client.Call("GET", path, nil, params) -} - -// DeleteTag -func (srv *Functions) DeleteTag(FunctionId string, TagId string) (map[string]interface{}, error) { - r := strings.NewReplacer("{functionId}", FunctionId, "{tagId}", TagId) - path := r.Replace("/functions/{functionId}/tags/{tagId}") - - params := map[string]interface{}{ - } - - return srv.client.Call("DELETE", path, nil, params) -} diff --git a/app/sdks/0.7.0/server-go/health.go b/app/sdks/0.7.0/server-go/health.go deleted file mode 100644 index d3b6b3a926..0000000000 --- a/app/sdks/0.7.0/server-go/health.go +++ /dev/null @@ -1,153 +0,0 @@ -package appwrite - -import ( -) - -// Health service -type Health struct { - client Client -} - -func NewHealth(clt Client) Health { - service := Health{ - client: clt, - } - - return service -} - -// Get check the Appwrite HTTP server is up and responsive. -func (srv *Health) Get() (map[string]interface{}, error) { - path := "/health" - - params := map[string]interface{}{ - } - - return srv.client.Call("GET", path, nil, params) -} - -// GetAntiVirus check the Appwrite Anti Virus server is up and connection is -// successful. -func (srv *Health) GetAntiVirus() (map[string]interface{}, error) { - path := "/health/anti-virus" - - params := map[string]interface{}{ - } - - return srv.client.Call("GET", path, nil, params) -} - -// GetCache check the Appwrite in-memory cache server is up and connection is -// successful. -func (srv *Health) GetCache() (map[string]interface{}, error) { - path := "/health/cache" - - params := map[string]interface{}{ - } - - return srv.client.Call("GET", path, nil, params) -} - -// GetDB check the Appwrite database server is up and connection is -// successful. -func (srv *Health) GetDB() (map[string]interface{}, error) { - path := "/health/db" - - params := map[string]interface{}{ - } - - return srv.client.Call("GET", path, nil, params) -} - -// GetQueueCertificates get the number of certificates that are waiting to be -// issued against [Letsencrypt](https://letsencrypt.org/) in the Appwrite -// internal queue server. -func (srv *Health) GetQueueCertificates() (map[string]interface{}, error) { - path := "/health/queue/certificates" - - params := map[string]interface{}{ - } - - return srv.client.Call("GET", path, nil, params) -} - -// GetQueueFunctions -func (srv *Health) GetQueueFunctions() (map[string]interface{}, error) { - path := "/health/queue/functions" - - params := map[string]interface{}{ - } - - return srv.client.Call("GET", path, nil, params) -} - -// GetQueueLogs get the number of logs that are waiting to be processed in the -// Appwrite internal queue server. -func (srv *Health) GetQueueLogs() (map[string]interface{}, error) { - path := "/health/queue/logs" - - params := map[string]interface{}{ - } - - return srv.client.Call("GET", path, nil, params) -} - -// GetQueueTasks get the number of tasks that are waiting to be processed in -// the Appwrite internal queue server. -func (srv *Health) GetQueueTasks() (map[string]interface{}, error) { - path := "/health/queue/tasks" - - params := map[string]interface{}{ - } - - return srv.client.Call("GET", path, nil, params) -} - -// GetQueueUsage get the number of usage stats that are waiting to be -// processed in the Appwrite internal queue server. -func (srv *Health) GetQueueUsage() (map[string]interface{}, error) { - path := "/health/queue/usage" - - params := map[string]interface{}{ - } - - return srv.client.Call("GET", path, nil, params) -} - -// GetQueueWebhooks get the number of webhooks that are waiting to be -// processed in the Appwrite internal queue server. -func (srv *Health) GetQueueWebhooks() (map[string]interface{}, error) { - path := "/health/queue/webhooks" - - params := map[string]interface{}{ - } - - return srv.client.Call("GET", path, nil, params) -} - -// GetStorageLocal check the Appwrite local storage device is up and -// connection is successful. -func (srv *Health) GetStorageLocal() (map[string]interface{}, error) { - path := "/health/storage/local" - - params := map[string]interface{}{ - } - - return srv.client.Call("GET", path, nil, params) -} - -// GetTime check the Appwrite server time is synced with Google remote NTP -// server. We use this technology to smoothly handle leap seconds with no -// disruptive events. The [Network Time -// Protocol](https://en.wikipedia.org/wiki/Network_Time_Protocol) (NTP) is -// 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. -func (srv *Health) GetTime() (map[string]interface{}, error) { - path := "/health/time" - - params := map[string]interface{}{ - } - - return srv.client.Call("GET", path, nil, params) -} diff --git a/app/sdks/0.7.0/server-go/locale.go b/app/sdks/0.7.0/server-go/locale.go deleted file mode 100644 index ecadd889cb..0000000000 --- a/app/sdks/0.7.0/server-go/locale.go +++ /dev/null @@ -1,88 +0,0 @@ -package appwrite - -import ( -) - -// Locale service -type Locale struct { - client Client -} - -func NewLocale(clt Client) Locale { - service := Locale{ - client: clt, - } - - return service -} - -// Get get the current user location based on IP. Returns an object with user -// country code, country name, continent name, continent code, ip address and -// suggested currency. You can use the locale header to get the data in a -// supported language. -// -// ([IP Geolocation by DB-IP](https://db-ip.com)) -func (srv *Locale) Get() (map[string]interface{}, error) { - path := "/locale" - - params := map[string]interface{}{ - } - - return srv.client.Call("GET", path, nil, params) -} - -// GetContinents list of all continents. You can use the locale header to get -// the data in a supported language. -func (srv *Locale) GetContinents() (map[string]interface{}, error) { - path := "/locale/continents" - - params := map[string]interface{}{ - } - - return srv.client.Call("GET", path, nil, params) -} - -// GetCountries list of all countries. You can use the locale header to get -// the data in a supported language. -func (srv *Locale) GetCountries() (map[string]interface{}, error) { - path := "/locale/countries" - - params := map[string]interface{}{ - } - - return srv.client.Call("GET", path, nil, params) -} - -// GetCountriesEU 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. -func (srv *Locale) GetCountriesEU() (map[string]interface{}, error) { - path := "/locale/countries/eu" - - params := map[string]interface{}{ - } - - return srv.client.Call("GET", path, nil, params) -} - -// GetCountriesPhones list of all countries phone codes. You can use the -// locale header to get the data in a supported language. -func (srv *Locale) GetCountriesPhones() (map[string]interface{}, error) { - path := "/locale/countries/phones" - - params := map[string]interface{}{ - } - - return srv.client.Call("GET", path, nil, params) -} - -// GetCurrencies list of all currencies, including currency symol, 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. -func (srv *Locale) GetCurrencies() (map[string]interface{}, error) { - path := "/locale/currencies" - - params := map[string]interface{}{ - } - - return srv.client.Call("GET", path, nil, params) -} diff --git a/app/sdks/0.7.0/server-go/main.go b/app/sdks/0.7.0/server-go/main.go deleted file mode 100644 index 13df7fc1b5..0000000000 --- a/app/sdks/0.7.0/server-go/main.go +++ /dev/null @@ -1,6 +0,0 @@ -package appwrite - -// NewClient initializes a new Appwrite client -func NewClient() Client { - return Client{} -} diff --git a/app/sdks/0.7.0/server-go/storage.go b/app/sdks/0.7.0/server-go/storage.go deleted file mode 100644 index 7ede9c3255..0000000000 --- a/app/sdks/0.7.0/server-go/storage.go +++ /dev/null @@ -1,134 +0,0 @@ -package appwrite - -import ( - "strings" -) - -// Storage service -type Storage struct { - client Client -} - -func NewStorage(clt Client) Storage { - service := Storage{ - client: clt, - } - - return service -} - -// ListFiles get a list of all the user files. You can use the query params to -// filter your results. On admin mode, this endpoint will return a list of all -// of the project files. [Learn more about different API modes](/docs/admin). -func (srv *Storage) ListFiles(Search string, Limit int, Offset int, OrderType string) (map[string]interface{}, error) { - path := "/storage/files" - - params := map[string]interface{}{ - "search": Search, - "limit": Limit, - "offset": Offset, - "orderType": OrderType, - } - - return srv.client.Call("GET", path, nil, params) -} - -// CreateFile create a new file. The user who creates the file will -// automatically be assigned to read and write access unless he has passed -// custom values for read and write arguments. -func (srv *Storage) CreateFile(File string, Read []interface{}, Write []interface{}) (map[string]interface{}, error) { - path := "/storage/files" - - params := map[string]interface{}{ - "file": File, - "read": Read, - "write": Write, - } - - return srv.client.Call("POST", path, nil, params) -} - -// GetFile get file by its unique ID. This endpoint response returns a JSON -// object with the file metadata. -func (srv *Storage) GetFile(FileId string) (map[string]interface{}, error) { - r := strings.NewReplacer("{fileId}", FileId) - path := r.Replace("/storage/files/{fileId}") - - params := map[string]interface{}{ - } - - return srv.client.Call("GET", path, nil, params) -} - -// UpdateFile update file by its unique ID. Only users with write permissions -// have access to update this resource. -func (srv *Storage) UpdateFile(FileId string, Read []interface{}, Write []interface{}) (map[string]interface{}, error) { - r := strings.NewReplacer("{fileId}", FileId) - path := r.Replace("/storage/files/{fileId}") - - params := map[string]interface{}{ - "read": Read, - "write": Write, - } - - return srv.client.Call("PUT", path, nil, params) -} - -// DeleteFile delete a file by its unique ID. Only users with write -// permissions have access to delete this resource. -func (srv *Storage) DeleteFile(FileId string) (map[string]interface{}, error) { - r := strings.NewReplacer("{fileId}", FileId) - path := r.Replace("/storage/files/{fileId}") - - params := map[string]interface{}{ - } - - return srv.client.Call("DELETE", path, nil, params) -} - -// GetFileDownload get 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. -func (srv *Storage) GetFileDownload(FileId string) (map[string]interface{}, error) { - r := strings.NewReplacer("{fileId}", FileId) - path := r.Replace("/storage/files/{fileId}/download") - - params := map[string]interface{}{ - } - - return srv.client.Call("GET", path, nil, params) -} - -// GetFilePreview get a file preview image. Currently, this method supports -// preview for image files (jpg, png, and gif), other supported formats, like -// pdf, docs, slides, and spreadsheets, will return the file icon image. You -// can also pass query string arguments for cutting and resizing your preview -// image. -func (srv *Storage) GetFilePreview(FileId string, Width int, Height int, Quality int, Background string, Output string) (map[string]interface{}, error) { - r := strings.NewReplacer("{fileId}", FileId) - path := r.Replace("/storage/files/{fileId}/preview") - - params := map[string]interface{}{ - "width": Width, - "height": Height, - "quality": Quality, - "background": Background, - "output": Output, - } - - return srv.client.Call("GET", path, nil, params) -} - -// GetFileView get file content by its unique ID. This endpoint is similar to -// the download method but returns with no 'Content-Disposition: attachment' -// header. -func (srv *Storage) GetFileView(FileId string, As string) (map[string]interface{}, error) { - r := strings.NewReplacer("{fileId}", FileId) - path := r.Replace("/storage/files/{fileId}/view") - - params := map[string]interface{}{ - "as": As, - } - - return srv.client.Call("GET", path, nil, params) -} diff --git a/app/sdks/0.7.0/server-go/teams.go b/app/sdks/0.7.0/server-go/teams.go deleted file mode 100644 index 14b89e0dda..0000000000 --- a/app/sdks/0.7.0/server-go/teams.go +++ /dev/null @@ -1,140 +0,0 @@ -package appwrite - -import ( - "strings" -) - -// Teams service -type Teams struct { - client Client -} - -func NewTeams(clt Client) Teams { - service := Teams{ - client: clt, - } - - return service -} - -// List get a list of all the current user teams. You can use the query params -// to filter your results. On admin mode, this endpoint will return a list of -// all of the project teams. [Learn more about different API -// modes](/docs/admin). -func (srv *Teams) List(Search string, Limit int, Offset int, OrderType string) (map[string]interface{}, error) { - path := "/teams" - - params := map[string]interface{}{ - "search": Search, - "limit": Limit, - "offset": Offset, - "orderType": OrderType, - } - - return srv.client.Call("GET", path, nil, params) -} - -// Create create a new team. The user who creates the team will automatically -// be assigned as the owner of the team. The team owner can invite new -// members, who will be able add new owners and update or delete the team from -// your project. -func (srv *Teams) Create(Name string, Roles []interface{}) (map[string]interface{}, error) { - path := "/teams" - - params := map[string]interface{}{ - "name": Name, - "roles": Roles, - } - - return srv.client.Call("POST", path, nil, params) -} - -// Get get team by its unique ID. All team members have read access for this -// resource. -func (srv *Teams) Get(TeamId string) (map[string]interface{}, error) { - r := strings.NewReplacer("{teamId}", TeamId) - path := r.Replace("/teams/{teamId}") - - params := map[string]interface{}{ - } - - return srv.client.Call("GET", path, nil, params) -} - -// Update update team by its unique ID. Only team owners have write access for -// this resource. -func (srv *Teams) Update(TeamId string, Name string) (map[string]interface{}, error) { - r := strings.NewReplacer("{teamId}", TeamId) - path := r.Replace("/teams/{teamId}") - - params := map[string]interface{}{ - "name": Name, - } - - return srv.client.Call("PUT", path, nil, params) -} - -// Delete delete team by its unique ID. Only team owners have write access for -// this resource. -func (srv *Teams) Delete(TeamId string) (map[string]interface{}, error) { - r := strings.NewReplacer("{teamId}", TeamId) - path := r.Replace("/teams/{teamId}") - - params := map[string]interface{}{ - } - - return srv.client.Call("DELETE", path, nil, params) -} - -// GetMemberships get team members by the team unique ID. All team members -// have read access for this list of resources. -func (srv *Teams) GetMemberships(TeamId string) (map[string]interface{}, error) { - r := strings.NewReplacer("{teamId}", TeamId) - path := r.Replace("/teams/{teamId}/memberships") - - params := map[string]interface{}{ - } - - return srv.client.Call("GET", path, nil, params) -} - -// CreateMembership use this endpoint to invite a new member to join your -// team. An email with a link to join the team will be sent to the new member -// email address if the member doesn't exist in the project it will be created -// automatically. -// -// Use the 'URL' parameter to redirect the user from the invitation email back -// to your app. When the user is redirected, use the [Update Team Membership -// Status](/docs/teams#updateMembershipStatus) endpoint to allow the user to -// accept the invitation to the team. -// -// Please note that in order to avoid a [Redirect -// Attacks](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) -// the only valid redirect URL's are the once from domains you have set when -// added your platforms in the console interface. -func (srv *Teams) CreateMembership(TeamId string, Email string, Roles []interface{}, Url string, Name string) (map[string]interface{}, error) { - r := strings.NewReplacer("{teamId}", TeamId) - path := r.Replace("/teams/{teamId}/memberships") - - params := map[string]interface{}{ - "email": Email, - "name": Name, - "roles": Roles, - "url": Url, - } - - return srv.client.Call("POST", path, nil, params) -} - -// DeleteMembership 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 he didn't accept it. -func (srv *Teams) DeleteMembership(TeamId string, InviteId string) (map[string]interface{}, error) { - r := strings.NewReplacer("{teamId}", TeamId, "{inviteId}", InviteId) - path := r.Replace("/teams/{teamId}/memberships/{inviteId}") - - params := map[string]interface{}{ - } - - return srv.client.Call("DELETE", path, nil, params) -} diff --git a/app/sdks/0.7.0/server-go/users.go b/app/sdks/0.7.0/server-go/users.go deleted file mode 100644 index 405b5a3209..0000000000 --- a/app/sdks/0.7.0/server-go/users.go +++ /dev/null @@ -1,137 +0,0 @@ -package appwrite - -import ( - "strings" -) - -// Users service -type Users struct { - client Client -} - -func NewUsers(clt Client) Users { - service := Users{ - client: clt, - } - - return service -} - -// List get a list of all the project users. You can use the query params to -// filter your results. -func (srv *Users) List(Search string, Limit int, Offset int, OrderType string) (map[string]interface{}, error) { - path := "/users" - - params := map[string]interface{}{ - "search": Search, - "limit": Limit, - "offset": Offset, - "orderType": OrderType, - } - - return srv.client.Call("GET", path, nil, params) -} - -// Create create a new user. -func (srv *Users) Create(Email string, Password string, Name string) (map[string]interface{}, error) { - path := "/users" - - params := map[string]interface{}{ - "email": Email, - "password": Password, - "name": Name, - } - - return srv.client.Call("POST", path, nil, params) -} - -// Get get user by its unique ID. -func (srv *Users) Get(UserId string) (map[string]interface{}, error) { - r := strings.NewReplacer("{userId}", UserId) - path := r.Replace("/users/{userId}") - - params := map[string]interface{}{ - } - - return srv.client.Call("GET", path, nil, params) -} - -// GetLogs get user activity logs list by its unique ID. -func (srv *Users) GetLogs(UserId string) (map[string]interface{}, error) { - r := strings.NewReplacer("{userId}", UserId) - path := r.Replace("/users/{userId}/logs") - - params := map[string]interface{}{ - } - - return srv.client.Call("GET", path, nil, params) -} - -// GetPrefs get user preferences by its unique ID. -func (srv *Users) GetPrefs(UserId string) (map[string]interface{}, error) { - r := strings.NewReplacer("{userId}", UserId) - path := r.Replace("/users/{userId}/prefs") - - params := map[string]interface{}{ - } - - return srv.client.Call("GET", path, nil, params) -} - -// UpdatePrefs update user preferences by its unique ID. You can pass only the -// specific settings you wish to update. -func (srv *Users) UpdatePrefs(UserId string, Prefs object) (map[string]interface{}, error) { - r := strings.NewReplacer("{userId}", UserId) - path := r.Replace("/users/{userId}/prefs") - - params := map[string]interface{}{ - "prefs": Prefs, - } - - return srv.client.Call("PATCH", path, nil, params) -} - -// GetSessions get user sessions list by its unique ID. -func (srv *Users) GetSessions(UserId string) (map[string]interface{}, error) { - r := strings.NewReplacer("{userId}", UserId) - path := r.Replace("/users/{userId}/sessions") - - params := map[string]interface{}{ - } - - return srv.client.Call("GET", path, nil, params) -} - -// DeleteSessions delete all user sessions by its unique ID. -func (srv *Users) DeleteSessions(UserId string) (map[string]interface{}, error) { - r := strings.NewReplacer("{userId}", UserId) - path := r.Replace("/users/{userId}/sessions") - - params := map[string]interface{}{ - } - - return srv.client.Call("DELETE", path, nil, params) -} - -// DeleteSession delete user sessions by its unique ID. -func (srv *Users) DeleteSession(UserId string, SessionId string) (map[string]interface{}, error) { - r := strings.NewReplacer("{userId}", UserId, "{sessionId}", SessionId) - path := r.Replace("/users/{userId}/sessions/{sessionId}") - - params := map[string]interface{}{ - } - - return srv.client.Call("DELETE", path, nil, params) -} - -// UpdateStatus update user status by its unique ID. -func (srv *Users) UpdateStatus(UserId string, Status string) (map[string]interface{}, error) { - r := strings.NewReplacer("{userId}", UserId) - path := r.Replace("/users/{userId}/status") - - params := map[string]interface{}{ - "status": Status, - } - - return srv.client.Call("PATCH", path, nil, params) -} diff --git a/app/sdks/0.7.0/server-go/utils.go b/app/sdks/0.7.0/server-go/utils.go deleted file mode 100644 index ca36149cf1..0000000000 --- a/app/sdks/0.7.0/server-go/utils.go +++ /dev/null @@ -1,36 +0,0 @@ -package appwrite - -import ( - "fmt" - "reflect" - "strconv" -) - -// ToString changes arg to string -func ToString(arg interface{}) string { - var tmp = reflect.Indirect(reflect.ValueOf(arg)).Interface() - switch v := tmp.(type) { - case int: - return strconv.Itoa(v) - case int8: - return strconv.FormatInt(int64(v), 10) - case int16: - return strconv.FormatInt(int64(v), 10) - case int32: - return strconv.FormatInt(int64(v), 10) - case int64: - return strconv.FormatInt(v, 10) - case string: - return v - case float32: - return strconv.FormatFloat(float64(v), 'f', -1, 32) - case float64: - return strconv.FormatFloat(v, 'f', -1, 64) - case fmt.Stringer: - return v.String() - case reflect.Value: - return ToString(v.Interface()) - default: - return "" - } -} diff --git a/app/sdks/0.7.0/server-java/CHANGELOG.md b/app/sdks/0.7.0/server-java/CHANGELOG.md deleted file mode 100644 index fa4d35e687..0000000000 --- a/app/sdks/0.7.0/server-java/CHANGELOG.md +++ /dev/null @@ -1 +0,0 @@ -# Change Log \ No newline at end of file diff --git a/app/sdks/0.7.0/server-java/LICENSE b/app/sdks/0.7.0/server-java/LICENSE deleted file mode 100644 index fc7c051a91..0000000000 --- a/app/sdks/0.7.0/server-java/LICENSE +++ /dev/null @@ -1,12 +0,0 @@ -Copyright (c) 2019 Appwrite (https://appwrite.io) and individual contributors. -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - - 3. Neither the name Appwrite nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/app/sdks/0.7.0/server-java/README.md b/app/sdks/0.7.0/server-java/README.md deleted file mode 100644 index 05e7d85945..0000000000 --- a/app/sdks/0.7.0/server-java/README.md +++ /dev/null @@ -1,43 +0,0 @@ -# Appwrite SDK for Java - -![License](https://img.shields.io/github/license/appwrite/sdk-for-java.svg?v=1) -![Version](https://img.shields.io/badge/api%20version-0.6.0-blue.svg?v=1) - -**This SDK is compatible with Appwrite server version 0.6.0. For older versions, please check previous releases.** - -Appwrite is an open-source backend as a service server that abstract and simplify complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way. - Use the Java SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools. - For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs) - - - -![Appwrite](https://appwrite.io/images/github.png) - -## Installation - -### Maven -Add this to your project's `pom.xml` file: - -```xml - - - com.squareup.okhttp3 - appwrite - 0.0.1 - - -``` - -You can install packages from the command line: - -```bash -mvn install appwrite -``` - -## Contribution - -This library is auto-generated by Appwrite custom [SDK Generator](https://github.com/appwrite/sdk-generator). To learn more about how you can help us improve this SDK, please check the [contribution guide](https://github.com/appwrite/sdk-generator/blob/master/CONTRIBUTING.md) before sending a pull-request. - -## License - -Please see the [BSD-3-Clause license](https://raw.githubusercontent.com/appwrite/appwrite/master/LICENSE) file for more information. \ No newline at end of file diff --git a/app/sdks/0.7.0/server-java/pom.xml b/app/sdks/0.7.0/server-java/pom.xml deleted file mode 100644 index 6d3098a6ea..0000000000 --- a/app/sdks/0.7.0/server-java/pom.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - 4.0.0 - - - appwrite - 0.0.1 - - Appwrite is an open-source self-hosted backend server that abstract and simplify complex and repetitive development tasks behind a very simple REST API - https://appwrite.io - - - 1.9 - 1.9 - - - - - com.squareup.okhttp3 - okhttp - 4.5.0 - - - com.google.code.gson - gson - 2.8.2 - - - - org.junit.jupiter - junit-jupiter-api - 5.6.2 - test - - - org.junit.jupiter - junit-jupiter-engine - 5.6.2 - test - - - - - - - maven-surefire-plugin - 2.22.2 - - - maven-failsafe-plugin - 2.22.2 - - - - \ No newline at end of file diff --git a/app/sdks/0.7.0/server-java/src/main/java/Client.java b/app/sdks/0.7.0/server-java/src/main/java/Client.java deleted file mode 100644 index 51c52aebb5..0000000000 --- a/app/sdks/0.7.0/server-java/src/main/java/Client.java +++ /dev/null @@ -1,143 +0,0 @@ -package ; - -import com.google.gson.Gson; -import okhttp3.Call; -import okhttp3.CookieJar; -import okhttp3.Headers; -import okhttp3.HttpUrl; -import okhttp3.FormBody; -import okhttp3.MediaType; -import okhttp3.OkHttpClient; -import okhttp3.Request; -import okhttp3.RequestBody; - -import java.util.List; -import java.util.HashMap; -import java.util.Map; - -import static java.util.Map.entry; - -public class Client { - private final OkHttpClient http; - private final Map headers; - private final Map config; - private String endPoint; - private boolean selfSigned; - private CookieJar cookieJar = CookieJar.NO_COOKIES; - - public Client() { - this("https://appwrite.io/v1", false, new OkHttpClient()); - } - - public Client(String endPoint, boolean selfSigned, OkHttpClient http) { - this.endPoint = endPoint; - this.selfSigned = selfSigned; - this.headers = new HashMap<>(Map.ofEntries( - entry("content-type", "application/json"), - entry("x-sdk-version", "appwrite:java:0.0.1") - )); - this.config = new HashMap<>(); - this.http = http.newBuilder() - .cookieJar(cookieJar) - .build(); - } - - public String getEndPoint(){ - return endPoint; - } - - public Map getConfig(){ - return config; - } - -// private Future getCookiePath() { -// final directory = getApplicationDocumentsDirectory(); -// final path = directory.path; -// final Directory dir = new Directory("$path/cookies"); -// dir.create(); -// return dir; -// } - - /// Your project ID - public Client setProject(String value) { - config.put("project", value); - addHeader("X-Appwrite-Project", value); - return this; - } - - /// Your secret API key - public Client setKey(String value) { - config.put("key", value); - addHeader("X-Appwrite-Key", value); - return this; - } - - public Client setLocale(String value) { - config.put("locale", value); - addHeader("X-Appwrite-Locale", value); - return this; - } - - public Client setSelfSigned(boolean status) { - selfSigned = status; - return this; - } - - public Client setEndpoint(String endPoint) { - this.endPoint = endPoint; - return this; - } - - public Client addHeader(String key, String value) { - headers.put(key, value); - return this; - } - - public Call call(String method, String path, Map headers, Map params) { - if(selfSigned) { - // Allow self signed requests - - } - - Headers requestHeaders = Headers.of(this.headers).newBuilder() - .addAll(Headers.of(headers)) - .build(); - - HttpUrl.Builder httpBuilder = HttpUrl.get(endPoint + path).newBuilder(); - if("GET".equals(method)) { - params.forEach((k, v) -> { - if(v instanceof List){ - httpBuilder.addQueryParameter(k+"[]", v.toString()); - }else{ - httpBuilder.addQueryParameter(k, v.toString()); - } - }); - Request request = new Request.Builder() - .url(httpBuilder.build()) - .headers(requestHeaders) - .get() - .build(); - - return http.newCall(request); - } - - RequestBody body; - if("multipart/form-data".equals(headers.get("content-type"))) { - FormBody.Builder builder = new FormBody.Builder(); - params.forEach((k, v) -> builder.add(k, v.toString())); - body = builder.build(); - } else { - Gson gson = new Gson(); - String json = gson.toJson(params); - body = RequestBody.create(json, MediaType.get("application/json")); - } - - Request request = new Request.Builder() - .url(httpBuilder.build()) - .headers(requestHeaders) - .method(method, body) - .build(); - - return http.newCall(request); - } -} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-java/src/main/java/enums/OrderType.java b/app/sdks/0.7.0/server-java/src/main/java/enums/OrderType.java deleted file mode 100644 index d4a73a3886..0000000000 --- a/app/sdks/0.7.0/server-java/src/main/java/enums/OrderType.java +++ /dev/null @@ -1,6 +0,0 @@ -package .enums; - -public enum OrderType { - ASC, DESC -} - diff --git a/app/sdks/0.7.0/server-java/src/main/java/services/Avatars.java b/app/sdks/0.7.0/server-java/src/main/java/services/Avatars.java deleted file mode 100644 index 3c0bb4e6c8..0000000000 --- a/app/sdks/0.7.0/server-java/src/main/java/services/Avatars.java +++ /dev/null @@ -1,164 +0,0 @@ -package .services; - - - -import okhttp3.Call; -import .Client; -import .enums.OrderType; - -import java.io.File; -import java.util.List; -import java.util.HashMap; -import java.util.Map; - -import static java.util.Map.entry; - -public class Avatars extends Service { - public Avatars(Client client){ - super(client); - } - - /// Get Browser Icon - /* - * You can use this endpoint to show different browser icons to your users. - * The code argument receives the browser code as it appears in your user - * /account/sessions endpoint. Use width, height and quality arguments to - * change the output settings. - */ - public Call getBrowser(String code, int width, int height, int quality) { - final String path = "/avatars/browsers/{code}".replace("{code}", code); - - final Map params = Map.ofEntries( - entry("width", width), - entry("height", height), - entry("quality", quality) - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("GET", path, headers, params); - } - - /// Get Credit Card Icon - /* - * Need to display your users with your billing method or their payment - * methods? The credit card endpoint will return you the icon of the credit - * card provider you need. Use width, height and quality arguments to change - * the output settings. - */ - public Call getCreditCard(String code, int width, int height, int quality) { - final String path = "/avatars/credit-cards/{code}".replace("{code}", code); - - final Map params = Map.ofEntries( - entry("width", width), - entry("height", height), - entry("quality", quality) - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("GET", path, headers, params); - } - - /// Get Favicon - /* - * Use this endpoint to fetch the favorite icon (AKA favicon) of a any remote - * website URL. - */ - public Call getFavicon(String url) { - final String path = "/avatars/favicon"; - - final Map params = Map.ofEntries( - entry("url", url) - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("GET", path, headers, params); - } - - /// Get Country Flag - /* - * You can use this endpoint to show different country flags icons to your - * users. The code argument receives the 2 letter country code. Use width, - * height and quality arguments to change the output settings. - */ - public Call getFlag(String code, int width, int height, int quality) { - final String path = "/avatars/flags/{code}".replace("{code}", code); - - final Map params = Map.ofEntries( - entry("width", width), - entry("height", height), - entry("quality", quality) - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("GET", path, headers, params); - } - - /// Get Image from URL - /* - * Use this endpoint to fetch a remote image URL and crop it to any image size - * you want. This endpoint is very useful if you need to crop and display - * remote images in your app or in case you want to make sure a 3rd party - * image is properly served using a TLS protocol. - */ - public Call getImage(String url, int width, int height) { - final String path = "/avatars/image"; - - final Map params = Map.ofEntries( - entry("url", url), - entry("width", width), - entry("height", height) - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("GET", path, headers, params); - } - - /// 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. - */ - public Call getQR(String text, int size, int margin, int download) { - final String path = "/avatars/qr"; - - final Map params = Map.ofEntries( - entry("text", text), - entry("size", size), - entry("margin", margin), - entry("download", download) - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("GET", path, headers, params); - } -} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-java/src/main/java/services/Database.java b/app/sdks/0.7.0/server-java/src/main/java/services/Database.java deleted file mode 100644 index 84161de9fc..0000000000 --- a/app/sdks/0.7.0/server-java/src/main/java/services/Database.java +++ /dev/null @@ -1,264 +0,0 @@ -package .services; - - - -import okhttp3.Call; -import .Client; -import .enums.OrderType; - -import java.io.File; -import java.util.List; -import java.util.HashMap; -import java.util.Map; - -import static java.util.Map.entry; - -public class Database extends Service { - public Database(Client client){ - super(client); - } - - /// List Collections - /* - * Get a list of all the user collections. You can use the query params to - * filter your results. On admin mode, this endpoint will return a list of all - * of the project collections. [Learn more about different API - * modes](/docs/admin). - */ - public Call listCollections(String search, int limit, int offset, OrderType orderType) { - final String path = "/database/collections"; - - final Map params = Map.ofEntries( - entry("search", search), - entry("limit", limit), - entry("offset", offset), - entry("orderType", orderType.name()) - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("GET", path, headers, params); - } - - /// Create Collection - /* - * Create a new Collection. - */ - public Call createCollection(String name, List read, List write, List rules) { - final String path = "/database/collections"; - - final Map params = Map.ofEntries( - entry("name", name), - entry("read", read), - entry("write", write), - entry("rules", rules) - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("POST", path, headers, params); - } - - /// Get Collection - /* - * Get collection by its unique ID. This endpoint response returns a JSON - * object with the collection metadata. - */ - public Call getCollection(String collectionId) { - final String path = "/database/collections/{collectionId}".replace("{collectionId}", collectionId); - - final Map params = Map.ofEntries( - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("GET", path, headers, params); - } - - /// Update Collection - /* - * Update collection by its unique ID. - */ - public Call updateCollection(String collectionId, String name, List read, List write, List rules) { - final String path = "/database/collections/{collectionId}".replace("{collectionId}", collectionId); - - final Map params = Map.ofEntries( - entry("name", name), - entry("read", read), - entry("write", write), - entry("rules", rules) - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("PUT", path, headers, params); - } - - /// Delete Collection - /* - * Delete a collection by its unique ID. Only users with write permissions - * have access to delete this resource. - */ - public Call deleteCollection(String collectionId) { - final String path = "/database/collections/{collectionId}".replace("{collectionId}", collectionId); - - final Map params = Map.ofEntries( - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("DELETE", path, headers, params); - } - - /// List Documents - /* - * Get a list of all the user documents. You can use the query params to - * filter your results. On admin mode, this endpoint will return a list of all - * of the project documents. [Learn more about different API - * modes](/docs/admin). - */ - public Call listDocuments(String collectionId, List filters, int offset, int limit, String orderField, OrderType orderType, String orderCast, String search, int first, int last) { - final String path = "/database/collections/{collectionId}/documents".replace("{collectionId}", collectionId); - - final Map params = Map.ofEntries( - entry("filters", filters), - entry("offset", offset), - entry("limit", limit), - entry("orderField", orderField), - entry("orderType", orderType.name()), - entry("orderCast", orderCast), - entry("search", search), - entry("first", first), - entry("last", last) - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("GET", path, headers, params); - } - - /// Create Document - /* - * Create a new Document. - */ - public Call createDocument(String collectionId, Object data, List read, List write, String parentDocument, String parentProperty, String parentPropertyType) { - final String path = "/database/collections/{collectionId}/documents".replace("{collectionId}", collectionId); - - final Map params = Map.ofEntries( - entry("data", data), - entry("read", read), - entry("write", write), - entry("parentDocument", parentDocument), - entry("parentProperty", parentProperty), - entry("parentPropertyType", parentPropertyType) - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("POST", path, headers, params); - } - - /// Get Document - /* - * Get document by its unique ID. This endpoint response returns a JSON object - * with the document data. - */ - public Call getDocument(String collectionId, String documentId) { - final String path = "/database/collections/{collectionId}/documents/{documentId}".replace("{collectionId}", collectionId).replace("{documentId}", documentId); - - final Map params = Map.ofEntries( - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("GET", path, headers, params); - } - - /// Update Document - public Call updateDocument(String collectionId, String documentId, Object data, List read, List write) { - final String path = "/database/collections/{collectionId}/documents/{documentId}".replace("{collectionId}", collectionId).replace("{documentId}", documentId); - - final Map params = Map.ofEntries( - entry("data", data), - entry("read", read), - entry("write", write) - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("PATCH", path, headers, params); - } - - /// Delete Document - /* - * Delete document by its unique ID. This endpoint deletes only the parent - * documents, his attributes and relations to other documents. Child documents - * **will not** be deleted. - */ - public Call deleteDocument(String collectionId, String documentId) { - final String path = "/database/collections/{collectionId}/documents/{documentId}".replace("{collectionId}", collectionId).replace("{documentId}", documentId); - - final Map params = Map.ofEntries( - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("DELETE", path, headers, params); - } - - /// Get Collection Logs - public Call getCollectionLogs(String collectionId) { - final String path = "/database/collections/{collectionId}/logs".replace("{collectionId}", collectionId); - - final Map params = Map.ofEntries( - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("GET", path, headers, params); - } -} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-java/src/main/java/services/Functions.java b/app/sdks/0.7.0/server-java/src/main/java/services/Functions.java deleted file mode 100644 index a04ad1b5a9..0000000000 --- a/app/sdks/0.7.0/server-java/src/main/java/services/Functions.java +++ /dev/null @@ -1,255 +0,0 @@ -package .services; - - - -import okhttp3.Call; -import .Client; -import .enums.OrderType; - -import java.io.File; -import java.util.List; -import java.util.HashMap; -import java.util.Map; - -import static java.util.Map.entry; - -public class Functions extends Service { - public Functions(Client client){ - super(client); - } - - /// List Functions - public Call list(String search, int limit, int offset, OrderType orderType) { - final String path = "/functions"; - - final Map params = Map.ofEntries( - entry("search", search), - entry("limit", limit), - entry("offset", offset), - entry("orderType", orderType.name()) - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("GET", path, headers, params); - } - - /// Create Function - public Call create(String name, Object vars, List events, String schedule, int timeout) { - final String path = "/functions"; - - final Map params = Map.ofEntries( - entry("name", name), - entry("vars", vars), - entry("events", events), - entry("schedule", schedule), - entry("timeout", timeout) - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("POST", path, headers, params); - } - - /// Get Function - public Call get(String functionId) { - final String path = "/functions/{functionId}".replace("{functionId}", functionId); - - final Map params = Map.ofEntries( - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("GET", path, headers, params); - } - - /// Update Function - public Call update(String functionId, String name, Object vars, List events, String schedule, int timeout) { - final String path = "/functions/{functionId}".replace("{functionId}", functionId); - - final Map params = Map.ofEntries( - entry("name", name), - entry("vars", vars), - entry("events", events), - entry("schedule", schedule), - entry("timeout", timeout) - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("PUT", path, headers, params); - } - - /// Delete Function - public Call delete(String functionId) { - final String path = "/functions/{functionId}".replace("{functionId}", functionId); - - final Map params = Map.ofEntries( - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("DELETE", path, headers, params); - } - - /// List Executions - public Call listExecutions(String functionId, String search, int limit, int offset, OrderType orderType) { - final String path = "/functions/{functionId}/executions".replace("{functionId}", functionId); - - final Map params = Map.ofEntries( - entry("search", search), - entry("limit", limit), - entry("offset", offset), - entry("orderType", orderType.name()) - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("GET", path, headers, params); - } - - /// Create Execution - public Call createExecution(String functionId, int async) { - final String path = "/functions/{functionId}/executions".replace("{functionId}", functionId); - - final Map params = Map.ofEntries( - entry("async", async) - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("POST", path, headers, params); - } - - /// Get Execution - public Call getExecution(String functionId, String executionId) { - final String path = "/functions/{functionId}/executions/{executionId}".replace("{functionId}", functionId).replace("{executionId}", executionId); - - final Map params = Map.ofEntries( - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("GET", path, headers, params); - } - - /// Update Function Tag - public Call updateTag(String functionId, String tag) { - final String path = "/functions/{functionId}/tag".replace("{functionId}", functionId); - - final Map params = Map.ofEntries( - entry("tag", tag) - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("PATCH", path, headers, params); - } - - /// List Tags - public Call listTags(String functionId, String search, int limit, int offset, OrderType orderType) { - final String path = "/functions/{functionId}/tags".replace("{functionId}", functionId); - - final Map params = Map.ofEntries( - entry("search", search), - entry("limit", limit), - entry("offset", offset), - entry("orderType", orderType.name()) - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("GET", path, headers, params); - } - - /// Create Tag - public Call createTag(String functionId, String env, String command, String code) { - final String path = "/functions/{functionId}/tags".replace("{functionId}", functionId); - - final Map params = Map.ofEntries( - entry("env", env), - entry("command", command), - entry("code", code) - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("POST", path, headers, params); - } - - /// Get Tag - public Call getTag(String functionId, String tagId) { - final String path = "/functions/{functionId}/tags/{tagId}".replace("{functionId}", functionId).replace("{tagId}", tagId); - - final Map params = Map.ofEntries( - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("GET", path, headers, params); - } - - /// Delete Tag - public Call deleteTag(String functionId, String tagId) { - final String path = "/functions/{functionId}/tags/{tagId}".replace("{functionId}", functionId).replace("{tagId}", tagId); - - final Map params = Map.ofEntries( - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("DELETE", path, headers, params); - } -} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-java/src/main/java/services/Health.java b/app/sdks/0.7.0/server-java/src/main/java/services/Health.java deleted file mode 100644 index 08e23433d1..0000000000 --- a/app/sdks/0.7.0/server-java/src/main/java/services/Health.java +++ /dev/null @@ -1,258 +0,0 @@ -package .services; - - - -import okhttp3.Call; -import .Client; -import .enums.OrderType; - -import java.io.File; -import java.util.List; -import java.util.HashMap; -import java.util.Map; - -import static java.util.Map.entry; - -public class Health extends Service { - public Health(Client client){ - super(client); - } - - /// Get HTTP - /* - * Check the Appwrite HTTP server is up and responsive. - */ - public Call get() { - final String path = "/health"; - - final Map params = Map.ofEntries( - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("GET", path, headers, params); - } - - /// Get Anti virus - /* - * Check the Appwrite Anti Virus server is up and connection is successful. - */ - public Call getAntiVirus() { - final String path = "/health/anti-virus"; - - final Map params = Map.ofEntries( - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("GET", path, headers, params); - } - - /// Get Cache - /* - * Check the Appwrite in-memory cache server is up and connection is - * successful. - */ - public Call getCache() { - final String path = "/health/cache"; - - final Map params = Map.ofEntries( - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("GET", path, headers, params); - } - - /// Get DB - /* - * Check the Appwrite database server is up and connection is successful. - */ - public Call getDB() { - final String path = "/health/db"; - - final Map params = Map.ofEntries( - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("GET", path, headers, params); - } - - /// Get Certificate Queue - /* - * Get the number of certificates that are waiting to be issued against - * [Letsencrypt](https://letsencrypt.org/) in the Appwrite internal queue - * server. - */ - public Call getQueueCertificates() { - final String path = "/health/queue/certificates"; - - final Map params = Map.ofEntries( - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("GET", path, headers, params); - } - - /// Get Functions Queue - public Call getQueueFunctions() { - final String path = "/health/queue/functions"; - - final Map params = Map.ofEntries( - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("GET", path, headers, params); - } - - /// Get Logs Queue - /* - * Get the number of logs that are waiting to be processed in the Appwrite - * internal queue server. - */ - public Call getQueueLogs() { - final String path = "/health/queue/logs"; - - final Map params = Map.ofEntries( - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("GET", path, headers, params); - } - - /// Get Tasks Queue - /* - * Get the number of tasks that are waiting to be processed in the Appwrite - * internal queue server. - */ - public Call getQueueTasks() { - final String path = "/health/queue/tasks"; - - final Map params = Map.ofEntries( - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("GET", path, headers, params); - } - - /// Get Usage Queue - /* - * Get the number of usage stats that are waiting to be processed in the - * Appwrite internal queue server. - */ - public Call getQueueUsage() { - final String path = "/health/queue/usage"; - - final Map params = Map.ofEntries( - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("GET", path, headers, params); - } - - /// Get Webhooks Queue - /* - * Get the number of webhooks that are waiting to be processed in the Appwrite - * internal queue server. - */ - public Call getQueueWebhooks() { - final String path = "/health/queue/webhooks"; - - final Map params = Map.ofEntries( - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("GET", path, headers, params); - } - - /// Get Local Storage - /* - * Check the Appwrite local storage device is up and connection is successful. - */ - public Call getStorageLocal() { - final String path = "/health/storage/local"; - - final Map params = Map.ofEntries( - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("GET", path, headers, params); - } - - /// Get Time - /* - * Check the Appwrite server time is synced with Google remote NTP server. We - * use this technology to smoothly handle leap seconds with no disruptive - * events. The [Network Time - * Protocol](https://en.wikipedia.org/wiki/Network_Time_Protocol) (NTP) is - * 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. - */ - public Call getTime() { - final String path = "/health/time"; - - final Map params = Map.ofEntries( - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("GET", path, headers, params); - } -} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-java/src/main/java/services/Locale.java b/app/sdks/0.7.0/server-java/src/main/java/services/Locale.java deleted file mode 100644 index 695b04a679..0000000000 --- a/app/sdks/0.7.0/server-java/src/main/java/services/Locale.java +++ /dev/null @@ -1,145 +0,0 @@ -package .services; - - - -import okhttp3.Call; -import .Client; -import .enums.OrderType; - -import java.io.File; -import java.util.List; -import java.util.HashMap; -import java.util.Map; - -import static java.util.Map.entry; - -public class Locale extends Service { - public Locale(Client client){ - super(client); - } - - /// Get User Locale - /* - * Get the current user location based on IP. Returns an object with user - * country code, country name, continent name, continent code, ip address and - * suggested currency. You can use the locale header to get the data in a - * supported language. - * - * ([IP Geolocation by DB-IP](https://db-ip.com)) - */ - public Call get() { - final String path = "/locale"; - - final Map params = Map.ofEntries( - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("GET", path, headers, params); - } - - /// List Continents - /* - * List of all continents. You can use the locale header to get the data in a - * supported language. - */ - public Call getContinents() { - final String path = "/locale/continents"; - - final Map params = Map.ofEntries( - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("GET", path, headers, params); - } - - /// List Countries - /* - * List of all countries. You can use the locale header to get the data in a - * supported language. - */ - public Call getCountries() { - final String path = "/locale/countries"; - - final Map params = Map.ofEntries( - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("GET", path, headers, params); - } - - /// 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. - */ - public Call getCountriesEU() { - final String path = "/locale/countries/eu"; - - final Map params = Map.ofEntries( - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("GET", path, headers, params); - } - - /// List Countries Phone Codes - /* - * List of all countries phone codes. You can use the locale header to get the - * data in a supported language. - */ - public Call getCountriesPhones() { - final String path = "/locale/countries/phones"; - - final Map params = Map.ofEntries( - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("GET", path, headers, params); - } - - /// List Currencies - /* - * List of all currencies, including currency symol, 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. - */ - public Call getCurrencies() { - final String path = "/locale/currencies"; - - final Map params = Map.ofEntries( - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("GET", path, headers, params); - } -} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-java/src/main/java/services/Service.java b/app/sdks/0.7.0/server-java/src/main/java/services/Service.java deleted file mode 100644 index 477b0ba724..0000000000 --- a/app/sdks/0.7.0/server-java/src/main/java/services/Service.java +++ /dev/null @@ -1,11 +0,0 @@ -package .services; - -import .Client; - -abstract class Service { - final Client client; - - Service(Client client) { - this.client = client; - } -} diff --git a/app/sdks/0.7.0/server-java/src/main/java/services/Storage.java b/app/sdks/0.7.0/server-java/src/main/java/services/Storage.java deleted file mode 100644 index 0233868d0d..0000000000 --- a/app/sdks/0.7.0/server-java/src/main/java/services/Storage.java +++ /dev/null @@ -1,204 +0,0 @@ -package .services; - - - -import okhttp3.Call; -import okhttp3.HttpUrl; -import .Client; -import .enums.OrderType; - -import java.io.File; -import java.util.List; -import java.util.HashMap; -import java.util.Map; - -import static java.util.Map.entry; - -public class Storage extends Service { - public Storage(Client client){ - super(client); - } - - /// List Files - /* - * Get a list of all the user files. You can use the query params to filter - * your results. On admin mode, this endpoint will return a list of all of the - * project files. [Learn more about different API modes](/docs/admin). - */ - public Call listFiles(String search, int limit, int offset, OrderType orderType) { - final String path = "/storage/files"; - - final Map params = Map.ofEntries( - entry("search", search), - entry("limit", limit), - entry("offset", offset), - entry("orderType", orderType.name()) - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("GET", path, headers, params); - } - - /// Create File - /* - * Create a new file. The user who creates the file will automatically be - * assigned to read and write access unless he has passed custom values for - * read and write arguments. - */ - public Call createFile(File file, List read, List write) { - final String path = "/storage/files"; - - final Map params = Map.ofEntries( - entry("file", file), - entry("read", read), - entry("write", write) - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "multipart/form-data") - ); - - return client.call("POST", path, headers, params); - } - - /// Get File - /* - * Get file by its unique ID. This endpoint response returns a JSON object - * with the file metadata. - */ - public Call getFile(String fileId) { - final String path = "/storage/files/{fileId}".replace("{fileId}", fileId); - - final Map params = Map.ofEntries( - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("GET", path, headers, params); - } - - /// Update File - /* - * Update file by its unique ID. Only users with write permissions have access - * to update this resource. - */ - public Call updateFile(String fileId, List read, List write) { - final String path = "/storage/files/{fileId}".replace("{fileId}", fileId); - - final Map params = Map.ofEntries( - entry("read", read), - entry("write", write) - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("PUT", path, headers, params); - } - - /// Delete File - /* - * Delete a file by its unique ID. Only users with write permissions have - * access to delete this resource. - */ - public Call deleteFile(String fileId) { - final String path = "/storage/files/{fileId}".replace("{fileId}", fileId); - - final Map params = Map.ofEntries( - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("DELETE", path, headers, params); - } - - /// Get File for Download - /* - * Get 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. - */ - public String getFileDownload(String fileId) { - final String path = "/storage/files/{fileId}/download".replace("{fileId}", fileId); - - final Map params = Map.ofEntries( - entry("project", client.getConfig().get("project")), - entry("key", client.getConfig().get("key")) - ); - - - - HttpUrl.Builder httpBuilder = new HttpUrl.Builder().build().newBuilder(client.getEndPoint() + path); - params.forEach((k, v) -> httpBuilder.addQueryParameter(k, v.toString())); - - return httpBuilder.build().toString(); - } - - /// Get File Preview - /* - * Get a file preview image. Currently, this method supports preview for image - * files (jpg, png, and gif), other supported formats, like pdf, docs, slides, - * and spreadsheets, will return the file icon image. You can also pass query - * string arguments for cutting and resizing your preview image. - */ - public String getFilePreview(String fileId, int width, int height, int quality, String background, String output) { - final String path = "/storage/files/{fileId}/preview".replace("{fileId}", fileId); - - final Map params = Map.ofEntries( - entry("width", width), - entry("height", height), - entry("quality", quality), - entry("background", background), - entry("output", output), - entry("project", client.getConfig().get("project")), - entry("key", client.getConfig().get("key")) - ); - - - - HttpUrl.Builder httpBuilder = new HttpUrl.Builder().build().newBuilder(client.getEndPoint() + path); - params.forEach((k, v) -> httpBuilder.addQueryParameter(k, v.toString())); - - return httpBuilder.build().toString(); - } - - /// Get File for View - /* - * Get file content by its unique ID. This endpoint is similar to the download - * method but returns with no 'Content-Disposition: attachment' header. - */ - public String getFileView(String fileId, String as) { - final String path = "/storage/files/{fileId}/view".replace("{fileId}", fileId); - - final Map params = Map.ofEntries( - entry("as", as), - entry("project", client.getConfig().get("project")), - entry("key", client.getConfig().get("key")) - ); - - - - HttpUrl.Builder httpBuilder = new HttpUrl.Builder().build().newBuilder(client.getEndPoint() + path); - params.forEach((k, v) -> httpBuilder.addQueryParameter(k, v.toString())); - - return httpBuilder.build().toString(); - } -} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-java/src/main/java/services/Teams.java b/app/sdks/0.7.0/server-java/src/main/java/services/Teams.java deleted file mode 100644 index 46cff57f8c..0000000000 --- a/app/sdks/0.7.0/server-java/src/main/java/services/Teams.java +++ /dev/null @@ -1,206 +0,0 @@ -package .services; - - - -import okhttp3.Call; -import .Client; -import .enums.OrderType; - -import java.io.File; -import java.util.List; -import java.util.HashMap; -import java.util.Map; - -import static java.util.Map.entry; - -public class Teams extends Service { - public Teams(Client client){ - super(client); - } - - /// List Teams - /* - * Get a list of all the current user teams. You can use the query params to - * filter your results. On admin mode, this endpoint will return a list of all - * of the project teams. [Learn more about different API modes](/docs/admin). - */ - public Call list(String search, int limit, int offset, OrderType orderType) { - final String path = "/teams"; - - final Map params = Map.ofEntries( - entry("search", search), - entry("limit", limit), - entry("offset", offset), - entry("orderType", orderType.name()) - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("GET", path, headers, params); - } - - /// Create Team - /* - * Create a new team. The user who creates the team will automatically be - * assigned as the owner of the team. The team owner can invite new members, - * who will be able add new owners and update or delete the team from your - * project. - */ - public Call create(String name, List roles) { - final String path = "/teams"; - - final Map params = Map.ofEntries( - entry("name", name), - entry("roles", roles) - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("POST", path, headers, params); - } - - /// Get Team - /* - * Get team by its unique ID. All team members have read access for this - * resource. - */ - public Call get(String teamId) { - final String path = "/teams/{teamId}".replace("{teamId}", teamId); - - final Map params = Map.ofEntries( - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("GET", path, headers, params); - } - - /// Update Team - /* - * Update team by its unique ID. Only team owners have write access for this - * resource. - */ - public Call update(String teamId, String name) { - final String path = "/teams/{teamId}".replace("{teamId}", teamId); - - final Map params = Map.ofEntries( - entry("name", name) - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("PUT", path, headers, params); - } - - /// Delete Team - /* - * Delete team by its unique ID. Only team owners have write access for this - * resource. - */ - public Call delete(String teamId) { - final String path = "/teams/{teamId}".replace("{teamId}", teamId); - - final Map params = Map.ofEntries( - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("DELETE", path, headers, params); - } - - /// Get Team Memberships - /* - * Get team members by the team unique ID. All team members have read access - * for this list of resources. - */ - public Call getMemberships(String teamId) { - final String path = "/teams/{teamId}/memberships".replace("{teamId}", teamId); - - final Map params = Map.ofEntries( - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("GET", path, headers, params); - } - - /// Create Team Membership - /* - * Use this endpoint to invite a new member to join your team. An email with a - * link to join the team will be sent to the new member email address if the - * member doesn't exist in the project it will be created automatically. - * - * Use the 'URL' parameter to redirect the user from the invitation email back - * to your app. When the user is redirected, use the [Update Team Membership - * Status](/docs/teams#updateMembershipStatus) endpoint to allow the user to - * accept the invitation to the team. - * - * Please note that in order to avoid a [Redirect - * Attacks](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) - * the only valid redirect URL's are the once from domains you have set when - * added your platforms in the console interface. - */ - public Call createMembership(String teamId, String email, List roles, String url, String name) { - final String path = "/teams/{teamId}/memberships".replace("{teamId}", teamId); - - final Map params = Map.ofEntries( - entry("email", email), - entry("name", name), - entry("roles", roles), - entry("url", url) - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("POST", path, headers, params); - } - - /// 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 he didn't accept it. - */ - public Call deleteMembership(String teamId, String inviteId) { - final String path = "/teams/{teamId}/memberships/{inviteId}".replace("{teamId}", teamId).replace("{inviteId}", inviteId); - - final Map params = Map.ofEntries( - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("DELETE", path, headers, params); - } -} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-java/src/main/java/services/Users.java b/app/sdks/0.7.0/server-java/src/main/java/services/Users.java deleted file mode 100644 index 921a7c1296..0000000000 --- a/app/sdks/0.7.0/server-java/src/main/java/services/Users.java +++ /dev/null @@ -1,221 +0,0 @@ -package .services; - - - -import okhttp3.Call; -import .Client; -import .enums.OrderType; - -import java.io.File; -import java.util.List; -import java.util.HashMap; -import java.util.Map; - -import static java.util.Map.entry; - -public class Users extends Service { - public Users(Client client){ - super(client); - } - - /// List Users - /* - * Get a list of all the project users. You can use the query params to filter - * your results. - */ - public Call list(String search, int limit, int offset, OrderType orderType) { - final String path = "/users"; - - final Map params = Map.ofEntries( - entry("search", search), - entry("limit", limit), - entry("offset", offset), - entry("orderType", orderType.name()) - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("GET", path, headers, params); - } - - /// Create User - /* - * Create a new user. - */ - public Call create(String email, String password, String name) { - final String path = "/users"; - - final Map params = Map.ofEntries( - entry("email", email), - entry("password", password), - entry("name", name) - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("POST", path, headers, params); - } - - /// Get User - /* - * Get user by its unique ID. - */ - public Call get(String userId) { - final String path = "/users/{userId}".replace("{userId}", userId); - - final Map params = Map.ofEntries( - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("GET", path, headers, params); - } - - /// Get User Logs - /* - * Get user activity logs list by its unique ID. - */ - public Call getLogs(String userId) { - final String path = "/users/{userId}/logs".replace("{userId}", userId); - - final Map params = Map.ofEntries( - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("GET", path, headers, params); - } - - /// Get User Preferences - /* - * Get user preferences by its unique ID. - */ - public Call getPrefs(String userId) { - final String path = "/users/{userId}/prefs".replace("{userId}", userId); - - final Map params = Map.ofEntries( - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("GET", path, headers, params); - } - - /// Update User Preferences - /* - * Update user preferences by its unique ID. You can pass only the specific - * settings you wish to update. - */ - public Call updatePrefs(String userId, Object prefs) { - final String path = "/users/{userId}/prefs".replace("{userId}", userId); - - final Map params = Map.ofEntries( - entry("prefs", prefs) - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("PATCH", path, headers, params); - } - - /// Get User Sessions - /* - * Get user sessions list by its unique ID. - */ - public Call getSessions(String userId) { - final String path = "/users/{userId}/sessions".replace("{userId}", userId); - - final Map params = Map.ofEntries( - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("GET", path, headers, params); - } - - /// Delete User Sessions - /* - * Delete all user sessions by its unique ID. - */ - public Call deleteSessions(String userId) { - final String path = "/users/{userId}/sessions".replace("{userId}", userId); - - final Map params = Map.ofEntries( - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("DELETE", path, headers, params); - } - - /// Delete User Session - /* - * Delete user sessions by its unique ID. - */ - public Call deleteSession(String userId, String sessionId) { - final String path = "/users/{userId}/sessions/{sessionId}".replace("{userId}", userId).replace("{sessionId}", sessionId); - - final Map params = Map.ofEntries( - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("DELETE", path, headers, params); - } - - /// Update User Status - /* - * Update user status by its unique ID. - */ - public Call updateStatus(String userId, String status) { - final String path = "/users/{userId}/status".replace("{userId}", userId); - - final Map params = Map.ofEntries( - entry("status", status) - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("PATCH", path, headers, params); - } -} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/CHANGELOG.md b/app/sdks/0.7.0/server-nodejs/CHANGELOG.md deleted file mode 100644 index fa4d35e687..0000000000 --- a/app/sdks/0.7.0/server-nodejs/CHANGELOG.md +++ /dev/null @@ -1 +0,0 @@ -# Change Log \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/LICENSE b/app/sdks/0.7.0/server-nodejs/LICENSE deleted file mode 100644 index fc7c051a91..0000000000 --- a/app/sdks/0.7.0/server-nodejs/LICENSE +++ /dev/null @@ -1,12 +0,0 @@ -Copyright (c) 2019 Appwrite (https://appwrite.io) and individual contributors. -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - - 3. Neither the name Appwrite nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/README.md b/app/sdks/0.7.0/server-nodejs/README.md deleted file mode 100644 index abf67fea4e..0000000000 --- a/app/sdks/0.7.0/server-nodejs/README.md +++ /dev/null @@ -1,28 +0,0 @@ -# Appwrite Node.js SDK - -![License](https://img.shields.io/github/license/appwrite/sdk-for-node.svg?v=1) -![Version](https://img.shields.io/badge/api%20version-0.6.1-blue.svg?v=1) - -Appwrite is an open-source backend as a service server that abstract and simplify complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way. - Use the Node.js SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools. - For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs) - - - -![Appwrite](https://appwrite.io/images/github.png) - -## Installation - -To install via [NPM](https://www.npmjs.com/): - -```bash -npm install node-appwrite --save -``` - -## Contribution - -This library is auto-generated by Appwrite custom [SDK Generator](https://github.com/appwrite/sdk-generator). To learn more about how you can help us improve this SDK, please check the [contribution guide](https://github.com/appwrite/sdk-generator/blob/master/CONTRIBUTING.md) before sending a pull-request. - -## License - -Please see the [BSD-3-Clause license](https://raw.githubusercontent.com/appwrite/appwrite/master/LICENSE) file for more information. \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/avatars/get-browser.md b/app/sdks/0.7.0/server-nodejs/docs/examples/avatars/get-browser.md deleted file mode 100644 index 2a670ce08b..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/avatars/get-browser.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let avatars = new sdk.Avatars(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = avatars.getBrowser('aa'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/avatars/get-credit-card.md b/app/sdks/0.7.0/server-nodejs/docs/examples/avatars/get-credit-card.md deleted file mode 100644 index afd38f5a97..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/avatars/get-credit-card.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let avatars = new sdk.Avatars(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = avatars.getCreditCard('amex'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/avatars/get-favicon.md b/app/sdks/0.7.0/server-nodejs/docs/examples/avatars/get-favicon.md deleted file mode 100644 index bb347371d4..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/avatars/get-favicon.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let avatars = new sdk.Avatars(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = avatars.getFavicon('https://example.com'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/avatars/get-flag.md b/app/sdks/0.7.0/server-nodejs/docs/examples/avatars/get-flag.md deleted file mode 100644 index db677bc4f8..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/avatars/get-flag.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let avatars = new sdk.Avatars(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = avatars.getFlag('af'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/avatars/get-image.md b/app/sdks/0.7.0/server-nodejs/docs/examples/avatars/get-image.md deleted file mode 100644 index efa871ea63..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/avatars/get-image.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let avatars = new sdk.Avatars(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = avatars.getImage('https://example.com'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/avatars/get-q-r.md b/app/sdks/0.7.0/server-nodejs/docs/examples/avatars/get-q-r.md deleted file mode 100644 index e79b3235af..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/avatars/get-q-r.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let avatars = new sdk.Avatars(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = avatars.getQR('[TEXT]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/database/create-collection.md b/app/sdks/0.7.0/server-nodejs/docs/examples/database/create-collection.md deleted file mode 100644 index c0207f30f0..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/database/create-collection.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let database = new sdk.Database(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = database.createCollection('[NAME]', [], [], []); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/database/create-document.md b/app/sdks/0.7.0/server-nodejs/docs/examples/database/create-document.md deleted file mode 100644 index 8676dfb84d..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/database/create-document.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let database = new sdk.Database(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = database.createDocument('[COLLECTION_ID]', {}, [], []); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/database/delete-collection.md b/app/sdks/0.7.0/server-nodejs/docs/examples/database/delete-collection.md deleted file mode 100644 index 503da98a73..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/database/delete-collection.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let database = new sdk.Database(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = database.deleteCollection('[COLLECTION_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/database/delete-document.md b/app/sdks/0.7.0/server-nodejs/docs/examples/database/delete-document.md deleted file mode 100644 index f14c985e83..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/database/delete-document.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let database = new sdk.Database(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = database.deleteDocument('[COLLECTION_ID]', '[DOCUMENT_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/database/get-collection-logs.md b/app/sdks/0.7.0/server-nodejs/docs/examples/database/get-collection-logs.md deleted file mode 100644 index 5bc911624b..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/database/get-collection-logs.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let database = new sdk.Database(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = database.getCollectionLogs('[COLLECTION_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/database/get-collection.md b/app/sdks/0.7.0/server-nodejs/docs/examples/database/get-collection.md deleted file mode 100644 index a14ce0d49a..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/database/get-collection.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let database = new sdk.Database(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = database.getCollection('[COLLECTION_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/database/get-document.md b/app/sdks/0.7.0/server-nodejs/docs/examples/database/get-document.md deleted file mode 100644 index 55cce32b9b..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/database/get-document.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let database = new sdk.Database(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = database.getDocument('[COLLECTION_ID]', '[DOCUMENT_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/database/list-collections.md b/app/sdks/0.7.0/server-nodejs/docs/examples/database/list-collections.md deleted file mode 100644 index bacfdb062c..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/database/list-collections.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let database = new sdk.Database(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = database.listCollections(); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/database/list-documents.md b/app/sdks/0.7.0/server-nodejs/docs/examples/database/list-documents.md deleted file mode 100644 index ad02d05e2a..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/database/list-documents.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let database = new sdk.Database(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = database.listDocuments('[COLLECTION_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/database/update-collection.md b/app/sdks/0.7.0/server-nodejs/docs/examples/database/update-collection.md deleted file mode 100644 index eb9326565a..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/database/update-collection.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let database = new sdk.Database(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = database.updateCollection('[COLLECTION_ID]', '[NAME]', [], []); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/database/update-document.md b/app/sdks/0.7.0/server-nodejs/docs/examples/database/update-document.md deleted file mode 100644 index 131722cd26..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/database/update-document.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let database = new sdk.Database(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = database.updateDocument('[COLLECTION_ID]', '[DOCUMENT_ID]', {}, [], []); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/functions/create-execution.md b/app/sdks/0.7.0/server-nodejs/docs/examples/functions/create-execution.md deleted file mode 100644 index 9ed33ae50b..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/functions/create-execution.md +++ /dev/null @@ -1,19 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let functions = new sdk.Functions(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = functions.createExecution('[FUNCTION_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/functions/create-tag.md b/app/sdks/0.7.0/server-nodejs/docs/examples/functions/create-tag.md deleted file mode 100644 index 5048701d05..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/functions/create-tag.md +++ /dev/null @@ -1,19 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let functions = new sdk.Functions(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = functions.createTag('[FUNCTION_ID]', 'node-14', '[COMMAND]', '[CODE]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/functions/create.md b/app/sdks/0.7.0/server-nodejs/docs/examples/functions/create.md deleted file mode 100644 index 3ac02eb506..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/functions/create.md +++ /dev/null @@ -1,19 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let functions = new sdk.Functions(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = functions.create('[NAME]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/functions/delete-tag.md b/app/sdks/0.7.0/server-nodejs/docs/examples/functions/delete-tag.md deleted file mode 100644 index fc2fe8a53b..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/functions/delete-tag.md +++ /dev/null @@ -1,19 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let functions = new sdk.Functions(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = functions.deleteTag('[FUNCTION_ID]', '[TAG_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/functions/delete.md b/app/sdks/0.7.0/server-nodejs/docs/examples/functions/delete.md deleted file mode 100644 index 048c96d99c..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/functions/delete.md +++ /dev/null @@ -1,19 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let functions = new sdk.Functions(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = functions.delete('[FUNCTION_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/functions/get-execution.md b/app/sdks/0.7.0/server-nodejs/docs/examples/functions/get-execution.md deleted file mode 100644 index 482f7ee713..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/functions/get-execution.md +++ /dev/null @@ -1,19 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let functions = new sdk.Functions(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = functions.getExecution('[FUNCTION_ID]', '[EXECUTION_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/functions/get-tag.md b/app/sdks/0.7.0/server-nodejs/docs/examples/functions/get-tag.md deleted file mode 100644 index 5caa2134b6..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/functions/get-tag.md +++ /dev/null @@ -1,19 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let functions = new sdk.Functions(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = functions.getTag('[FUNCTION_ID]', '[TAG_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/functions/get.md b/app/sdks/0.7.0/server-nodejs/docs/examples/functions/get.md deleted file mode 100644 index cfc2d0fae2..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/functions/get.md +++ /dev/null @@ -1,19 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let functions = new sdk.Functions(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = functions.get('[FUNCTION_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/functions/list-executions.md b/app/sdks/0.7.0/server-nodejs/docs/examples/functions/list-executions.md deleted file mode 100644 index ceecf677a6..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/functions/list-executions.md +++ /dev/null @@ -1,19 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let functions = new sdk.Functions(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = functions.listExecutions('[FUNCTION_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/functions/list-tags.md b/app/sdks/0.7.0/server-nodejs/docs/examples/functions/list-tags.md deleted file mode 100644 index 147d65afe2..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/functions/list-tags.md +++ /dev/null @@ -1,19 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let functions = new sdk.Functions(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = functions.listTags('[FUNCTION_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/functions/list.md b/app/sdks/0.7.0/server-nodejs/docs/examples/functions/list.md deleted file mode 100644 index 3cb999c51b..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/functions/list.md +++ /dev/null @@ -1,19 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let functions = new sdk.Functions(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = functions.list(); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/functions/update-active.md b/app/sdks/0.7.0/server-nodejs/docs/examples/functions/update-active.md deleted file mode 100644 index 1c2f0da2e2..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/functions/update-active.md +++ /dev/null @@ -1,19 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let functions = new sdk.Functions(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = functions.updateActive('[FUNCTION_ID]', '[ACTIVE]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/functions/update-tag.md b/app/sdks/0.7.0/server-nodejs/docs/examples/functions/update-tag.md deleted file mode 100644 index 8b9baefaf0..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/functions/update-tag.md +++ /dev/null @@ -1,19 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let functions = new sdk.Functions(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = functions.updateTag('[FUNCTION_ID]', '[TAG]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/functions/update.md b/app/sdks/0.7.0/server-nodejs/docs/examples/functions/update.md deleted file mode 100644 index 73672ae162..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/functions/update.md +++ /dev/null @@ -1,19 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let functions = new sdk.Functions(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = functions.update('[FUNCTION_ID]', '[NAME]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/health/get-anti-virus.md b/app/sdks/0.7.0/server-nodejs/docs/examples/health/get-anti-virus.md deleted file mode 100644 index c08e612bcf..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/health/get-anti-virus.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let health = new sdk.Health(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = health.getAntiVirus(); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/health/get-cache.md b/app/sdks/0.7.0/server-nodejs/docs/examples/health/get-cache.md deleted file mode 100644 index d19cc8abd5..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/health/get-cache.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let health = new sdk.Health(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = health.getCache(); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/health/get-d-b.md b/app/sdks/0.7.0/server-nodejs/docs/examples/health/get-d-b.md deleted file mode 100644 index 08505367d4..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/health/get-d-b.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let health = new sdk.Health(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = health.getDB(); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/health/get-queue-certificates.md b/app/sdks/0.7.0/server-nodejs/docs/examples/health/get-queue-certificates.md deleted file mode 100644 index 2eb69e0126..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/health/get-queue-certificates.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let health = new sdk.Health(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = health.getQueueCertificates(); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/health/get-queue-functions.md b/app/sdks/0.7.0/server-nodejs/docs/examples/health/get-queue-functions.md deleted file mode 100644 index 9470e11646..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/health/get-queue-functions.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let health = new sdk.Health(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = health.getQueueFunctions(); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/health/get-queue-logs.md b/app/sdks/0.7.0/server-nodejs/docs/examples/health/get-queue-logs.md deleted file mode 100644 index 10f1cb24e3..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/health/get-queue-logs.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let health = new sdk.Health(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = health.getQueueLogs(); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/health/get-queue-tasks.md b/app/sdks/0.7.0/server-nodejs/docs/examples/health/get-queue-tasks.md deleted file mode 100644 index c159f4e6ee..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/health/get-queue-tasks.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let health = new sdk.Health(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = health.getQueueTasks(); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/health/get-queue-usage.md b/app/sdks/0.7.0/server-nodejs/docs/examples/health/get-queue-usage.md deleted file mode 100644 index 6286c741ee..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/health/get-queue-usage.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let health = new sdk.Health(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = health.getQueueUsage(); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/health/get-queue-webhooks.md b/app/sdks/0.7.0/server-nodejs/docs/examples/health/get-queue-webhooks.md deleted file mode 100644 index 3a788eb895..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/health/get-queue-webhooks.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let health = new sdk.Health(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = health.getQueueWebhooks(); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/health/get-storage-anti-virus.md b/app/sdks/0.7.0/server-nodejs/docs/examples/health/get-storage-anti-virus.md deleted file mode 100644 index 70c3850375..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/health/get-storage-anti-virus.md +++ /dev/null @@ -1,19 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let health = new sdk.Health(client); - -client - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = health.getStorageAntiVirus(); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/health/get-storage-local.md b/app/sdks/0.7.0/server-nodejs/docs/examples/health/get-storage-local.md deleted file mode 100644 index 84b8fb47a6..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/health/get-storage-local.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let health = new sdk.Health(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = health.getStorageLocal(); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/health/get-time.md b/app/sdks/0.7.0/server-nodejs/docs/examples/health/get-time.md deleted file mode 100644 index 563bf2fb52..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/health/get-time.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let health = new sdk.Health(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = health.getTime(); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/health/get.md b/app/sdks/0.7.0/server-nodejs/docs/examples/health/get.md deleted file mode 100644 index 20c3d40801..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/health/get.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let health = new sdk.Health(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = health.get(); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/locale/get-continents.md b/app/sdks/0.7.0/server-nodejs/docs/examples/locale/get-continents.md deleted file mode 100644 index 323237b4ab..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/locale/get-continents.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let locale = new sdk.Locale(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = locale.getContinents(); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/locale/get-countries-e-u.md b/app/sdks/0.7.0/server-nodejs/docs/examples/locale/get-countries-e-u.md deleted file mode 100644 index fc9170dba4..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/locale/get-countries-e-u.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let locale = new sdk.Locale(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = locale.getCountriesEU(); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/locale/get-countries-phones.md b/app/sdks/0.7.0/server-nodejs/docs/examples/locale/get-countries-phones.md deleted file mode 100644 index 42be901677..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/locale/get-countries-phones.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let locale = new sdk.Locale(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = locale.getCountriesPhones(); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/locale/get-countries.md b/app/sdks/0.7.0/server-nodejs/docs/examples/locale/get-countries.md deleted file mode 100644 index 437c9bb502..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/locale/get-countries.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let locale = new sdk.Locale(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = locale.getCountries(); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/locale/get-currencies.md b/app/sdks/0.7.0/server-nodejs/docs/examples/locale/get-currencies.md deleted file mode 100644 index 1b7d605760..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/locale/get-currencies.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let locale = new sdk.Locale(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = locale.getCurrencies(); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/locale/get.md b/app/sdks/0.7.0/server-nodejs/docs/examples/locale/get.md deleted file mode 100644 index 2f2eb95d90..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/locale/get.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let locale = new sdk.Locale(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = locale.get(); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/storage/create-file.md b/app/sdks/0.7.0/server-nodejs/docs/examples/storage/create-file.md deleted file mode 100644 index 1eda9fd868..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/storage/create-file.md +++ /dev/null @@ -1,21 +0,0 @@ -const sdk = require('node-appwrite'); -const fs = require('fs'); - -// Init SDK -let client = new sdk.Client(); - -let storage = new sdk.Storage(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = storage.createFile(fs.createReadStream(__dirname + '/file.png')), [], []); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/storage/delete-file.md b/app/sdks/0.7.0/server-nodejs/docs/examples/storage/delete-file.md deleted file mode 100644 index 9ce0ff7f2e..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/storage/delete-file.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let storage = new sdk.Storage(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = storage.deleteFile('[FILE_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/storage/get-file-download.md b/app/sdks/0.7.0/server-nodejs/docs/examples/storage/get-file-download.md deleted file mode 100644 index 1683ed87e0..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/storage/get-file-download.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let storage = new sdk.Storage(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = storage.getFileDownload('[FILE_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/storage/get-file-preview.md b/app/sdks/0.7.0/server-nodejs/docs/examples/storage/get-file-preview.md deleted file mode 100644 index 771dcd35f0..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/storage/get-file-preview.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let storage = new sdk.Storage(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = storage.getFilePreview('[FILE_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/storage/get-file-view.md b/app/sdks/0.7.0/server-nodejs/docs/examples/storage/get-file-view.md deleted file mode 100644 index 83029ecdee..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/storage/get-file-view.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let storage = new sdk.Storage(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = storage.getFileView('[FILE_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/storage/get-file.md b/app/sdks/0.7.0/server-nodejs/docs/examples/storage/get-file.md deleted file mode 100644 index 2a76fdf189..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/storage/get-file.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let storage = new sdk.Storage(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = storage.getFile('[FILE_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/storage/list-files.md b/app/sdks/0.7.0/server-nodejs/docs/examples/storage/list-files.md deleted file mode 100644 index e11fd95300..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/storage/list-files.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let storage = new sdk.Storage(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = storage.listFiles(); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/storage/update-file.md b/app/sdks/0.7.0/server-nodejs/docs/examples/storage/update-file.md deleted file mode 100644 index 4726169146..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/storage/update-file.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let storage = new sdk.Storage(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = storage.updateFile('[FILE_ID]', [], []); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/teams/create-membership.md b/app/sdks/0.7.0/server-nodejs/docs/examples/teams/create-membership.md deleted file mode 100644 index cd17042e58..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/teams/create-membership.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let teams = new sdk.Teams(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = teams.createMembership('[TEAM_ID]', 'email@example.com', [], 'https://example.com'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/teams/create.md b/app/sdks/0.7.0/server-nodejs/docs/examples/teams/create.md deleted file mode 100644 index c0d0611a49..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/teams/create.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let teams = new sdk.Teams(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = teams.create('[NAME]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/teams/delete-membership.md b/app/sdks/0.7.0/server-nodejs/docs/examples/teams/delete-membership.md deleted file mode 100644 index f9a76f3ec0..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/teams/delete-membership.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let teams = new sdk.Teams(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = teams.deleteMembership('[TEAM_ID]', '[INVITE_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/teams/delete.md b/app/sdks/0.7.0/server-nodejs/docs/examples/teams/delete.md deleted file mode 100644 index e833fdfb9b..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/teams/delete.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let teams = new sdk.Teams(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = teams.delete('[TEAM_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/teams/get-memberships.md b/app/sdks/0.7.0/server-nodejs/docs/examples/teams/get-memberships.md deleted file mode 100644 index 75cdf38e5c..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/teams/get-memberships.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let teams = new sdk.Teams(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = teams.getMemberships('[TEAM_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/teams/get.md b/app/sdks/0.7.0/server-nodejs/docs/examples/teams/get.md deleted file mode 100644 index a51322df27..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/teams/get.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let teams = new sdk.Teams(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = teams.get('[TEAM_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/teams/list.md b/app/sdks/0.7.0/server-nodejs/docs/examples/teams/list.md deleted file mode 100644 index 259bbd22b2..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/teams/list.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let teams = new sdk.Teams(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = teams.list(); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/teams/update.md b/app/sdks/0.7.0/server-nodejs/docs/examples/teams/update.md deleted file mode 100644 index 2118e8a90f..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/teams/update.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let teams = new sdk.Teams(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = teams.update('[TEAM_ID]', '[NAME]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/users/create.md b/app/sdks/0.7.0/server-nodejs/docs/examples/users/create.md deleted file mode 100644 index 83704cbd9d..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/users/create.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let users = new sdk.Users(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = users.create('email@example.com', 'password'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/users/delete-session.md b/app/sdks/0.7.0/server-nodejs/docs/examples/users/delete-session.md deleted file mode 100644 index 22308d4fa6..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/users/delete-session.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let users = new sdk.Users(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = users.deleteSession('[USER_ID]', '[SESSION_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/users/delete-sessions.md b/app/sdks/0.7.0/server-nodejs/docs/examples/users/delete-sessions.md deleted file mode 100644 index 75f8f96bda..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/users/delete-sessions.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let users = new sdk.Users(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = users.deleteSessions('[USER_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/users/get-logs.md b/app/sdks/0.7.0/server-nodejs/docs/examples/users/get-logs.md deleted file mode 100644 index 1287b5ef5f..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/users/get-logs.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let users = new sdk.Users(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = users.getLogs('[USER_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/users/get-prefs.md b/app/sdks/0.7.0/server-nodejs/docs/examples/users/get-prefs.md deleted file mode 100644 index 088e6b0811..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/users/get-prefs.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let users = new sdk.Users(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = users.getPrefs('[USER_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/users/get-sessions.md b/app/sdks/0.7.0/server-nodejs/docs/examples/users/get-sessions.md deleted file mode 100644 index f5ad029ebe..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/users/get-sessions.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let users = new sdk.Users(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = users.getSessions('[USER_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/users/get.md b/app/sdks/0.7.0/server-nodejs/docs/examples/users/get.md deleted file mode 100644 index 5b91577284..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/users/get.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let users = new sdk.Users(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = users.get('[USER_ID]'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/users/list.md b/app/sdks/0.7.0/server-nodejs/docs/examples/users/list.md deleted file mode 100644 index 0bc83b06bf..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/users/list.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let users = new sdk.Users(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = users.list(); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/users/update-prefs.md b/app/sdks/0.7.0/server-nodejs/docs/examples/users/update-prefs.md deleted file mode 100644 index 7d1011d6be..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/users/update-prefs.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let users = new sdk.Users(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = users.updatePrefs('[USER_ID]', {}); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/docs/examples/users/update-status.md b/app/sdks/0.7.0/server-nodejs/docs/examples/users/update-status.md deleted file mode 100644 index 86f54381da..0000000000 --- a/app/sdks/0.7.0/server-nodejs/docs/examples/users/update-status.md +++ /dev/null @@ -1,20 +0,0 @@ -const sdk = require('node-appwrite'); - -// Init SDK -let client = new sdk.Client(); - -let users = new sdk.Users(client); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID - .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -let promise = users.updateStatus('[USER_ID]', '1'); - -promise.then(function (response) { - console.log(response); -}, function (error) { - console.log(error); -}); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/index.js b/app/sdks/0.7.0/server-nodejs/index.js deleted file mode 100644 index deb571190d..0000000000 --- a/app/sdks/0.7.0/server-nodejs/index.js +++ /dev/null @@ -1,21 +0,0 @@ -const Client = require('./lib/client.js'); -const Avatars = require('./lib/services/avatars.js'); -const Database = require('./lib/services/database.js'); -const Functions = require('./lib/services/functions.js'); -const Health = require('./lib/services/health.js'); -const Locale = require('./lib/services/locale.js'); -const Storage = require('./lib/services/storage.js'); -const Teams = require('./lib/services/teams.js'); -const Users = require('./lib/services/users.js'); - -module.exports = { - Client, - Avatars, - Database, - Functions, - Health, - Locale, - Storage, - Teams, - Users, -}; \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/lib/client.js b/app/sdks/0.7.0/server-nodejs/lib/client.js deleted file mode 100644 index add1956056..0000000000 --- a/app/sdks/0.7.0/server-nodejs/lib/client.js +++ /dev/null @@ -1,135 +0,0 @@ -const URL = require('url').URL; -const request = require('request-promise-native'); - -class Client { - - constructor() { - this.endpoint = 'https://appwrite.io/v1'; - this.headers = { - 'content-type': '', - 'x-sdk-version': 'appwrite:nodejs:1.1.0', - }; - this.selfSigned = false; - } - - /** - * Set Project - * - * Your project ID - * - * @param string value - * - * @return self - */ - setProject(value) { - this.addHeader('X-Appwrite-Project', value); - - return this; - } - - /** - * Set Key - * - * Your secret API key - * - * @param string value - * - * @return self - */ - setKey(value) { - this.addHeader('X-Appwrite-Key', value); - - return this; - } - - /** - * Set Locale - * - * @param string value - * - * @return self - */ - setLocale(value) { - this.addHeader('X-Appwrite-Locale', value); - - return this; - } - - /*** - * @param bool status - * @return this - */ - setSelfSigned(status = true) { - this.selfSigned = status; - - return this; - } - - /*** - * @param endpoint - * @return this - */ - setEndpoint(endpoint) - { - this.endpoint = endpoint; - - return this; - } - - /** - * @param key string - * @param value string - */ - addHeader(key, value) { - this.headers[key.toLowerCase()] = value.toLowerCase(); - - return this; - } - - async call(method, path = '', headers = {}, params = {}) { - if(this.selfSigned) { // Allow self signed requests - process.env["NODE_TLS_REJECT_UNAUTHORIZED"] = 0; - } - - headers = Object.assign(this.headers, headers); - - let contentType = headers['content-type'].toLowerCase(); - let options = { - method: method.toUpperCase(), - uri: this.endpoint + path, - qs: (method.toUpperCase() === 'GET') ? params : {}, - headers: headers, - body: (method.toUpperCase() === 'GET' || contentType.startsWith('multipart/form-data')) ? null : params, - json: (contentType.startsWith('application/json')), - formData: (contentType.startsWith('multipart/form-data')) ? this.flatten(params) : null, - }; - - let response = await request(options); - - if(contentType.startsWith('multipart/form-data')) { - response = JSON.parse(response); - } - - return response; - } - - flatten(data, prefix = '') { - let output = {}; - - for (const key in data) { - let value = data[key]; - let finalKey = prefix ? prefix + '[' + key +']' : key; - - if (Array.isArray(value)) { - output = Object.assign(output, this.flatten(value, finalKey)); // @todo: handle name collision here if needed - } - else { - output[finalKey] = value; - } - } - - return output; - } -} - -module.exports = Client; \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/lib/service.js b/app/sdks/0.7.0/server-nodejs/lib/service.js deleted file mode 100644 index e799c064be..0000000000 --- a/app/sdks/0.7.0/server-nodejs/lib/service.js +++ /dev/null @@ -1,10 +0,0 @@ -class Service { - /** - * @param client - */ - constructor(client) { - this.client = client; - } -} - -module.exports = Service; \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/lib/services/avatars.js b/app/sdks/0.7.0/server-nodejs/lib/services/avatars.js deleted file mode 100644 index c34bdde966..0000000000 --- a/app/sdks/0.7.0/server-nodejs/lib/services/avatars.js +++ /dev/null @@ -1,164 +0,0 @@ -const Service = require('../service.js'); - -class Avatars extends Service { - - /** - * Get Browser Icon - * - * You can use this endpoint to show different browser icons to your users. - * The code argument receives the browser code as it appears in your user - * /account/sessions endpoint. Use width, height and quality arguments to - * change the output settings. - * - * @param string code - * @param number width - * @param number height - * @param number quality - * @throws Exception - * @return {} - */ - async getBrowser(code, width = 100, height = 100, quality = 100) { - let path = '/avatars/browsers/{code}'.replace(new RegExp('{code}', 'g'), code); - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - 'width': width, - 'height': height, - 'quality': quality - }); - } - - /** - * Get Credit Card Icon - * - * Need to display your users with your billing method or their payment - * methods? The credit card endpoint will return you the icon of the credit - * card provider you need. Use width, height and quality arguments to change - * the output settings. - * - * @param string code - * @param number width - * @param number height - * @param number quality - * @throws Exception - * @return {} - */ - async getCreditCard(code, width = 100, height = 100, quality = 100) { - let path = '/avatars/credit-cards/{code}'.replace(new RegExp('{code}', 'g'), code); - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - 'width': width, - 'height': height, - 'quality': quality - }); - } - - /** - * Get Favicon - * - * Use this endpoint to fetch the favorite icon (AKA favicon) of a any remote - * website URL. - * - * @param string url - * @throws Exception - * @return {} - */ - async getFavicon(url) { - let path = '/avatars/favicon'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - 'url': url - }); - } - - /** - * Get Country Flag - * - * You can use this endpoint to show different country flags icons to your - * users. The code argument receives the 2 letter country code. Use width, - * height and quality arguments to change the output settings. - * - * @param string code - * @param number width - * @param number height - * @param number quality - * @throws Exception - * @return {} - */ - async getFlag(code, width = 100, height = 100, quality = 100) { - let path = '/avatars/flags/{code}'.replace(new RegExp('{code}', 'g'), code); - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - 'width': width, - 'height': height, - 'quality': quality - }); - } - - /** - * Get Image from URL - * - * Use this endpoint to fetch a remote image URL and crop it to any image size - * you want. This endpoint is very useful if you need to crop and display - * remote images in your app or in case you want to make sure a 3rd party - * image is properly served using a TLS protocol. - * - * @param string url - * @param number width - * @param number height - * @throws Exception - * @return {} - */ - async getImage(url, width = 400, height = 400) { - let path = '/avatars/image'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - 'url': url, - 'width': width, - 'height': height - }); - } - - /** - * 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. - * - * @param string text - * @param number size - * @param number margin - * @param number download - * @throws Exception - * @return {} - */ - async getQR(text, size = 400, margin = 1, download = 0) { - let path = '/avatars/qr'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - 'text': text, - 'size': size, - 'margin': margin, - 'download': download - }); - } -} - -module.exports = Avatars; \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/lib/services/database.js b/app/sdks/0.7.0/server-nodejs/lib/services/database.js deleted file mode 100644 index ce1c09e391..0000000000 --- a/app/sdks/0.7.0/server-nodejs/lib/services/database.js +++ /dev/null @@ -1,283 +0,0 @@ -const Service = require('../service.js'); - -class Database extends Service { - - /** - * List Collections - * - * Get a list of all the user collections. You can use the query params to - * filter your results. On admin mode, this endpoint will return a list of all - * of the project collections. [Learn more about different API - * modes](/docs/admin). - * - * @param string search - * @param number limit - * @param number offset - * @param string orderType - * @throws Exception - * @return {} - */ - async listCollections(search = '', limit = 25, offset = 0, orderType = 'ASC') { - let path = '/database/collections'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - 'search': search, - 'limit': limit, - 'offset': offset, - 'orderType': orderType - }); - } - - /** - * Create Collection - * - * Create a new Collection. - * - * @param string name - * @param string[] read - * @param string[] write - * @param string[] rules - * @throws Exception - * @return {} - */ - async createCollection(name, read, write, rules) { - let path = '/database/collections'; - - return await this.client.call('post', path, { - 'content-type': 'application/json', - }, - { - 'name': name, - 'read': read, - 'write': write, - 'rules': rules - }); - } - - /** - * Get Collection - * - * Get collection by its unique ID. This endpoint response returns a JSON - * object with the collection metadata. - * - * @param string collectionId - * @throws Exception - * @return {} - */ - async getCollection(collectionId) { - let path = '/database/collections/{collectionId}'.replace(new RegExp('{collectionId}', 'g'), collectionId); - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Update Collection - * - * Update collection by its unique ID. - * - * @param string collectionId - * @param string name - * @param string[] read - * @param string[] write - * @param string[] rules - * @throws Exception - * @return {} - */ - async updateCollection(collectionId, name, read, write, rules = []) { - let path = '/database/collections/{collectionId}'.replace(new RegExp('{collectionId}', 'g'), collectionId); - - return await this.client.call('put', path, { - 'content-type': 'application/json', - }, - { - 'name': name, - 'read': read, - 'write': write, - 'rules': rules - }); - } - - /** - * Delete Collection - * - * Delete a collection by its unique ID. Only users with write permissions - * have access to delete this resource. - * - * @param string collectionId - * @throws Exception - * @return {} - */ - async deleteCollection(collectionId) { - let path = '/database/collections/{collectionId}'.replace(new RegExp('{collectionId}', 'g'), collectionId); - - return await this.client.call('delete', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * List Documents - * - * Get a list of all the user documents. You can use the query params to - * filter your results. On admin mode, this endpoint will return a list of all - * of the project documents. [Learn more about different API - * modes](/docs/admin). - * - * @param string collectionId - * @param string[] filters - * @param number offset - * @param number limit - * @param string orderField - * @param string orderType - * @param string orderCast - * @param string search - * @param number first - * @param number last - * @throws Exception - * @return {} - */ - async listDocuments(collectionId, filters = [], offset = 0, limit = 50, orderField = '$id', orderType = 'ASC', orderCast = 'string', search = '', first = 0, last = 0) { - let path = '/database/collections/{collectionId}/documents'.replace(new RegExp('{collectionId}', 'g'), collectionId); - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - 'filters': filters, - 'offset': offset, - 'limit': limit, - 'orderField': orderField, - 'orderType': orderType, - 'orderCast': orderCast, - 'search': search, - 'first': first, - 'last': last - }); - } - - /** - * Create Document - * - * Create a new Document. - * - * @param string collectionId - * @param object data - * @param string[] read - * @param string[] write - * @param string parentDocument - * @param string parentProperty - * @param string parentPropertyType - * @throws Exception - * @return {} - */ - async createDocument(collectionId, data, read, write, parentDocument = '', parentProperty = '', parentPropertyType = 'assign') { - let path = '/database/collections/{collectionId}/documents'.replace(new RegExp('{collectionId}', 'g'), collectionId); - - return await this.client.call('post', path, { - 'content-type': 'application/json', - }, - { - 'data': data, - 'read': read, - 'write': write, - 'parentDocument': parentDocument, - 'parentProperty': parentProperty, - 'parentPropertyType': parentPropertyType - }); - } - - /** - * Get Document - * - * Get document by its unique ID. This endpoint response returns a JSON object - * with the document data. - * - * @param string collectionId - * @param string documentId - * @throws Exception - * @return {} - */ - async getDocument(collectionId, documentId) { - let path = '/database/collections/{collectionId}/documents/{documentId}'.replace(new RegExp('{collectionId}', 'g'), collectionId).replace(new RegExp('{documentId}', 'g'), documentId); - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Update Document - * - * @param string collectionId - * @param string documentId - * @param object data - * @param string[] read - * @param string[] write - * @throws Exception - * @return {} - */ - async updateDocument(collectionId, documentId, data, read, write) { - let path = '/database/collections/{collectionId}/documents/{documentId}'.replace(new RegExp('{collectionId}', 'g'), collectionId).replace(new RegExp('{documentId}', 'g'), documentId); - - return await this.client.call('patch', path, { - 'content-type': 'application/json', - }, - { - 'data': data, - 'read': read, - 'write': write - }); - } - - /** - * Delete Document - * - * Delete document by its unique ID. This endpoint deletes only the parent - * documents, his attributes and relations to other documents. Child documents - * **will not** be deleted. - * - * @param string collectionId - * @param string documentId - * @throws Exception - * @return {} - */ - async deleteDocument(collectionId, documentId) { - let path = '/database/collections/{collectionId}/documents/{documentId}'.replace(new RegExp('{collectionId}', 'g'), collectionId).replace(new RegExp('{documentId}', 'g'), documentId); - - return await this.client.call('delete', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Get Collection Logs - * - * @param string collectionId - * @throws Exception - * @return {} - */ - async getCollectionLogs(collectionId) { - let path = '/database/collections/{collectionId}/logs'.replace(new RegExp('{collectionId}', 'g'), collectionId); - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } -} - -module.exports = Database; \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/lib/services/functions.js b/app/sdks/0.7.0/server-nodejs/lib/services/functions.js deleted file mode 100644 index 0dfd8d945d..0000000000 --- a/app/sdks/0.7.0/server-nodejs/lib/services/functions.js +++ /dev/null @@ -1,282 +0,0 @@ -const Service = require('../service.js'); - -class Functions extends Service { - - /** - * List Functions - * - * @param string search - * @param number limit - * @param number offset - * @param string orderType - * @throws Exception - * @return {} - */ - async list(search = '', limit = 25, offset = 0, orderType = 'ASC') { - let path = '/functions'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - 'search': search, - 'limit': limit, - 'offset': offset, - 'orderType': orderType - }); - } - - /** - * Create Function - * - * @param string name - * @param object vars - * @param string[] events - * @param string schedule - * @param number timeout - * @throws Exception - * @return {} - */ - async create(name, vars = [], events = [], schedule = '', timeout = 15) { - let path = '/functions'; - - return await this.client.call('post', path, { - 'content-type': 'application/json', - }, - { - 'name': name, - 'vars': vars, - 'events': events, - 'schedule': schedule, - 'timeout': timeout - }); - } - - /** - * Get Function - * - * @param string functionId - * @throws Exception - * @return {} - */ - async get(functionId) { - let path = '/functions/{functionId}'.replace(new RegExp('{functionId}', 'g'), functionId); - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Update Function - * - * @param string functionId - * @param string name - * @param object vars - * @param string[] events - * @param string schedule - * @param number timeout - * @throws Exception - * @return {} - */ - async update(functionId, name, vars = [], events = [], schedule = '', timeout = 15) { - let path = '/functions/{functionId}'.replace(new RegExp('{functionId}', 'g'), functionId); - - return await this.client.call('put', path, { - 'content-type': 'application/json', - }, - { - 'name': name, - 'vars': vars, - 'events': events, - 'schedule': schedule, - 'timeout': timeout - }); - } - - /** - * Delete Function - * - * @param string functionId - * @throws Exception - * @return {} - */ - async delete(functionId) { - let path = '/functions/{functionId}'.replace(new RegExp('{functionId}', 'g'), functionId); - - return await this.client.call('delete', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * List Executions - * - * @param string functionId - * @param string search - * @param number limit - * @param number offset - * @param string orderType - * @throws Exception - * @return {} - */ - async listExecutions(functionId, search = '', limit = 25, offset = 0, orderType = 'ASC') { - let path = '/functions/{functionId}/executions'.replace(new RegExp('{functionId}', 'g'), functionId); - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - 'search': search, - 'limit': limit, - 'offset': offset, - 'orderType': orderType - }); - } - - /** - * Create Execution - * - * @param string functionId - * @param number async - * @throws Exception - * @return {} - */ - async createExecution(functionId, async = 1) { - let path = '/functions/{functionId}/executions'.replace(new RegExp('{functionId}', 'g'), functionId); - - return await this.client.call('post', path, { - 'content-type': 'application/json', - }, - { - 'async': async - }); - } - - /** - * Get Execution - * - * @param string functionId - * @param string executionId - * @throws Exception - * @return {} - */ - async getExecution(functionId, executionId) { - let path = '/functions/{functionId}/executions/{executionId}'.replace(new RegExp('{functionId}', 'g'), functionId).replace(new RegExp('{executionId}', 'g'), executionId); - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Update Function Tag - * - * @param string functionId - * @param string tag - * @throws Exception - * @return {} - */ - async updateTag(functionId, tag) { - let path = '/functions/{functionId}/tag'.replace(new RegExp('{functionId}', 'g'), functionId); - - return await this.client.call('patch', path, { - 'content-type': 'application/json', - }, - { - 'tag': tag - }); - } - - /** - * List Tags - * - * @param string functionId - * @param string search - * @param number limit - * @param number offset - * @param string orderType - * @throws Exception - * @return {} - */ - async listTags(functionId, search = '', limit = 25, offset = 0, orderType = 'ASC') { - let path = '/functions/{functionId}/tags'.replace(new RegExp('{functionId}', 'g'), functionId); - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - 'search': search, - 'limit': limit, - 'offset': offset, - 'orderType': orderType - }); - } - - /** - * Create Tag - * - * @param string functionId - * @param string env - * @param string command - * @param string code - * @throws Exception - * @return {} - */ - async createTag(functionId, env, command, code) { - let path = '/functions/{functionId}/tags'.replace(new RegExp('{functionId}', 'g'), functionId); - - return await this.client.call('post', path, { - 'content-type': 'application/json', - }, - { - 'env': env, - 'command': command, - 'code': code - }); - } - - /** - * Get Tag - * - * @param string functionId - * @param string tagId - * @throws Exception - * @return {} - */ - async getTag(functionId, tagId) { - let path = '/functions/{functionId}/tags/{tagId}'.replace(new RegExp('{functionId}', 'g'), functionId).replace(new RegExp('{tagId}', 'g'), tagId); - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Delete Tag - * - * @param string functionId - * @param string tagId - * @throws Exception - * @return {} - */ - async deleteTag(functionId, tagId) { - let path = '/functions/{functionId}/tags/{tagId}'.replace(new RegExp('{functionId}', 'g'), functionId).replace(new RegExp('{tagId}', 'g'), tagId); - - return await this.client.call('delete', path, { - 'content-type': 'application/json', - }, - { - }); - } -} - -module.exports = Functions; \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/lib/services/health.js b/app/sdks/0.7.0/server-nodejs/lib/services/health.js deleted file mode 100644 index a0aed052ce..0000000000 --- a/app/sdks/0.7.0/server-nodejs/lib/services/health.js +++ /dev/null @@ -1,233 +0,0 @@ -const Service = require('../service.js'); - -class Health extends Service { - - /** - * Get HTTP - * - * Check the Appwrite HTTP server is up and responsive. - * - * @throws Exception - * @return {} - */ - async get() { - let path = '/health'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Get Anti virus - * - * Check the Appwrite Anti Virus server is up and connection is successful. - * - * @throws Exception - * @return {} - */ - async getAntiVirus() { - let path = '/health/anti-virus'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Get Cache - * - * Check the Appwrite in-memory cache server is up and connection is - * successful. - * - * @throws Exception - * @return {} - */ - async getCache() { - let path = '/health/cache'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Get DB - * - * Check the Appwrite database server is up and connection is successful. - * - * @throws Exception - * @return {} - */ - async getDB() { - let path = '/health/db'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Get Certificate Queue - * - * Get the number of certificates that are waiting to be issued against - * [Letsencrypt](https://letsencrypt.org/) in the Appwrite internal queue - * server. - * - * @throws Exception - * @return {} - */ - async getQueueCertificates() { - let path = '/health/queue/certificates'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Get Functions Queue - * - * @throws Exception - * @return {} - */ - async getQueueFunctions() { - let path = '/health/queue/functions'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Get Logs Queue - * - * Get the number of logs that are waiting to be processed in the Appwrite - * internal queue server. - * - * @throws Exception - * @return {} - */ - async getQueueLogs() { - let path = '/health/queue/logs'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Get Tasks Queue - * - * Get the number of tasks that are waiting to be processed in the Appwrite - * internal queue server. - * - * @throws Exception - * @return {} - */ - async getQueueTasks() { - let path = '/health/queue/tasks'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Get Usage Queue - * - * Get the number of usage stats that are waiting to be processed in the - * Appwrite internal queue server. - * - * @throws Exception - * @return {} - */ - async getQueueUsage() { - let path = '/health/queue/usage'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Get Webhooks Queue - * - * Get the number of webhooks that are waiting to be processed in the Appwrite - * internal queue server. - * - * @throws Exception - * @return {} - */ - async getQueueWebhooks() { - let path = '/health/queue/webhooks'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Get Local Storage - * - * Check the Appwrite local storage device is up and connection is successful. - * - * @throws Exception - * @return {} - */ - async getStorageLocal() { - let path = '/health/storage/local'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Get Time - * - * Check the Appwrite server time is synced with Google remote NTP server. We - * use this technology to smoothly handle leap seconds with no disruptive - * events. The [Network Time - * Protocol](https://en.wikipedia.org/wiki/Network_Time_Protocol) (NTP) is - * 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. - * - * @throws Exception - * @return {} - */ - async getTime() { - let path = '/health/time'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } -} - -module.exports = Health; \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/lib/services/locale.js b/app/sdks/0.7.0/server-nodejs/lib/services/locale.js deleted file mode 100644 index bc1efa4688..0000000000 --- a/app/sdks/0.7.0/server-nodejs/lib/services/locale.js +++ /dev/null @@ -1,125 +0,0 @@ -const Service = require('../service.js'); - -class Locale extends Service { - - /** - * Get User Locale - * - * Get the current user location based on IP. Returns an object with user - * country code, country name, continent name, continent code, ip address and - * suggested currency. You can use the locale header to get the data in a - * supported language. - * - * ([IP Geolocation by DB-IP](https://db-ip.com)) - * - * @throws Exception - * @return {} - */ - async get() { - let path = '/locale'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * List Continents - * - * List of all continents. You can use the locale header to get the data in a - * supported language. - * - * @throws Exception - * @return {} - */ - async getContinents() { - let path = '/locale/continents'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * List Countries - * - * List of all countries. You can use the locale header to get the data in a - * supported language. - * - * @throws Exception - * @return {} - */ - async getCountries() { - let path = '/locale/countries'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * 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. - * - * @throws Exception - * @return {} - */ - async getCountriesEU() { - let path = '/locale/countries/eu'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * List Countries Phone Codes - * - * List of all countries phone codes. You can use the locale header to get the - * data in a supported language. - * - * @throws Exception - * @return {} - */ - async getCountriesPhones() { - let path = '/locale/countries/phones'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * List Currencies - * - * List of all currencies, including currency symol, 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. - * - * @throws Exception - * @return {} - */ - async getCurrencies() { - let path = '/locale/currencies'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } -} - -module.exports = Locale; \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/lib/services/storage.js b/app/sdks/0.7.0/server-nodejs/lib/services/storage.js deleted file mode 100644 index 2b670db31a..0000000000 --- a/app/sdks/0.7.0/server-nodejs/lib/services/storage.js +++ /dev/null @@ -1,199 +0,0 @@ -const Service = require('../service.js'); - -class Storage extends Service { - - /** - * List Files - * - * Get a list of all the user files. You can use the query params to filter - * your results. On admin mode, this endpoint will return a list of all of the - * project files. [Learn more about different API modes](/docs/admin). - * - * @param string search - * @param number limit - * @param number offset - * @param string orderType - * @throws Exception - * @return {} - */ - async listFiles(search = '', limit = 25, offset = 0, orderType = 'ASC') { - let path = '/storage/files'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - 'search': search, - 'limit': limit, - 'offset': offset, - 'orderType': orderType - }); - } - - /** - * Create File - * - * Create a new file. The user who creates the file will automatically be - * assigned to read and write access unless he has passed custom values for - * read and write arguments. - * - * @param File file - * @param string[] read - * @param string[] write - * @throws Exception - * @return {} - */ - async createFile(file, read, write) { - let path = '/storage/files'; - - return await this.client.call('post', path, { - 'content-type': 'multipart/form-data', - }, - { - 'file': file, - 'read': read, - 'write': write - }); - } - - /** - * Get File - * - * Get file by its unique ID. This endpoint response returns a JSON object - * with the file metadata. - * - * @param string fileId - * @throws Exception - * @return {} - */ - async getFile(fileId) { - let path = '/storage/files/{fileId}'.replace(new RegExp('{fileId}', 'g'), fileId); - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Update File - * - * Update file by its unique ID. Only users with write permissions have access - * to update this resource. - * - * @param string fileId - * @param string[] read - * @param string[] write - * @throws Exception - * @return {} - */ - async updateFile(fileId, read, write) { - let path = '/storage/files/{fileId}'.replace(new RegExp('{fileId}', 'g'), fileId); - - return await this.client.call('put', path, { - 'content-type': 'application/json', - }, - { - 'read': read, - 'write': write - }); - } - - /** - * Delete File - * - * Delete a file by its unique ID. Only users with write permissions have - * access to delete this resource. - * - * @param string fileId - * @throws Exception - * @return {} - */ - async deleteFile(fileId) { - let path = '/storage/files/{fileId}'.replace(new RegExp('{fileId}', 'g'), fileId); - - return await this.client.call('delete', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Get File for Download - * - * Get 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. - * - * @param string fileId - * @throws Exception - * @return {} - */ - async getFileDownload(fileId) { - let path = '/storage/files/{fileId}/download'.replace(new RegExp('{fileId}', 'g'), fileId); - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Get File Preview - * - * Get a file preview image. Currently, this method supports preview for image - * files (jpg, png, and gif), other supported formats, like pdf, docs, slides, - * and spreadsheets, will return the file icon image. You can also pass query - * string arguments for cutting and resizing your preview image. - * - * @param string fileId - * @param number width - * @param number height - * @param number quality - * @param string background - * @param string output - * @throws Exception - * @return {} - */ - async getFilePreview(fileId, width = 0, height = 0, quality = 100, background = '', output = '') { - let path = '/storage/files/{fileId}/preview'.replace(new RegExp('{fileId}', 'g'), fileId); - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - 'width': width, - 'height': height, - 'quality': quality, - 'background': background, - 'output': output - }); - } - - /** - * Get File for View - * - * Get file content by its unique ID. This endpoint is similar to the download - * method but returns with no 'Content-Disposition: attachment' header. - * - * @param string fileId - * @param string as - * @throws Exception - * @return {} - */ - async getFileView(fileId, as = '') { - let path = '/storage/files/{fileId}/view'.replace(new RegExp('{fileId}', 'g'), fileId); - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - 'as': as - }); - } -} - -module.exports = Storage; \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/lib/services/teams.js b/app/sdks/0.7.0/server-nodejs/lib/services/teams.js deleted file mode 100644 index a17dd50aa3..0000000000 --- a/app/sdks/0.7.0/server-nodejs/lib/services/teams.js +++ /dev/null @@ -1,202 +0,0 @@ -const Service = require('../service.js'); - -class Teams extends Service { - - /** - * List Teams - * - * Get a list of all the current user teams. You can use the query params to - * filter your results. On admin mode, this endpoint will return a list of all - * of the project teams. [Learn more about different API modes](/docs/admin). - * - * @param string search - * @param number limit - * @param number offset - * @param string orderType - * @throws Exception - * @return {} - */ - async list(search = '', limit = 25, offset = 0, orderType = 'ASC') { - let path = '/teams'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - 'search': search, - 'limit': limit, - 'offset': offset, - 'orderType': orderType - }); - } - - /** - * Create Team - * - * Create a new team. The user who creates the team will automatically be - * assigned as the owner of the team. The team owner can invite new members, - * who will be able add new owners and update or delete the team from your - * project. - * - * @param string name - * @param string[] roles - * @throws Exception - * @return {} - */ - async create(name, roles = ["owner"]) { - let path = '/teams'; - - return await this.client.call('post', path, { - 'content-type': 'application/json', - }, - { - 'name': name, - 'roles': roles - }); - } - - /** - * Get Team - * - * Get team by its unique ID. All team members have read access for this - * resource. - * - * @param string teamId - * @throws Exception - * @return {} - */ - async get(teamId) { - let path = '/teams/{teamId}'.replace(new RegExp('{teamId}', 'g'), teamId); - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Update Team - * - * Update team by its unique ID. Only team owners have write access for this - * resource. - * - * @param string teamId - * @param string name - * @throws Exception - * @return {} - */ - async update(teamId, name) { - let path = '/teams/{teamId}'.replace(new RegExp('{teamId}', 'g'), teamId); - - return await this.client.call('put', path, { - 'content-type': 'application/json', - }, - { - 'name': name - }); - } - - /** - * Delete Team - * - * Delete team by its unique ID. Only team owners have write access for this - * resource. - * - * @param string teamId - * @throws Exception - * @return {} - */ - async delete(teamId) { - let path = '/teams/{teamId}'.replace(new RegExp('{teamId}', 'g'), teamId); - - return await this.client.call('delete', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Get Team Memberships - * - * Get team members by the team unique ID. All team members have read access - * for this list of resources. - * - * @param string teamId - * @throws Exception - * @return {} - */ - async getMemberships(teamId) { - let path = '/teams/{teamId}/memberships'.replace(new RegExp('{teamId}', 'g'), teamId); - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Create Team Membership - * - * Use this endpoint to invite a new member to join your team. An email with a - * link to join the team will be sent to the new member email address if the - * member doesn't exist in the project it will be created automatically. - * - * Use the 'URL' parameter to redirect the user from the invitation email back - * to your app. When the user is redirected, use the [Update Team Membership - * Status](/docs/teams#updateMembershipStatus) endpoint to allow the user to - * accept the invitation to the team. - * - * Please note that in order to avoid a [Redirect - * Attacks](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) - * the only valid redirect URL's are the once from domains you have set when - * added your platforms in the console interface. - * - * @param string teamId - * @param string email - * @param string[] roles - * @param string url - * @param string name - * @throws Exception - * @return {} - */ - async createMembership(teamId, email, roles, url, name = '') { - let path = '/teams/{teamId}/memberships'.replace(new RegExp('{teamId}', 'g'), teamId); - - return await this.client.call('post', path, { - 'content-type': 'application/json', - }, - { - 'email': email, - 'name': name, - 'roles': roles, - 'url': url - }); - } - - /** - * 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 he didn't accept it. - * - * @param string teamId - * @param string inviteId - * @throws Exception - * @return {} - */ - async deleteMembership(teamId, inviteId) { - let path = '/teams/{teamId}/memberships/{inviteId}'.replace(new RegExp('{teamId}', 'g'), teamId).replace(new RegExp('{inviteId}', 'g'), inviteId); - - return await this.client.call('delete', path, { - 'content-type': 'application/json', - }, - { - }); - } -} - -module.exports = Teams; \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/lib/services/users.js b/app/sdks/0.7.0/server-nodejs/lib/services/users.js deleted file mode 100644 index 2292fb2664..0000000000 --- a/app/sdks/0.7.0/server-nodejs/lib/services/users.js +++ /dev/null @@ -1,215 +0,0 @@ -const Service = require('../service.js'); - -class Users extends Service { - - /** - * List Users - * - * Get a list of all the project users. You can use the query params to filter - * your results. - * - * @param string search - * @param number limit - * @param number offset - * @param string orderType - * @throws Exception - * @return {} - */ - async list(search = '', limit = 25, offset = 0, orderType = 'ASC') { - let path = '/users'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - 'search': search, - 'limit': limit, - 'offset': offset, - 'orderType': orderType - }); - } - - /** - * Create User - * - * Create a new user. - * - * @param string email - * @param string password - * @param string name - * @throws Exception - * @return {} - */ - async create(email, password, name = '') { - let path = '/users'; - - return await this.client.call('post', path, { - 'content-type': 'application/json', - }, - { - 'email': email, - 'password': password, - 'name': name - }); - } - - /** - * Get User - * - * Get user by its unique ID. - * - * @param string userId - * @throws Exception - * @return {} - */ - async get(userId) { - let path = '/users/{userId}'.replace(new RegExp('{userId}', 'g'), userId); - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Get User Logs - * - * Get user activity logs list by its unique ID. - * - * @param string userId - * @throws Exception - * @return {} - */ - async getLogs(userId) { - let path = '/users/{userId}/logs'.replace(new RegExp('{userId}', 'g'), userId); - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Get User Preferences - * - * Get user preferences by its unique ID. - * - * @param string userId - * @throws Exception - * @return {} - */ - async getPrefs(userId) { - let path = '/users/{userId}/prefs'.replace(new RegExp('{userId}', 'g'), userId); - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Update User Preferences - * - * Update user preferences by its unique ID. You can pass only the specific - * settings you wish to update. - * - * @param string userId - * @param object prefs - * @throws Exception - * @return {} - */ - async updatePrefs(userId, prefs) { - let path = '/users/{userId}/prefs'.replace(new RegExp('{userId}', 'g'), userId); - - return await this.client.call('patch', path, { - 'content-type': 'application/json', - }, - { - 'prefs': prefs - }); - } - - /** - * Get User Sessions - * - * Get user sessions list by its unique ID. - * - * @param string userId - * @throws Exception - * @return {} - */ - async getSessions(userId) { - let path = '/users/{userId}/sessions'.replace(new RegExp('{userId}', 'g'), userId); - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Delete User Sessions - * - * Delete all user sessions by its unique ID. - * - * @param string userId - * @throws Exception - * @return {} - */ - async deleteSessions(userId) { - let path = '/users/{userId}/sessions'.replace(new RegExp('{userId}', 'g'), userId); - - return await this.client.call('delete', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Delete User Session - * - * Delete user sessions by its unique ID. - * - * @param string userId - * @param string sessionId - * @throws Exception - * @return {} - */ - async deleteSession(userId, sessionId) { - let path = '/users/{userId}/sessions/{sessionId}'.replace(new RegExp('{userId}', 'g'), userId).replace(new RegExp('{sessionId}', 'g'), sessionId); - - return await this.client.call('delete', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Update User Status - * - * Update user status by its unique ID. - * - * @param string userId - * @param string status - * @throws Exception - * @return {} - */ - async updateStatus(userId, status) { - let path = '/users/{userId}/status'.replace(new RegExp('{userId}', 'g'), userId); - - return await this.client.call('patch', path, { - 'content-type': 'application/json', - }, - { - 'status': status - }); - } -} - -module.exports = Users; \ No newline at end of file diff --git a/app/sdks/0.7.0/server-nodejs/package.json b/app/sdks/0.7.0/server-nodejs/package.json deleted file mode 100644 index 377ea48db2..0000000000 --- a/app/sdks/0.7.0/server-nodejs/package.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "node-appwrite", - "homepage": "https://appwrite.io/support", - "description": "Appwrite is an open-source self-hosted backend server that abstract and simplify complex and repetitive development tasks behind a very simple REST API", - "version": "1.1.0", - "license": "BSD-3-Clause", - "main": "index.js", - "repository": { - "type": "git", - "url": "https://github.com/appwrite/sdk-for-node" - }, - "devDependencies": {}, - "dependencies": { - "request": "^2.88.0", - "request-promise-native": "^1.0.7" - } -} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/CHANGELOG.md b/app/sdks/0.7.0/server-php/CHANGELOG.md deleted file mode 100644 index fa4d35e687..0000000000 --- a/app/sdks/0.7.0/server-php/CHANGELOG.md +++ /dev/null @@ -1 +0,0 @@ -# Change Log \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/LICENSE b/app/sdks/0.7.0/server-php/LICENSE deleted file mode 100644 index fc7c051a91..0000000000 --- a/app/sdks/0.7.0/server-php/LICENSE +++ /dev/null @@ -1,12 +0,0 @@ -Copyright (c) 2019 Appwrite (https://appwrite.io) and individual contributors. -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - - 3. Neither the name Appwrite nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/README.md b/app/sdks/0.7.0/server-php/README.md deleted file mode 100644 index 0d64f84fca..0000000000 --- a/app/sdks/0.7.0/server-php/README.md +++ /dev/null @@ -1,28 +0,0 @@ -# Appwrite PHP SDK - -![License](https://img.shields.io/github/license/appwrite/sdk-for-php.svg?v=1) -![Version](https://img.shields.io/badge/api%20version-0.6.1-blue.svg?v=1) - -Appwrite is an open-source backend as a service server that abstract and simplify complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way. - Use the PHP SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools. - For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs) - - - -![Appwrite](https://appwrite.io/images/github.png) - -## Installation - -To install via [Composer](http://getcomposer.org/): - -```bash -composer require appwrite/appwrite -``` - -## Contribution - -This library is auto-generated by Appwrite custom [SDK Generator](https://github.com/appwrite/sdk-generator). To learn more about how you can help us improve this SDK, please check the [contribution guide](https://github.com/appwrite/sdk-generator/blob/master/CONTRIBUTING.md) before sending a pull-request. - -## License - -Please see the [BSD-3-Clause license](https://raw.githubusercontent.com/appwrite/appwrite/master/LICENSE) file for more information. \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/composer.json b/app/sdks/0.7.0/server-php/composer.json deleted file mode 100644 index 64d2e1746f..0000000000 --- a/app/sdks/0.7.0/server-php/composer.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "name": "appwrite/appwrite", - "description": "Appwrite is an open-source backend as a service server that abstract and simplify complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way. - Use the PHP SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools. - For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs)", - "type": "library", - "license": "BSD-3-Clause", - "support": { - "url": "https://appwrite.io/support", - "email": "team@localhost.test" - }, - "autoload": { - "psr-4": { - "Appwrite\\": "src/Appwrite" - } - }, - "require": { - "php": ">=7.1.0", - "ext-curl": "*", - "ext-json": "*" - }, - "require-dev": { - "phpunit/phpunit": "3.7.35" - }, - "minimum-stability": "dev" -} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/avatars.md b/app/sdks/0.7.0/server-php/docs/avatars.md deleted file mode 100644 index 9fa1ee61f1..0000000000 --- a/app/sdks/0.7.0/server-php/docs/avatars.md +++ /dev/null @@ -1,100 +0,0 @@ -# Avatars Service - -## Get Browser Icon - -```http request -GET https://appwrite.io/v1/avatars/browsers/{code} -``` - -** You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user /account/sessions endpoint. Use width, height and quality arguments to change the output settings. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| code | string | **Required** Browser Code. | | -| width | integer | Image width. Pass an integer between 0 to 2000. Defaults to 100. | 100 | -| height | integer | Image height. Pass an integer between 0 to 2000. Defaults to 100. | 100 | -| quality | integer | Image quality. Pass an integer between 0 to 100. Defaults to 100. | 100 | - -## Get Credit Card Icon - -```http request -GET https://appwrite.io/v1/avatars/credit-cards/{code} -``` - -** Need to display your users with your billing method or their payment methods? The credit card endpoint will return you the icon of the credit card provider you need. Use width, height and quality arguments to change the output settings. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| code | string | **Required** Credit Card Code. Possible values: amex, argencard, cabal, censosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa. | | -| width | integer | Image width. Pass an integer between 0 to 2000. Defaults to 100. | 100 | -| height | integer | Image height. Pass an integer between 0 to 2000. Defaults to 100. | 100 | -| quality | integer | Image quality. Pass an integer between 0 to 100. Defaults to 100. | 100 | - -## Get Favicon - -```http request -GET https://appwrite.io/v1/avatars/favicon -``` - -** Use this endpoint to fetch the favorite icon (AKA favicon) of a any remote website URL. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| url | string | **Required** Website URL which you want to fetch the favicon from. | | - -## Get Country Flag - -```http request -GET https://appwrite.io/v1/avatars/flags/{code} -``` - -** You can use this endpoint to show different country flags icons to your users. The code argument receives the 2 letter country code. Use width, height and quality arguments to change the output settings. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| code | string | **Required** Country Code. ISO Alpha-2 country code format. | | -| width | integer | Image width. Pass an integer between 0 to 2000. Defaults to 100. | 100 | -| height | integer | Image height. Pass an integer between 0 to 2000. Defaults to 100. | 100 | -| quality | integer | Image quality. Pass an integer between 0 to 100. Defaults to 100. | 100 | - -## Get Image from URL - -```http request -GET https://appwrite.io/v1/avatars/image -``` - -** Use this endpoint to fetch a remote image URL and crop it to any image size you want. This endpoint is very useful if you need to crop and display remote images in your app or in case you want to make sure a 3rd party image is properly served using a TLS protocol. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| url | string | **Required** Image URL which you want to crop. | | -| width | integer | Resize preview image width, Pass an integer between 0 to 2000. | 400 | -| height | integer | Resize preview image height, Pass an integer between 0 to 2000. | 400 | - -## Get QR Code - -```http request -GET https://appwrite.io/v1/avatars/qr -``` - -** 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. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| text | string | **Required** Plain text to be converted to QR code image. | | -| size | integer | QR code size. Pass an integer between 0 to 1000. Defaults to 400. | 400 | -| margin | integer | Margin from edge. Pass an integer between 0 to 10. Defaults to 1. | 1 | -| download | integer | Return resulting image with 'Content-Disposition: attachment ' headers for the browser to start downloading it. Pass 0 for no header, or 1 for otherwise. Default value is set to 0. | 0 | - diff --git a/app/sdks/0.7.0/server-php/docs/database.md b/app/sdks/0.7.0/server-php/docs/database.md deleted file mode 100644 index f192a92fc8..0000000000 --- a/app/sdks/0.7.0/server-php/docs/database.md +++ /dev/null @@ -1,183 +0,0 @@ -# Database Service - -## List Collections - -```http request -GET https://appwrite.io/v1/database/collections -``` - -** Get a list of all the user collections. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project collections. [Learn more about different API modes](/docs/admin). ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| search | string | Search term to filter your list results. | | -| limit | integer | Results limit value. By default will return maximum 25 results. Maximum of 100 results allowed per request. | 25 | -| offset | integer | Results offset. The default value is 0. Use this param to manage pagination. | 0 | -| orderType | string | Order result by ASC or DESC order. | ASC | - -## Create Collection - -```http request -POST https://appwrite.io/v1/database/collections -``` - -** Create a new Collection. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| name | string | Collection name. | | -| read | array | An array of strings with read permissions. By default no user is granted with any read permissions. [learn more about permissions](/docs/permissions) and get a full list of available permissions. | | -| write | array | An array of strings with write permissions. By default no user is granted with any write permissions. [learn more about permissions](/docs/permissions) and get a full list of available permissions. | | -| rules | array | Array of [rule objects](/docs/rules). Each rule define a collection field name, data type and validation. | | - -## Get Collection - -```http request -GET https://appwrite.io/v1/database/collections/{collectionId} -``` - -** Get collection by its unique ID. This endpoint response returns a JSON object with the collection metadata. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| collectionId | string | **Required** Collection unique ID. | | - -## Update Collection - -```http request -PUT https://appwrite.io/v1/database/collections/{collectionId} -``` - -** Update collection by its unique ID. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| collectionId | string | **Required** Collection unique ID. | | -| name | string | Collection name. | | -| read | array | An array of strings with read permissions. By default no user is granted with any read permissions. [learn more about permissions(/docs/permissions) and get a full list of available permissions. | | -| write | array | An array of strings with write permissions. By default no user is granted with any write permissions. [learn more about permissions](/docs/permissions) and get a full list of available permissions. | | -| rules | array | Array of [rule objects](/docs/rules). Each rule define a collection field name, data type and validation. | [] | - -## Delete Collection - -```http request -DELETE https://appwrite.io/v1/database/collections/{collectionId} -``` - -** Delete a collection by its unique ID. Only users with write permissions have access to delete this resource. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| collectionId | string | **Required** Collection unique ID. | | - -## List Documents - -```http request -GET https://appwrite.io/v1/database/collections/{collectionId}/documents -``` - -** Get a list of all the user documents. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project documents. [Learn more about different API modes](/docs/admin). ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| collectionId | string | **Required** Collection unique ID. You can create a new collection with validation rules using the Database service [server integration](/docs/database?platform=server#createCollection). | | -| filters | array | Array of filter strings. Each filter is constructed from a key name, comparison operator (=, !=, >, <, <=, >=) and a value. You can also use a dot (.) separator in attribute names to filter by child document attributes. Examples: 'name=John Doe' or 'category.$id>=5bed2d152c362'. | [] | -| offset | integer | Offset value. Use this value to manage pagination. | 0 | -| limit | integer | Maximum number of documents to return in response. Use this value to manage pagination. | 50 | -| orderField | string | Document field that results will be sorted by. | $id | -| orderType | string | Order direction. Possible values are DESC for descending order, or ASC for ascending order. | ASC | -| orderCast | string | Order field type casting. Possible values are int, string, date, time or datetime. The database will attempt to cast the order field to the value you pass here. The default value is a string. | string | -| search | string | Search query. Enter any free text search. The database will try to find a match against all document attributes and children. | | -| first | integer | Return only the first document. Pass 1 for true or 0 for false. The default value is 0. | 0 | -| last | integer | Return only the last document. Pass 1 for true or 0 for false. The default value is 0. | 0 | - -## Create Document - -```http request -POST https://appwrite.io/v1/database/collections/{collectionId}/documents -``` - -** Create a new Document. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| collectionId | string | **Required** Collection unique ID. You can create a new collection with validation rules using the Database service [server integration](/docs/database?platform=server#createCollection). | | -| data | object | Document data as JSON object. | | -| read | array | An array of strings with read permissions. By default no user is granted with any read permissions. [learn more about permissions](/docs/permissions) and get a full list of available permissions. | | -| write | array | An array of strings with write permissions. By default no user is granted with any write permissions. [learn more about permissions](/docs/permissions) and get a full list of available permissions. | | -| parentDocument | string | Parent document unique ID. Use when you want your new document to be a child of a parent document. | | -| parentProperty | string | Parent document property name. Use when you want your new document to be a child of a parent document. | | -| parentPropertyType | string | Parent document property connection type. You can set this value to **assign**, **append** or **prepend**, default value is assign. Use when you want your new document to be a child of a parent document. | assign | - -## Get Document - -```http request -GET https://appwrite.io/v1/database/collections/{collectionId}/documents/{documentId} -``` - -** Get document by its unique ID. This endpoint response returns a JSON object with the document data. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| collectionId | string | **Required** Collection unique ID. You can create a new collection with validation rules using the Database service [server integration](/docs/database?platform=server#createCollection). | | -| documentId | string | **Required** Document unique ID. | | - -## Update Document - -```http request -PATCH https://appwrite.io/v1/database/collections/{collectionId}/documents/{documentId} -``` - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| collectionId | string | **Required** Collection unique ID. You can create a new collection with validation rules using the Database service [server integration](/docs/database?platform=server#createCollection). | | -| documentId | string | **Required** Document unique ID. | | -| data | object | Document data as JSON object. | | -| read | array | An array of strings with read permissions. By default no user is granted with any read permissions. [learn more about permissions](/docs/permissions) and get a full list of available permissions. | | -| write | array | An array of strings with write permissions. By default no user is granted with any write permissions. [learn more about permissions](/docs/permissions) and get a full list of available permissions. | | - -## Delete Document - -```http request -DELETE https://appwrite.io/v1/database/collections/{collectionId}/documents/{documentId} -``` - -** Delete document by its unique ID. This endpoint deletes only the parent documents, his attributes and relations to other documents. Child documents **will not** be deleted. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| collectionId | string | **Required** Collection unique ID. You can create a new collection with validation rules using the Database service [server integration](/docs/database?platform=server#createCollection). | | -| documentId | string | **Required** Document unique ID. | | - -## Get Collection Logs - -```http request -GET https://appwrite.io/v1/database/collections/{collectionId}/logs -``` - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| collectionId | string | **Required** Collection unique ID. | | - diff --git a/app/sdks/0.7.0/server-php/docs/examples/avatars/get-browser.md b/app/sdks/0.7.0/server-php/docs/examples/avatars/get-browser.md deleted file mode 100644 index 795d79157e..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/avatars/get-browser.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$avatars = new Avatars($client); - -$result = $avatars->getBrowser('aa'); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/avatars/get-credit-card.md b/app/sdks/0.7.0/server-php/docs/examples/avatars/get-credit-card.md deleted file mode 100644 index 33879d0179..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/avatars/get-credit-card.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$avatars = new Avatars($client); - -$result = $avatars->getCreditCard('amex'); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/avatars/get-favicon.md b/app/sdks/0.7.0/server-php/docs/examples/avatars/get-favicon.md deleted file mode 100644 index dee19dbf04..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/avatars/get-favicon.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$avatars = new Avatars($client); - -$result = $avatars->getFavicon('https://example.com'); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/avatars/get-flag.md b/app/sdks/0.7.0/server-php/docs/examples/avatars/get-flag.md deleted file mode 100644 index d70d7e43ec..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/avatars/get-flag.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$avatars = new Avatars($client); - -$result = $avatars->getFlag('af'); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/avatars/get-image.md b/app/sdks/0.7.0/server-php/docs/examples/avatars/get-image.md deleted file mode 100644 index a46b9fbe37..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/avatars/get-image.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$avatars = new Avatars($client); - -$result = $avatars->getImage('https://example.com'); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/avatars/get-q-r.md b/app/sdks/0.7.0/server-php/docs/examples/avatars/get-q-r.md deleted file mode 100644 index 95b5a6d7b3..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/avatars/get-q-r.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$avatars = new Avatars($client); - -$result = $avatars->getQR('[TEXT]'); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/database/create-collection.md b/app/sdks/0.7.0/server-php/docs/examples/database/create-collection.md deleted file mode 100644 index 276d5049fe..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/database/create-collection.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$database = new Database($client); - -$result = $database->createCollection('[NAME]', [], [], []); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/database/create-document.md b/app/sdks/0.7.0/server-php/docs/examples/database/create-document.md deleted file mode 100644 index 6c32cdf950..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/database/create-document.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$database = new Database($client); - -$result = $database->createDocument('[COLLECTION_ID]', [], [], []); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/database/delete-collection.md b/app/sdks/0.7.0/server-php/docs/examples/database/delete-collection.md deleted file mode 100644 index 4018420188..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/database/delete-collection.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$database = new Database($client); - -$result = $database->deleteCollection('[COLLECTION_ID]'); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/database/delete-document.md b/app/sdks/0.7.0/server-php/docs/examples/database/delete-document.md deleted file mode 100644 index 3ed45d6ee1..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/database/delete-document.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$database = new Database($client); - -$result = $database->deleteDocument('[COLLECTION_ID]', '[DOCUMENT_ID]'); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/database/get-collection-logs.md b/app/sdks/0.7.0/server-php/docs/examples/database/get-collection-logs.md deleted file mode 100644 index 22c547eb39..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/database/get-collection-logs.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$database = new Database($client); - -$result = $database->getCollectionLogs('[COLLECTION_ID]'); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/database/get-collection.md b/app/sdks/0.7.0/server-php/docs/examples/database/get-collection.md deleted file mode 100644 index a088b24bb6..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/database/get-collection.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$database = new Database($client); - -$result = $database->getCollection('[COLLECTION_ID]'); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/database/get-document.md b/app/sdks/0.7.0/server-php/docs/examples/database/get-document.md deleted file mode 100644 index d506bd8414..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/database/get-document.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$database = new Database($client); - -$result = $database->getDocument('[COLLECTION_ID]', '[DOCUMENT_ID]'); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/database/list-collections.md b/app/sdks/0.7.0/server-php/docs/examples/database/list-collections.md deleted file mode 100644 index 4f4aa1b775..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/database/list-collections.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$database = new Database($client); - -$result = $database->listCollections(); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/database/list-documents.md b/app/sdks/0.7.0/server-php/docs/examples/database/list-documents.md deleted file mode 100644 index 359da4ce33..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/database/list-documents.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$database = new Database($client); - -$result = $database->listDocuments('[COLLECTION_ID]'); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/database/update-collection.md b/app/sdks/0.7.0/server-php/docs/examples/database/update-collection.md deleted file mode 100644 index 70d596066a..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/database/update-collection.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$database = new Database($client); - -$result = $database->updateCollection('[COLLECTION_ID]', '[NAME]', [], []); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/database/update-document.md b/app/sdks/0.7.0/server-php/docs/examples/database/update-document.md deleted file mode 100644 index 4389034640..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/database/update-document.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$database = new Database($client); - -$result = $database->updateDocument('[COLLECTION_ID]', '[DOCUMENT_ID]', [], [], []); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/functions/create-execution.md b/app/sdks/0.7.0/server-php/docs/examples/functions/create-execution.md deleted file mode 100644 index ca232c8771..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/functions/create-execution.md +++ /dev/null @@ -1,15 +0,0 @@ -setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$functions = new Functions($client); - -$result = $functions->createExecution('[FUNCTION_ID]'); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/functions/create-tag.md b/app/sdks/0.7.0/server-php/docs/examples/functions/create-tag.md deleted file mode 100644 index cc4ff73e90..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/functions/create-tag.md +++ /dev/null @@ -1,15 +0,0 @@ -setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$functions = new Functions($client); - -$result = $functions->createTag('[FUNCTION_ID]', 'node-14', '[COMMAND]', '[CODE]'); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/functions/create.md b/app/sdks/0.7.0/server-php/docs/examples/functions/create.md deleted file mode 100644 index 7ec5dc2831..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/functions/create.md +++ /dev/null @@ -1,15 +0,0 @@ -setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$functions = new Functions($client); - -$result = $functions->create('[NAME]'); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/functions/delete-tag.md b/app/sdks/0.7.0/server-php/docs/examples/functions/delete-tag.md deleted file mode 100644 index 681c9c3aa7..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/functions/delete-tag.md +++ /dev/null @@ -1,15 +0,0 @@ -setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$functions = new Functions($client); - -$result = $functions->deleteTag('[FUNCTION_ID]', '[TAG_ID]'); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/functions/delete.md b/app/sdks/0.7.0/server-php/docs/examples/functions/delete.md deleted file mode 100644 index 12476f1d6a..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/functions/delete.md +++ /dev/null @@ -1,15 +0,0 @@ -setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$functions = new Functions($client); - -$result = $functions->delete('[FUNCTION_ID]'); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/functions/get-execution.md b/app/sdks/0.7.0/server-php/docs/examples/functions/get-execution.md deleted file mode 100644 index 774c7ecc3f..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/functions/get-execution.md +++ /dev/null @@ -1,15 +0,0 @@ -setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$functions = new Functions($client); - -$result = $functions->getExecution('[FUNCTION_ID]', '[EXECUTION_ID]'); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/functions/get-tag.md b/app/sdks/0.7.0/server-php/docs/examples/functions/get-tag.md deleted file mode 100644 index b1c2f23dcf..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/functions/get-tag.md +++ /dev/null @@ -1,15 +0,0 @@ -setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$functions = new Functions($client); - -$result = $functions->getTag('[FUNCTION_ID]', '[TAG_ID]'); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/functions/get.md b/app/sdks/0.7.0/server-php/docs/examples/functions/get.md deleted file mode 100644 index 0b6b438c65..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/functions/get.md +++ /dev/null @@ -1,15 +0,0 @@ -setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$functions = new Functions($client); - -$result = $functions->get('[FUNCTION_ID]'); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/functions/list-executions.md b/app/sdks/0.7.0/server-php/docs/examples/functions/list-executions.md deleted file mode 100644 index a0403c653d..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/functions/list-executions.md +++ /dev/null @@ -1,15 +0,0 @@ -setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$functions = new Functions($client); - -$result = $functions->listExecutions('[FUNCTION_ID]'); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/functions/list-tags.md b/app/sdks/0.7.0/server-php/docs/examples/functions/list-tags.md deleted file mode 100644 index 3c2e6b6e87..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/functions/list-tags.md +++ /dev/null @@ -1,15 +0,0 @@ -setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$functions = new Functions($client); - -$result = $functions->listTags('[FUNCTION_ID]'); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/functions/list.md b/app/sdks/0.7.0/server-php/docs/examples/functions/list.md deleted file mode 100644 index bfbfde406f..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/functions/list.md +++ /dev/null @@ -1,15 +0,0 @@ -setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$functions = new Functions($client); - -$result = $functions->list(); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/functions/update-active.md b/app/sdks/0.7.0/server-php/docs/examples/functions/update-active.md deleted file mode 100644 index 18b7316f3b..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/functions/update-active.md +++ /dev/null @@ -1,15 +0,0 @@ -setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$functions = new Functions($client); - -$result = $functions->updateActive('[FUNCTION_ID]', '[ACTIVE]'); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/functions/update-tag.md b/app/sdks/0.7.0/server-php/docs/examples/functions/update-tag.md deleted file mode 100644 index 68099d8fbb..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/functions/update-tag.md +++ /dev/null @@ -1,15 +0,0 @@ -setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$functions = new Functions($client); - -$result = $functions->updateTag('[FUNCTION_ID]', '[TAG]'); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/functions/update.md b/app/sdks/0.7.0/server-php/docs/examples/functions/update.md deleted file mode 100644 index 34315a129a..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/functions/update.md +++ /dev/null @@ -1,15 +0,0 @@ -setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$functions = new Functions($client); - -$result = $functions->update('[FUNCTION_ID]', '[NAME]'); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/health/get-anti-virus.md b/app/sdks/0.7.0/server-php/docs/examples/health/get-anti-virus.md deleted file mode 100644 index 89a5fb2a7a..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/health/get-anti-virus.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$health = new Health($client); - -$result = $health->getAntiVirus(); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/health/get-cache.md b/app/sdks/0.7.0/server-php/docs/examples/health/get-cache.md deleted file mode 100644 index e654c26f51..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/health/get-cache.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$health = new Health($client); - -$result = $health->getCache(); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/health/get-d-b.md b/app/sdks/0.7.0/server-php/docs/examples/health/get-d-b.md deleted file mode 100644 index 2d37991a3d..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/health/get-d-b.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$health = new Health($client); - -$result = $health->getDB(); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/health/get-queue-certificates.md b/app/sdks/0.7.0/server-php/docs/examples/health/get-queue-certificates.md deleted file mode 100644 index 57f2c5793e..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/health/get-queue-certificates.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$health = new Health($client); - -$result = $health->getQueueCertificates(); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/health/get-queue-functions.md b/app/sdks/0.7.0/server-php/docs/examples/health/get-queue-functions.md deleted file mode 100644 index 8ff6510e1c..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/health/get-queue-functions.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$health = new Health($client); - -$result = $health->getQueueFunctions(); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/health/get-queue-logs.md b/app/sdks/0.7.0/server-php/docs/examples/health/get-queue-logs.md deleted file mode 100644 index fa723d7391..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/health/get-queue-logs.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$health = new Health($client); - -$result = $health->getQueueLogs(); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/health/get-queue-tasks.md b/app/sdks/0.7.0/server-php/docs/examples/health/get-queue-tasks.md deleted file mode 100644 index b8f1794a1a..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/health/get-queue-tasks.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$health = new Health($client); - -$result = $health->getQueueTasks(); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/health/get-queue-usage.md b/app/sdks/0.7.0/server-php/docs/examples/health/get-queue-usage.md deleted file mode 100644 index 371d02f5b4..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/health/get-queue-usage.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$health = new Health($client); - -$result = $health->getQueueUsage(); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/health/get-queue-webhooks.md b/app/sdks/0.7.0/server-php/docs/examples/health/get-queue-webhooks.md deleted file mode 100644 index af48a72d06..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/health/get-queue-webhooks.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$health = new Health($client); - -$result = $health->getQueueWebhooks(); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/health/get-storage-anti-virus.md b/app/sdks/0.7.0/server-php/docs/examples/health/get-storage-anti-virus.md deleted file mode 100644 index 0d1958e4f2..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/health/get-storage-anti-virus.md +++ /dev/null @@ -1,15 +0,0 @@ -setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$health = new Health($client); - -$result = $health->getStorageAntiVirus(); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/health/get-storage-local.md b/app/sdks/0.7.0/server-php/docs/examples/health/get-storage-local.md deleted file mode 100644 index eba15a1652..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/health/get-storage-local.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$health = new Health($client); - -$result = $health->getStorageLocal(); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/health/get-time.md b/app/sdks/0.7.0/server-php/docs/examples/health/get-time.md deleted file mode 100644 index 849f499460..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/health/get-time.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$health = new Health($client); - -$result = $health->getTime(); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/health/get.md b/app/sdks/0.7.0/server-php/docs/examples/health/get.md deleted file mode 100644 index 9f1ec8970c..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/health/get.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$health = new Health($client); - -$result = $health->get(); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/locale/get-continents.md b/app/sdks/0.7.0/server-php/docs/examples/locale/get-continents.md deleted file mode 100644 index bb099d31f5..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/locale/get-continents.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$locale = new Locale($client); - -$result = $locale->getContinents(); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/locale/get-countries-e-u.md b/app/sdks/0.7.0/server-php/docs/examples/locale/get-countries-e-u.md deleted file mode 100644 index 87287a5cea..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/locale/get-countries-e-u.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$locale = new Locale($client); - -$result = $locale->getCountriesEU(); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/locale/get-countries-phones.md b/app/sdks/0.7.0/server-php/docs/examples/locale/get-countries-phones.md deleted file mode 100644 index 71a39303da..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/locale/get-countries-phones.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$locale = new Locale($client); - -$result = $locale->getCountriesPhones(); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/locale/get-countries.md b/app/sdks/0.7.0/server-php/docs/examples/locale/get-countries.md deleted file mode 100644 index 1c8f863a76..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/locale/get-countries.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$locale = new Locale($client); - -$result = $locale->getCountries(); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/locale/get-currencies.md b/app/sdks/0.7.0/server-php/docs/examples/locale/get-currencies.md deleted file mode 100644 index b799bf6b80..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/locale/get-currencies.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$locale = new Locale($client); - -$result = $locale->getCurrencies(); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/locale/get.md b/app/sdks/0.7.0/server-php/docs/examples/locale/get.md deleted file mode 100644 index 8e11f17689..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/locale/get.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$locale = new Locale($client); - -$result = $locale->get(); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/storage/create-file.md b/app/sdks/0.7.0/server-php/docs/examples/storage/create-file.md deleted file mode 100644 index ba533dd2e7..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/storage/create-file.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$storage = new Storage($client); - -$result = $storage->createFile(new \CURLFile('/path/to/file.png', 'image/png', 'file.png'), [], []); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/storage/delete-file.md b/app/sdks/0.7.0/server-php/docs/examples/storage/delete-file.md deleted file mode 100644 index 23d4013d22..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/storage/delete-file.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$storage = new Storage($client); - -$result = $storage->deleteFile('[FILE_ID]'); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/storage/get-file-download.md b/app/sdks/0.7.0/server-php/docs/examples/storage/get-file-download.md deleted file mode 100644 index 3064481141..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/storage/get-file-download.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$storage = new Storage($client); - -$result = $storage->getFileDownload('[FILE_ID]'); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/storage/get-file-preview.md b/app/sdks/0.7.0/server-php/docs/examples/storage/get-file-preview.md deleted file mode 100644 index 00cb63696b..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/storage/get-file-preview.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$storage = new Storage($client); - -$result = $storage->getFilePreview('[FILE_ID]'); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/storage/get-file-view.md b/app/sdks/0.7.0/server-php/docs/examples/storage/get-file-view.md deleted file mode 100644 index 07b7ab32ba..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/storage/get-file-view.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$storage = new Storage($client); - -$result = $storage->getFileView('[FILE_ID]'); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/storage/get-file.md b/app/sdks/0.7.0/server-php/docs/examples/storage/get-file.md deleted file mode 100644 index c8b6495f18..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/storage/get-file.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$storage = new Storage($client); - -$result = $storage->getFile('[FILE_ID]'); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/storage/list-files.md b/app/sdks/0.7.0/server-php/docs/examples/storage/list-files.md deleted file mode 100644 index 787c38e320..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/storage/list-files.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$storage = new Storage($client); - -$result = $storage->listFiles(); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/storage/update-file.md b/app/sdks/0.7.0/server-php/docs/examples/storage/update-file.md deleted file mode 100644 index 7515217b97..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/storage/update-file.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$storage = new Storage($client); - -$result = $storage->updateFile('[FILE_ID]', [], []); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/teams/create-membership.md b/app/sdks/0.7.0/server-php/docs/examples/teams/create-membership.md deleted file mode 100644 index 9c88b1bba5..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/teams/create-membership.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$teams = new Teams($client); - -$result = $teams->createMembership('[TEAM_ID]', 'email@example.com', [], 'https://example.com'); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/teams/create.md b/app/sdks/0.7.0/server-php/docs/examples/teams/create.md deleted file mode 100644 index 7b0946bc83..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/teams/create.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$teams = new Teams($client); - -$result = $teams->create('[NAME]'); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/teams/delete-membership.md b/app/sdks/0.7.0/server-php/docs/examples/teams/delete-membership.md deleted file mode 100644 index ca9d3d57c0..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/teams/delete-membership.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$teams = new Teams($client); - -$result = $teams->deleteMembership('[TEAM_ID]', '[INVITE_ID]'); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/teams/delete.md b/app/sdks/0.7.0/server-php/docs/examples/teams/delete.md deleted file mode 100644 index 394a1940fc..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/teams/delete.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$teams = new Teams($client); - -$result = $teams->delete('[TEAM_ID]'); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/teams/get-memberships.md b/app/sdks/0.7.0/server-php/docs/examples/teams/get-memberships.md deleted file mode 100644 index 56f6d59063..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/teams/get-memberships.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$teams = new Teams($client); - -$result = $teams->getMemberships('[TEAM_ID]'); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/teams/get.md b/app/sdks/0.7.0/server-php/docs/examples/teams/get.md deleted file mode 100644 index 6f0b705707..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/teams/get.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$teams = new Teams($client); - -$result = $teams->get('[TEAM_ID]'); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/teams/list.md b/app/sdks/0.7.0/server-php/docs/examples/teams/list.md deleted file mode 100644 index d17bb7689b..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/teams/list.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$teams = new Teams($client); - -$result = $teams->list(); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/teams/update.md b/app/sdks/0.7.0/server-php/docs/examples/teams/update.md deleted file mode 100644 index 945001dc36..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/teams/update.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$teams = new Teams($client); - -$result = $teams->update('[TEAM_ID]', '[NAME]'); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/users/create.md b/app/sdks/0.7.0/server-php/docs/examples/users/create.md deleted file mode 100644 index 53497b4277..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/users/create.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$users = new Users($client); - -$result = $users->create('email@example.com', 'password'); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/users/delete-session.md b/app/sdks/0.7.0/server-php/docs/examples/users/delete-session.md deleted file mode 100644 index ead6de7549..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/users/delete-session.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$users = new Users($client); - -$result = $users->deleteSession('[USER_ID]', '[SESSION_ID]'); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/users/delete-sessions.md b/app/sdks/0.7.0/server-php/docs/examples/users/delete-sessions.md deleted file mode 100644 index 968d788ea7..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/users/delete-sessions.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$users = new Users($client); - -$result = $users->deleteSessions('[USER_ID]'); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/users/get-logs.md b/app/sdks/0.7.0/server-php/docs/examples/users/get-logs.md deleted file mode 100644 index 5602536920..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/users/get-logs.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$users = new Users($client); - -$result = $users->getLogs('[USER_ID]'); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/users/get-prefs.md b/app/sdks/0.7.0/server-php/docs/examples/users/get-prefs.md deleted file mode 100644 index 1c9978a0fb..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/users/get-prefs.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$users = new Users($client); - -$result = $users->getPrefs('[USER_ID]'); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/users/get-sessions.md b/app/sdks/0.7.0/server-php/docs/examples/users/get-sessions.md deleted file mode 100644 index fef9f1db74..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/users/get-sessions.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$users = new Users($client); - -$result = $users->getSessions('[USER_ID]'); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/users/get.md b/app/sdks/0.7.0/server-php/docs/examples/users/get.md deleted file mode 100644 index 16c29f9a5a..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/users/get.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$users = new Users($client); - -$result = $users->get('[USER_ID]'); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/users/list.md b/app/sdks/0.7.0/server-php/docs/examples/users/list.md deleted file mode 100644 index efce771ea1..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/users/list.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$users = new Users($client); - -$result = $users->list(); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/users/update-prefs.md b/app/sdks/0.7.0/server-php/docs/examples/users/update-prefs.md deleted file mode 100644 index 9e9141f8a7..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/users/update-prefs.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$users = new Users($client); - -$result = $users->updatePrefs('[USER_ID]', []); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/examples/users/update-status.md b/app/sdks/0.7.0/server-php/docs/examples/users/update-status.md deleted file mode 100644 index 87f9bceb46..0000000000 --- a/app/sdks/0.7.0/server-php/docs/examples/users/update-status.md +++ /dev/null @@ -1,16 +0,0 @@ -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('5df5acd0d48c2') // Your project ID - ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key -; - -$users = new Users($client); - -$result = $users->updateStatus('[USER_ID]', '1'); \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/docs/functions.md b/app/sdks/0.7.0/server-php/docs/functions.md deleted file mode 100644 index 39e28d55b8..0000000000 --- a/app/sdks/0.7.0/server-php/docs/functions.md +++ /dev/null @@ -1,186 +0,0 @@ -# Functions Service - -## List Functions - -```http request -GET https://appwrite.io/v1/functions -``` - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| search | string | Search term to filter your list results. | | -| limit | integer | Results limit value. By default will return maximum 25 results. Maximum of 100 results allowed per request. | 25 | -| offset | integer | Results offset. The default value is 0. Use this param to manage pagination. | 0 | -| orderType | string | Order result by ASC or DESC order. | ASC | - -## Create Function - -```http request -POST https://appwrite.io/v1/functions -``` - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| name | string | Function name. | | -| vars | object | Key-value JSON object. | [] | -| events | array | Events list. | [] | -| schedule | string | Schedule CRON syntax. | | -| timeout | integer | Function maximum execution time in seconds. | 15 | - -## Get Function - -```http request -GET https://appwrite.io/v1/functions/{functionId} -``` - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| functionId | string | **Required** Function unique ID. | | - -## Update Function - -```http request -PUT https://appwrite.io/v1/functions/{functionId} -``` - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| functionId | string | **Required** Function unique ID. | | -| name | string | Function name. | | -| vars | object | Key-value JSON object. | [] | -| events | array | Events list. | [] | -| schedule | string | Schedule CRON syntax. | | -| timeout | integer | Function maximum execution time in seconds. | 15 | - -## Delete Function - -```http request -DELETE https://appwrite.io/v1/functions/{functionId} -``` - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| functionId | string | **Required** Function unique ID. | | - -## List Executions - -```http request -GET https://appwrite.io/v1/functions/{functionId}/executions -``` - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| functionId | string | **Required** Function unique ID. | | -| search | string | Search term to filter your list results. | | -| limit | integer | Results limit value. By default will return maximum 25 results. Maximum of 100 results allowed per request. | 25 | -| offset | integer | Results offset. The default value is 0. Use this param to manage pagination. | 0 | -| orderType | string | Order result by ASC or DESC order. | ASC | - -## Create Execution - -```http request -POST https://appwrite.io/v1/functions/{functionId}/executions -``` - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| functionId | string | **Required** Function unique ID. | | -| async | integer | Execute code asynchronously. Pass 1 for true, 0 for false. Default value is 1. | 1 | - -## Get Execution - -```http request -GET https://appwrite.io/v1/functions/{functionId}/executions/{executionId} -``` - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| functionId | string | **Required** Function unique ID. | | -| executionId | string | **Required** Execution unique ID. | | - -## Update Function Tag - -```http request -PATCH https://appwrite.io/v1/functions/{functionId}/tag -``` - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| functionId | string | **Required** Function unique ID. | | -| tag | string | Tag unique ID. | | - -## List Tags - -```http request -GET https://appwrite.io/v1/functions/{functionId}/tags -``` - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| functionId | string | **Required** Function unique ID. | | -| search | string | Search term to filter your list results. | | -| limit | integer | Results limit value. By default will return maximum 25 results. Maximum of 100 results allowed per request. | 25 | -| offset | integer | Results offset. The default value is 0. Use this param to manage pagination. | 0 | -| orderType | string | Order result by ASC or DESC order. | ASC | - -## Create Tag - -```http request -POST https://appwrite.io/v1/functions/{functionId}/tags -``` - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| functionId | string | **Required** Function unique ID. | | -| env | string | Execution enviornment. | | -| command | string | Code execution command. | | -| code | string | Code package. Use the Appwrite code packager to create a deployable package file. | | - -## Get Tag - -```http request -GET https://appwrite.io/v1/functions/{functionId}/tags/{tagId} -``` - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| functionId | string | **Required** Function unique ID. | | -| tagId | string | **Required** Tag unique ID. | | - -## Delete Tag - -```http request -DELETE https://appwrite.io/v1/functions/{functionId}/tags/{tagId} -``` - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| functionId | string | **Required** Function unique ID. | | -| tagId | string | **Required** Tag unique ID. | | - diff --git a/app/sdks/0.7.0/server-php/docs/health.md b/app/sdks/0.7.0/server-php/docs/health.md deleted file mode 100644 index 38b814b633..0000000000 --- a/app/sdks/0.7.0/server-php/docs/health.md +++ /dev/null @@ -1,96 +0,0 @@ -# Health Service - -## Get HTTP - -```http request -GET https://appwrite.io/v1/health -``` - -** Check the Appwrite HTTP server is up and responsive. ** - -## Get Anti virus - -```http request -GET https://appwrite.io/v1/health/anti-virus -``` - -** Check the Appwrite Anti Virus server is up and connection is successful. ** - -## Get Cache - -```http request -GET https://appwrite.io/v1/health/cache -``` - -** Check the Appwrite in-memory cache server is up and connection is successful. ** - -## Get DB - -```http request -GET https://appwrite.io/v1/health/db -``` - -** Check the Appwrite database server is up and connection is successful. ** - -## Get Certificate Queue - -```http request -GET https://appwrite.io/v1/health/queue/certificates -``` - -** Get the number of certificates that are waiting to be issued against [Letsencrypt](https://letsencrypt.org/) in the Appwrite internal queue server. ** - -## Get Functions Queue - -```http request -GET https://appwrite.io/v1/health/queue/functions -``` - -## Get Logs Queue - -```http request -GET https://appwrite.io/v1/health/queue/logs -``` - -** Get the number of logs that are waiting to be processed in the Appwrite internal queue server. ** - -## Get Tasks Queue - -```http request -GET https://appwrite.io/v1/health/queue/tasks -``` - -** Get the number of tasks that are waiting to be processed in the Appwrite internal queue server. ** - -## Get Usage Queue - -```http request -GET https://appwrite.io/v1/health/queue/usage -``` - -** Get the number of usage stats that are waiting to be processed in the Appwrite internal queue server. ** - -## Get Webhooks Queue - -```http request -GET https://appwrite.io/v1/health/queue/webhooks -``` - -** Get the number of webhooks that are waiting to be processed in the Appwrite internal queue server. ** - -## Get Local Storage - -```http request -GET https://appwrite.io/v1/health/storage/local -``` - -** Check the Appwrite local storage device is up and connection is successful. ** - -## Get Time - -```http request -GET https://appwrite.io/v1/health/time -``` - -** Check the Appwrite server time is synced with Google remote NTP server. We use this technology to smoothly handle leap seconds with no disruptive events. The [Network Time Protocol](https://en.wikipedia.org/wiki/Network_Time_Protocol) (NTP) is 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. ** - diff --git a/app/sdks/0.7.0/server-php/docs/locale.md b/app/sdks/0.7.0/server-php/docs/locale.md deleted file mode 100644 index 7e99b08829..0000000000 --- a/app/sdks/0.7.0/server-php/docs/locale.md +++ /dev/null @@ -1,52 +0,0 @@ -# Locale Service - -## Get User Locale - -```http request -GET https://appwrite.io/v1/locale -``` - -** Get the current user location based on IP. Returns an object with user country code, country name, continent name, continent code, ip address and suggested currency. You can use the locale header to get the data in a supported language. - -([IP Geolocation by DB-IP](https://db-ip.com)) ** - -## List Continents - -```http request -GET https://appwrite.io/v1/locale/continents -``` - -** List of all continents. You can use the locale header to get the data in a supported language. ** - -## List Countries - -```http request -GET https://appwrite.io/v1/locale/countries -``` - -** List of all countries. You can use the locale header to get the data in a supported language. ** - -## List EU Countries - -```http request -GET https://appwrite.io/v1/locale/countries/eu -``` - -** 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. ** - -## List Countries Phone Codes - -```http request -GET https://appwrite.io/v1/locale/countries/phones -``` - -** List of all countries phone codes. You can use the locale header to get the data in a supported language. ** - -## List Currencies - -```http request -GET https://appwrite.io/v1/locale/currencies -``` - -** List of all currencies, including currency symol, 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. ** - diff --git a/app/sdks/0.7.0/server-php/docs/storage.md b/app/sdks/0.7.0/server-php/docs/storage.md deleted file mode 100644 index 2138f901a8..0000000000 --- a/app/sdks/0.7.0/server-php/docs/storage.md +++ /dev/null @@ -1,127 +0,0 @@ -# Storage Service - -## List Files - -```http request -GET https://appwrite.io/v1/storage/files -``` - -** Get a list of all the user files. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project files. [Learn more about different API modes](/docs/admin). ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| search | string | Search term to filter your list results. | | -| limit | integer | Results limit value. By default will return maximum 25 results. Maximum of 100 results allowed per request. | 25 | -| offset | integer | Results offset. The default value is 0. Use this param to manage pagination. | 0 | -| orderType | string | Order result by ASC or DESC order. | ASC | - -## Create File - -```http request -POST https://appwrite.io/v1/storage/files -``` - -** Create a new file. The user who creates the file will automatically be assigned to read and write access unless he has passed custom values for read and write arguments. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| file | file | Binary File. | | -| read | array | An array of strings with read permissions. By default no user is granted with any read permissions. [learn more about permissions](/docs/permissions) and get a full list of available permissions. | | -| write | array | An array of strings with write permissions. By default no user is granted with any write permissions. [learn more about permissions](/docs/permissions) and get a full list of available permissions. | | - -## Get File - -```http request -GET https://appwrite.io/v1/storage/files/{fileId} -``` - -** Get file by its unique ID. This endpoint response returns a JSON object with the file metadata. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| fileId | string | **Required** File unique ID. | | - -## Update File - -```http request -PUT https://appwrite.io/v1/storage/files/{fileId} -``` - -** Update file by its unique ID. Only users with write permissions have access to update this resource. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| fileId | string | **Required** File unique ID. | | -| read | array | An array of strings with read permissions. By default no user is granted with any read permissions. [learn more about permissions](/docs/permissions) and get a full list of available permissions. | | -| write | array | An array of strings with write permissions. By default no user is granted with any write permissions. [learn more about permissions](/docs/permissions) and get a full list of available permissions. | | - -## Delete File - -```http request -DELETE https://appwrite.io/v1/storage/files/{fileId} -``` - -** Delete a file by its unique ID. Only users with write permissions have access to delete this resource. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| fileId | string | **Required** File unique ID. | | - -## Get File for Download - -```http request -GET https://appwrite.io/v1/storage/files/{fileId}/download -``` - -** Get 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. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| fileId | string | **Required** File unique ID. | | - -## Get File Preview - -```http request -GET https://appwrite.io/v1/storage/files/{fileId}/preview -``` - -** Get a file preview image. Currently, this method supports preview for image files (jpg, png, and gif), other supported formats, like pdf, docs, slides, and spreadsheets, will return the file icon image. You can also pass query string arguments for cutting and resizing your preview image. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| fileId | string | **Required** File unique ID | | -| width | integer | Resize preview image width, Pass an integer between 0 to 4000. | 0 | -| height | integer | Resize preview image height, Pass an integer between 0 to 4000. | 0 | -| quality | integer | Preview image quality. Pass an integer between 0 to 100. Defaults to 100. | 100 | -| background | string | Preview image background color. Only works with transparent images (png). Use a valid HEX color, no # is needed for prefix. | | -| output | string | Output format type (jpeg, jpg, png, gif and webp). | | - -## Get File for View - -```http request -GET https://appwrite.io/v1/storage/files/{fileId}/view -``` - -** Get file content by its unique ID. This endpoint is similar to the download method but returns with no 'Content-Disposition: attachment' header. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| fileId | string | **Required** File unique ID. | | -| as | string | Choose a file format to convert your file to. Currently you can only convert word and pdf files to pdf or txt. This option is currently experimental only, use at your own risk. | | - diff --git a/app/sdks/0.7.0/server-php/docs/teams.md b/app/sdks/0.7.0/server-php/docs/teams.md deleted file mode 100644 index 7b2646c0ce..0000000000 --- a/app/sdks/0.7.0/server-php/docs/teams.md +++ /dev/null @@ -1,128 +0,0 @@ -# Teams Service - -## List Teams - -```http request -GET https://appwrite.io/v1/teams -``` - -** Get a list of all the current user teams. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project teams. [Learn more about different API modes](/docs/admin). ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| search | string | Search term to filter your list results. | | -| limit | integer | Results limit value. By default will return maximum 25 results. Maximum of 100 results allowed per request. | 25 | -| offset | integer | Results offset. The default value is 0. Use this param to manage pagination. | 0 | -| orderType | string | Order result by ASC or DESC order. | ASC | - -## Create Team - -```http request -POST https://appwrite.io/v1/teams -``` - -** Create a new team. The user who creates the team will automatically be assigned as the owner of the team. The team owner can invite new members, who will be able add new owners and update or delete the team from your project. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| name | string | Team name. | | -| roles | array | Array of strings. Use this param to set the roles in the team for the user who created it. The default role is **owner**. A role can be any string. Learn more about [roles and permissions](/docs/permissions). | ["owner"] | - -## Get Team - -```http request -GET https://appwrite.io/v1/teams/{teamId} -``` - -** Get team by its unique ID. All team members have read access for this resource. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| teamId | string | **Required** Team unique ID. | | - -## Update Team - -```http request -PUT https://appwrite.io/v1/teams/{teamId} -``` - -** Update team by its unique ID. Only team owners have write access for this resource. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| teamId | string | **Required** Team unique ID. | | -| name | string | Team name. | | - -## Delete Team - -```http request -DELETE https://appwrite.io/v1/teams/{teamId} -``` - -** Delete team by its unique ID. Only team owners have write access for this resource. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| teamId | string | **Required** Team unique ID. | | - -## Get Team Memberships - -```http request -GET https://appwrite.io/v1/teams/{teamId}/memberships -``` - -** Get team members by the team unique ID. All team members have read access for this list of resources. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| teamId | string | **Required** Team unique ID. | | - -## Create Team Membership - -```http request -POST https://appwrite.io/v1/teams/{teamId}/memberships -``` - -** Use this endpoint to invite a new member to join your team. An email with a link to join the team will be sent to the new member email address if the member doesn't exist in the project it will be created automatically. - -Use the 'URL' parameter to redirect the user from the invitation email back to your app. When the user is redirected, use the [Update Team Membership Status](/docs/teams#updateMembershipStatus) endpoint to allow the user to accept the invitation to the team. - -Please note that in order to avoid a [Redirect Attacks](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URL's are the once from domains you have set when added your platforms in the console interface. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| teamId | string | **Required** Team unique ID. | | -| email | string | New team member email. | | -| name | string | New team member name. | | -| roles | array | Array of strings. Use this param to set the user roles in the team. A role can be any string. Learn more about [roles and permissions](/docs/permissions). | | -| url | string | URL to redirect the user back to your app from the invitation email. | | - -## Delete Team Membership - -```http request -DELETE https://appwrite.io/v1/teams/{teamId}/memberships/{inviteId} -``` - -** 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 he didn't accept it. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| teamId | string | **Required** Team unique ID. | | -| inviteId | string | **Required** Invite unique ID. | | - diff --git a/app/sdks/0.7.0/server-php/docs/users.md b/app/sdks/0.7.0/server-php/docs/users.md deleted file mode 100644 index fd884b254f..0000000000 --- a/app/sdks/0.7.0/server-php/docs/users.md +++ /dev/null @@ -1,150 +0,0 @@ -# Users Service - -## List Users - -```http request -GET https://appwrite.io/v1/users -``` - -** Get a list of all the project users. You can use the query params to filter your results. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| search | string | Search term to filter your list results. | | -| limit | integer | Results limit value. By default will return maximum 25 results. Maximum of 100 results allowed per request. | 25 | -| offset | integer | Results offset. The default value is 0. Use this param to manage pagination. | 0 | -| orderType | string | Order result by ASC or DESC order. | ASC | - -## Create User - -```http request -POST https://appwrite.io/v1/users -``` - -** Create a new user. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| email | string | User email. | | -| password | string | User password. | | -| name | string | User name. | | - -## Get User - -```http request -GET https://appwrite.io/v1/users/{userId} -``` - -** Get user by its unique ID. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| userId | string | **Required** User unique ID. | | - -## Get User Logs - -```http request -GET https://appwrite.io/v1/users/{userId}/logs -``` - -** Get user activity logs list by its unique ID. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| userId | string | **Required** User unique ID. | | - -## Get User Preferences - -```http request -GET https://appwrite.io/v1/users/{userId}/prefs -``` - -** Get user preferences by its unique ID. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| userId | string | **Required** User unique ID. | | - -## Update User Preferences - -```http request -PATCH https://appwrite.io/v1/users/{userId}/prefs -``` - -** Update user preferences by its unique ID. You can pass only the specific settings you wish to update. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| userId | string | **Required** User unique ID. | | -| prefs | object | Prefs key-value JSON object. | | - -## Get User Sessions - -```http request -GET https://appwrite.io/v1/users/{userId}/sessions -``` - -** Get user sessions list by its unique ID. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| userId | string | **Required** User unique ID. | | - -## Delete User Sessions - -```http request -DELETE https://appwrite.io/v1/users/{userId}/sessions -``` - -** Delete all user sessions by its unique ID. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| userId | string | **Required** User unique ID. | | - -## Delete User Session - -```http request -DELETE https://appwrite.io/v1/users/{userId}/sessions/{sessionId} -``` - -** Delete user sessions by its unique ID. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| userId | string | **Required** User unique ID. | | -| sessionId | string | **Required** User unique session ID. | | - -## Update User Status - -```http request -PATCH https://appwrite.io/v1/users/{userId}/status -``` - -** Update user status by its unique ID. ** - -### Parameters - -| Field Name | Type | Description | Default | -| --- | --- | --- | --- | -| userId | string | **Required** User unique ID. | | -| status | string | User Status code. To activate the user pass 1, to block the user pass 2 and for disabling the user pass 0 | | - diff --git a/app/sdks/0.7.0/server-php/src/Appwrite/Client.php b/app/sdks/0.7.0/server-php/src/Appwrite/Client.php deleted file mode 100644 index f44d0c9233..0000000000 --- a/app/sdks/0.7.0/server-php/src/Appwrite/Client.php +++ /dev/null @@ -1,240 +0,0 @@ - '', - 'x-sdk-version' => 'appwrite:php:1.1.0', - ]; - - /** - * SDK constructor. - */ - public function __construct() - { - } - - /** - * Set Project - * - * Your project ID - * - * @param string $value - * - * @return Client - */ - public function setProject($value) - { - $this->addHeader('X-Appwrite-Project', $value); - - return $this; - } - - /** - * Set Key - * - * Your secret API key - * - * @param string $value - * - * @return Client - */ - public function setKey($value) - { - $this->addHeader('X-Appwrite-Key', $value); - - return $this; - } - - /** - * Set Locale - * - * @param string $value - * - * @return Client - */ - public function setLocale($value) - { - $this->addHeader('X-Appwrite-Locale', $value); - - return $this; - } - - - /*** - * @param bool $status - * @return $this - */ - public function setSelfSigned($status = true) - { - $this->selfSigned = $status; - - return $this; - } - - /*** - * @param $endpoint - * @return $this - */ - public function setEndpoint($endpoint) - { - $this->endpoint = $endpoint; - - return $this; - } - - /** - * @param $key - * @param $value - */ - public function addHeader($key, $value) - { - $this->headers[strtolower($key)] = strtolower($value); - - return $this; - } - - /** - * Call - * - * Make an API call - * - * @param string $method - * @param string $path - * @param array $params - * @param array $headers - * @return array|string - * @throws Exception - */ - public function call($method, $path = '', $headers = array(), array $params = array()) - { - $headers = array_merge($this->headers, $headers); - $ch = curl_init($this->endpoint . $path . (($method == self::METHOD_GET && !empty($params)) ? '?' . http_build_query($params) : '')); - $responseHeaders = []; - $responseStatus = -1; - $responseType = ''; - $responseBody = ''; - - switch ($headers['content-type']) { - case 'application/json': - $query = json_encode($params); - break; - - case 'multipart/form-data': - $query = $this->flatten($params); - break; - - default: - $query = http_build_query($params); - break; - } - - foreach ($headers as $i => $header) { - $headers[] = $i . ':' . $header; - unset($headers[$i]); - } - - curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $method); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); - curl_setopt($ch, CURLOPT_USERAGENT, php_uname('s') . '-' . php_uname('r') . ':php-' . phpversion()); - curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); - curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); - curl_setopt($ch, CURLOPT_HEADERFUNCTION, function($curl, $header) use (&$responseHeaders) { - $len = strlen($header); - $header = explode(':', strtolower($header), 2); - - if (count($header) < 2) { // ignore invalid headers - return $len; - } - - $responseHeaders[strtolower(trim($header[0]))] = trim($header[1]); - - return $len; - }); - - if($method != self::METHOD_GET) { - curl_setopt($ch, CURLOPT_POSTFIELDS, $query); - } - - // Allow self signed certificates - if($this->selfSigned) { - curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); - curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); - } - - $responseBody = curl_exec($ch); - $responseType = (isset($responseHeaders['content-type'])) ? $responseHeaders['content-type'] : ''; - $responseStatus = curl_getinfo($ch, CURLINFO_HTTP_CODE); - - switch(substr($responseType, 0, strpos($responseType, ';'))) { - case 'application/json': - $responseBody = json_decode($responseBody, true); - break; - } - - if ((curl_errno($ch)/* || 200 != $responseStatus*/)) { - throw new Exception(curl_error($ch) . ' with status code ' . $responseStatus, $responseStatus); - } - - curl_close($ch); - - return $responseBody; - } - - /** - * Flatten params array to PHP multiple format - * - * @param array $data - * @param string $prefix - * @return array - */ - protected function flatten(array $data, $prefix = '') { - $output = []; - - foreach($data as $key => $value) { - $finalKey = $prefix ? "{$prefix}[{$key}]" : $key; - - if (is_array($value)) { - $output += $this->flatten($value, $finalKey); // @todo: handle name collision here if needed - } - else { - $output[$finalKey] = $value; - } - } - - return $output; - } -} diff --git a/app/sdks/0.7.0/server-php/src/Appwrite/Service.php b/app/sdks/0.7.0/server-php/src/Appwrite/Service.php deleted file mode 100644 index ea3ad92e2d..0000000000 --- a/app/sdks/0.7.0/server-php/src/Appwrite/Service.php +++ /dev/null @@ -1,19 +0,0 @@ -client = $client; - } -} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/src/Appwrite/Services/Avatars.php b/app/sdks/0.7.0/server-php/src/Appwrite/Services/Avatars.php deleted file mode 100644 index 90f39f8535..0000000000 --- a/app/sdks/0.7.0/server-php/src/Appwrite/Services/Avatars.php +++ /dev/null @@ -1,175 +0,0 @@ -client->call(Client::METHOD_GET, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Get Credit Card Icon - * - * Need to display your users with your billing method or their payment - * methods? The credit card endpoint will return you the icon of the credit - * card provider you need. Use width, height and quality arguments to change - * the output settings. - * - * @param string $code - * @param int $width - * @param int $height - * @param int $quality - * @throws Exception - * @return array - */ - public function getCreditCard(string $code, int $width = 100, int $height = 100, int $quality = 100):array - { - $path = str_replace(['{code}'], [$code], '/avatars/credit-cards/{code}'); - $params = []; - - $params['width'] = $width; - $params['height'] = $height; - $params['quality'] = $quality; - - return $this->client->call(Client::METHOD_GET, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Get Favicon - * - * Use this endpoint to fetch the favorite icon (AKA favicon) of a any remote - * website URL. - * - * @param string $url - * @throws Exception - * @return array - */ - public function getFavicon(string $url):array - { - $path = str_replace([], [], '/avatars/favicon'); - $params = []; - - $params['url'] = $url; - - return $this->client->call(Client::METHOD_GET, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Get Country Flag - * - * You can use this endpoint to show different country flags icons to your - * users. The code argument receives the 2 letter country code. Use width, - * height and quality arguments to change the output settings. - * - * @param string $code - * @param int $width - * @param int $height - * @param int $quality - * @throws Exception - * @return array - */ - public function getFlag(string $code, int $width = 100, int $height = 100, int $quality = 100):array - { - $path = str_replace(['{code}'], [$code], '/avatars/flags/{code}'); - $params = []; - - $params['width'] = $width; - $params['height'] = $height; - $params['quality'] = $quality; - - return $this->client->call(Client::METHOD_GET, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Get Image from URL - * - * Use this endpoint to fetch a remote image URL and crop it to any image size - * you want. This endpoint is very useful if you need to crop and display - * remote images in your app or in case you want to make sure a 3rd party - * image is properly served using a TLS protocol. - * - * @param string $url - * @param int $width - * @param int $height - * @throws Exception - * @return array - */ - public function getImage(string $url, int $width = 400, int $height = 400):array - { - $path = str_replace([], [], '/avatars/image'); - $params = []; - - $params['url'] = $url; - $params['width'] = $width; - $params['height'] = $height; - - return $this->client->call(Client::METHOD_GET, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * 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. - * - * @param string $text - * @param int $size - * @param int $margin - * @param int $download - * @throws Exception - * @return array - */ - public function getQR(string $text, int $size = 400, int $margin = 1, int $download = 0):array - { - $path = str_replace([], [], '/avatars/qr'); - $params = []; - - $params['text'] = $text; - $params['size'] = $size; - $params['margin'] = $margin; - $params['download'] = $download; - - return $this->client->call(Client::METHOD_GET, $path, [ - 'content-type' => 'application/json', - ], $params); - } - -} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/src/Appwrite/Services/Database.php b/app/sdks/0.7.0/server-php/src/Appwrite/Services/Database.php deleted file mode 100644 index 7ce8ac359f..0000000000 --- a/app/sdks/0.7.0/server-php/src/Appwrite/Services/Database.php +++ /dev/null @@ -1,299 +0,0 @@ -client->call(Client::METHOD_GET, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Create Collection - * - * Create a new Collection. - * - * @param string $name - * @param array $read - * @param array $write - * @param array $rules - * @throws Exception - * @return array - */ - public function createCollection(string $name, array $read, array $write, array $rules):array - { - $path = str_replace([], [], '/database/collections'); - $params = []; - - $params['name'] = $name; - $params['read'] = $read; - $params['write'] = $write; - $params['rules'] = $rules; - - return $this->client->call(Client::METHOD_POST, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Get Collection - * - * Get collection by its unique ID. This endpoint response returns a JSON - * object with the collection metadata. - * - * @param string $collectionId - * @throws Exception - * @return array - */ - public function getCollection(string $collectionId):array - { - $path = str_replace(['{collectionId}'], [$collectionId], '/database/collections/{collectionId}'); - $params = []; - - - return $this->client->call(Client::METHOD_GET, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Update Collection - * - * Update collection by its unique ID. - * - * @param string $collectionId - * @param string $name - * @param array $read - * @param array $write - * @param array $rules - * @throws Exception - * @return array - */ - public function updateCollection(string $collectionId, string $name, array $read, array $write, array $rules = []):array - { - $path = str_replace(['{collectionId}'], [$collectionId], '/database/collections/{collectionId}'); - $params = []; - - $params['name'] = $name; - $params['read'] = $read; - $params['write'] = $write; - $params['rules'] = $rules; - - return $this->client->call(Client::METHOD_PUT, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Delete Collection - * - * Delete a collection by its unique ID. Only users with write permissions - * have access to delete this resource. - * - * @param string $collectionId - * @throws Exception - * @return array - */ - public function deleteCollection(string $collectionId):array - { - $path = str_replace(['{collectionId}'], [$collectionId], '/database/collections/{collectionId}'); - $params = []; - - - return $this->client->call(Client::METHOD_DELETE, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * List Documents - * - * Get a list of all the user documents. You can use the query params to - * filter your results. On admin mode, this endpoint will return a list of all - * of the project documents. [Learn more about different API - * modes](/docs/admin). - * - * @param string $collectionId - * @param array $filters - * @param int $offset - * @param int $limit - * @param string $orderField - * @param string $orderType - * @param string $orderCast - * @param string $search - * @param int $first - * @param int $last - * @throws Exception - * @return array - */ - public function listDocuments(string $collectionId, array $filters = [], int $offset = 0, int $limit = 50, string $orderField = '$id', string $orderType = 'ASC', string $orderCast = 'string', string $search = '', int $first = 0, int $last = 0):array - { - $path = str_replace(['{collectionId}'], [$collectionId], '/database/collections/{collectionId}/documents'); - $params = []; - - $params['filters'] = $filters; - $params['offset'] = $offset; - $params['limit'] = $limit; - $params['orderField'] = $orderField; - $params['orderType'] = $orderType; - $params['orderCast'] = $orderCast; - $params['search'] = $search; - $params['first'] = $first; - $params['last'] = $last; - - return $this->client->call(Client::METHOD_GET, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Create Document - * - * Create a new Document. - * - * @param string $collectionId - * @param array $data - * @param array $read - * @param array $write - * @param string $parentDocument - * @param string $parentProperty - * @param string $parentPropertyType - * @throws Exception - * @return array - */ - public function createDocument(string $collectionId, array $data, array $read, array $write, string $parentDocument = '', string $parentProperty = '', string $parentPropertyType = 'assign'):array - { - $path = str_replace(['{collectionId}'], [$collectionId], '/database/collections/{collectionId}/documents'); - $params = []; - - $params['data'] = $data; - $params['read'] = $read; - $params['write'] = $write; - $params['parentDocument'] = $parentDocument; - $params['parentProperty'] = $parentProperty; - $params['parentPropertyType'] = $parentPropertyType; - - return $this->client->call(Client::METHOD_POST, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Get Document - * - * Get document by its unique ID. This endpoint response returns a JSON object - * with the document data. - * - * @param string $collectionId - * @param string $documentId - * @throws Exception - * @return array - */ - public function getDocument(string $collectionId, string $documentId):array - { - $path = str_replace(['{collectionId}', '{documentId}'], [$collectionId, $documentId], '/database/collections/{collectionId}/documents/{documentId}'); - $params = []; - - - return $this->client->call(Client::METHOD_GET, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Update Document - * - * @param string $collectionId - * @param string $documentId - * @param array $data - * @param array $read - * @param array $write - * @throws Exception - * @return array - */ - public function updateDocument(string $collectionId, string $documentId, array $data, array $read, array $write):array - { - $path = str_replace(['{collectionId}', '{documentId}'], [$collectionId, $documentId], '/database/collections/{collectionId}/documents/{documentId}'); - $params = []; - - $params['data'] = $data; - $params['read'] = $read; - $params['write'] = $write; - - return $this->client->call(Client::METHOD_PATCH, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Delete Document - * - * Delete document by its unique ID. This endpoint deletes only the parent - * documents, his attributes and relations to other documents. Child documents - * **will not** be deleted. - * - * @param string $collectionId - * @param string $documentId - * @throws Exception - * @return array - */ - public function deleteDocument(string $collectionId, string $documentId):array - { - $path = str_replace(['{collectionId}', '{documentId}'], [$collectionId, $documentId], '/database/collections/{collectionId}/documents/{documentId}'); - $params = []; - - - return $this->client->call(Client::METHOD_DELETE, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Get Collection Logs - * - * @param string $collectionId - * @throws Exception - * @return array - */ - public function getCollectionLogs(string $collectionId):array - { - $path = str_replace(['{collectionId}'], [$collectionId], '/database/collections/{collectionId}/logs'); - $params = []; - - - return $this->client->call(Client::METHOD_GET, $path, [ - 'content-type' => 'application/json', - ], $params); - } - -} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/src/Appwrite/Services/Functions.php b/app/sdks/0.7.0/server-php/src/Appwrite/Services/Functions.php deleted file mode 100644 index 1771652072..0000000000 --- a/app/sdks/0.7.0/server-php/src/Appwrite/Services/Functions.php +++ /dev/null @@ -1,300 +0,0 @@ -client->call(Client::METHOD_GET, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Create Function - * - * @param string $name - * @param array $vars - * @param array $events - * @param string $schedule - * @param int $timeout - * @throws Exception - * @return array - */ - public function create(string $name, array $vars = , array $events = [], string $schedule = '', int $timeout = 15):array - { - $path = str_replace([], [], '/functions'); - $params = []; - - $params['name'] = $name; - $params['vars'] = $vars; - $params['events'] = $events; - $params['schedule'] = $schedule; - $params['timeout'] = $timeout; - - return $this->client->call(Client::METHOD_POST, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Get Function - * - * @param string $functionId - * @throws Exception - * @return array - */ - public function get(string $functionId):array - { - $path = str_replace(['{functionId}'], [$functionId], '/functions/{functionId}'); - $params = []; - - - return $this->client->call(Client::METHOD_GET, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Update Function - * - * @param string $functionId - * @param string $name - * @param array $vars - * @param array $events - * @param string $schedule - * @param int $timeout - * @throws Exception - * @return array - */ - public function update(string $functionId, string $name, array $vars = , array $events = [], string $schedule = '', int $timeout = 15):array - { - $path = str_replace(['{functionId}'], [$functionId], '/functions/{functionId}'); - $params = []; - - $params['name'] = $name; - $params['vars'] = $vars; - $params['events'] = $events; - $params['schedule'] = $schedule; - $params['timeout'] = $timeout; - - return $this->client->call(Client::METHOD_PUT, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Delete Function - * - * @param string $functionId - * @throws Exception - * @return array - */ - public function delete(string $functionId):array - { - $path = str_replace(['{functionId}'], [$functionId], '/functions/{functionId}'); - $params = []; - - - return $this->client->call(Client::METHOD_DELETE, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * List Executions - * - * @param string $functionId - * @param string $search - * @param int $limit - * @param int $offset - * @param string $orderType - * @throws Exception - * @return array - */ - public function listExecutions(string $functionId, string $search = '', int $limit = 25, int $offset = 0, string $orderType = 'ASC'):array - { - $path = str_replace(['{functionId}'], [$functionId], '/functions/{functionId}/executions'); - $params = []; - - $params['search'] = $search; - $params['limit'] = $limit; - $params['offset'] = $offset; - $params['orderType'] = $orderType; - - return $this->client->call(Client::METHOD_GET, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Create Execution - * - * @param string $functionId - * @param int $async - * @throws Exception - * @return array - */ - public function createExecution(string $functionId, int $async = 1):array - { - $path = str_replace(['{functionId}'], [$functionId], '/functions/{functionId}/executions'); - $params = []; - - $params['async'] = $async; - - return $this->client->call(Client::METHOD_POST, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Get Execution - * - * @param string $functionId - * @param string $executionId - * @throws Exception - * @return array - */ - public function getExecution(string $functionId, string $executionId):array - { - $path = str_replace(['{functionId}', '{executionId}'], [$functionId, $executionId], '/functions/{functionId}/executions/{executionId}'); - $params = []; - - - return $this->client->call(Client::METHOD_GET, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Update Function Tag - * - * @param string $functionId - * @param string $tag - * @throws Exception - * @return array - */ - public function updateTag(string $functionId, string $tag):array - { - $path = str_replace(['{functionId}'], [$functionId], '/functions/{functionId}/tag'); - $params = []; - - $params['tag'] = $tag; - - return $this->client->call(Client::METHOD_PATCH, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * List Tags - * - * @param string $functionId - * @param string $search - * @param int $limit - * @param int $offset - * @param string $orderType - * @throws Exception - * @return array - */ - public function listTags(string $functionId, string $search = '', int $limit = 25, int $offset = 0, string $orderType = 'ASC'):array - { - $path = str_replace(['{functionId}'], [$functionId], '/functions/{functionId}/tags'); - $params = []; - - $params['search'] = $search; - $params['limit'] = $limit; - $params['offset'] = $offset; - $params['orderType'] = $orderType; - - return $this->client->call(Client::METHOD_GET, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Create Tag - * - * @param string $functionId - * @param string $env - * @param string $command - * @param string $code - * @throws Exception - * @return array - */ - public function createTag(string $functionId, string $env, string $command, string $code):array - { - $path = str_replace(['{functionId}'], [$functionId], '/functions/{functionId}/tags'); - $params = []; - - $params['env'] = $env; - $params['command'] = $command; - $params['code'] = $code; - - return $this->client->call(Client::METHOD_POST, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Get Tag - * - * @param string $functionId - * @param string $tagId - * @throws Exception - * @return array - */ - public function getTag(string $functionId, string $tagId):array - { - $path = str_replace(['{functionId}', '{tagId}'], [$functionId, $tagId], '/functions/{functionId}/tags/{tagId}'); - $params = []; - - - return $this->client->call(Client::METHOD_GET, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Delete Tag - * - * @param string $functionId - * @param string $tagId - * @throws Exception - * @return array - */ - public function deleteTag(string $functionId, string $tagId):array - { - $path = str_replace(['{functionId}', '{tagId}'], [$functionId, $tagId], '/functions/{functionId}/tags/{tagId}'); - $params = []; - - - return $this->client->call(Client::METHOD_DELETE, $path, [ - 'content-type' => 'application/json', - ], $params); - } - -} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/src/Appwrite/Services/Health.php b/app/sdks/0.7.0/server-php/src/Appwrite/Services/Health.php deleted file mode 100644 index d39f1f406d..0000000000 --- a/app/sdks/0.7.0/server-php/src/Appwrite/Services/Health.php +++ /dev/null @@ -1,250 +0,0 @@ -client->call(Client::METHOD_GET, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Get Anti virus - * - * Check the Appwrite Anti Virus server is up and connection is successful. - * - * @throws Exception - * @return array - */ - public function getAntiVirus():array - { - $path = str_replace([], [], '/health/anti-virus'); - $params = []; - - - return $this->client->call(Client::METHOD_GET, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Get Cache - * - * Check the Appwrite in-memory cache server is up and connection is - * successful. - * - * @throws Exception - * @return array - */ - public function getCache():array - { - $path = str_replace([], [], '/health/cache'); - $params = []; - - - return $this->client->call(Client::METHOD_GET, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Get DB - * - * Check the Appwrite database server is up and connection is successful. - * - * @throws Exception - * @return array - */ - public function getDB():array - { - $path = str_replace([], [], '/health/db'); - $params = []; - - - return $this->client->call(Client::METHOD_GET, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Get Certificate Queue - * - * Get the number of certificates that are waiting to be issued against - * [Letsencrypt](https://letsencrypt.org/) in the Appwrite internal queue - * server. - * - * @throws Exception - * @return array - */ - public function getQueueCertificates():array - { - $path = str_replace([], [], '/health/queue/certificates'); - $params = []; - - - return $this->client->call(Client::METHOD_GET, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Get Functions Queue - * - * @throws Exception - * @return array - */ - public function getQueueFunctions():array - { - $path = str_replace([], [], '/health/queue/functions'); - $params = []; - - - return $this->client->call(Client::METHOD_GET, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Get Logs Queue - * - * Get the number of logs that are waiting to be processed in the Appwrite - * internal queue server. - * - * @throws Exception - * @return array - */ - public function getQueueLogs():array - { - $path = str_replace([], [], '/health/queue/logs'); - $params = []; - - - return $this->client->call(Client::METHOD_GET, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Get Tasks Queue - * - * Get the number of tasks that are waiting to be processed in the Appwrite - * internal queue server. - * - * @throws Exception - * @return array - */ - public function getQueueTasks():array - { - $path = str_replace([], [], '/health/queue/tasks'); - $params = []; - - - return $this->client->call(Client::METHOD_GET, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Get Usage Queue - * - * Get the number of usage stats that are waiting to be processed in the - * Appwrite internal queue server. - * - * @throws Exception - * @return array - */ - public function getQueueUsage():array - { - $path = str_replace([], [], '/health/queue/usage'); - $params = []; - - - return $this->client->call(Client::METHOD_GET, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Get Webhooks Queue - * - * Get the number of webhooks that are waiting to be processed in the Appwrite - * internal queue server. - * - * @throws Exception - * @return array - */ - public function getQueueWebhooks():array - { - $path = str_replace([], [], '/health/queue/webhooks'); - $params = []; - - - return $this->client->call(Client::METHOD_GET, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Get Local Storage - * - * Check the Appwrite local storage device is up and connection is successful. - * - * @throws Exception - * @return array - */ - public function getStorageLocal():array - { - $path = str_replace([], [], '/health/storage/local'); - $params = []; - - - return $this->client->call(Client::METHOD_GET, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Get Time - * - * Check the Appwrite server time is synced with Google remote NTP server. We - * use this technology to smoothly handle leap seconds with no disruptive - * events. The [Network Time - * Protocol](https://en.wikipedia.org/wiki/Network_Time_Protocol) (NTP) is - * 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. - * - * @throws Exception - * @return array - */ - public function getTime():array - { - $path = str_replace([], [], '/health/time'); - $params = []; - - - return $this->client->call(Client::METHOD_GET, $path, [ - 'content-type' => 'application/json', - ], $params); - } - -} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/src/Appwrite/Services/Locale.php b/app/sdks/0.7.0/server-php/src/Appwrite/Services/Locale.php deleted file mode 100644 index 25255c81a0..0000000000 --- a/app/sdks/0.7.0/server-php/src/Appwrite/Services/Locale.php +++ /dev/null @@ -1,136 +0,0 @@ -client->call(Client::METHOD_GET, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * List Continents - * - * List of all continents. You can use the locale header to get the data in a - * supported language. - * - * @throws Exception - * @return array - */ - public function getContinents():array - { - $path = str_replace([], [], '/locale/continents'); - $params = []; - - - return $this->client->call(Client::METHOD_GET, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * List Countries - * - * List of all countries. You can use the locale header to get the data in a - * supported language. - * - * @throws Exception - * @return array - */ - public function getCountries():array - { - $path = str_replace([], [], '/locale/countries'); - $params = []; - - - return $this->client->call(Client::METHOD_GET, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * 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. - * - * @throws Exception - * @return array - */ - public function getCountriesEU():array - { - $path = str_replace([], [], '/locale/countries/eu'); - $params = []; - - - return $this->client->call(Client::METHOD_GET, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * List Countries Phone Codes - * - * List of all countries phone codes. You can use the locale header to get the - * data in a supported language. - * - * @throws Exception - * @return array - */ - public function getCountriesPhones():array - { - $path = str_replace([], [], '/locale/countries/phones'); - $params = []; - - - return $this->client->call(Client::METHOD_GET, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * List Currencies - * - * List of all currencies, including currency symol, 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. - * - * @throws Exception - * @return array - */ - public function getCurrencies():array - { - $path = str_replace([], [], '/locale/currencies'); - $params = []; - - - return $this->client->call(Client::METHOD_GET, $path, [ - 'content-type' => 'application/json', - ], $params); - } - -} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/src/Appwrite/Services/Storage.php b/app/sdks/0.7.0/server-php/src/Appwrite/Services/Storage.php deleted file mode 100644 index 09b74fbf8f..0000000000 --- a/app/sdks/0.7.0/server-php/src/Appwrite/Services/Storage.php +++ /dev/null @@ -1,212 +0,0 @@ -client->call(Client::METHOD_GET, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Create File - * - * Create a new file. The user who creates the file will automatically be - * assigned to read and write access unless he has passed custom values for - * read and write arguments. - * - * @param \CurlFile $file - * @param array $read - * @param array $write - * @throws Exception - * @return array - */ - public function createFile(\CurlFile $file, array $read, array $write):array - { - $path = str_replace([], [], '/storage/files'); - $params = []; - - $params['file'] = $file; - $params['read'] = $read; - $params['write'] = $write; - - return $this->client->call(Client::METHOD_POST, $path, [ - 'content-type' => 'multipart/form-data', - ], $params); - } - - /** - * Get File - * - * Get file by its unique ID. This endpoint response returns a JSON object - * with the file metadata. - * - * @param string $fileId - * @throws Exception - * @return array - */ - public function getFile(string $fileId):array - { - $path = str_replace(['{fileId}'], [$fileId], '/storage/files/{fileId}'); - $params = []; - - - return $this->client->call(Client::METHOD_GET, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Update File - * - * Update file by its unique ID. Only users with write permissions have access - * to update this resource. - * - * @param string $fileId - * @param array $read - * @param array $write - * @throws Exception - * @return array - */ - public function updateFile(string $fileId, array $read, array $write):array - { - $path = str_replace(['{fileId}'], [$fileId], '/storage/files/{fileId}'); - $params = []; - - $params['read'] = $read; - $params['write'] = $write; - - return $this->client->call(Client::METHOD_PUT, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Delete File - * - * Delete a file by its unique ID. Only users with write permissions have - * access to delete this resource. - * - * @param string $fileId - * @throws Exception - * @return array - */ - public function deleteFile(string $fileId):array - { - $path = str_replace(['{fileId}'], [$fileId], '/storage/files/{fileId}'); - $params = []; - - - return $this->client->call(Client::METHOD_DELETE, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Get File for Download - * - * Get 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. - * - * @param string $fileId - * @throws Exception - * @return array - */ - public function getFileDownload(string $fileId):array - { - $path = str_replace(['{fileId}'], [$fileId], '/storage/files/{fileId}/download'); - $params = []; - - - return $this->client->call(Client::METHOD_GET, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Get File Preview - * - * Get a file preview image. Currently, this method supports preview for image - * files (jpg, png, and gif), other supported formats, like pdf, docs, slides, - * and spreadsheets, will return the file icon image. You can also pass query - * string arguments for cutting and resizing your preview image. - * - * @param string $fileId - * @param int $width - * @param int $height - * @param int $quality - * @param string $background - * @param string $output - * @throws Exception - * @return array - */ - public function getFilePreview(string $fileId, int $width = 0, int $height = 0, int $quality = 100, string $background = '', string $output = ''):array - { - $path = str_replace(['{fileId}'], [$fileId], '/storage/files/{fileId}/preview'); - $params = []; - - $params['width'] = $width; - $params['height'] = $height; - $params['quality'] = $quality; - $params['background'] = $background; - $params['output'] = $output; - - return $this->client->call(Client::METHOD_GET, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Get File for View - * - * Get file content by its unique ID. This endpoint is similar to the download - * method but returns with no 'Content-Disposition: attachment' header. - * - * @param string $fileId - * @param string $as - * @throws Exception - * @return array - */ - public function getFileView(string $fileId, string $as = ''):array - { - $path = str_replace(['{fileId}'], [$fileId], '/storage/files/{fileId}/view'); - $params = []; - - $params['as'] = $as; - - return $this->client->call(Client::METHOD_GET, $path, [ - 'content-type' => 'application/json', - ], $params); - } - -} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/src/Appwrite/Services/Teams.php b/app/sdks/0.7.0/server-php/src/Appwrite/Services/Teams.php deleted file mode 100644 index 7ef2240ab7..0000000000 --- a/app/sdks/0.7.0/server-php/src/Appwrite/Services/Teams.php +++ /dev/null @@ -1,215 +0,0 @@ -client->call(Client::METHOD_GET, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Create Team - * - * Create a new team. The user who creates the team will automatically be - * assigned as the owner of the team. The team owner can invite new members, - * who will be able add new owners and update or delete the team from your - * project. - * - * @param string $name - * @param array $roles - * @throws Exception - * @return array - */ - public function create(string $name, array $roles = ["owner"]):array - { - $path = str_replace([], [], '/teams'); - $params = []; - - $params['name'] = $name; - $params['roles'] = $roles; - - return $this->client->call(Client::METHOD_POST, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Get Team - * - * Get team by its unique ID. All team members have read access for this - * resource. - * - * @param string $teamId - * @throws Exception - * @return array - */ - public function get(string $teamId):array - { - $path = str_replace(['{teamId}'], [$teamId], '/teams/{teamId}'); - $params = []; - - - return $this->client->call(Client::METHOD_GET, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Update Team - * - * Update team by its unique ID. Only team owners have write access for this - * resource. - * - * @param string $teamId - * @param string $name - * @throws Exception - * @return array - */ - public function update(string $teamId, string $name):array - { - $path = str_replace(['{teamId}'], [$teamId], '/teams/{teamId}'); - $params = []; - - $params['name'] = $name; - - return $this->client->call(Client::METHOD_PUT, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Delete Team - * - * Delete team by its unique ID. Only team owners have write access for this - * resource. - * - * @param string $teamId - * @throws Exception - * @return array - */ - public function delete(string $teamId):array - { - $path = str_replace(['{teamId}'], [$teamId], '/teams/{teamId}'); - $params = []; - - - return $this->client->call(Client::METHOD_DELETE, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Get Team Memberships - * - * Get team members by the team unique ID. All team members have read access - * for this list of resources. - * - * @param string $teamId - * @throws Exception - * @return array - */ - public function getMemberships(string $teamId):array - { - $path = str_replace(['{teamId}'], [$teamId], '/teams/{teamId}/memberships'); - $params = []; - - - return $this->client->call(Client::METHOD_GET, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Create Team Membership - * - * Use this endpoint to invite a new member to join your team. An email with a - * link to join the team will be sent to the new member email address if the - * member doesn't exist in the project it will be created automatically. - * - * Use the 'URL' parameter to redirect the user from the invitation email back - * to your app. When the user is redirected, use the [Update Team Membership - * Status](/docs/teams#updateMembershipStatus) endpoint to allow the user to - * accept the invitation to the team. - * - * Please note that in order to avoid a [Redirect - * Attacks](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) - * the only valid redirect URL's are the once from domains you have set when - * added your platforms in the console interface. - * - * @param string $teamId - * @param string $email - * @param array $roles - * @param string $url - * @param string $name - * @throws Exception - * @return array - */ - public function createMembership(string $teamId, string $email, array $roles, string $url, string $name = ''):array - { - $path = str_replace(['{teamId}'], [$teamId], '/teams/{teamId}/memberships'); - $params = []; - - $params['email'] = $email; - $params['name'] = $name; - $params['roles'] = $roles; - $params['url'] = $url; - - return $this->client->call(Client::METHOD_POST, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * 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 he didn't accept it. - * - * @param string $teamId - * @param string $inviteId - * @throws Exception - * @return array - */ - public function deleteMembership(string $teamId, string $inviteId):array - { - $path = str_replace(['{teamId}', '{inviteId}'], [$teamId, $inviteId], '/teams/{teamId}/memberships/{inviteId}'); - $params = []; - - - return $this->client->call(Client::METHOD_DELETE, $path, [ - 'content-type' => 'application/json', - ], $params); - } - -} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-php/src/Appwrite/Services/Users.php b/app/sdks/0.7.0/server-php/src/Appwrite/Services/Users.php deleted file mode 100644 index b2b4f576cc..0000000000 --- a/app/sdks/0.7.0/server-php/src/Appwrite/Services/Users.php +++ /dev/null @@ -1,230 +0,0 @@ -client->call(Client::METHOD_GET, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Create User - * - * Create a new user. - * - * @param string $email - * @param string $password - * @param string $name - * @throws Exception - * @return array - */ - public function create(string $email, string $password, string $name = ''):array - { - $path = str_replace([], [], '/users'); - $params = []; - - $params['email'] = $email; - $params['password'] = $password; - $params['name'] = $name; - - return $this->client->call(Client::METHOD_POST, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Get User - * - * Get user by its unique ID. - * - * @param string $userId - * @throws Exception - * @return array - */ - public function get(string $userId):array - { - $path = str_replace(['{userId}'], [$userId], '/users/{userId}'); - $params = []; - - - return $this->client->call(Client::METHOD_GET, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Get User Logs - * - * Get user activity logs list by its unique ID. - * - * @param string $userId - * @throws Exception - * @return array - */ - public function getLogs(string $userId):array - { - $path = str_replace(['{userId}'], [$userId], '/users/{userId}/logs'); - $params = []; - - - return $this->client->call(Client::METHOD_GET, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Get User Preferences - * - * Get user preferences by its unique ID. - * - * @param string $userId - * @throws Exception - * @return array - */ - public function getPrefs(string $userId):array - { - $path = str_replace(['{userId}'], [$userId], '/users/{userId}/prefs'); - $params = []; - - - return $this->client->call(Client::METHOD_GET, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Update User Preferences - * - * Update user preferences by its unique ID. You can pass only the specific - * settings you wish to update. - * - * @param string $userId - * @param array $prefs - * @throws Exception - * @return array - */ - public function updatePrefs(string $userId, array $prefs):array - { - $path = str_replace(['{userId}'], [$userId], '/users/{userId}/prefs'); - $params = []; - - $params['prefs'] = $prefs; - - return $this->client->call(Client::METHOD_PATCH, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Get User Sessions - * - * Get user sessions list by its unique ID. - * - * @param string $userId - * @throws Exception - * @return array - */ - public function getSessions(string $userId):array - { - $path = str_replace(['{userId}'], [$userId], '/users/{userId}/sessions'); - $params = []; - - - return $this->client->call(Client::METHOD_GET, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Delete User Sessions - * - * Delete all user sessions by its unique ID. - * - * @param string $userId - * @throws Exception - * @return array - */ - public function deleteSessions(string $userId):array - { - $path = str_replace(['{userId}'], [$userId], '/users/{userId}/sessions'); - $params = []; - - - return $this->client->call(Client::METHOD_DELETE, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Delete User Session - * - * Delete user sessions by its unique ID. - * - * @param string $userId - * @param string $sessionId - * @throws Exception - * @return array - */ - public function deleteSession(string $userId, string $sessionId):array - { - $path = str_replace(['{userId}', '{sessionId}'], [$userId, $sessionId], '/users/{userId}/sessions/{sessionId}'); - $params = []; - - - return $this->client->call(Client::METHOD_DELETE, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Update User Status - * - * Update user status by its unique ID. - * - * @param string $userId - * @param string $status - * @throws Exception - * @return array - */ - public function updateStatus(string $userId, string $status):array - { - $path = str_replace(['{userId}'], [$userId], '/users/{userId}/status'); - $params = []; - - $params['status'] = $status; - - return $this->client->call(Client::METHOD_PATCH, $path, [ - 'content-type' => 'application/json', - ], $params); - } - -} \ No newline at end of file diff --git a/app/sdks/0.7.0/server-python/CHANGELOG.md b/app/sdks/0.7.0/server-python/CHANGELOG.md deleted file mode 100644 index fa4d35e687..0000000000 --- a/app/sdks/0.7.0/server-python/CHANGELOG.md +++ /dev/null @@ -1 +0,0 @@ -# Change Log \ No newline at end of file diff --git a/app/sdks/0.7.0/server-python/LICENSE b/app/sdks/0.7.0/server-python/LICENSE deleted file mode 100644 index fc7c051a91..0000000000 --- a/app/sdks/0.7.0/server-python/LICENSE +++ /dev/null @@ -1,12 +0,0 @@ -Copyright (c) 2019 Appwrite (https://appwrite.io) and individual contributors. -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - - 3. Neither the name Appwrite nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/app/sdks/0.7.0/server-python/README.md b/app/sdks/0.7.0/server-python/README.md deleted file mode 100644 index 04421ff241..0000000000 --- a/app/sdks/0.7.0/server-python/README.md +++ /dev/null @@ -1,30 +0,0 @@ -# Appwrite Python SDK - -![License](https://img.shields.io/github/license/appwrite/sdk-for-python.svg?v=1) -![Version](https://img.shields.io/badge/api%20version-0.6.2-blue.svg?v=1) - -**This SDK is compatible with Appwrite server version 0.6.2. For older versions, please check previous releases.** - -Appwrite is an open-source backend as a service server that abstract and simplify complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way. - Use the Python SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools. - For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs) - - - -![Appwrite](https://appwrite.io/images/github.png) - -## Installation - -To install via [PyPI](https://pypi.org/): - -```bash -pip install appwrite -``` - -## Contribution - -This library is auto-generated by Appwrite custom [SDK Generator](https://github.com/appwrite/sdk-generator). To learn more about how you can help us improve this SDK, please check the [contribution guide](https://github.com/appwrite/sdk-generator/blob/master/CONTRIBUTING.md) before sending a pull-request. - -## License - -Please see the [BSD-3-Clause license](https://raw.githubusercontent.com/appwrite/appwrite/master/LICENSE) file for more information. diff --git a/app/sdks/0.7.0/server-python/appwrite/__init__.py b/app/sdks/0.7.0/server-python/appwrite/__init__.py deleted file mode 100644 index 0519ecba6e..0000000000 --- a/app/sdks/0.7.0/server-python/appwrite/__init__.py +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/app/sdks/0.7.0/server-python/appwrite/client.py b/app/sdks/0.7.0/server-python/appwrite/client.py deleted file mode 100644 index 8989fccb9c..0000000000 --- a/app/sdks/0.7.0/server-python/appwrite/client.py +++ /dev/null @@ -1,106 +0,0 @@ -import io -import requests - -class Client: - def __init__(self): - self._self_signed = False - self._endpoint = 'https://appwrite.io/v1' - self._global_headers = { - 'content-type': '', - 'x-sdk-version': 'appwrite:python:0.0.6', - } - - def set_self_signed(self, status=True): - self._self_signed = status - return self - - def set_endpoint(self, endpoint): - self._endpoint = endpoint - return self - - def add_header(self, key, value): - self._global_headers[key.lower()] = value.lower() - return self - - def set_project(self, value): - """Your project ID""" - - self._global_headers['x-appwrite-project'] = value.lower() - return self - - def set_key(self, value): - """Your secret API key""" - - self._global_headers['x-appwrite-key'] = value.lower() - return self - - def set_locale(self, value): - self._global_headers['x-appwrite-locale'] = value.lower() - return self - - def call(self, method, path='', headers=None, params=None): - if headers is None: - headers = {} - - if params is None: - params = {} - - data = {} - json = {} - files = {} - - headers = {**self._global_headers, **headers} - - if method != 'get': - data = params - params = {} - - if headers['content-type'].startswith('application/json'): - json = data - data = {} - - if headers['content-type'].startswith('multipart/form-data'): - del headers['content-type'] - - for key in data.copy(): - if isinstance(data[key], io.BufferedIOBase): - files[key] = data[key] - del data[key] - - response = requests.request( # call method dynamically https://stackoverflow.com/a/4246075/2299554 - method=method, - url=self._endpoint + path, - params=self.flatten(params), - data=self.flatten(data), - json=json, - files=files, - headers=headers, - verify=self._self_signed, - ) - - response.raise_for_status() - - content_type = response.headers['Content-Type'] - - if content_type.startswith('application/json'): - return response.json() - - return response._content - - def flatten(self, data, prefix=''): - output = {} - i = 0 - - for key in data: - value = data[key] if isinstance(data, dict) else key - finalKey = prefix + '[' + key +']' if prefix else key - finalKey = prefix + '[' + str(i) +']' if isinstance(data, list) else finalKey - i += 1 - - if isinstance(value, list) or isinstance(value, dict): - output = {**output, **self.flatten(value, finalKey)} - else: - output[finalKey] = value - - return output - diff --git a/app/sdks/0.7.0/server-python/appwrite/service.py b/app/sdks/0.7.0/server-python/appwrite/service.py deleted file mode 100644 index b5b60e6c22..0000000000 --- a/app/sdks/0.7.0/server-python/appwrite/service.py +++ /dev/null @@ -1,6 +0,0 @@ -from .client import Client - - -class Service: - def __init__(self, client: Client): - self.client = client diff --git a/app/sdks/0.7.0/server-python/appwrite/services/__init__.py b/app/sdks/0.7.0/server-python/appwrite/services/__init__.py deleted file mode 100644 index 0519ecba6e..0000000000 --- a/app/sdks/0.7.0/server-python/appwrite/services/__init__.py +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/app/sdks/0.7.0/server-python/appwrite/services/avatars.py b/app/sdks/0.7.0/server-python/appwrite/services/avatars.py deleted file mode 100644 index 4a2a4024a6..0000000000 --- a/app/sdks/0.7.0/server-python/appwrite/services/avatars.py +++ /dev/null @@ -1,87 +0,0 @@ -from ..service import Service - - -class Avatars(Service): - - def __init__(self, client): - super(Avatars, self).__init__(client) - - def get_browser(self, code, width=100, height=100, quality=100): - """Get Browser Icon""" - - params = {} - path = '/avatars/browsers/{code}' - path = path.replace('{code}', code) - params['width'] = width - params['height'] = height - params['quality'] = quality - - return self.client.call('get', path, { - 'content-type': 'application/json', - }, params) - - def get_credit_card(self, code, width=100, height=100, quality=100): - """Get Credit Card Icon""" - - params = {} - path = '/avatars/credit-cards/{code}' - path = path.replace('{code}', code) - params['width'] = width - params['height'] = height - params['quality'] = quality - - return self.client.call('get', path, { - 'content-type': 'application/json', - }, params) - - def get_favicon(self, url): - """Get Favicon""" - - params = {} - path = '/avatars/favicon' - params['url'] = url - - return self.client.call('get', path, { - 'content-type': 'application/json', - }, params) - - def get_flag(self, code, width=100, height=100, quality=100): - """Get Country Flag""" - - params = {} - path = '/avatars/flags/{code}' - path = path.replace('{code}', code) - params['width'] = width - params['height'] = height - params['quality'] = quality - - return self.client.call('get', path, { - 'content-type': 'application/json', - }, params) - - def get_image(self, url, width=400, height=400): - """Get Image from URL""" - - params = {} - path = '/avatars/image' - params['url'] = url - params['width'] = width - params['height'] = height - - return self.client.call('get', path, { - 'content-type': 'application/json', - }, params) - - def get_q_r(self, text, size=400, margin=1, download=0): - """Get QR Code""" - - params = {} - path = '/avatars/qr' - params['text'] = text - params['size'] = size - params['margin'] = margin - params['download'] = download - - return self.client.call('get', path, { - 'content-type': 'application/json', - }, params) diff --git a/app/sdks/0.7.0/server-python/appwrite/services/database.py b/app/sdks/0.7.0/server-python/appwrite/services/database.py deleted file mode 100644 index 2549e689d5..0000000000 --- a/app/sdks/0.7.0/server-python/appwrite/services/database.py +++ /dev/null @@ -1,159 +0,0 @@ -from ..service import Service - - -class Database(Service): - - def __init__(self, client): - super(Database, self).__init__(client) - - def list_collections(self, search='', limit=25, offset=0, order_type='ASC'): - """List Collections""" - - params = {} - path = '/database/collections' - params['search'] = search - params['limit'] = limit - params['offset'] = offset - params['orderType'] = order_type - - return self.client.call('get', path, { - 'content-type': 'application/json', - }, params) - - def create_collection(self, name, read, write, rules): - """Create Collection""" - - params = {} - path = '/database/collections' - params['name'] = name - params['read'] = read - params['write'] = write - params['rules'] = rules - - return self.client.call('post', path, { - 'content-type': 'application/json', - }, params) - - def get_collection(self, collection_id): - """Get Collection""" - - params = {} - path = '/database/collections/{collectionId}' - path = path.replace('{collectionId}', collection_id) - - return self.client.call('get', path, { - 'content-type': 'application/json', - }, params) - - def update_collection(self, collection_id, name, read, write, rules=[]): - """Update Collection""" - - params = {} - path = '/database/collections/{collectionId}' - path = path.replace('{collectionId}', collection_id) - params['name'] = name - params['read'] = read - params['write'] = write - params['rules'] = rules - - return self.client.call('put', path, { - 'content-type': 'application/json', - }, params) - - def delete_collection(self, collection_id): - """Delete Collection""" - - params = {} - path = '/database/collections/{collectionId}' - path = path.replace('{collectionId}', collection_id) - - return self.client.call('delete', path, { - 'content-type': 'application/json', - }, params) - - def list_documents(self, collection_id, filters=[], offset=0, limit=50, order_field='$id', order_type='ASC', order_cast='string', search='', first=0, last=0): - """List Documents""" - - params = {} - path = '/database/collections/{collectionId}/documents' - path = path.replace('{collectionId}', collection_id) - params['filters'] = filters - params['offset'] = offset - params['limit'] = limit - params['orderField'] = order_field - params['orderType'] = order_type - params['orderCast'] = order_cast - params['search'] = search - params['first'] = first - params['last'] = last - - return self.client.call('get', path, { - 'content-type': 'application/json', - }, params) - - def create_document(self, collection_id, data, read, write, parent_document='', parent_property='', parent_property_type='assign'): - """Create Document""" - - params = {} - path = '/database/collections/{collectionId}/documents' - path = path.replace('{collectionId}', collection_id) - params['data'] = data - params['read'] = read - params['write'] = write - params['parentDocument'] = parent_document - params['parentProperty'] = parent_property - params['parentPropertyType'] = parent_property_type - - return self.client.call('post', path, { - 'content-type': 'application/json', - }, params) - - def get_document(self, collection_id, document_id): - """Get Document""" - - params = {} - path = '/database/collections/{collectionId}/documents/{documentId}' - path = path.replace('{collectionId}', collection_id) - path = path.replace('{documentId}', document_id) - - return self.client.call('get', path, { - 'content-type': 'application/json', - }, params) - - def update_document(self, collection_id, document_id, data, read, write): - """Update Document""" - - params = {} - path = '/database/collections/{collectionId}/documents/{documentId}' - path = path.replace('{collectionId}', collection_id) - path = path.replace('{documentId}', document_id) - params['data'] = data - params['read'] = read - params['write'] = write - - return self.client.call('patch', path, { - 'content-type': 'application/json', - }, params) - - def delete_document(self, collection_id, document_id): - """Delete Document""" - - params = {} - path = '/database/collections/{collectionId}/documents/{documentId}' - path = path.replace('{collectionId}', collection_id) - path = path.replace('{documentId}', document_id) - - return self.client.call('delete', path, { - 'content-type': 'application/json', - }, params) - - def get_collection_logs(self, collection_id): - """Get Collection Logs""" - - params = {} - path = '/database/collections/{collectionId}/logs' - path = path.replace('{collectionId}', collection_id) - - return self.client.call('get', path, { - 'content-type': 'application/json', - }, params) diff --git a/app/sdks/0.7.0/server-python/appwrite/services/functions.py b/app/sdks/0.7.0/server-python/appwrite/services/functions.py deleted file mode 100644 index 1688f21f47..0000000000 --- a/app/sdks/0.7.0/server-python/appwrite/services/functions.py +++ /dev/null @@ -1,178 +0,0 @@ -from ..service import Service - - -class Functions(Service): - - def __init__(self, client): - super(Functions, self).__init__(client) - - def list(self, search='', limit=25, offset=0, order_type='ASC'): - """List Functions""" - - params = {} - path = '/functions' - params['search'] = search - params['limit'] = limit - params['offset'] = offset - params['orderType'] = order_type - - return self.client.call('get', path, { - 'content-type': 'application/json', - }, params) - - def create(self, name, vars=[], events=[], schedule='', timeout=15): - """Create Function""" - - params = {} - path = '/functions' - params['name'] = name - params['vars'] = vars - params['events'] = events - params['schedule'] = schedule - params['timeout'] = timeout - - return self.client.call('post', path, { - 'content-type': 'application/json', - }, params) - - def get(self, function_id): - """Get Function""" - - params = {} - path = '/functions/{functionId}' - path = path.replace('{functionId}', function_id) - - return self.client.call('get', path, { - 'content-type': 'application/json', - }, params) - - def update(self, function_id, name, vars=[], events=[], schedule='', timeout=15): - """Update Function""" - - params = {} - path = '/functions/{functionId}' - path = path.replace('{functionId}', function_id) - params['name'] = name - params['vars'] = vars - params['events'] = events - params['schedule'] = schedule - params['timeout'] = timeout - - return self.client.call('put', path, { - 'content-type': 'application/json', - }, params) - - def delete(self, function_id): - """Delete Function""" - - params = {} - path = '/functions/{functionId}' - path = path.replace('{functionId}', function_id) - - return self.client.call('delete', path, { - 'content-type': 'application/json', - }, params) - - def list_executions(self, function_id, search='', limit=25, offset=0, order_type='ASC'): - """List Executions""" - - params = {} - path = '/functions/{functionId}/executions' - path = path.replace('{functionId}', function_id) - params['search'] = search - params['limit'] = limit - params['offset'] = offset - params['orderType'] = order_type - - return self.client.call('get', path, { - 'content-type': 'application/json', - }, params) - - def create_execution(self, function_id, async=1): - """Create Execution""" - - params = {} - path = '/functions/{functionId}/executions' - path = path.replace('{functionId}', function_id) - params['async'] = async - - return self.client.call('post', path, { - 'content-type': 'application/json', - }, params) - - def get_execution(self, function_id, execution_id): - """Get Execution""" - - params = {} - path = '/functions/{functionId}/executions/{executionId}' - path = path.replace('{functionId}', function_id) - path = path.replace('{executionId}', execution_id) - - return self.client.call('get', path, { - 'content-type': 'application/json', - }, params) - - def update_tag(self, function_id, tag): - """Update Function Tag""" - - params = {} - path = '/functions/{functionId}/tag' - path = path.replace('{functionId}', function_id) - params['tag'] = tag - - return self.client.call('patch', path, { - 'content-type': 'application/json', - }, params) - - def list_tags(self, function_id, search='', limit=25, offset=0, order_type='ASC'): - """List Tags""" - - params = {} - path = '/functions/{functionId}/tags' - path = path.replace('{functionId}', function_id) - params['search'] = search - params['limit'] = limit - params['offset'] = offset - params['orderType'] = order_type - - return self.client.call('get', path, { - 'content-type': 'application/json', - }, params) - - def create_tag(self, function_id, env, command, code): - """Create Tag""" - - params = {} - path = '/functions/{functionId}/tags' - path = path.replace('{functionId}', function_id) - params['env'] = env - params['command'] = command - params['code'] = code - - return self.client.call('post', path, { - 'content-type': 'application/json', - }, params) - - def get_tag(self, function_id, tag_id): - """Get Tag""" - - params = {} - path = '/functions/{functionId}/tags/{tagId}' - path = path.replace('{functionId}', function_id) - path = path.replace('{tagId}', tag_id) - - return self.client.call('get', path, { - 'content-type': 'application/json', - }, params) - - def delete_tag(self, function_id, tag_id): - """Delete Tag""" - - params = {} - path = '/functions/{functionId}/tags/{tagId}' - path = path.replace('{functionId}', function_id) - path = path.replace('{tagId}', tag_id) - - return self.client.call('delete', path, { - 'content-type': 'application/json', - }, params) diff --git a/app/sdks/0.7.0/server-python/appwrite/services/health.py b/app/sdks/0.7.0/server-python/appwrite/services/health.py deleted file mode 100644 index 5e08ebe6e8..0000000000 --- a/app/sdks/0.7.0/server-python/appwrite/services/health.py +++ /dev/null @@ -1,127 +0,0 @@ -from ..service import Service - - -class Health(Service): - - def __init__(self, client): - super(Health, self).__init__(client) - - def get(self): - """Get HTTP""" - - params = {} - path = '/health' - - return self.client.call('get', path, { - 'content-type': 'application/json', - }, params) - - def get_anti_virus(self): - """Get Anti virus""" - - params = {} - path = '/health/anti-virus' - - return self.client.call('get', path, { - 'content-type': 'application/json', - }, params) - - def get_cache(self): - """Get Cache""" - - params = {} - path = '/health/cache' - - return self.client.call('get', path, { - 'content-type': 'application/json', - }, params) - - def get_d_b(self): - """Get DB""" - - params = {} - path = '/health/db' - - return self.client.call('get', path, { - 'content-type': 'application/json', - }, params) - - def get_queue_certificates(self): - """Get Certificate Queue""" - - params = {} - path = '/health/queue/certificates' - - return self.client.call('get', path, { - 'content-type': 'application/json', - }, params) - - def get_queue_functions(self): - """Get Functions Queue""" - - params = {} - path = '/health/queue/functions' - - return self.client.call('get', path, { - 'content-type': 'application/json', - }, params) - - def get_queue_logs(self): - """Get Logs Queue""" - - params = {} - path = '/health/queue/logs' - - return self.client.call('get', path, { - 'content-type': 'application/json', - }, params) - - def get_queue_tasks(self): - """Get Tasks Queue""" - - params = {} - path = '/health/queue/tasks' - - return self.client.call('get', path, { - 'content-type': 'application/json', - }, params) - - def get_queue_usage(self): - """Get Usage Queue""" - - params = {} - path = '/health/queue/usage' - - return self.client.call('get', path, { - 'content-type': 'application/json', - }, params) - - def get_queue_webhooks(self): - """Get Webhooks Queue""" - - params = {} - path = '/health/queue/webhooks' - - return self.client.call('get', path, { - 'content-type': 'application/json', - }, params) - - def get_storage_local(self): - """Get Local Storage""" - - params = {} - path = '/health/storage/local' - - return self.client.call('get', path, { - 'content-type': 'application/json', - }, params) - - def get_time(self): - """Get Time""" - - params = {} - path = '/health/time' - - return self.client.call('get', path, { - 'content-type': 'application/json', - }, params) diff --git a/app/sdks/0.7.0/server-python/appwrite/services/locale.py b/app/sdks/0.7.0/server-python/appwrite/services/locale.py deleted file mode 100644 index 70c955eb85..0000000000 --- a/app/sdks/0.7.0/server-python/appwrite/services/locale.py +++ /dev/null @@ -1,67 +0,0 @@ -from ..service import Service - - -class Locale(Service): - - def __init__(self, client): - super(Locale, self).__init__(client) - - def get(self): - """Get User Locale""" - - params = {} - path = '/locale' - - return self.client.call('get', path, { - 'content-type': 'application/json', - }, params) - - def get_continents(self): - """List Continents""" - - params = {} - path = '/locale/continents' - - return self.client.call('get', path, { - 'content-type': 'application/json', - }, params) - - def get_countries(self): - """List Countries""" - - params = {} - path = '/locale/countries' - - return self.client.call('get', path, { - 'content-type': 'application/json', - }, params) - - def get_countries_e_u(self): - """List EU Countries""" - - params = {} - path = '/locale/countries/eu' - - return self.client.call('get', path, { - 'content-type': 'application/json', - }, params) - - def get_countries_phones(self): - """List Countries Phone Codes""" - - params = {} - path = '/locale/countries/phones' - - return self.client.call('get', path, { - 'content-type': 'application/json', - }, params) - - def get_currencies(self): - """List Currencies""" - - params = {} - path = '/locale/currencies' - - return self.client.call('get', path, { - 'content-type': 'application/json', - }, params) diff --git a/app/sdks/0.7.0/server-python/appwrite/services/storage.py b/app/sdks/0.7.0/server-python/appwrite/services/storage.py deleted file mode 100644 index 7e2a986f6e..0000000000 --- a/app/sdks/0.7.0/server-python/appwrite/services/storage.py +++ /dev/null @@ -1,108 +0,0 @@ -from ..service import Service - - -class Storage(Service): - - def __init__(self, client): - super(Storage, self).__init__(client) - - def list_files(self, search='', limit=25, offset=0, order_type='ASC'): - """List Files""" - - params = {} - path = '/storage/files' - params['search'] = search - params['limit'] = limit - params['offset'] = offset - params['orderType'] = order_type - - return self.client.call('get', path, { - 'content-type': 'application/json', - }, params) - - def create_file(self, file, read, write): - """Create File""" - - params = {} - path = '/storage/files' - params['file'] = file - params['read'] = read - params['write'] = write - - return self.client.call('post', path, { - 'content-type': 'multipart/form-data', - }, params) - - def get_file(self, file_id): - """Get File""" - - params = {} - path = '/storage/files/{fileId}' - path = path.replace('{fileId}', file_id) - - return self.client.call('get', path, { - 'content-type': 'application/json', - }, params) - - def update_file(self, file_id, read, write): - """Update File""" - - params = {} - path = '/storage/files/{fileId}' - path = path.replace('{fileId}', file_id) - params['read'] = read - params['write'] = write - - return self.client.call('put', path, { - 'content-type': 'application/json', - }, params) - - def delete_file(self, file_id): - """Delete File""" - - params = {} - path = '/storage/files/{fileId}' - path = path.replace('{fileId}', file_id) - - return self.client.call('delete', path, { - 'content-type': 'application/json', - }, params) - - def get_file_download(self, file_id): - """Get File for Download""" - - params = {} - path = '/storage/files/{fileId}/download' - path = path.replace('{fileId}', file_id) - - return self.client.call('get', path, { - 'content-type': 'application/json', - }, params) - - def get_file_preview(self, file_id, width=0, height=0, quality=100, background='', output=''): - """Get File Preview""" - - params = {} - path = '/storage/files/{fileId}/preview' - path = path.replace('{fileId}', file_id) - params['width'] = width - params['height'] = height - params['quality'] = quality - params['background'] = background - params['output'] = output - - return self.client.call('get', path, { - 'content-type': 'application/json', - }, params) - - def get_file_view(self, file_id, xas=''): - """Get File for View""" - - params = {} - path = '/storage/files/{fileId}/view' - path = path.replace('{fileId}', file_id) - params['as'] = xas - - return self.client.call('get', path, { - 'content-type': 'application/json', - }, params) diff --git a/app/sdks/0.7.0/server-python/appwrite/services/teams.py b/app/sdks/0.7.0/server-python/appwrite/services/teams.py deleted file mode 100644 index cdc3780ad9..0000000000 --- a/app/sdks/0.7.0/server-python/appwrite/services/teams.py +++ /dev/null @@ -1,105 +0,0 @@ -from ..service import Service - - -class Teams(Service): - - def __init__(self, client): - super(Teams, self).__init__(client) - - def list(self, search='', limit=25, offset=0, order_type='ASC'): - """List Teams""" - - params = {} - path = '/teams' - params['search'] = search - params['limit'] = limit - params['offset'] = offset - params['orderType'] = order_type - - return self.client.call('get', path, { - 'content-type': 'application/json', - }, params) - - def create(self, name, roles=[]): - """Create Team""" - - params = {} - path = '/teams' - params['name'] = name - params['roles'] = roles - - return self.client.call('post', path, { - 'content-type': 'application/json', - }, params) - - def get(self, team_id): - """Get Team""" - - params = {} - path = '/teams/{teamId}' - path = path.replace('{teamId}', team_id) - - return self.client.call('get', path, { - 'content-type': 'application/json', - }, params) - - def update(self, team_id, name): - """Update Team""" - - params = {} - path = '/teams/{teamId}' - path = path.replace('{teamId}', team_id) - params['name'] = name - - return self.client.call('put', path, { - 'content-type': 'application/json', - }, params) - - def delete(self, team_id): - """Delete Team""" - - params = {} - path = '/teams/{teamId}' - path = path.replace('{teamId}', team_id) - - return self.client.call('delete', path, { - 'content-type': 'application/json', - }, params) - - def get_memberships(self, team_id): - """Get Team Memberships""" - - params = {} - path = '/teams/{teamId}/memberships' - path = path.replace('{teamId}', team_id) - - return self.client.call('get', path, { - 'content-type': 'application/json', - }, params) - - def create_membership(self, team_id, email, roles, url, name=''): - """Create Team Membership""" - - params = {} - path = '/teams/{teamId}/memberships' - path = path.replace('{teamId}', team_id) - params['email'] = email - params['name'] = name - params['roles'] = roles - params['url'] = url - - return self.client.call('post', path, { - 'content-type': 'application/json', - }, params) - - def delete_membership(self, team_id, invite_id): - """Delete Team Membership""" - - params = {} - path = '/teams/{teamId}/memberships/{inviteId}' - path = path.replace('{teamId}', team_id) - path = path.replace('{inviteId}', invite_id) - - return self.client.call('delete', path, { - 'content-type': 'application/json', - }, params) diff --git a/app/sdks/0.7.0/server-python/appwrite/services/users.py b/app/sdks/0.7.0/server-python/appwrite/services/users.py deleted file mode 100644 index 2608f07a50..0000000000 --- a/app/sdks/0.7.0/server-python/appwrite/services/users.py +++ /dev/null @@ -1,125 +0,0 @@ -from ..service import Service - - -class Users(Service): - - def __init__(self, client): - super(Users, self).__init__(client) - - def list(self, search='', limit=25, offset=0, order_type='ASC'): - """List Users""" - - params = {} - path = '/users' - params['search'] = search - params['limit'] = limit - params['offset'] = offset - params['orderType'] = order_type - - return self.client.call('get', path, { - 'content-type': 'application/json', - }, params) - - def create(self, email, password, name=''): - """Create User""" - - params = {} - path = '/users' - params['email'] = email - params['password'] = password - params['name'] = name - - return self.client.call('post', path, { - 'content-type': 'application/json', - }, params) - - def get(self, user_id): - """Get User""" - - params = {} - path = '/users/{userId}' - path = path.replace('{userId}', user_id) - - return self.client.call('get', path, { - 'content-type': 'application/json', - }, params) - - def get_logs(self, user_id): - """Get User Logs""" - - params = {} - path = '/users/{userId}/logs' - path = path.replace('{userId}', user_id) - - return self.client.call('get', path, { - 'content-type': 'application/json', - }, params) - - def get_prefs(self, user_id): - """Get User Preferences""" - - params = {} - path = '/users/{userId}/prefs' - path = path.replace('{userId}', user_id) - - return self.client.call('get', path, { - 'content-type': 'application/json', - }, params) - - def update_prefs(self, user_id, prefs): - """Update User Preferences""" - - params = {} - path = '/users/{userId}/prefs' - path = path.replace('{userId}', user_id) - params['prefs'] = prefs - - return self.client.call('patch', path, { - 'content-type': 'application/json', - }, params) - - def get_sessions(self, user_id): - """Get User Sessions""" - - params = {} - path = '/users/{userId}/sessions' - path = path.replace('{userId}', user_id) - - return self.client.call('get', path, { - 'content-type': 'application/json', - }, params) - - def delete_sessions(self, user_id): - """Delete User Sessions""" - - params = {} - path = '/users/{userId}/sessions' - path = path.replace('{userId}', user_id) - - return self.client.call('delete', path, { - 'content-type': 'application/json', - }, params) - - def delete_session(self, user_id, session_id): - """Delete User Session""" - - params = {} - path = '/users/{userId}/sessions/{sessionId}' - path = path.replace('{userId}', user_id) - path = path.replace('{sessionId}', session_id) - - return self.client.call('delete', path, { - 'content-type': 'application/json', - }, params) - - def update_status(self, user_id, status): - """Update User Status""" - - params = {} - path = '/users/{userId}/status' - path = path.replace('{userId}', user_id) - params['status'] = status - - return self.client.call('patch', path, { - 'content-type': 'application/json', - }, params) diff --git a/app/sdks/0.7.0/server-python/docs/examples/avatars/get-browser.md b/app/sdks/0.7.0/server-python/docs/examples/avatars/get-browser.md deleted file mode 100644 index ec783ca34d..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/avatars/get-browser.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.avatars import Avatars - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -avatars = Avatars(client) - -result = avatars.get_browser('aa') diff --git a/app/sdks/0.7.0/server-python/docs/examples/avatars/get-credit-card.md b/app/sdks/0.7.0/server-python/docs/examples/avatars/get-credit-card.md deleted file mode 100644 index ce2d3f8135..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/avatars/get-credit-card.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.avatars import Avatars - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -avatars = Avatars(client) - -result = avatars.get_credit_card('amex') diff --git a/app/sdks/0.7.0/server-python/docs/examples/avatars/get-favicon.md b/app/sdks/0.7.0/server-python/docs/examples/avatars/get-favicon.md deleted file mode 100644 index 8de722c202..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/avatars/get-favicon.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.avatars import Avatars - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -avatars = Avatars(client) - -result = avatars.get_favicon('https://example.com') diff --git a/app/sdks/0.7.0/server-python/docs/examples/avatars/get-flag.md b/app/sdks/0.7.0/server-python/docs/examples/avatars/get-flag.md deleted file mode 100644 index 0bf5657d2e..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/avatars/get-flag.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.avatars import Avatars - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -avatars = Avatars(client) - -result = avatars.get_flag('af') diff --git a/app/sdks/0.7.0/server-python/docs/examples/avatars/get-image.md b/app/sdks/0.7.0/server-python/docs/examples/avatars/get-image.md deleted file mode 100644 index 3164a956c1..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/avatars/get-image.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.avatars import Avatars - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -avatars = Avatars(client) - -result = avatars.get_image('https://example.com') diff --git a/app/sdks/0.7.0/server-python/docs/examples/avatars/get-q-r.md b/app/sdks/0.7.0/server-python/docs/examples/avatars/get-q-r.md deleted file mode 100644 index b0c6508a8a..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/avatars/get-q-r.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.avatars import Avatars - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -avatars = Avatars(client) - -result = avatars.get_q_r('[TEXT]') diff --git a/app/sdks/0.7.0/server-python/docs/examples/database/create-collection.md b/app/sdks/0.7.0/server-python/docs/examples/database/create-collection.md deleted file mode 100644 index 8741c13744..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/database/create-collection.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.database import Database - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -database = Database(client) - -result = database.create_collection('[NAME]', [], [], []) diff --git a/app/sdks/0.7.0/server-python/docs/examples/database/create-document.md b/app/sdks/0.7.0/server-python/docs/examples/database/create-document.md deleted file mode 100644 index fff7a96bc0..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/database/create-document.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.database import Database - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -database = Database(client) - -result = database.create_document('[COLLECTION_ID]', {}, [], []) diff --git a/app/sdks/0.7.0/server-python/docs/examples/database/delete-collection.md b/app/sdks/0.7.0/server-python/docs/examples/database/delete-collection.md deleted file mode 100644 index c3a7af45f5..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/database/delete-collection.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.database import Database - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -database = Database(client) - -result = database.delete_collection('[COLLECTION_ID]') diff --git a/app/sdks/0.7.0/server-python/docs/examples/database/delete-document.md b/app/sdks/0.7.0/server-python/docs/examples/database/delete-document.md deleted file mode 100644 index 1adacaff4e..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/database/delete-document.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.database import Database - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -database = Database(client) - -result = database.delete_document('[COLLECTION_ID]', '[DOCUMENT_ID]') diff --git a/app/sdks/0.7.0/server-python/docs/examples/database/get-collection-logs.md b/app/sdks/0.7.0/server-python/docs/examples/database/get-collection-logs.md deleted file mode 100644 index 4abaa17f24..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/database/get-collection-logs.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.database import Database - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -database = Database(client) - -result = database.get_collection_logs('[COLLECTION_ID]') diff --git a/app/sdks/0.7.0/server-python/docs/examples/database/get-collection.md b/app/sdks/0.7.0/server-python/docs/examples/database/get-collection.md deleted file mode 100644 index 34269a7d4a..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/database/get-collection.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.database import Database - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -database = Database(client) - -result = database.get_collection('[COLLECTION_ID]') diff --git a/app/sdks/0.7.0/server-python/docs/examples/database/get-document.md b/app/sdks/0.7.0/server-python/docs/examples/database/get-document.md deleted file mode 100644 index 13d313c15f..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/database/get-document.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.database import Database - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -database = Database(client) - -result = database.get_document('[COLLECTION_ID]', '[DOCUMENT_ID]') diff --git a/app/sdks/0.7.0/server-python/docs/examples/database/list-collections.md b/app/sdks/0.7.0/server-python/docs/examples/database/list-collections.md deleted file mode 100644 index 840ae586fe..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/database/list-collections.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.database import Database - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -database = Database(client) - -result = database.list_collections() diff --git a/app/sdks/0.7.0/server-python/docs/examples/database/list-documents.md b/app/sdks/0.7.0/server-python/docs/examples/database/list-documents.md deleted file mode 100644 index 6969eef581..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/database/list-documents.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.database import Database - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -database = Database(client) - -result = database.list_documents('[COLLECTION_ID]') diff --git a/app/sdks/0.7.0/server-python/docs/examples/database/update-collection.md b/app/sdks/0.7.0/server-python/docs/examples/database/update-collection.md deleted file mode 100644 index 0bf8f29fb8..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/database/update-collection.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.database import Database - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -database = Database(client) - -result = database.update_collection('[COLLECTION_ID]', '[NAME]', [], []) diff --git a/app/sdks/0.7.0/server-python/docs/examples/database/update-document.md b/app/sdks/0.7.0/server-python/docs/examples/database/update-document.md deleted file mode 100644 index 40e11c0665..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/database/update-document.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.database import Database - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -database = Database(client) - -result = database.update_document('[COLLECTION_ID]', '[DOCUMENT_ID]', {}, [], []) diff --git a/app/sdks/0.7.0/server-python/docs/examples/functions/create-execution.md b/app/sdks/0.7.0/server-python/docs/examples/functions/create-execution.md deleted file mode 100644 index aa8e955751..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/functions/create-execution.md +++ /dev/null @@ -1,13 +0,0 @@ -from appwrite.client import Client -from appwrite.services.functions import Functions - -client = Client() - -(client - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -functions = Functions(client) - -result = functions.create_execution('[FUNCTION_ID]') diff --git a/app/sdks/0.7.0/server-python/docs/examples/functions/create-tag.md b/app/sdks/0.7.0/server-python/docs/examples/functions/create-tag.md deleted file mode 100644 index 533f3095c3..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/functions/create-tag.md +++ /dev/null @@ -1,13 +0,0 @@ -from appwrite.client import Client -from appwrite.services.functions import Functions - -client = Client() - -(client - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -functions = Functions(client) - -result = functions.create_tag('[FUNCTION_ID]', 'node-14', '[COMMAND]', '[CODE]') diff --git a/app/sdks/0.7.0/server-python/docs/examples/functions/create.md b/app/sdks/0.7.0/server-python/docs/examples/functions/create.md deleted file mode 100644 index 2b63ea7191..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/functions/create.md +++ /dev/null @@ -1,13 +0,0 @@ -from appwrite.client import Client -from appwrite.services.functions import Functions - -client = Client() - -(client - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -functions = Functions(client) - -result = functions.create('[NAME]') diff --git a/app/sdks/0.7.0/server-python/docs/examples/functions/delete-tag.md b/app/sdks/0.7.0/server-python/docs/examples/functions/delete-tag.md deleted file mode 100644 index 554817cf5e..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/functions/delete-tag.md +++ /dev/null @@ -1,13 +0,0 @@ -from appwrite.client import Client -from appwrite.services.functions import Functions - -client = Client() - -(client - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -functions = Functions(client) - -result = functions.delete_tag('[FUNCTION_ID]', '[TAG_ID]') diff --git a/app/sdks/0.7.0/server-python/docs/examples/functions/delete.md b/app/sdks/0.7.0/server-python/docs/examples/functions/delete.md deleted file mode 100644 index 9c1575c1e8..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/functions/delete.md +++ /dev/null @@ -1,13 +0,0 @@ -from appwrite.client import Client -from appwrite.services.functions import Functions - -client = Client() - -(client - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -functions = Functions(client) - -result = functions.delete('[FUNCTION_ID]') diff --git a/app/sdks/0.7.0/server-python/docs/examples/functions/get-execution.md b/app/sdks/0.7.0/server-python/docs/examples/functions/get-execution.md deleted file mode 100644 index b979241983..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/functions/get-execution.md +++ /dev/null @@ -1,13 +0,0 @@ -from appwrite.client import Client -from appwrite.services.functions import Functions - -client = Client() - -(client - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -functions = Functions(client) - -result = functions.get_execution('[FUNCTION_ID]', '[EXECUTION_ID]') diff --git a/app/sdks/0.7.0/server-python/docs/examples/functions/get-tag.md b/app/sdks/0.7.0/server-python/docs/examples/functions/get-tag.md deleted file mode 100644 index b5c3f23059..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/functions/get-tag.md +++ /dev/null @@ -1,13 +0,0 @@ -from appwrite.client import Client -from appwrite.services.functions import Functions - -client = Client() - -(client - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -functions = Functions(client) - -result = functions.get_tag('[FUNCTION_ID]', '[TAG_ID]') diff --git a/app/sdks/0.7.0/server-python/docs/examples/functions/get.md b/app/sdks/0.7.0/server-python/docs/examples/functions/get.md deleted file mode 100644 index 0e4036db4d..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/functions/get.md +++ /dev/null @@ -1,13 +0,0 @@ -from appwrite.client import Client -from appwrite.services.functions import Functions - -client = Client() - -(client - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -functions = Functions(client) - -result = functions.get('[FUNCTION_ID]') diff --git a/app/sdks/0.7.0/server-python/docs/examples/functions/list-executions.md b/app/sdks/0.7.0/server-python/docs/examples/functions/list-executions.md deleted file mode 100644 index 75f5260b46..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/functions/list-executions.md +++ /dev/null @@ -1,13 +0,0 @@ -from appwrite.client import Client -from appwrite.services.functions import Functions - -client = Client() - -(client - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -functions = Functions(client) - -result = functions.list_executions('[FUNCTION_ID]') diff --git a/app/sdks/0.7.0/server-python/docs/examples/functions/list-tags.md b/app/sdks/0.7.0/server-python/docs/examples/functions/list-tags.md deleted file mode 100644 index a992416640..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/functions/list-tags.md +++ /dev/null @@ -1,13 +0,0 @@ -from appwrite.client import Client -from appwrite.services.functions import Functions - -client = Client() - -(client - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -functions = Functions(client) - -result = functions.list_tags('[FUNCTION_ID]') diff --git a/app/sdks/0.7.0/server-python/docs/examples/functions/list.md b/app/sdks/0.7.0/server-python/docs/examples/functions/list.md deleted file mode 100644 index a2b1e7d3db..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/functions/list.md +++ /dev/null @@ -1,13 +0,0 @@ -from appwrite.client import Client -from appwrite.services.functions import Functions - -client = Client() - -(client - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -functions = Functions(client) - -result = functions.list() diff --git a/app/sdks/0.7.0/server-python/docs/examples/functions/update-active.md b/app/sdks/0.7.0/server-python/docs/examples/functions/update-active.md deleted file mode 100644 index 72f8314055..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/functions/update-active.md +++ /dev/null @@ -1,13 +0,0 @@ -from appwrite.client import Client -from appwrite.services.functions import Functions - -client = Client() - -(client - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -functions = Functions(client) - -result = functions.update_active('[FUNCTION_ID]', '[ACTIVE]') diff --git a/app/sdks/0.7.0/server-python/docs/examples/functions/update-tag.md b/app/sdks/0.7.0/server-python/docs/examples/functions/update-tag.md deleted file mode 100644 index 4ab93d1b6a..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/functions/update-tag.md +++ /dev/null @@ -1,13 +0,0 @@ -from appwrite.client import Client -from appwrite.services.functions import Functions - -client = Client() - -(client - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -functions = Functions(client) - -result = functions.update_tag('[FUNCTION_ID]', '[TAG]') diff --git a/app/sdks/0.7.0/server-python/docs/examples/functions/update.md b/app/sdks/0.7.0/server-python/docs/examples/functions/update.md deleted file mode 100644 index 751a5d2538..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/functions/update.md +++ /dev/null @@ -1,13 +0,0 @@ -from appwrite.client import Client -from appwrite.services.functions import Functions - -client = Client() - -(client - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -functions = Functions(client) - -result = functions.update('[FUNCTION_ID]', '[NAME]') diff --git a/app/sdks/0.7.0/server-python/docs/examples/health/get-anti-virus.md b/app/sdks/0.7.0/server-python/docs/examples/health/get-anti-virus.md deleted file mode 100644 index 0c90f20750..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/health/get-anti-virus.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.health import Health - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -health = Health(client) - -result = health.get_anti_virus() diff --git a/app/sdks/0.7.0/server-python/docs/examples/health/get-cache.md b/app/sdks/0.7.0/server-python/docs/examples/health/get-cache.md deleted file mode 100644 index e06416fdf0..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/health/get-cache.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.health import Health - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -health = Health(client) - -result = health.get_cache() diff --git a/app/sdks/0.7.0/server-python/docs/examples/health/get-d-b.md b/app/sdks/0.7.0/server-python/docs/examples/health/get-d-b.md deleted file mode 100644 index 34d9446080..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/health/get-d-b.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.health import Health - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -health = Health(client) - -result = health.get_d_b() diff --git a/app/sdks/0.7.0/server-python/docs/examples/health/get-queue-certificates.md b/app/sdks/0.7.0/server-python/docs/examples/health/get-queue-certificates.md deleted file mode 100644 index 74f61975fc..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/health/get-queue-certificates.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.health import Health - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -health = Health(client) - -result = health.get_queue_certificates() diff --git a/app/sdks/0.7.0/server-python/docs/examples/health/get-queue-functions.md b/app/sdks/0.7.0/server-python/docs/examples/health/get-queue-functions.md deleted file mode 100644 index 6704514eb7..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/health/get-queue-functions.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.health import Health - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -health = Health(client) - -result = health.get_queue_functions() diff --git a/app/sdks/0.7.0/server-python/docs/examples/health/get-queue-logs.md b/app/sdks/0.7.0/server-python/docs/examples/health/get-queue-logs.md deleted file mode 100644 index 79d169f51f..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/health/get-queue-logs.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.health import Health - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -health = Health(client) - -result = health.get_queue_logs() diff --git a/app/sdks/0.7.0/server-python/docs/examples/health/get-queue-tasks.md b/app/sdks/0.7.0/server-python/docs/examples/health/get-queue-tasks.md deleted file mode 100644 index aba8cca053..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/health/get-queue-tasks.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.health import Health - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -health = Health(client) - -result = health.get_queue_tasks() diff --git a/app/sdks/0.7.0/server-python/docs/examples/health/get-queue-usage.md b/app/sdks/0.7.0/server-python/docs/examples/health/get-queue-usage.md deleted file mode 100644 index cb3cc5ae6f..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/health/get-queue-usage.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.health import Health - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -health = Health(client) - -result = health.get_queue_usage() diff --git a/app/sdks/0.7.0/server-python/docs/examples/health/get-queue-webhooks.md b/app/sdks/0.7.0/server-python/docs/examples/health/get-queue-webhooks.md deleted file mode 100644 index a4c9d96d66..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/health/get-queue-webhooks.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.health import Health - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -health = Health(client) - -result = health.get_queue_webhooks() diff --git a/app/sdks/0.7.0/server-python/docs/examples/health/get-storage-anti-virus.md b/app/sdks/0.7.0/server-python/docs/examples/health/get-storage-anti-virus.md deleted file mode 100644 index 5ce63ac816..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/health/get-storage-anti-virus.md +++ /dev/null @@ -1,13 +0,0 @@ -from appwrite.client import Client -from appwrite.services.health import Health - -client = Client() - -(client - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -health = Health(client) - -result = health.get_storage_anti_virus() diff --git a/app/sdks/0.7.0/server-python/docs/examples/health/get-storage-local.md b/app/sdks/0.7.0/server-python/docs/examples/health/get-storage-local.md deleted file mode 100644 index a97ed125ad..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/health/get-storage-local.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.health import Health - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -health = Health(client) - -result = health.get_storage_local() diff --git a/app/sdks/0.7.0/server-python/docs/examples/health/get-time.md b/app/sdks/0.7.0/server-python/docs/examples/health/get-time.md deleted file mode 100644 index ecc66250cc..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/health/get-time.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.health import Health - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -health = Health(client) - -result = health.get_time() diff --git a/app/sdks/0.7.0/server-python/docs/examples/health/get.md b/app/sdks/0.7.0/server-python/docs/examples/health/get.md deleted file mode 100644 index 77352aafab..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/health/get.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.health import Health - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -health = Health(client) - -result = health.get() diff --git a/app/sdks/0.7.0/server-python/docs/examples/locale/get-continents.md b/app/sdks/0.7.0/server-python/docs/examples/locale/get-continents.md deleted file mode 100644 index bf4c255434..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/locale/get-continents.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.locale import Locale - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -locale = Locale(client) - -result = locale.get_continents() diff --git a/app/sdks/0.7.0/server-python/docs/examples/locale/get-countries-e-u.md b/app/sdks/0.7.0/server-python/docs/examples/locale/get-countries-e-u.md deleted file mode 100644 index 78d69ff2dc..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/locale/get-countries-e-u.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.locale import Locale - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -locale = Locale(client) - -result = locale.get_countries_e_u() diff --git a/app/sdks/0.7.0/server-python/docs/examples/locale/get-countries-phones.md b/app/sdks/0.7.0/server-python/docs/examples/locale/get-countries-phones.md deleted file mode 100644 index fb349b1442..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/locale/get-countries-phones.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.locale import Locale - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -locale = Locale(client) - -result = locale.get_countries_phones() diff --git a/app/sdks/0.7.0/server-python/docs/examples/locale/get-countries.md b/app/sdks/0.7.0/server-python/docs/examples/locale/get-countries.md deleted file mode 100644 index ceb731073d..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/locale/get-countries.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.locale import Locale - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -locale = Locale(client) - -result = locale.get_countries() diff --git a/app/sdks/0.7.0/server-python/docs/examples/locale/get-currencies.md b/app/sdks/0.7.0/server-python/docs/examples/locale/get-currencies.md deleted file mode 100644 index dacb886e20..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/locale/get-currencies.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.locale import Locale - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -locale = Locale(client) - -result = locale.get_currencies() diff --git a/app/sdks/0.7.0/server-python/docs/examples/locale/get.md b/app/sdks/0.7.0/server-python/docs/examples/locale/get.md deleted file mode 100644 index 43cd2107de..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/locale/get.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.locale import Locale - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -locale = Locale(client) - -result = locale.get() diff --git a/app/sdks/0.7.0/server-python/docs/examples/storage/create-file.md b/app/sdks/0.7.0/server-python/docs/examples/storage/create-file.md deleted file mode 100644 index fd76dd068b..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/storage/create-file.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.storage import Storage - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -storage = Storage(client) - -result = storage.create_file(open('/path/to/file.png', 'rb'), [], []) diff --git a/app/sdks/0.7.0/server-python/docs/examples/storage/delete-file.md b/app/sdks/0.7.0/server-python/docs/examples/storage/delete-file.md deleted file mode 100644 index 155e5a41d4..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/storage/delete-file.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.storage import Storage - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -storage = Storage(client) - -result = storage.delete_file('[FILE_ID]') diff --git a/app/sdks/0.7.0/server-python/docs/examples/storage/get-file-download.md b/app/sdks/0.7.0/server-python/docs/examples/storage/get-file-download.md deleted file mode 100644 index 975a0f302d..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/storage/get-file-download.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.storage import Storage - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -storage = Storage(client) - -result = storage.get_file_download('[FILE_ID]') diff --git a/app/sdks/0.7.0/server-python/docs/examples/storage/get-file-preview.md b/app/sdks/0.7.0/server-python/docs/examples/storage/get-file-preview.md deleted file mode 100644 index ad9abe444f..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/storage/get-file-preview.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.storage import Storage - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -storage = Storage(client) - -result = storage.get_file_preview('[FILE_ID]') diff --git a/app/sdks/0.7.0/server-python/docs/examples/storage/get-file-view.md b/app/sdks/0.7.0/server-python/docs/examples/storage/get-file-view.md deleted file mode 100644 index 892b93ca97..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/storage/get-file-view.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.storage import Storage - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -storage = Storage(client) - -result = storage.get_file_view('[FILE_ID]') diff --git a/app/sdks/0.7.0/server-python/docs/examples/storage/get-file.md b/app/sdks/0.7.0/server-python/docs/examples/storage/get-file.md deleted file mode 100644 index cded2ba12f..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/storage/get-file.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.storage import Storage - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -storage = Storage(client) - -result = storage.get_file('[FILE_ID]') diff --git a/app/sdks/0.7.0/server-python/docs/examples/storage/list-files.md b/app/sdks/0.7.0/server-python/docs/examples/storage/list-files.md deleted file mode 100644 index d54bb75d79..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/storage/list-files.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.storage import Storage - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -storage = Storage(client) - -result = storage.list_files() diff --git a/app/sdks/0.7.0/server-python/docs/examples/storage/update-file.md b/app/sdks/0.7.0/server-python/docs/examples/storage/update-file.md deleted file mode 100644 index 5001cbae74..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/storage/update-file.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.storage import Storage - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -storage = Storage(client) - -result = storage.update_file('[FILE_ID]', [], []) diff --git a/app/sdks/0.7.0/server-python/docs/examples/teams/create-membership.md b/app/sdks/0.7.0/server-python/docs/examples/teams/create-membership.md deleted file mode 100644 index e72ddc6fe3..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/teams/create-membership.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.teams import Teams - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -teams = Teams(client) - -result = teams.create_membership('[TEAM_ID]', 'email@example.com', [], 'https://example.com') diff --git a/app/sdks/0.7.0/server-python/docs/examples/teams/create.md b/app/sdks/0.7.0/server-python/docs/examples/teams/create.md deleted file mode 100644 index d4d1ba63c8..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/teams/create.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.teams import Teams - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -teams = Teams(client) - -result = teams.create('[NAME]') diff --git a/app/sdks/0.7.0/server-python/docs/examples/teams/delete-membership.md b/app/sdks/0.7.0/server-python/docs/examples/teams/delete-membership.md deleted file mode 100644 index e08e44fdcc..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/teams/delete-membership.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.teams import Teams - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -teams = Teams(client) - -result = teams.delete_membership('[TEAM_ID]', '[INVITE_ID]') diff --git a/app/sdks/0.7.0/server-python/docs/examples/teams/delete.md b/app/sdks/0.7.0/server-python/docs/examples/teams/delete.md deleted file mode 100644 index 87d953ff5f..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/teams/delete.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.teams import Teams - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -teams = Teams(client) - -result = teams.delete('[TEAM_ID]') diff --git a/app/sdks/0.7.0/server-python/docs/examples/teams/get-memberships.md b/app/sdks/0.7.0/server-python/docs/examples/teams/get-memberships.md deleted file mode 100644 index 01879bb280..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/teams/get-memberships.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.teams import Teams - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -teams = Teams(client) - -result = teams.get_memberships('[TEAM_ID]') diff --git a/app/sdks/0.7.0/server-python/docs/examples/teams/get.md b/app/sdks/0.7.0/server-python/docs/examples/teams/get.md deleted file mode 100644 index c1f90c8fe1..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/teams/get.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.teams import Teams - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -teams = Teams(client) - -result = teams.get('[TEAM_ID]') diff --git a/app/sdks/0.7.0/server-python/docs/examples/teams/list.md b/app/sdks/0.7.0/server-python/docs/examples/teams/list.md deleted file mode 100644 index a3d831ff4f..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/teams/list.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.teams import Teams - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -teams = Teams(client) - -result = teams.list() diff --git a/app/sdks/0.7.0/server-python/docs/examples/teams/update.md b/app/sdks/0.7.0/server-python/docs/examples/teams/update.md deleted file mode 100644 index 63f6acdc9b..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/teams/update.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.teams import Teams - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -teams = Teams(client) - -result = teams.update('[TEAM_ID]', '[NAME]') diff --git a/app/sdks/0.7.0/server-python/docs/examples/users/create.md b/app/sdks/0.7.0/server-python/docs/examples/users/create.md deleted file mode 100644 index 4c63f3771d..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/users/create.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.users import Users - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -users = Users(client) - -result = users.create('email@example.com', 'password') diff --git a/app/sdks/0.7.0/server-python/docs/examples/users/delete-session.md b/app/sdks/0.7.0/server-python/docs/examples/users/delete-session.md deleted file mode 100644 index ca2fa99b56..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/users/delete-session.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.users import Users - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -users = Users(client) - -result = users.delete_session('[USER_ID]', '[SESSION_ID]') diff --git a/app/sdks/0.7.0/server-python/docs/examples/users/delete-sessions.md b/app/sdks/0.7.0/server-python/docs/examples/users/delete-sessions.md deleted file mode 100644 index fe4b2be3a8..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/users/delete-sessions.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.users import Users - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -users = Users(client) - -result = users.delete_sessions('[USER_ID]') diff --git a/app/sdks/0.7.0/server-python/docs/examples/users/get-logs.md b/app/sdks/0.7.0/server-python/docs/examples/users/get-logs.md deleted file mode 100644 index 22816871d2..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/users/get-logs.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.users import Users - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -users = Users(client) - -result = users.get_logs('[USER_ID]') diff --git a/app/sdks/0.7.0/server-python/docs/examples/users/get-prefs.md b/app/sdks/0.7.0/server-python/docs/examples/users/get-prefs.md deleted file mode 100644 index 846c7c13f5..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/users/get-prefs.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.users import Users - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -users = Users(client) - -result = users.get_prefs('[USER_ID]') diff --git a/app/sdks/0.7.0/server-python/docs/examples/users/get-sessions.md b/app/sdks/0.7.0/server-python/docs/examples/users/get-sessions.md deleted file mode 100644 index 0e29608697..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/users/get-sessions.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.users import Users - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -users = Users(client) - -result = users.get_sessions('[USER_ID]') diff --git a/app/sdks/0.7.0/server-python/docs/examples/users/get.md b/app/sdks/0.7.0/server-python/docs/examples/users/get.md deleted file mode 100644 index bc23f2238c..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/users/get.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.users import Users - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -users = Users(client) - -result = users.get('[USER_ID]') diff --git a/app/sdks/0.7.0/server-python/docs/examples/users/list.md b/app/sdks/0.7.0/server-python/docs/examples/users/list.md deleted file mode 100644 index b7492fa9bf..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/users/list.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.users import Users - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -users = Users(client) - -result = users.list() diff --git a/app/sdks/0.7.0/server-python/docs/examples/users/update-prefs.md b/app/sdks/0.7.0/server-python/docs/examples/users/update-prefs.md deleted file mode 100644 index c78546f484..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/users/update-prefs.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.users import Users - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -users = Users(client) - -result = users.update_prefs('[USER_ID]', {}) diff --git a/app/sdks/0.7.0/server-python/docs/examples/users/update-status.md b/app/sdks/0.7.0/server-python/docs/examples/users/update-status.md deleted file mode 100644 index f40c83b61e..0000000000 --- a/app/sdks/0.7.0/server-python/docs/examples/users/update-status.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.users import Users - -client = Client() - -(client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -) - -users = Users(client) - -result = users.update_status('[USER_ID]', '1') diff --git a/app/sdks/0.7.0/server-python/requirements.txt b/app/sdks/0.7.0/server-python/requirements.txt deleted file mode 100644 index e20605c43d..0000000000 --- a/app/sdks/0.7.0/server-python/requirements.txt +++ /dev/null @@ -1 +0,0 @@ -requests==2.22.0 \ No newline at end of file diff --git a/app/sdks/0.7.0/server-python/setup.cfg b/app/sdks/0.7.0/server-python/setup.cfg deleted file mode 100644 index 224a77957f..0000000000 --- a/app/sdks/0.7.0/server-python/setup.cfg +++ /dev/null @@ -1,2 +0,0 @@ -[metadata] -description-file = README.md \ No newline at end of file diff --git a/app/sdks/0.7.0/server-python/setup.py b/app/sdks/0.7.0/server-python/setup.py deleted file mode 100644 index 8e2fd0c3cb..0000000000 --- a/app/sdks/0.7.0/server-python/setup.py +++ /dev/null @@ -1,30 +0,0 @@ -import setuptools - -setuptools.setup( - name = 'appwrite', - packages = ['appwrite', 'appwrite/services'], - version = '0.0.6', - license='BSD-3-Clause', - description = 'Appwrite is an open-source self-hosted backend server that abstract and simplify complex and repetitive development tasks behind a very simple REST API', - author = 'Appwrite Team', - author_email = 'team@localhost.test', - maintainer = 'Appwrite Team', - maintainer_email = 'team@localhost.test', - url = 'https://appwrite.io/support', - download_url='https://github.com/appwrite/sdk-for-python/archive/0.0.6.tar.gz', - # keywords = ['SOME', 'MEANINGFULL', 'KEYWORDS'], - install_requires=[ - 'requests', - ], - classifiers=[ - 'Development Status :: 5 - Production/Stable', - 'Intended Audience :: Developers', - 'Environment :: Web Environment', - 'Topic :: Software Development', - 'License :: OSI Approved :: BSD License', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.5', - 'Programming Language :: Python :: 3.6', - 'Programming Language :: Python :: 3.7', - ], -) diff --git a/app/sdks/0.7.0/server-ruby/CHANGELOG.md b/app/sdks/0.7.0/server-ruby/CHANGELOG.md deleted file mode 100644 index fa4d35e687..0000000000 --- a/app/sdks/0.7.0/server-ruby/CHANGELOG.md +++ /dev/null @@ -1 +0,0 @@ -# Change Log \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/Gemfile b/app/sdks/0.7.0/server-ruby/Gemfile deleted file mode 100644 index cd8aa9e04c..0000000000 --- a/app/sdks/0.7.0/server-ruby/Gemfile +++ /dev/null @@ -1,3 +0,0 @@ -source 'https://rubygems.org' - -gemspec \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/LICENSE b/app/sdks/0.7.0/server-ruby/LICENSE deleted file mode 100644 index fc7c051a91..0000000000 --- a/app/sdks/0.7.0/server-ruby/LICENSE +++ /dev/null @@ -1,12 +0,0 @@ -Copyright (c) 2019 Appwrite (https://appwrite.io) and individual contributors. -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - - 3. Neither the name Appwrite nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/README.md b/app/sdks/0.7.0/server-ruby/README.md deleted file mode 100644 index cbc2cf781c..0000000000 --- a/app/sdks/0.7.0/server-ruby/README.md +++ /dev/null @@ -1,30 +0,0 @@ -# Appwrite Ruby SDK - -![License](https://img.shields.io/github/license/appwrite/sdk-for-ruby.svg?v=1) -![Version](https://img.shields.io/badge/api%20version-0.6.1-blue.svg?v=1) - -**This SDK is compatible with Appwrite server version 0.6.1. For older versions, please check previous releases.** - -Appwrite is an open-source backend as a service server that abstract and simplify complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way. - Use the Ruby SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools. - For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs) - - - -![Appwrite](https://appwrite.io/images/github.png) - -## Installation - -To install via [Gem](https://rubygems.org/): - -```bash -gem install appwrite --save -``` - -## Contribution - -This library is auto-generated by Appwrite custom [SDK Generator](https://github.com/appwrite/sdk-generator). To learn more about how you can help us improve this SDK, please check the [contribution guide](https://github.com/appwrite/sdk-generator/blob/master/CONTRIBUTING.md) before sending a pull-request. - -## License - -Please see the [BSD-3-Clause license](https://raw.githubusercontent.com/appwrite/appwrite/master/LICENSE) file for more information. \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/appwrite.gemspec b/app/sdks/0.7.0/server-ruby/appwrite.gemspec deleted file mode 100644 index f550cecf9f..0000000000 --- a/app/sdks/0.7.0/server-ruby/appwrite.gemspec +++ /dev/null @@ -1,13 +0,0 @@ -Gem::Specification.new do |s| - - s.name = 'appwrite' - s.version = '1.0.11' - s.summary = "Appwrite is an open-source backend as a service server that abstract and simplify complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way. - Use the Ruby SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools. - For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs)" - s.author = 'Appwrite Team' - s.homepage = 'https://appwrite.io/support' - s.email = 'team@localhost.test' - s.files = `git ls-files`.split($INPUT_RECORD_SEPARATOR) - -end \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/avatars/get-browser.md b/app/sdks/0.7.0/server-ruby/docs/examples/avatars/get-browser.md deleted file mode 100644 index fc0cfc913f..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/avatars/get-browser.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -avatars = Appwrite::Avatars.new(client); - -response = avatars.get_browser(code: 'aa'); - -puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/avatars/get-credit-card.md b/app/sdks/0.7.0/server-ruby/docs/examples/avatars/get-credit-card.md deleted file mode 100644 index b3763f0846..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/avatars/get-credit-card.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -avatars = Appwrite::Avatars.new(client); - -response = avatars.get_credit_card(code: 'amex'); - -puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/avatars/get-favicon.md b/app/sdks/0.7.0/server-ruby/docs/examples/avatars/get-favicon.md deleted file mode 100644 index 2ee4e75789..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/avatars/get-favicon.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -avatars = Appwrite::Avatars.new(client); - -response = avatars.get_favicon(url: 'https://example.com'); - -puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/avatars/get-flag.md b/app/sdks/0.7.0/server-ruby/docs/examples/avatars/get-flag.md deleted file mode 100644 index 2e2f01f0f9..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/avatars/get-flag.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -avatars = Appwrite::Avatars.new(client); - -response = avatars.get_flag(code: 'af'); - -puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/avatars/get-image.md b/app/sdks/0.7.0/server-ruby/docs/examples/avatars/get-image.md deleted file mode 100644 index 682d6bf9df..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/avatars/get-image.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -avatars = Appwrite::Avatars.new(client); - -response = avatars.get_image(url: 'https://example.com'); - -puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/avatars/get-q-r.md b/app/sdks/0.7.0/server-ruby/docs/examples/avatars/get-q-r.md deleted file mode 100644 index f145425ca2..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/avatars/get-q-r.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -avatars = Appwrite::Avatars.new(client); - -response = avatars.get_q_r(text: '[TEXT]'); - -puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/database/create-collection.md b/app/sdks/0.7.0/server-ruby/docs/examples/database/create-collection.md deleted file mode 100644 index 0317ed9f05..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/database/create-collection.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -database = Appwrite::Database.new(client); - -response = database.create_collection(name: '[NAME]', read: [], write: [], rules: []); - -puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/database/create-document.md b/app/sdks/0.7.0/server-ruby/docs/examples/database/create-document.md deleted file mode 100644 index 0101c746b4..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/database/create-document.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -database = Appwrite::Database.new(client); - -response = database.create_document(collection_id: '[COLLECTION_ID]', data: {}, read: [], write: []); - -puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/database/delete-collection.md b/app/sdks/0.7.0/server-ruby/docs/examples/database/delete-collection.md deleted file mode 100644 index b91c369da7..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/database/delete-collection.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -database = Appwrite::Database.new(client); - -response = database.delete_collection(collection_id: '[COLLECTION_ID]'); - -puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/database/delete-document.md b/app/sdks/0.7.0/server-ruby/docs/examples/database/delete-document.md deleted file mode 100644 index 6548ec2946..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/database/delete-document.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -database = Appwrite::Database.new(client); - -response = database.delete_document(collection_id: '[COLLECTION_ID]', document_id: '[DOCUMENT_ID]'); - -puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/database/get-collection-logs.md b/app/sdks/0.7.0/server-ruby/docs/examples/database/get-collection-logs.md deleted file mode 100644 index 65938d1af9..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/database/get-collection-logs.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -database = Appwrite::Database.new(client); - -response = database.get_collection_logs(collection_id: '[COLLECTION_ID]'); - -puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/database/get-collection.md b/app/sdks/0.7.0/server-ruby/docs/examples/database/get-collection.md deleted file mode 100644 index 1e54e94c10..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/database/get-collection.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -database = Appwrite::Database.new(client); - -response = database.get_collection(collection_id: '[COLLECTION_ID]'); - -puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/database/get-document.md b/app/sdks/0.7.0/server-ruby/docs/examples/database/get-document.md deleted file mode 100644 index 3040b82c03..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/database/get-document.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -database = Appwrite::Database.new(client); - -response = database.get_document(collection_id: '[COLLECTION_ID]', document_id: '[DOCUMENT_ID]'); - -puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/database/list-collections.md b/app/sdks/0.7.0/server-ruby/docs/examples/database/list-collections.md deleted file mode 100644 index ec15fe3b08..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/database/list-collections.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -database = Appwrite::Database.new(client); - -response = database.list_collections(); - -puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/database/list-documents.md b/app/sdks/0.7.0/server-ruby/docs/examples/database/list-documents.md deleted file mode 100644 index fa33f10ccf..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/database/list-documents.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -database = Appwrite::Database.new(client); - -response = database.list_documents(collection_id: '[COLLECTION_ID]'); - -puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/database/update-collection.md b/app/sdks/0.7.0/server-ruby/docs/examples/database/update-collection.md deleted file mode 100644 index 3ecfbdb4ab..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/database/update-collection.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -database = Appwrite::Database.new(client); - -response = database.update_collection(collection_id: '[COLLECTION_ID]', name: '[NAME]', read: [], write: []); - -puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/database/update-document.md b/app/sdks/0.7.0/server-ruby/docs/examples/database/update-document.md deleted file mode 100644 index 492d4f3edc..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/database/update-document.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -database = Appwrite::Database.new(client); - -response = database.update_document(collection_id: '[COLLECTION_ID]', document_id: '[DOCUMENT_ID]', data: {}, read: [], write: []); - -puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/health/get-anti-virus.md b/app/sdks/0.7.0/server-ruby/docs/examples/health/get-anti-virus.md deleted file mode 100644 index 0c83a06cf8..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/health/get-anti-virus.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -health = Appwrite::Health.new(client); - -response = health.get_anti_virus(); - -puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/health/get-cache.md b/app/sdks/0.7.0/server-ruby/docs/examples/health/get-cache.md deleted file mode 100644 index 6f51fb6e00..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/health/get-cache.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -health = Appwrite::Health.new(client); - -response = health.get_cache(); - -puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/health/get-d-b.md b/app/sdks/0.7.0/server-ruby/docs/examples/health/get-d-b.md deleted file mode 100644 index 4bb00577a7..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/health/get-d-b.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -health = Appwrite::Health.new(client); - -response = health.get_d_b(); - -puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/health/get-queue-certificates.md b/app/sdks/0.7.0/server-ruby/docs/examples/health/get-queue-certificates.md deleted file mode 100644 index f758b7c3a4..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/health/get-queue-certificates.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -health = Appwrite::Health.new(client); - -response = health.get_queue_certificates(); - -puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/health/get-queue-functions.md b/app/sdks/0.7.0/server-ruby/docs/examples/health/get-queue-functions.md deleted file mode 100644 index 653607f79d..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/health/get-queue-functions.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -health = Appwrite::Health.new(client); - -response = health.get_queue_functions(); - -puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/health/get-queue-logs.md b/app/sdks/0.7.0/server-ruby/docs/examples/health/get-queue-logs.md deleted file mode 100644 index c6751f7f91..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/health/get-queue-logs.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -health = Appwrite::Health.new(client); - -response = health.get_queue_logs(); - -puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/health/get-queue-tasks.md b/app/sdks/0.7.0/server-ruby/docs/examples/health/get-queue-tasks.md deleted file mode 100644 index c6da38832e..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/health/get-queue-tasks.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -health = Appwrite::Health.new(client); - -response = health.get_queue_tasks(); - -puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/health/get-queue-usage.md b/app/sdks/0.7.0/server-ruby/docs/examples/health/get-queue-usage.md deleted file mode 100644 index ed81452d86..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/health/get-queue-usage.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -health = Appwrite::Health.new(client); - -response = health.get_queue_usage(); - -puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/health/get-queue-webhooks.md b/app/sdks/0.7.0/server-ruby/docs/examples/health/get-queue-webhooks.md deleted file mode 100644 index 9e55ab1d87..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/health/get-queue-webhooks.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -health = Appwrite::Health.new(client); - -response = health.get_queue_webhooks(); - -puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/health/get-storage-local.md b/app/sdks/0.7.0/server-ruby/docs/examples/health/get-storage-local.md deleted file mode 100644 index 09c47ae437..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/health/get-storage-local.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -health = Appwrite::Health.new(client); - -response = health.get_storage_local(); - -puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/health/get-time.md b/app/sdks/0.7.0/server-ruby/docs/examples/health/get-time.md deleted file mode 100644 index 3d72794e93..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/health/get-time.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -health = Appwrite::Health.new(client); - -response = health.get_time(); - -puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/health/get.md b/app/sdks/0.7.0/server-ruby/docs/examples/health/get.md deleted file mode 100644 index 9496c31b36..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/health/get.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -health = Appwrite::Health.new(client); - -response = health.get(); - -puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/locale/get-continents.md b/app/sdks/0.7.0/server-ruby/docs/examples/locale/get-continents.md deleted file mode 100644 index 92f38922e1..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/locale/get-continents.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -locale = Appwrite::Locale.new(client); - -response = locale.get_continents(); - -puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/locale/get-countries-e-u.md b/app/sdks/0.7.0/server-ruby/docs/examples/locale/get-countries-e-u.md deleted file mode 100644 index b83125d4a6..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/locale/get-countries-e-u.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -locale = Appwrite::Locale.new(client); - -response = locale.get_countries_e_u(); - -puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/locale/get-countries-phones.md b/app/sdks/0.7.0/server-ruby/docs/examples/locale/get-countries-phones.md deleted file mode 100644 index 728a1b3cdc..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/locale/get-countries-phones.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -locale = Appwrite::Locale.new(client); - -response = locale.get_countries_phones(); - -puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/locale/get-countries.md b/app/sdks/0.7.0/server-ruby/docs/examples/locale/get-countries.md deleted file mode 100644 index 54975db928..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/locale/get-countries.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -locale = Appwrite::Locale.new(client); - -response = locale.get_countries(); - -puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/locale/get-currencies.md b/app/sdks/0.7.0/server-ruby/docs/examples/locale/get-currencies.md deleted file mode 100644 index 4e39b435e1..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/locale/get-currencies.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -locale = Appwrite::Locale.new(client); - -response = locale.get_currencies(); - -puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/locale/get.md b/app/sdks/0.7.0/server-ruby/docs/examples/locale/get.md deleted file mode 100644 index b390d505c4..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/locale/get.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -locale = Appwrite::Locale.new(client); - -response = locale.get(); - -puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/storage/create-file.md b/app/sdks/0.7.0/server-ruby/docs/examples/storage/create-file.md deleted file mode 100644 index b044e35b86..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/storage/create-file.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -storage = Appwrite::Storage.new(client); - -response = storage.create_file(file: File.new(), read: [], write: []); - -puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/storage/delete-file.md b/app/sdks/0.7.0/server-ruby/docs/examples/storage/delete-file.md deleted file mode 100644 index 1aa67b3537..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/storage/delete-file.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -storage = Appwrite::Storage.new(client); - -response = storage.delete_file(file_id: '[FILE_ID]'); - -puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/storage/get-file-download.md b/app/sdks/0.7.0/server-ruby/docs/examples/storage/get-file-download.md deleted file mode 100644 index 777c565d06..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/storage/get-file-download.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -storage = Appwrite::Storage.new(client); - -response = storage.get_file_download(file_id: '[FILE_ID]'); - -puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/storage/get-file-preview.md b/app/sdks/0.7.0/server-ruby/docs/examples/storage/get-file-preview.md deleted file mode 100644 index 48be3a044e..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/storage/get-file-preview.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -storage = Appwrite::Storage.new(client); - -response = storage.get_file_preview(file_id: '[FILE_ID]'); - -puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/storage/get-file-view.md b/app/sdks/0.7.0/server-ruby/docs/examples/storage/get-file-view.md deleted file mode 100644 index a3dc012098..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/storage/get-file-view.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -storage = Appwrite::Storage.new(client); - -response = storage.get_file_view(file_id: '[FILE_ID]'); - -puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/storage/get-file.md b/app/sdks/0.7.0/server-ruby/docs/examples/storage/get-file.md deleted file mode 100644 index 203a4dff7c..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/storage/get-file.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -storage = Appwrite::Storage.new(client); - -response = storage.get_file(file_id: '[FILE_ID]'); - -puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/storage/list-files.md b/app/sdks/0.7.0/server-ruby/docs/examples/storage/list-files.md deleted file mode 100644 index a148da78f9..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/storage/list-files.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -storage = Appwrite::Storage.new(client); - -response = storage.list_files(); - -puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/storage/update-file.md b/app/sdks/0.7.0/server-ruby/docs/examples/storage/update-file.md deleted file mode 100644 index 36d5049816..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/storage/update-file.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -storage = Appwrite::Storage.new(client); - -response = storage.update_file(file_id: '[FILE_ID]', read: [], write: []); - -puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/teams/create-membership.md b/app/sdks/0.7.0/server-ruby/docs/examples/teams/create-membership.md deleted file mode 100644 index fc0a249361..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/teams/create-membership.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -teams = Appwrite::Teams.new(client); - -response = teams.create_membership(team_id: '[TEAM_ID]', email: 'email@example.com', roles: [], url: 'https://example.com'); - -puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/teams/create.md b/app/sdks/0.7.0/server-ruby/docs/examples/teams/create.md deleted file mode 100644 index d7f9c2f8c0..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/teams/create.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -teams = Appwrite::Teams.new(client); - -response = teams.create(name: '[NAME]'); - -puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/teams/delete-membership.md b/app/sdks/0.7.0/server-ruby/docs/examples/teams/delete-membership.md deleted file mode 100644 index 545cacc51f..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/teams/delete-membership.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -teams = Appwrite::Teams.new(client); - -response = teams.delete_membership(team_id: '[TEAM_ID]', invite_id: '[INVITE_ID]'); - -puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/teams/delete.md b/app/sdks/0.7.0/server-ruby/docs/examples/teams/delete.md deleted file mode 100644 index d28907f741..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/teams/delete.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -teams = Appwrite::Teams.new(client); - -response = teams.delete(team_id: '[TEAM_ID]'); - -puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/teams/get-memberships.md b/app/sdks/0.7.0/server-ruby/docs/examples/teams/get-memberships.md deleted file mode 100644 index 013d952afc..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/teams/get-memberships.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -teams = Appwrite::Teams.new(client); - -response = teams.get_memberships(team_id: '[TEAM_ID]'); - -puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/teams/get.md b/app/sdks/0.7.0/server-ruby/docs/examples/teams/get.md deleted file mode 100644 index 1dd4918a12..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/teams/get.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -teams = Appwrite::Teams.new(client); - -response = teams.get(team_id: '[TEAM_ID]'); - -puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/teams/list.md b/app/sdks/0.7.0/server-ruby/docs/examples/teams/list.md deleted file mode 100644 index c0cd72a362..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/teams/list.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -teams = Appwrite::Teams.new(client); - -response = teams.list(); - -puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/teams/update.md b/app/sdks/0.7.0/server-ruby/docs/examples/teams/update.md deleted file mode 100644 index b7e87a8e09..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/teams/update.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -teams = Appwrite::Teams.new(client); - -response = teams.update(team_id: '[TEAM_ID]', name: '[NAME]'); - -puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/users/create.md b/app/sdks/0.7.0/server-ruby/docs/examples/users/create.md deleted file mode 100644 index 0a152ac366..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/users/create.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -users = Appwrite::Users.new(client); - -response = users.create(email: 'email@example.com', password: 'password'); - -puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/users/delete-session.md b/app/sdks/0.7.0/server-ruby/docs/examples/users/delete-session.md deleted file mode 100644 index 149c7d9293..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/users/delete-session.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -users = Appwrite::Users.new(client); - -response = users.delete_session(user_id: '[USER_ID]', session_id: '[SESSION_ID]'); - -puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/users/delete-sessions.md b/app/sdks/0.7.0/server-ruby/docs/examples/users/delete-sessions.md deleted file mode 100644 index 3f02e08dd1..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/users/delete-sessions.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -users = Appwrite::Users.new(client); - -response = users.delete_sessions(user_id: '[USER_ID]'); - -puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/users/get-logs.md b/app/sdks/0.7.0/server-ruby/docs/examples/users/get-logs.md deleted file mode 100644 index 695a77ad27..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/users/get-logs.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -users = Appwrite::Users.new(client); - -response = users.get_logs(user_id: '[USER_ID]'); - -puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/users/get-prefs.md b/app/sdks/0.7.0/server-ruby/docs/examples/users/get-prefs.md deleted file mode 100644 index 4a0761e283..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/users/get-prefs.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -users = Appwrite::Users.new(client); - -response = users.get_prefs(user_id: '[USER_ID]'); - -puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/users/get-sessions.md b/app/sdks/0.7.0/server-ruby/docs/examples/users/get-sessions.md deleted file mode 100644 index 52f37a4609..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/users/get-sessions.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -users = Appwrite::Users.new(client); - -response = users.get_sessions(user_id: '[USER_ID]'); - -puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/users/get.md b/app/sdks/0.7.0/server-ruby/docs/examples/users/get.md deleted file mode 100644 index 562ac958c3..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/users/get.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -users = Appwrite::Users.new(client); - -response = users.get(user_id: '[USER_ID]'); - -puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/users/list.md b/app/sdks/0.7.0/server-ruby/docs/examples/users/list.md deleted file mode 100644 index 096ce859e3..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/users/list.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -users = Appwrite::Users.new(client); - -response = users.list(); - -puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/users/update-prefs.md b/app/sdks/0.7.0/server-ruby/docs/examples/users/update-prefs.md deleted file mode 100644 index 2bb2d42e16..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/users/update-prefs.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -users = Appwrite::Users.new(client); - -response = users.update_prefs(user_id: '[USER_ID]', prefs: {}); - -puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/docs/examples/users/update-status.md b/app/sdks/0.7.0/server-ruby/docs/examples/users/update-status.md deleted file mode 100644 index 088ee380d8..0000000000 --- a/app/sdks/0.7.0/server-ruby/docs/examples/users/update-status.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -client = Appwrite::Client.new() - -client - .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint - .set_project('5df5acd0d48c2') # Your project ID - .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key -; - -users = Appwrite::Users.new(client); - -response = users.update_status(user_id: '[USER_ID]', status: '1'); - -puts response \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/lib/appwrite.rb b/app/sdks/0.7.0/server-ruby/lib/appwrite.rb deleted file mode 100644 index 1b4f38bea2..0000000000 --- a/app/sdks/0.7.0/server-ruby/lib/appwrite.rb +++ /dev/null @@ -1,13 +0,0 @@ -require 'net/http' -require 'uri' -require 'json' -require_relative 'appwrite/client' -require_relative 'appwrite/service' -require_relative 'appwrite/services/avatars' -require_relative 'appwrite/services/database' -require_relative 'appwrite/services/functions' -require_relative 'appwrite/services/health' -require_relative 'appwrite/services/locale' -require_relative 'appwrite/services/storage' -require_relative 'appwrite/services/teams' -require_relative 'appwrite/services/users' diff --git a/app/sdks/0.7.0/server-ruby/lib/appwrite/client.rb b/app/sdks/0.7.0/server-ruby/lib/appwrite/client.rb deleted file mode 100644 index 2cd09d52fe..0000000000 --- a/app/sdks/0.7.0/server-ruby/lib/appwrite/client.rb +++ /dev/null @@ -1,116 +0,0 @@ -require 'net/http' -require 'uri' -require 'json' -require 'cgi' - -module Appwrite - class Client - - METHOD_GET = 'get' - METHOD_POST = 'post' - METHOD_PUT = 'put' - METHOD_PATCH = 'patch' - METHOD_DELETE = 'delete' - METHOD_HEAD = 'head' - METHOD_OPTIONS = 'options' - METHOD_CONNECT = 'connect' - METHOD_TRACE = 'trace' - - def initialize() - @headers = { - 'content-type' => '', - 'user-agent' => RUBY_PLATFORM + ':ruby-' + RUBY_VERSION, - 'x-sdk-version' => 'appwrite:ruby:1.0.11' - } - @endpoint = 'https://appwrite.io/v1'; - end - - def set_project(value) - add_header('x-appwrite-project', value) - - return self - end - - def set_key(value) - add_header('x-appwrite-key', value) - - return self - end - - def set_locale(value) - add_header('x-appwrite-locale', value) - - return self - end - - def set_endpoint(endpoint) - @endpoint = endpoint - - return self - end - - def add_header(key, value) - @headers[key.downcase] = value.downcase - - return self - end - - def call(method, path = '', headers = {}, params = {}) - uri = URI.parse(@endpoint + path + ((method == METHOD_GET && params.length) ? '?' + encode(params) : '')) - return fetch(method, uri, headers, params) - end - - protected - - private - - def fetch(method, uri, headers, params, limit = 5) - raise ArgumentError, 'Too Many HTTP Redirects' if limit == 0 - - http = Net::HTTP.new(uri.host, uri.port) - http.use_ssl = (uri.scheme == 'https') - payload = '' - - headers = @headers.merge(headers) - - if (method != METHOD_GET) - case headers['content-type'][0, headers['content-type'].index(';') || headers['content-type'].length] - when 'application/json' - payload = params.to_json - else - payload = encode(params) - end - end - - begin - response = http.send_request(method.upcase, uri.request_uri, payload, headers) - rescue => error - raise 'Request Failed: ' + error.message - end - - # Handle Redirects - if (response.class == Net::HTTPRedirection || response.class == Net::HTTPMovedPermanently) - location = response['location'] - uri = URI.parse(uri.scheme + "://" + uri.host + "" + location) - - return fetch(method, uri, headers, {}, limit - 1) - end - - return JSON.parse(response.body); - end - - def encode(value, key = nil) - case value - when Hash then value.map { |k,v| encode(v, append_key(key,k)) }.join('&') - when Array then value.map { |v| encode(v, "#{key}[]") }.join('&') - when nil then '' - else - "#{key}=#{CGI.escape(value.to_s)}" - end - end - - def append_key(root_key, key) - root_key.nil? ? key : "#{root_key}[#{key.to_s}]" - end - end -end \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/lib/appwrite/service.rb b/app/sdks/0.7.0/server-ruby/lib/appwrite/service.rb deleted file mode 100644 index 0d954c6d17..0000000000 --- a/app/sdks/0.7.0/server-ruby/lib/appwrite/service.rb +++ /dev/null @@ -1,12 +0,0 @@ -module Appwrite - class Service - - def initialize(client) - @client = client - end - - protected - - private - end -end \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/lib/appwrite/services/avatars.rb b/app/sdks/0.7.0/server-ruby/lib/appwrite/services/avatars.rb deleted file mode 100644 index 2c8e8ee723..0000000000 --- a/app/sdks/0.7.0/server-ruby/lib/appwrite/services/avatars.rb +++ /dev/null @@ -1,95 +0,0 @@ -module Appwrite - class Avatars < Service - - def get_browser(code:, width: 100, height: 100, quality: 100) - path = '/avatars/browsers/{code}' - .gsub('{code}', code) - - params = { - 'width': width, - 'height': height, - 'quality': quality - } - - return @client.call('get', path, { - 'content-type' => 'application/json', - }, params); - end - - def get_credit_card(code:, width: 100, height: 100, quality: 100) - path = '/avatars/credit-cards/{code}' - .gsub('{code}', code) - - params = { - 'width': width, - 'height': height, - 'quality': quality - } - - return @client.call('get', path, { - 'content-type' => 'application/json', - }, params); - end - - def get_favicon(url:) - path = '/avatars/favicon' - - params = { - 'url': url - } - - return @client.call('get', path, { - 'content-type' => 'application/json', - }, params); - end - - def get_flag(code:, width: 100, height: 100, quality: 100) - path = '/avatars/flags/{code}' - .gsub('{code}', code) - - params = { - 'width': width, - 'height': height, - 'quality': quality - } - - return @client.call('get', path, { - 'content-type' => 'application/json', - }, params); - end - - def get_image(url:, width: 400, height: 400) - path = '/avatars/image' - - params = { - 'url': url, - 'width': width, - 'height': height - } - - return @client.call('get', path, { - 'content-type' => 'application/json', - }, params); - end - - def get_q_r(text:, size: 400, margin: 1, download: 0) - path = '/avatars/qr' - - params = { - 'text': text, - 'size': size, - 'margin': margin, - 'download': download - } - - return @client.call('get', path, { - 'content-type' => 'application/json', - }, params); - end - - - protected - - private - end -end \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/lib/appwrite/services/database.rb b/app/sdks/0.7.0/server-ruby/lib/appwrite/services/database.rb deleted file mode 100644 index d8efcc34e1..0000000000 --- a/app/sdks/0.7.0/server-ruby/lib/appwrite/services/database.rb +++ /dev/null @@ -1,172 +0,0 @@ -module Appwrite - class Database < Service - - def list_collections(search: '', limit: 25, offset: 0, order_type: 'ASC') - path = '/database/collections' - - params = { - 'search': search, - 'limit': limit, - 'offset': offset, - 'orderType': order_type - } - - return @client.call('get', path, { - 'content-type' => 'application/json', - }, params); - end - - def create_collection(name:, read:, write:, rules:) - path = '/database/collections' - - params = { - 'name': name, - 'read': read, - 'write': write, - 'rules': rules - } - - return @client.call('post', path, { - 'content-type' => 'application/json', - }, params); - end - - def get_collection(collection_id:) - path = '/database/collections/{collectionId}' - .gsub('{collectionId}', collection_id) - - params = { - } - - return @client.call('get', path, { - 'content-type' => 'application/json', - }, params); - end - - def update_collection(collection_id:, name:, read:, write:, rules: []) - path = '/database/collections/{collectionId}' - .gsub('{collectionId}', collection_id) - - params = { - 'name': name, - 'read': read, - 'write': write, - 'rules': rules - } - - return @client.call('put', path, { - 'content-type' => 'application/json', - }, params); - end - - def delete_collection(collection_id:) - path = '/database/collections/{collectionId}' - .gsub('{collectionId}', collection_id) - - params = { - } - - return @client.call('delete', path, { - 'content-type' => 'application/json', - }, params); - end - - def list_documents(collection_id:, filters: [], offset: 0, limit: 50, order_field: '$id', order_type: 'ASC', order_cast: 'string', search: '', first: 0, last: 0) - path = '/database/collections/{collectionId}/documents' - .gsub('{collectionId}', collection_id) - - params = { - 'filters': filters, - 'offset': offset, - 'limit': limit, - 'orderField': order_field, - 'orderType': order_type, - 'orderCast': order_cast, - 'search': search, - 'first': first, - 'last': last - } - - return @client.call('get', path, { - 'content-type' => 'application/json', - }, params); - end - - def create_document(collection_id:, data:, read:, write:, parent_document: '', parent_property: '', parent_property_type: 'assign') - path = '/database/collections/{collectionId}/documents' - .gsub('{collectionId}', collection_id) - - params = { - 'data': data, - 'read': read, - 'write': write, - 'parentDocument': parent_document, - 'parentProperty': parent_property, - 'parentPropertyType': parent_property_type - } - - return @client.call('post', path, { - 'content-type' => 'application/json', - }, params); - end - - def get_document(collection_id:, document_id:) - path = '/database/collections/{collectionId}/documents/{documentId}' - .gsub('{collectionId}', collection_id) - .gsub('{documentId}', document_id) - - params = { - } - - return @client.call('get', path, { - 'content-type' => 'application/json', - }, params); - end - - def update_document(collection_id:, document_id:, data:, read:, write:) - path = '/database/collections/{collectionId}/documents/{documentId}' - .gsub('{collectionId}', collection_id) - .gsub('{documentId}', document_id) - - params = { - 'data': data, - 'read': read, - 'write': write - } - - return @client.call('patch', path, { - 'content-type' => 'application/json', - }, params); - end - - def delete_document(collection_id:, document_id:) - path = '/database/collections/{collectionId}/documents/{documentId}' - .gsub('{collectionId}', collection_id) - .gsub('{documentId}', document_id) - - params = { - } - - return @client.call('delete', path, { - 'content-type' => 'application/json', - }, params); - end - - def get_collection_logs(collection_id:) - path = '/database/collections/{collectionId}/logs' - .gsub('{collectionId}', collection_id) - - params = { - } - - return @client.call('get', path, { - 'content-type' => 'application/json', - }, params); - end - - - protected - - private - end -end \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/lib/appwrite/services/functions.rb b/app/sdks/0.7.0/server-ruby/lib/appwrite/services/functions.rb deleted file mode 100644 index e6fb0c5f12..0000000000 --- a/app/sdks/0.7.0/server-ruby/lib/appwrite/services/functions.rb +++ /dev/null @@ -1,193 +0,0 @@ -module Appwrite - class Functions < Service - - def list(search: '', limit: 25, offset: 0, order_type: 'ASC') - path = '/functions' - - params = { - 'search': search, - 'limit': limit, - 'offset': offset, - 'orderType': order_type - } - - return @client.call('get', path, { - 'content-type' => 'application/json', - }, params); - end - - def create(name:, vars: [], events: [], schedule: '', timeout: 15) - path = '/functions' - - params = { - 'name': name, - 'vars': vars, - 'events': events, - 'schedule': schedule, - 'timeout': timeout - } - - return @client.call('post', path, { - 'content-type' => 'application/json', - }, params); - end - - def get(function_id:) - path = '/functions/{functionId}' - .gsub('{function_id}', function_id) - - params = { - } - - return @client.call('get', path, { - 'content-type' => 'application/json', - }, params); - end - - def update(function_id:, name:, vars: [], events: [], schedule: '', timeout: 15) - path = '/functions/{functionId}' - .gsub('{function_id}', function_id) - - params = { - 'name': name, - 'vars': vars, - 'events': events, - 'schedule': schedule, - 'timeout': timeout - } - - return @client.call('put', path, { - 'content-type' => 'application/json', - }, params); - end - - def delete(function_id:) - path = '/functions/{functionId}' - .gsub('{function_id}', function_id) - - params = { - } - - return @client.call('delete', path, { - 'content-type' => 'application/json', - }, params); - end - - def list_executions(function_id:, search: '', limit: 25, offset: 0, order_type: 'ASC') - path = '/functions/{functionId}/executions' - .gsub('{function_id}', function_id) - - params = { - 'search': search, - 'limit': limit, - 'offset': offset, - 'orderType': order_type - } - - return @client.call('get', path, { - 'content-type' => 'application/json', - }, params); - end - - def create_execution(function_id:, async: 1) - path = '/functions/{functionId}/executions' - .gsub('{function_id}', function_id) - - params = { - 'async': async - } - - return @client.call('post', path, { - 'content-type' => 'application/json', - }, params); - end - - def get_execution(function_id:, execution_id:) - path = '/functions/{functionId}/executions/{executionId}' - .gsub('{function_id}', function_id) - .gsub('{execution_id}', execution_id) - - params = { - } - - return @client.call('get', path, { - 'content-type' => 'application/json', - }, params); - end - - def update_tag(function_id:, tag:) - path = '/functions/{functionId}/tag' - .gsub('{function_id}', function_id) - - params = { - 'tag': tag - } - - return @client.call('patch', path, { - 'content-type' => 'application/json', - }, params); - end - - def list_tags(function_id:, search: '', limit: 25, offset: 0, order_type: 'ASC') - path = '/functions/{functionId}/tags' - .gsub('{function_id}', function_id) - - params = { - 'search': search, - 'limit': limit, - 'offset': offset, - 'orderType': order_type - } - - return @client.call('get', path, { - 'content-type' => 'application/json', - }, params); - end - - def create_tag(function_id:, env:, command:, code:) - path = '/functions/{functionId}/tags' - .gsub('{function_id}', function_id) - - params = { - 'env': env, - 'command': command, - 'code': code - } - - return @client.call('post', path, { - 'content-type' => 'application/json', - }, params); - end - - def get_tag(function_id:, tag_id:) - path = '/functions/{functionId}/tags/{tagId}' - .gsub('{function_id}', function_id) - .gsub('{tag_id}', tag_id) - - params = { - } - - return @client.call('get', path, { - 'content-type' => 'application/json', - }, params); - end - - def delete_tag(function_id:, tag_id:) - path = '/functions/{functionId}/tags/{tagId}' - .gsub('{function_id}', function_id) - .gsub('{tag_id}', tag_id) - - params = { - } - - return @client.call('delete', path, { - 'content-type' => 'application/json', - }, params); - end - - - protected - - private - end -end \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/lib/appwrite/services/health.rb b/app/sdks/0.7.0/server-ruby/lib/appwrite/services/health.rb deleted file mode 100644 index d2c6bc7b60..0000000000 --- a/app/sdks/0.7.0/server-ruby/lib/appwrite/services/health.rb +++ /dev/null @@ -1,141 +0,0 @@ -module Appwrite - class Health < Service - - def get() - path = '/health' - - params = { - } - - return @client.call('get', path, { - 'content-type' => 'application/json', - }, params); - end - - def get_anti_virus() - path = '/health/anti-virus' - - params = { - } - - return @client.call('get', path, { - 'content-type' => 'application/json', - }, params); - end - - def get_cache() - path = '/health/cache' - - params = { - } - - return @client.call('get', path, { - 'content-type' => 'application/json', - }, params); - end - - def get_d_b() - path = '/health/db' - - params = { - } - - return @client.call('get', path, { - 'content-type' => 'application/json', - }, params); - end - - def get_queue_certificates() - path = '/health/queue/certificates' - - params = { - } - - return @client.call('get', path, { - 'content-type' => 'application/json', - }, params); - end - - def get_queue_functions() - path = '/health/queue/functions' - - params = { - } - - return @client.call('get', path, { - 'content-type' => 'application/json', - }, params); - end - - def get_queue_logs() - path = '/health/queue/logs' - - params = { - } - - return @client.call('get', path, { - 'content-type' => 'application/json', - }, params); - end - - def get_queue_tasks() - path = '/health/queue/tasks' - - params = { - } - - return @client.call('get', path, { - 'content-type' => 'application/json', - }, params); - end - - def get_queue_usage() - path = '/health/queue/usage' - - params = { - } - - return @client.call('get', path, { - 'content-type' => 'application/json', - }, params); - end - - def get_queue_webhooks() - path = '/health/queue/webhooks' - - params = { - } - - return @client.call('get', path, { - 'content-type' => 'application/json', - }, params); - end - - def get_storage_local() - path = '/health/storage/local' - - params = { - } - - return @client.call('get', path, { - 'content-type' => 'application/json', - }, params); - end - - def get_time() - path = '/health/time' - - params = { - } - - return @client.call('get', path, { - 'content-type' => 'application/json', - }, params); - end - - - protected - - private - end -end \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/lib/appwrite/services/locale.rb b/app/sdks/0.7.0/server-ruby/lib/appwrite/services/locale.rb deleted file mode 100644 index 707c8b2f4a..0000000000 --- a/app/sdks/0.7.0/server-ruby/lib/appwrite/services/locale.rb +++ /dev/null @@ -1,75 +0,0 @@ -module Appwrite - class Locale < Service - - def get() - path = '/locale' - - params = { - } - - return @client.call('get', path, { - 'content-type' => 'application/json', - }, params); - end - - def get_continents() - path = '/locale/continents' - - params = { - } - - return @client.call('get', path, { - 'content-type' => 'application/json', - }, params); - end - - def get_countries() - path = '/locale/countries' - - params = { - } - - return @client.call('get', path, { - 'content-type' => 'application/json', - }, params); - end - - def get_countries_e_u() - path = '/locale/countries/eu' - - params = { - } - - return @client.call('get', path, { - 'content-type' => 'application/json', - }, params); - end - - def get_countries_phones() - path = '/locale/countries/phones' - - params = { - } - - return @client.call('get', path, { - 'content-type' => 'application/json', - }, params); - end - - def get_currencies() - path = '/locale/currencies' - - params = { - } - - return @client.call('get', path, { - 'content-type' => 'application/json', - }, params); - end - - - protected - - private - end -end \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/lib/appwrite/services/storage.rb b/app/sdks/0.7.0/server-ruby/lib/appwrite/services/storage.rb deleted file mode 100644 index 0e99a2b0d5..0000000000 --- a/app/sdks/0.7.0/server-ruby/lib/appwrite/services/storage.rb +++ /dev/null @@ -1,118 +0,0 @@ -module Appwrite - class Storage < Service - - def list_files(search: '', limit: 25, offset: 0, order_type: 'ASC') - path = '/storage/files' - - params = { - 'search': search, - 'limit': limit, - 'offset': offset, - 'orderType': order_type - } - - return @client.call('get', path, { - 'content-type' => 'application/json', - }, params); - end - - def create_file(file:, read:, write:) - path = '/storage/files' - - params = { - 'file': file, - 'read': read, - 'write': write - } - - return @client.call('post', path, { - 'content-type' => 'multipart/form-data', - }, params); - end - - def get_file(file_id:) - path = '/storage/files/{fileId}' - .gsub('{fileId}', file_id) - - params = { - } - - return @client.call('get', path, { - 'content-type' => 'application/json', - }, params); - end - - def update_file(file_id:, read:, write:) - path = '/storage/files/{fileId}' - .gsub('{fileId}', file_id) - - params = { - 'read': read, - 'write': write - } - - return @client.call('put', path, { - 'content-type' => 'application/json', - }, params); - end - - def delete_file(file_id:) - path = '/storage/files/{fileId}' - .gsub('{fileId}', file_id) - - params = { - } - - return @client.call('delete', path, { - 'content-type' => 'application/json', - }, params); - end - - def get_file_download(file_id:) - path = '/storage/files/{fileId}/download' - .gsub('{fileId}', file_id) - - params = { - } - - return @client.call('get', path, { - 'content-type' => 'application/json', - }, params); - end - - def get_file_preview(file_id:, width: 0, height: 0, quality: 100, background: '', output: '') - path = '/storage/files/{fileId}/preview' - .gsub('{fileId}', file_id) - - params = { - 'width': width, - 'height': height, - 'quality': quality, - 'background': background, - 'output': output - } - - return @client.call('get', path, { - 'content-type' => 'application/json', - }, params); - end - - def get_file_view(file_id:, as: '') - path = '/storage/files/{fileId}/view' - .gsub('{fileId}', file_id) - - params = { - 'as': as - } - - return @client.call('get', path, { - 'content-type' => 'application/json', - }, params); - end - - - protected - - private - end -end \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/lib/appwrite/services/teams.rb b/app/sdks/0.7.0/server-ruby/lib/appwrite/services/teams.rb deleted file mode 100644 index 0e677476d2..0000000000 --- a/app/sdks/0.7.0/server-ruby/lib/appwrite/services/teams.rb +++ /dev/null @@ -1,115 +0,0 @@ -module Appwrite - class Teams < Service - - def list(search: '', limit: 25, offset: 0, order_type: 'ASC') - path = '/teams' - - params = { - 'search': search, - 'limit': limit, - 'offset': offset, - 'orderType': order_type - } - - return @client.call('get', path, { - 'content-type' => 'application/json', - }, params); - end - - def create(name:, roles: ["owner"]) - path = '/teams' - - params = { - 'name': name, - 'roles': roles - } - - return @client.call('post', path, { - 'content-type' => 'application/json', - }, params); - end - - def get(team_id:) - path = '/teams/{teamId}' - .gsub('{teamId}', team_id) - - params = { - } - - return @client.call('get', path, { - 'content-type' => 'application/json', - }, params); - end - - def update(team_id:, name:) - path = '/teams/{teamId}' - .gsub('{teamId}', team_id) - - params = { - 'name': name - } - - return @client.call('put', path, { - 'content-type' => 'application/json', - }, params); - end - - def delete(team_id:) - path = '/teams/{teamId}' - .gsub('{teamId}', team_id) - - params = { - } - - return @client.call('delete', path, { - 'content-type' => 'application/json', - }, params); - end - - def get_memberships(team_id:) - path = '/teams/{teamId}/memberships' - .gsub('{teamId}', team_id) - - params = { - } - - return @client.call('get', path, { - 'content-type' => 'application/json', - }, params); - end - - def create_membership(team_id:, email:, roles:, url:, name: '') - path = '/teams/{teamId}/memberships' - .gsub('{teamId}', team_id) - - params = { - 'email': email, - 'name': name, - 'roles': roles, - 'url': url - } - - return @client.call('post', path, { - 'content-type' => 'application/json', - }, params); - end - - def delete_membership(team_id:, invite_id:) - path = '/teams/{teamId}/memberships/{inviteId}' - .gsub('{teamId}', team_id) - .gsub('{inviteId}', invite_id) - - params = { - } - - return @client.call('delete', path, { - 'content-type' => 'application/json', - }, params); - end - - - protected - - private - end -end \ No newline at end of file diff --git a/app/sdks/0.7.0/server-ruby/lib/appwrite/services/users.rb b/app/sdks/0.7.0/server-ruby/lib/appwrite/services/users.rb deleted file mode 100644 index f75434bd1a..0000000000 --- a/app/sdks/0.7.0/server-ruby/lib/appwrite/services/users.rb +++ /dev/null @@ -1,137 +0,0 @@ -module Appwrite - class Users < Service - - def list(search: '', limit: 25, offset: 0, order_type: 'ASC') - path = '/users' - - params = { - 'search': search, - 'limit': limit, - 'offset': offset, - 'orderType': order_type - } - - return @client.call('get', path, { - 'content-type' => 'application/json', - }, params); - end - - def create(email:, password:, name: '') - path = '/users' - - params = { - 'email': email, - 'password': password, - 'name': name - } - - return @client.call('post', path, { - 'content-type' => 'application/json', - }, params); - end - - def get(user_id:) - path = '/users/{userId}' - .gsub('{userId}', user_id) - - params = { - } - - return @client.call('get', path, { - 'content-type' => 'application/json', - }, params); - end - - def get_logs(user_id:) - path = '/users/{userId}/logs' - .gsub('{userId}', user_id) - - params = { - } - - return @client.call('get', path, { - 'content-type' => 'application/json', - }, params); - end - - def get_prefs(user_id:) - path = '/users/{userId}/prefs' - .gsub('{userId}', user_id) - - params = { - } - - return @client.call('get', path, { - 'content-type' => 'application/json', - }, params); - end - - def update_prefs(user_id:, prefs:) - path = '/users/{userId}/prefs' - .gsub('{userId}', user_id) - - params = { - 'prefs': prefs - } - - return @client.call('patch', path, { - 'content-type' => 'application/json', - }, params); - end - - def get_sessions(user_id:) - path = '/users/{userId}/sessions' - .gsub('{userId}', user_id) - - params = { - } - - return @client.call('get', path, { - 'content-type' => 'application/json', - }, params); - end - - def delete_sessions(user_id:) - path = '/users/{userId}/sessions' - .gsub('{userId}', user_id) - - params = { - } - - return @client.call('delete', path, { - 'content-type' => 'application/json', - }, params); - end - - def delete_session(user_id:, session_id:) - path = '/users/{userId}/sessions/{sessionId}' - .gsub('{userId}', user_id) - .gsub('{sessionId}', session_id) - - params = { - } - - return @client.call('delete', path, { - 'content-type' => 'application/json', - }, params); - end - - def update_status(user_id:, status:) - path = '/users/{userId}/status' - .gsub('{userId}', user_id) - - params = { - 'status': status - } - - return @client.call('patch', path, { - 'content-type' => 'application/json', - }, params); - end - - - protected - - private - end -end \ No newline at end of file